From d70586b00b9530ab99ab4b8f003e9a54793e419f Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Thu, 09 Jan 2014 00:13:14 +0000
Subject: [PATCH] Reorganize opendj-config packaging, removing all references to opends and renaming admin to config
---
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccessLogFilteringCriteriaConfiguration.xml | 475
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DseeCompatAccessControlHandlerConfiguration.xml | 82
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SNMPConnectionHandlerConfiguration.xml | 347
opendj-config/src/test/java/org/forgerock/opendj/config/AbstractManagedObjectDefinitionTest.java | 211
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/JMXAlertHandlerConfiguration.xml | 52
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicySubentryVirtualAttributeConfiguration.xml | 69
opendj-config/src/main/java/org/forgerock/opendj/config/conditions/NOTCondition.java | 78
opendj-config/src/main/resources/stylesheets/messagesMO.xsl | 4
opendj-config/src/main/resources/stylesheets/property-types/size.xsl | 2
opendj-config/src/main/java/org/forgerock/opendj/config/conditions/ANDCondition.java | 92
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/IdentityMapperConfiguration.xml | 89
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FractionalLDIFImportPluginConfiguration.xml | 49
opendj-config/src/main/java-templates/org/forgerock/opendj/server/util/DynamicConstants.java | 182
opendj-config/src/main/resources/stylesheets/manifestMO.xsl | 4
opendj-config/src/test/resources/org/forgerock/opendj/config/TestChildCfgDefn.properties | 0
opendj-config/src/main/java/org/forgerock/opendj/config/PropertyValueVisitor.java | 296
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeValuePasswordValidatorConfiguration.xml | 145
opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinitionUsageBuilder.java | 341
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MonitorBackendConfiguration.xml | 59
opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPNameBuilder.java | 214
opendj-config/src/main/java/org/forgerock/opendj/config/client/ManagementContext.java | 414
opendj-config/src/main/java/org/forgerock/opendj/config/client/AuthenticationException.java | 82
opendj-config/src/test/resources/org/forgerock/opendj/config/TestParentCfgDefn.properties | 0
opendj-config/src/main/java/org/forgerock/opendj/config/PropertyIsReadOnlyException.java | 50
opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectDefinitionI18NResource.java | 291
opendj-config/src/main/java/org/forgerock/opendj/config/conditions/package-info.java | 33
opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigAddListener.java | 63
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordGeneratorConfiguration.xml | 90
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/HTTPAccessLogPublisherConfiguration.xml | 58
opendj-config/src/main/java/org/forgerock/opendj/config/client/ConcurrentModificationException.java | 84
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GSSAPISASLMechanismHandlerConfiguration.xml | 251
opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigExceptionFactory.java | 124
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/HasSubordinatesVirtualAttributeConfiguration.xml | 67
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PBKDF2PasswordStorageSchemeConfiguration.xml | 77
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReplicationSynchronizationProviderConfiguration.xml | 126
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WhoAmIExtendedOperationHandlerConfiguration.xml | 55
opendj-config/src/main/java/org/forgerock/opendj/config/DefinitionDecodingException.java | 118
opendj-config/src/test/java/org/forgerock/opendj/config/server/DNBuilderTest.java | 114
opendj-config/src/main/java/org/forgerock/opendj/config/DNPropertyDefinition.java | 192
opendj-config/src/main/java/org/forgerock/opendj/config/IllegalPropertyValueException.java | 90
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BlindTrustManagerProviderConfiguration.xml | 57
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedAuditLogPublisherConfiguration.xml | 287
opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/MockLDAPConnection.java | 388
opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPConnection.java | 125
opendj-config/src/test/resources/org/forgerock/opendj/config/TestChildConfiguration.xml | 160
opendj-config/src/main/resources/stylesheets/property-types/ip-address.xsl | 2
opendj-config/pom.xml | 9
opendj-config/src/test/java/org/forgerock/opendj/config/SizePropertyDefinitionTest.java | 263
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DebugTargetConfiguration.xml | 248
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MemoryBackendConfiguration.xml | 63
opendj-config/src/main/resources/stylesheets/property-types/enumeration.xsl | 6
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubjectAttributeToUserAttributeCertificateMapperConfiguration.xml | 103
opendj-config/src/test/java/org/forgerock/opendj/config/AdminTestCase.java | 125
opendj-config/src/main/java/org/forgerock/opendj/config/ACIPropertyDefinition.java | 133
opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/AggregationClientTest.java | 338
opendj-config/src/main/resources/stylesheets/property-types/oid.xsl | 2
opendj-config/src/main/java/org/forgerock/opendj/config/DefaultBehaviorProvider.java | 92
opendj-config/src/main/resources/stylesheets/admin-preprocessor.xsd | 8
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CollectiveAttributeSubentriesVirtualAttributeConfiguration.xml | 69
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalDBBackendConfiguration.xml | 1077
opendj-config/src/main/java/org/forgerock/opendj/config/AbsoluteInheritedDefaultBehaviorProvider.java | 112
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReferentialIntegrityPluginConfiguration.xml | 263
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TelephoneNumberAttributeSyntaxConfiguration.xml | 70
opendj-config/src/main/java/org/forgerock/opendj/config/DefaultBehaviorProviderVisitor.java | 104
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/UserDefinedVirtualAttributeConfiguration.xml | 72
opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigurationDeleteListener.java | 67
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccessLogPublisherConfiguration.xml | 146
opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectPath.java | 1186 +
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SynchronizationProviderConfiguration.xml | 97
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedMD5PasswordStorageSchemeConfiguration.xml | 67
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileCountLogRetentionPolicyConfiguration.xml | 64
opendj-config/src/main/resources/stylesheets/property-types/ip-address-mask.xsl | 2
opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/DeleteSubtreeMockLDAPConnection.java | 70
opendj-config/src/main/java/org/forgerock/opendj/config/server/ConstraintViolationException.java | 150
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/IsMemberOfVirtualAttributeConfiguration.xml | 68
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ErrorLogAccountStatusNotificationHandlerConfiguration.xml | 147
opendj-config/src/test/java/org/forgerock/opendj/config/EnumPropertyDefinitionTest.java | 143
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExactMatchIdentityMapperConfiguration.xml | 111
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SMTPAlertHandlerConfiguration.xml | 129
opendj-config/src/main/java/org/forgerock/opendj/config/Reference.java | 204
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/Base64PasswordStorageSchemeConfiguration.xml | 63
opendj-config/src/test/java/org/forgerock/opendj/config/DNPropertyDefinitionTest.java | 131
opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/CreateEntryMockLDAPConnection.java | 111
opendj-config/src/main/java/org/forgerock/opendj/config/conditions/IsPresentCondition.java | 86
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CancelExtendedOperationHandlerConfiguration.xml | 59
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedDebugLogPublisherConfiguration.xml | 270
opendj-config/src/main/resources/stylesheets/property-types/aggregation.xsl | 8
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NullBackendConfiguration.xml | 74
opendj-config/src/test/java/org/forgerock/opendj/config/SizeUnitTest.java | 278
opendj-config/src/test/java/org/forgerock/opendj/config/StringPropertyDefinitionTest.java | 80
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RequestFilteringQOSPolicyConfiguration.xml | 207
opendj-config/src/main/java/org/forgerock/opendj/config/SetRelationDefinition.java | 222
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/VirtualStaticGroupImplementationConfiguration.xml | 60
opendj-config/src/main/java/org/forgerock/opendj/config/AdministratorAction.java | 166
opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectAlreadyExistsException.java | 47
opendj-config/src/main/java/org/forgerock/opendj/config/Configuration.java | 51
opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/ModifyEntryMockLDAPConnection.java | 115
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReplicationServerConfiguration.xml | 330
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeSyntaxConfiguration.xml | 82
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SizeLimitLogRetentionPolicyConfiguration.xml | 64
opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPManagementContext.java | 87
opendj-config/src/main/java/org/forgerock/opendj/config/PropertyIsSingleValuedException.java | 50
opendj-config/src/main/java/org/forgerock/opendj/config/RelationDefinitionVisitor.java | 118
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LogPublisherConfiguration.xml | 78
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ConnectionHandlerConfiguration.xml | 88
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WorkQueueConfiguration.xml | 77
opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectDeleteListenerAdaptor.java | 82
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileSystemEntryCacheConfiguration.xml | 303
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CertificateAttributeSyntaxConfiguration.xml | 74
opendj-config/src/test/java/org/forgerock/opendj/config/ConfigurationMockTest.java | 10
opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectPathSerializer.java | 114
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RepeatedCharactersPasswordValidatorConfiguration.xml | 100
opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigException.java | 76
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/Package.xml | 577
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DynamicGroupImplementationConfiguration.xml | 51
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PluginRootConfiguration.xml | 1669 +
opendj-config/src/main/java/org/forgerock/opendj/config/Tag.java | 175
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubschemaSubentryVirtualAttributeConfiguration.xml | 68
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AuthenticationPolicyConfiguration.xml | 66
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StaticGroupImplementationConfiguration.xml | 56
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StructuralObjectClassVirtualAttributeConfiguration.xml | 68
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ParallelWorkQueueConfiguration.xml | 90
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LengthBasedPasswordValidatorConfiguration.xml | 113
opendj-config/src/main/java/org/forgerock/opendj/config/EnumPropertyDefinition.java | 227
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CertificateMapperConfiguration.xml | 87
opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigurationChangeListener.java | 67
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TimeLimitLogRotationPolicyConfiguration.xml | 63
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA512PasswordStorageSchemeConfiguration.xml | 61
opendj-config/src/test/java/org/forgerock/opendj/config/MockLDAPProfile.java | 136
opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/MockConstraint.java | 131
opendj-config/src/main/resources/stylesheets/property-types/duration.xsl | 2
opendj-config/src/test/java/org/forgerock/opendj/config/AttributeTypePropertyDefinitionTest.java | 91
opendj-config/src/main/java/org/forgerock/opendj/config/client/ClientConstraintHandler.java | 133
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AnonymousSASLMechanismHandlerConfiguration.xml | 61
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedErrorLogPublisherConfiguration.xml | 270
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NetworkGroupConfiguration.xml | 300
opendj-config/src/main/java/org/forgerock/opendj/config/AdminException.java | 63
opendj-config/src/main/java/org/forgerock/opendj/config/LDAPProfile.java | 361
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CountryStringAttributeSyntaxConfiguration.xml | 75
opendj-config/src/main/java/org/forgerock/opendj/config/DefinedDefaultBehaviorProvider.java | 79
opendj-config/src/test/java/org/forgerock/opendj/config/AggregationPropertyDefinitionTest.java | 80
opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigChangeListenerAdaptor.java | 428
opendj-config/src/main/java/org/forgerock/opendj/config/server/DelayedConfigAddListener.java | 172
opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/PropertySet.java | 327
opendj-config/src/main/resources/stylesheets/serverMO.xsl | 14
opendj-config/src/main/java/org/forgerock/opendj/config/AdminRuntimeException.java | 78
opendj-config/src/main/java/org/forgerock/opendj/config/client/AdminSecurityException.java | 64
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NumSubordinatesVirtualAttributeConfiguration.xml | 67
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MonitorProviderConfiguration.xml | 84
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA1PasswordStorageSchemeConfiguration.xml | 59
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SystemInfoMonitorProviderConfiguration.xml | 54
opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerConstraintHandler.java | 169
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeCleanupPluginConfiguration.xml | 125
opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagementContext.java | 845
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDIFConnectionHandlerConfiguration.xml | 103
opendj-config/src/main/resources/stylesheets/package-info.xsl | 2
opendj-config/src/main/java/org/forgerock/opendj/config/server/AbstractConfigListenerAdaptor.java | 65
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SchemaBackendConfiguration.xml | 121
opendj-config/src/main/java/org/forgerock/opendj/config/OptionalRelationDefinition.java | 155
opendj-config/src/main/java/org/forgerock/opendj/config/conditions/Conditions.java | 191
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TrustManagerProviderConfiguration.xml | 83
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SASLMechanismHandlerConfiguration.xml | 90
opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigChangeListener.java | 64
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SizeLimitLogRotationPolicyConfiguration.xml | 64
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootDNUserConfiguration.xml | 73
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AlertHandlerConfiguration.xml | 145
opendj-config/src/main/java/org/forgerock/opendj/config/IPAddressPropertyDefinition.java | 152
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AdministrationConnectorConfiguration.xml | 228
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/UniqueCharactersPasswordValidatorConfiguration.xml | 96
opendj-config/src/test/java/org/forgerock/opendj/config/ManagedObjectDefinitionI18NResourceTest.java | 56
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TripleDESPasswordStorageSchemeConfiguration.xml | 58
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WorkflowConfiguration.xml | 106
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FixedTimeLogRotationPolicyConfiguration.xml | 72
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicyConfiguration.xml | 941
opendj-config/src/main/java/org/forgerock/opendj/config/AbstractManagedObjectDefinition.java | 973
opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/LDAPClientTest.java | 944
opendj-config/src/main/java/org/forgerock/opendj/config/StringPropertyDefinition.java | 282
opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObject.java | 1440 +
opendj-config/src/main/java/org/forgerock/opendj/config/PropertyException.java | 87
opendj-config/src/main/java/org/forgerock/opendj/config/DefaultBehaviorException.java | 61
opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigDeleteListener.java | 63
opendj-config/src/main/resources/stylesheets/property-types.xsl | 6
opendj-config/src/test/java/org/forgerock/opendj/config/ManagedObjectPathTest.java | 235
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RC4PasswordStorageSchemeConfiguration.xml | 58
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalDBVLVIndexConfiguration.xml | 231
opendj-config/src/test/java/org/forgerock/opendj/config/ConfigurationMock.java | 31
opendj-config/src/main/java/org/forgerock/opendj/config/UnknownPropertyDefinitionException.java | 65
opendj-config/src/test/java/org/forgerock/opendj/config/server/AggregationServerTest.java | 642
opendj-config/src/main/java/org/forgerock/opendj/config/client/AdminClientException.java | 68
opendj-config/src/main/java/org/forgerock/opendj/config/SizeUnit.java | 352
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WorkflowElementConfiguration.xml | 92
opendj-config/src/main/java/org/forgerock/opendj/config/DurationUnit.java | 349
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootConfiguration.xml | 487
opendj-config/src/test/java/org/forgerock/opendj/config/TestParentCfgClient.java | 306
opendj-config/src/main/java/org/forgerock/opendj/config/server/DNBuilder.java | 72
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/KeyManagerProviderConfiguration.xml | 91
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDIFBackendConfiguration.xml | 101
opendj-config/src/main/resources/stylesheets/ldapMOProfile.xsl | 4
opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinitionsOptions.java | 137
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BackupBackendConfiguration.xml | 84
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ErrorLogPublisherConfiguration.xml | 194
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GlobalConfiguration.xml | 925
opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectOption.java | 46
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/HTTPConnectionHandlerConfiguration.xml | 573
opendj-config/src/main/java/org/forgerock/opendj/config/GenericConstraint.java | 190
opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectChangeListenerAdaptor.java | 84
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryCacheConfiguration.xml | 101
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ResourceLimitsQOSPolicyConfiguration.xml | 274
opendj-config/src/main/java/org/forgerock/opendj/config/PropertyProvider.java | 80
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ChangeNumberControlPluginConfiguration.xml | 74
opendj-config/src/main/java/org/forgerock/opendj/config/SizePropertyDefinition.java | 349
opendj-config/src/main/resources/stylesheets/admin-ldap.xsd | 4
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryUUIDVirtualAttributeConfiguration.xml | 74
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExtensionConfiguration.xml | 89
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FreeDiskSpaceLogRetentionPolicyConfiguration.xml | 67
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA256PasswordStorageSchemeConfiguration.xml | 61
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryCacheMonitorProviderConfiguration.xml | 54
opendj-config/src/main/resources/stylesheets/property-types/integer.xsl | 2
opendj-config/src/main/java/org/forgerock/opendj/config/ClassLoaderProvider.java | 730
opendj-config/src/main/java/org/forgerock/opendj/config/DefaultManagedObject.java | 173
opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigurationRepository.java | 178
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GetConnectionIdExtendedOperationHandlerConfiguration.xml | 56
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ProfilerPluginConfiguration.xml | 190
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TrustStoreBackendConfiguration.xml | 122
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NetworkGroupPluginConfiguration.xml | 83
opendj-config/src/test/java/org/forgerock/opendj/config/TestCfg.java | 203
opendj-config/src/main/java/org/forgerock/opendj/config/BooleanPropertyDefinition.java | 146
opendj-config/src/main/java/org/forgerock/opendj/config/package-info.java | 34
opendj-config/src/test/java/org/forgerock/opendj/config/server/MockConstraint.java | 147
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RandomPasswordGeneratorConfiguration.xml | 118
opendj-config/src/main/resources/stylesheets/property-types/dn.xsl | 2
opendj-config/src/main/java/org/forgerock/opendj/config/Constraint.java | 103
opendj-config/src/main/java/org/forgerock/opendj/config/PropertyOption.java | 67
opendj-config/src/test/java/org/forgerock/opendj/config/RelativeInheritedDefaultBehaviorProviderTest.java | 103
opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPDriver.java | 572
opendj-config/src/main/resources/stylesheets/admin.xsd | 14
opendj-config/src/test/java/org/forgerock/opendj/config/server/DefaultBehaviorTest.java | 429
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StackTraceMonitorProviderConfiguration.xml | 54
opendj-config/src/main/java/org/forgerock/opendj/config/client/ManagedObject.java | 738
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DebugLogPublisherConfiguration.xml | 252
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootDNConfiguration.xml | 228
opendj-config/src/test/java/org/forgerock/opendj/config/TestParentCfg.java | 216
opendj-config/src/main/java/org/forgerock/opendj/config/client/ManagedObjectDecodingException.java | 125
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccessControlHandlerConfiguration.xml | 98
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/VirtualAttributeConfiguration.xml | 275
opendj-config/src/main/resources/stylesheets/metaMO.xsl | 94
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AESPasswordStorageSchemeConfiguration.xml | 58
opendj-config/src/main/java/org/forgerock/opendj/config/DurationPropertyDefinition.java | 526
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExternalChangelogDomainConfiguration.xml | 112
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TaskBackendConfiguration.xml | 132
opendj-config/src/main/java/org/forgerock/opendj/config/AliasDefaultBehaviorProvider.java | 99
opendj-config/src/main/resources/stylesheets/property-types/java-class.xsl | 2
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExternalSASLMechanismHandlerConfiguration.xml | 138
opendj-config/src/main/resources/stylesheets/admin-cli.xsd | 8
opendj-config/src/main/java/org/forgerock/opendj/config/DefinitionResolver.java | 66
opendj-config/src/main/java/org/forgerock/opendj/config/IntegerPropertyDefinition.java | 337
opendj-config/src/test/java/org/forgerock/opendj/config/DurationUnitTest.java | 90
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MemberVirtualAttributeConfiguration.xml | 105
opendj-config-maven-plugin/src/main/java/org/forgerock/opendj/maven/OpendjConfigMojo.java | 33
opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectAddListenerAdaptor.java | 82
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GoverningStructureRuleVirtualAttributeConfiguration.xml | 68
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicyImportPluginConfiguration.xml | 158
opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectNotFoundException.java | 56
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeTypeDescriptionAttributeSyntaxConfiguration.xml | 84
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReplicationDomainConfiguration.xml | 548
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CharacterSetPasswordValidatorConfiguration.xml | 198
opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPManagedObject.java | 330
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GetSymmetricKeyExtendedOperationHandlerConfiguration.xml | 57
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SMTPAccountStatusNotificationHandlerConfiguration.xml | 208
opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectDefinitionResource.java | 130
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordModifyExtendedOperationHandlerConfiguration.xml | 96
opendj-config/src/main/java/org/forgerock/opendj/config/conditions/ORCondition.java | 92
opendj-config/src/test/java/org/forgerock/opendj/config/TestTopCfgDefnTest.java | 108
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/VersionMonitorProviderConfiguration.xml | 53
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/JPEGAttributeSyntaxConfiguration.xml | 70
opendj-config/src/test/java/org/forgerock/opendj/config/TestChildCfgDefn.java | 492
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RegularExpressionIdentityMapperConfiguration.xml | 189
opendj-config/src/main/java/org/forgerock/opendj/config/ConfigurationClient.java | 78
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDAPPassThroughAuthenticationPolicyConfiguration.xml | 663
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TraditionalWorkQueueConfiguration.xml | 114
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BackendConfiguration.xml | 171
opendj-config/src/main/java/org/forgerock/opendj/config/client/OperationRejectedException.java | 208
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryUUIDPluginConfiguration.xml | 78
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedTrustManagerProviderConfiguration.xml | 126
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootDSEBackendConfiguration.xml | 87
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LastModPluginConfiguration.xml | 69
opendj-config/src/main/java/org/forgerock/opendj/config/OperationsException.java | 63
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BlowfishPasswordStorageSchemeConfiguration.xml | 58
opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigurationAddListener.java | 66
opendj-config/src/main/java/org/forgerock/opendj/config/server/package-info.java | 38
opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/package-info.java | 37
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExtendedOperationHandlerConfiguration.xml | 85
opendj-config/src/test/java/org/forgerock/opendj/config/TestChildCfgClient.java | 196
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA384PasswordStorageSchemeConfiguration.xml | 61
opendj-config/src/main/resources/stylesheets/property-types/password.xsl | 2
opendj-config/src/main/resources/stylesheets/property-types/string.xsl | 2
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntityTagVirtualAttributeConfiguration.xml | 124
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedKeyManagerProviderConfiguration.xml | 127
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicyStateExtendedOperationHandlerConfiguration.xml | 57
opendj-config/src/main/java/org/forgerock/opendj/config/conditions/Condition.java | 75
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/JMXConnectionHandlerConfiguration.xml | 178
opendj-config/src/main/resources/stylesheets/property-types/boolean.xsl | 2
opendj-config/src/main/java/org/forgerock/opendj/config/UndefinedDefaultBehaviorProvider.java | 53
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordValidatorConfiguration.xml | 95
opendj-config/src/main/java/org/forgerock/opendj/config/InstantiableRelationDefinition.java | 260
opendj-config/src/main/java/org/forgerock/opendj/config/client/AuthenticationNotSupportedException.java | 83
opendj-config/src/test/java/org/forgerock/opendj/config/ValidateConfigDefinitionsTest.java | 222
opendj-config/src/test/java/org/forgerock/opendj/config/server/ConstraintTest.java | 319
opendj-config/src/main/java/org/forgerock/opendj/config/IPAddressMaskPropertyDefinition.java | 133
opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinition.java | 585
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryDNVirtualAttributeConfiguration.xml | 74
opendj-config/src/main/resources/stylesheets/clientMO.xsl | 26
opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/package-info.java | 34
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ConfigFileHandlerBackendConfiguration.xml | 61
opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigDeleteListenerAdaptor.java | 269
opendj-config/src/main/java/org/forgerock/opendj/config/client/IllegalManagedObjectNameException.java | 126
opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectAddListener.java | 68
opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/package-info.java | 44
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordStorageSchemeConfiguration.xml | 88
opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectDefinition.java | 88
opendj-config/src/test/java/org/forgerock/opendj/config/IntegerPropertyDefinitionTest.java | 244
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/QOSPolicyConfiguration.xml | 68
opendj-config/src/test/java/org/forgerock/opendj/config/LDAPProfileTest.java | 47
opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigChangeResult.java | 191
opendj-config/src/main/java/org/forgerock/opendj/config/TopCfgDefn.java | 64
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CollationMatchingRuleConfiguration.xml | 125
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DirectoryStringAttributeSyntaxConfiguration.xml | 77
opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectDecodingException.java | 128
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PlainSASLMechanismHandlerConfiguration.xml | 94
opendj-config/src/main/resources/stylesheets/property-types/extensible-matching-rule-type.xsl | 2
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SHA1PasswordStorageSchemeConfiguration.xml | 60
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ClearPasswordStorageSchemeConfiguration.xml | 61
opendj-config/src/main/resources/stylesheets/property-types/attribute-type.xsl | 2
opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/AbstractManagedObject.java | 865
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StartTLSExtendedOperationHandlerConfiguration.xml | 55
opendj-config/src/main/java/org/opends/server/types/AddressMask.java | 2
opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectChangeListener.java | 68
opendj-config/src/main/java/org/forgerock/opendj/config/DecodingException.java | 51
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MD5PasswordStorageSchemeConfiguration.xml | 68
opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/Driver.java | 671
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SevenBitCleanPluginConfiguration.xml | 119
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PluginConfiguration.xml | 410
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ClientConnectionMonitorProviderConfiguration.xml | 54
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CryptoManagerConfiguration.xml | 311
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/UniqueAttributePluginConfiguration.xml | 108
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SambaPasswordPluginConfiguration.xml | 119
opendj-config/src/main/java/org/forgerock/opendj/config/SingletonRelationDefinition.java | 155
opendj-config/src/main/java/org/forgerock/opendj/config/PropertyIsMandatoryException.java | 50
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GroupImplementationConfiguration.xml | 87
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDAPConnectionHandlerConfiguration.xml | 606
opendj-config/src/main/java/org/forgerock/opendj/config/PropertyNotFoundException.java | 68
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MatchingRuleConfiguration.xml | 85
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SimilarityBasedPasswordValidatorConfiguration.xml | 83
opendj-config/src/main/java/org/forgerock/opendj/config/RelationDefinition.java | 361
opendj-config/src/main/java/org/forgerock/opendj/config/RelationOption.java | 45
opendj-config/src/main/java/org/forgerock/opendj/config/AggregationPropertyDefinition.java | 1033
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CryptPasswordStorageSchemeConfiguration.xml | 119
opendj-config/src/test/java/org/forgerock/opendj/config/DurationPropertyDefinitionTest.java | 364
opendj-config/src/main/resources/stylesheets/cliMOProfile.xsl | 4
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedHTTPAccessLogPublisherConfiguration.xml | 360
opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/Property.java | 117
opendj-config/src/main/java/org/forgerock/opendj/config/ClassPropertyDefinition.java | 273
opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectDeleteListener.java | 68
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalDBIndexConfiguration.xml | 231
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalBackendWorkflowElementConfiguration.xml | 67
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LogRetentionPolicyConfiguration.xml | 66
opendj-config/src/test/java/org/forgerock/opendj/config/BooleanPropertyDefinitionTest.java | 87
opendj-config/src/test/resources/org/forgerock/opendj/config/TestParentConfiguration.xml | 133
opendj-config/src/main/java/org/forgerock/opendj/config/RelativeInheritedDefaultBehaviorProvider.java | 130
opendj-config/src/test/java/org/forgerock/opendj/config/TestChildCfg.java | 125
opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigAddListenerAdaptor.java | 252
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccountStatusNotificationHandlerConfiguration.xml | 89
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CramMD5SASLMechanismHandlerConfiguration.xml | 99
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FIFOEntryCacheConfiguration.xml | 132
opendj-config/src/main/java/org/forgerock/opendj/config/client/MissingMandatoryPropertiesException.java | 150
opendj-config/src/main/java/org/forgerock/opendj/config/client/package-info.java | 34
opendj-config/src/test/java/org/forgerock/opendj/config/server/AdminTestCaseUtils.java | 120
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LogRotationPolicyConfiguration.xml | 66
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedAccessLogPublisherConfiguration.xml | 365
opendj-config/src/main/java/org/forgerock/opendj/config/conditions/ContainsCondition.java | 175
opendj-config/src/main/resources/stylesheets/conditions.xsl | 2
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordExpirationTimeVirtualAttributeConfiguration.xml | 68
opendj-config/src/test/java/org/forgerock/opendj/config/server/ListenerTest.java | 292
opendj-config/src/test/java/org/forgerock/opendj/config/TestParentCfgDefn.java | 585
opendj-config/src/main/resources/stylesheets/property-types/aci.xsl | 2
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DictionaryPasswordValidatorConfiguration.xml | 197
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MemoryUsageMonitorProviderConfiguration.xml | 53
opendj-config/src/main/resources/stylesheets/preprocessor.xsl | 10
opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinitionVisitor.java | 262
opendj-config/src/main/java/org/forgerock/opendj/config/IllegalPropertyValueStringException.java | 90
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SoftReferenceEntryCacheConfiguration.xml | 77
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PKCS11KeyManagerProviderConfiguration.xml | 62
/dev/null | 133
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FingerprintCertificateMapperConfiguration.xml | 122
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDAPAttributeDescriptionListPluginConfiguration.xml | 75
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubjectDNToUserAttributeCertificateMapperConfiguration.xml | 92
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubjectEqualsDNCertificateMapperConfiguration.xml | 54
opendj-config/src/main/java/org/forgerock/opendj/config/AttributeTypePropertyDefinition.java | 147
opendj-config/src/test/java/org/forgerock/opendj/config/ClassPropertyDefinitionTest.java | 146
opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DigestMD5SASLMechanismHandlerConfiguration.xml | 210
400 files changed, 65,145 insertions(+), 296 deletions(-)
diff --git a/opendj-config-maven-plugin/src/main/java/org/forgerock/opendj/maven/OpendjConfigMojo.java b/opendj-config-maven-plugin/src/main/java/org/forgerock/opendj/maven/OpendjConfigMojo.java
index 6f1116f..c4c4e81 100644
--- a/opendj-config-maven-plugin/src/main/java/org/forgerock/opendj/maven/OpendjConfigMojo.java
+++ b/opendj-config-maven-plugin/src/main/java/org/forgerock/opendj/maven/OpendjConfigMojo.java
@@ -50,15 +50,15 @@
public class OpendjConfigMojo extends AbstractBuildMojo {
/**
- * Package path in which artefacts are generated.
+ * Package name for which artifacts are generated.
* <p>
* This relative path is used to locate xml definition files and to locate
- * generated artefacts.
+ * generated artifacts.
*
- * @parameter default-value="org/forgerock/opendj/admin"
+ * @parameter
* @required
*/
- private String packagePath;
+ private String packageName;
/**
* Root directory where definitions of configuration as xml files are
@@ -81,7 +81,7 @@
/**
* Root directory containing generated sources for configuration.
*
- * @parameter default-value="${project.build.directory}/generated-sources/admin"
+ * @parameter default-value="${project.build.directory}/generated-sources/config"
* @required
*/
private String generatedSourcesRootDir;
@@ -90,7 +90,7 @@
* Temporary directory containing generated manifests.
* <p>
* There is one manifest file generated by component. It is the
- * responsability of project that use this plugin to concatenate all
+ * responsibility of project that use this plugin to concatenate all
* generated files into a single file.
*
* @parameter default-value="${project.build.directory}/tmp"
@@ -101,7 +101,7 @@
/**
* Root directory containing generated messages for configuration.
*
- * @parameter default-value="${basedir}/src/main/resources/admin/messages"
+ * @parameter default-value="${basedir}/src/main/resources/config/messages"
* @required
*/
private String generatedMessagesRootDir;
@@ -109,20 +109,27 @@
/**
* Root directory containing generated profiles for configuration.
*
- * @parameter default-value="${project.build.outputDirectory}/admin/profiles"
+ * @parameter default-value="${project.build.outputDirectory}/config/profiles"
* @required
*/
private String generatedProfilesRootDir;
/**
- * Returns the package path in which artefacts are generated.
- * <p>
- * The package path is a relative path.
+ * Returns the package name in which artifacts are generated.
+ *
+ * @return the package name
+ */
+ public final String getPackageName() {
+ return packageName;
+ }
+
+ /**
+ * Returns the package path in which artifacts are generated.
*
* @return the package path
*/
public final String getPackagePath() {
- return packagePath;
+ return packageName.replace('.', '/');
}
/**
@@ -141,7 +148,7 @@
* @return the directory containing xml configuration files
*/
public final File getXmlDefinitionsDirectory() {
- return new File(getXmlDefinitionsRootDirectory(), packagePath);
+ return new File(getXmlDefinitionsRootDirectory(), getPackagePath());
}
/**
diff --git a/opendj-config/pom.xml b/opendj-config/pom.xml
index 7b07b7d..bd917d4 100644
--- a/opendj-config/pom.xml
+++ b/opendj-config/pom.xml
@@ -99,7 +99,7 @@
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/java</source>
- <source>${project.build.directory}/generated-sources/admin</source>
+ <source>${project.build.directory}/generated-sources/config</source>
</sources>
</configuration>
</execution>
@@ -189,7 +189,8 @@
<goals>
<goal>generate</goal>
</goals>
- <configuration>
+ <configuration>
+ <packageName>org.forgerock.opendj.server.config</packageName>
</configuration>
</execution>
</executions>
@@ -221,10 +222,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- </plugin>
</plugins>
</build>
<reporting>
diff --git a/opendj-config/src/main/java-templates/org/forgerock/opendj/server/util/DynamicConstants.java b/opendj-config/src/main/java-templates/org/forgerock/opendj/server/util/DynamicConstants.java
new file mode 100644
index 0000000..177330d
--- /dev/null
+++ b/opendj-config/src/main/java-templates/org/forgerock/opendj/server/util/DynamicConstants.java
@@ -0,0 +1,182 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2006-2009 Sun Microsystems, Inc.
+ * Portions Copyright 2011-2013 ForgeRock AS
+ */
+package org.forgerock.opendj.server.util;
+
+/**
+ * This file contains a number of constants that are used throughout the
+ * Directory Server source. It was dynamically generated as part of the
+ * build process and should not be edited directly.
+ */
+public final class DynamicConstants {
+
+ /**
+ * The official full product name for the Directory Server.
+ */
+ public static String PRODUCT_NAME = "${serverProductName}";
+
+ /**
+ * The short product name for the Directory Server.
+ */
+ public static String SHORT_NAME = "${serverShortProductName}";
+
+ /**
+ * The major version number for the Directory Server.
+ */
+ public static int MAJOR_VERSION = ${parsedVersion.majorVersion};
+
+ /**
+ * The minor version number for the Directory Server.
+ */
+ public static int MINOR_VERSION = ${parsedVersion.minorVersion};
+
+ /**
+ * The point version number for the Directory Server.
+ */
+ public static int POINT_VERSION = ${parsedVersion.incrementalVersion};
+
+ /**
+ * The official build number for the Directory Server.
+ */
+ public static int BUILD_NUMBER = ${parsedVersion.buildNumber};
+
+ /**
+ * The version qualifier string for the Directory Server.
+ */
+ public static String VERSION_QUALIFIER = "${parsedVersion.qualifier}";
+
+ /**
+ * The set of bug IDs for fixes included in this build of the Directory
+ * Server.
+ */
+ public static String FIX_IDS = "${issuesFixIds}";
+
+ /**
+ * The build ID for the generated build of the Directory Server.
+ */
+ public static String BUILD_ID = "${buildDateTime}";
+
+ /**
+ * The username of the user that created this build.
+ */
+ public static String BUILD_USER = "${user.name}";
+
+ /**
+ * The Java version used to generate this build.
+ */
+ public static String BUILD_JAVA_VERSION = "${java.version}";
+
+ /**
+ * The vendor for the Java version used to generate this build.
+ */
+ public static String BUILD_JAVA_VENDOR = "${java.vendor}";
+
+ /**
+ * The JVM version used to generate this build.
+ */
+ public static String BUILD_JVM_VERSION = "${java.vm.version}";
+
+ /**
+ * The vendor for the JVM used to generate this build.
+ */
+ public static String BUILD_JVM_VENDOR = "${java.vm.vendor}";
+
+ /**
+ * The operating system on which this build was generated.
+ */
+ public static String BUILD_OS = "${os.name} ${os.version} ${os.arch}";
+
+ /**
+ * Indicates whether this is a debug build of the Directory Server that may
+ * include additional debugging facilities not available in standard release
+ * versions.
+ */
+ public static boolean DEBUG_BUILD = ${isDebugBuild};
+
+ /**
+ * The Subversion revision number on which this build is based.
+ */
+ public static long REVISION_NUMBER = ${buildRevision};
+
+ /**
+ * The Subversion url repository location on which this build is based.
+ */
+ public static String URL_REPOSITORY = "${scm.url}";
+
+ /**
+ * The documentation home.
+ */
+ public static String DOC_REFERENCE_HOME = "${docReferenceHome}";
+
+ /**
+ * The documentation url.
+ */
+ public static String DOC_REFERENCE_WIKI = "${docReferenceWiki}";
+
+ /**
+ * The documentation url.
+ */
+ public static String DOC_QUICK_REFERENCE_GUIDE = "${docQuickRefGuide}";
+
+ /**
+ * The administration guide.
+ */
+ public static String ADMINISTRATION_GUIDE_URL = "${adminGuideUrl}";
+
+ /**
+ * A string representation of the version number.
+ */
+ public static String VERSION_NUMBER_STRING = "${project.version}";
+
+ /**
+ * A string representation of the version number.
+ */
+ public static String OPENDJ_NUMBER_STRING = "${project.version}";
+
+ /**
+ * A string representation of the release version.
+ */
+ public static String RELEASE_VERSION_STRING = OPENDJ_NUMBER_STRING;
+
+ /**
+ * A compact version string for this product, suitable for use in path names
+ * and similar cases.
+ */
+ public static String COMPACT_VERSION_STRING = SHORT_NAME + "-" + VERSION_NUMBER_STRING;
+
+ /**
+ * A full version string for this product.
+ */
+ public static String FULL_VERSION_STRING = PRODUCT_NAME + " " + RELEASE_VERSION_STRING
+ + (((FIX_IDS != null) && (FIX_IDS.length() > 0)) ? "+" + FIX_IDS : "");
+
+ /**
+ * A printable version string for this product.
+ */
+ public static final String PRINTABLE_VERSION_STRING = FULL_VERSION_STRING + System.getProperty("line.separator")
+ + "Build " + BUILD_ID + System.getProperty("line.separator");
+
+}
diff --git a/opendj-config/src/main/java-templates/org/opends/server/util/DynamicConstants.java b/opendj-config/src/main/java-templates/org/opends/server/util/DynamicConstants.java
deleted file mode 100644
index c0b8265..0000000
--- a/opendj-config/src/main/java-templates/org/opends/server/util/DynamicConstants.java
+++ /dev/null
@@ -1,182 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2006-2009 Sun Microsystems, Inc.
- * Portions Copyright 2011-2013 ForgeRock AS
- */
-package org.opends.server.util;
-
-/**
- * This file contains a number of constants that are used throughout the
- * Directory Server source. It was dynamically generated as part of the
- * build process and should not be edited directly.
- */
-public final class DynamicConstants {
-
- /**
- * The official full product name for the Directory Server.
- */
- public static String PRODUCT_NAME = "${serverProductName}";
-
- /**
- * The short product name for the Directory Server.
- */
- public static String SHORT_NAME = "${serverShortProductName}";
-
- /**
- * The major version number for the Directory Server.
- */
- public static int MAJOR_VERSION = ${parsedVersion.majorVersion};
-
- /**
- * The minor version number for the Directory Server.
- */
- public static int MINOR_VERSION = ${parsedVersion.minorVersion};
-
- /**
- * The point version number for the Directory Server.
- */
- public static int POINT_VERSION = ${parsedVersion.incrementalVersion};
-
- /**
- * The official build number for the Directory Server.
- */
- public static int BUILD_NUMBER = ${parsedVersion.buildNumber};
-
- /**
- * The version qualifier string for the Directory Server.
- */
- public static String VERSION_QUALIFIER = "${parsedVersion.qualifier}";
-
- /**
- * The set of bug IDs for fixes included in this build of the Directory
- * Server.
- */
- public static String FIX_IDS = "${issuesFixIds}";
-
- /**
- * The build ID for the generated build of the Directory Server.
- */
- public static String BUILD_ID = "${buildDateTime}";
-
- /**
- * The username of the user that created this build.
- */
- public static String BUILD_USER = "${user.name}";
-
- /**
- * The Java version used to generate this build.
- */
- public static String BUILD_JAVA_VERSION = "${java.version}";
-
- /**
- * The vendor for the Java version used to generate this build.
- */
- public static String BUILD_JAVA_VENDOR = "${java.vendor}";
-
- /**
- * The JVM version used to generate this build.
- */
- public static String BUILD_JVM_VERSION = "${java.vm.version}";
-
- /**
- * The vendor for the JVM used to generate this build.
- */
- public static String BUILD_JVM_VENDOR = "${java.vm.vendor}";
-
- /**
- * The operating system on which this build was generated.
- */
- public static String BUILD_OS = "${os.name} ${os.version} ${os.arch}";
-
- /**
- * Indicates whether this is a debug build of the Directory Server that may
- * include additional debugging facilities not available in standard release
- * versions.
- */
- public static boolean DEBUG_BUILD = ${isDebugBuild};
-
- /**
- * The Subversion revision number on which this build is based.
- */
- public static long REVISION_NUMBER = ${buildRevision};
-
- /**
- * The Subversion url repository location on which this build is based.
- */
- public static String URL_REPOSITORY = "${scm.url}";
-
- /**
- * The documentation home.
- */
- public static String DOC_REFERENCE_HOME = "${docReferenceHome}";
-
- /**
- * The documentation url.
- */
- public static String DOC_REFERENCE_WIKI = "${docReferenceWiki}";
-
- /**
- * The documentation url.
- */
- public static String DOC_QUICK_REFERENCE_GUIDE = "${docQuickRefGuide}";
-
- /**
- * The administration guide.
- */
- public static String ADMINISTRATION_GUIDE_URL = "${adminGuideUrl}";
-
- /**
- * A string representation of the version number.
- */
- public static String VERSION_NUMBER_STRING = "${project.version}";
-
- /**
- * A string representation of the version number.
- */
- public static String OPENDJ_NUMBER_STRING = "${project.version}";
-
- /**
- * A string representation of the release version.
- */
- public static String RELEASE_VERSION_STRING = OPENDJ_NUMBER_STRING;
-
- /**
- * A compact version string for this product, suitable for use in path names
- * and similar cases.
- */
- public static String COMPACT_VERSION_STRING = SHORT_NAME + "-" + VERSION_NUMBER_STRING;
-
- /**
- * A full version string for this product.
- */
- public static String FULL_VERSION_STRING = PRODUCT_NAME + " " + RELEASE_VERSION_STRING
- + (((FIX_IDS != null) && (FIX_IDS.length() > 0)) ? "+" + FIX_IDS : "");
-
- /**
- * A printable version string for this product.
- */
- public static final String PRINTABLE_VERSION_STRING = FULL_VERSION_STRING + System.getProperty("line.separator")
- + "Build " + BUILD_ID + System.getProperty("line.separator");
-
-}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/ACIPropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/ACIPropertyDefinition.java
new file mode 100644
index 0000000..a43333f
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/ACIPropertyDefinition.java
@@ -0,0 +1,133 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import org.opends.server.authorization.dseecompat.Aci;
+import org.opends.server.authorization.dseecompat.AciException;
+import org.forgerock.opendj.ldap.ByteString;
+import org.forgerock.opendj.ldap.DN;
+
+import java.util.EnumSet;
+
+/**
+ * ACI property definition.
+ */
+public final class ACIPropertyDefinition extends PropertyDefinition<Aci> {
+
+ /**
+ * An interface for incrementally constructing ACI property definitions.
+ */
+ public static final class Builder extends AbstractBuilder<Aci, ACIPropertyDefinition> {
+
+ // Private constructor
+ private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ super(d, propertyName);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ACIPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<Aci> defaultBehavior) {
+ return new ACIPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior);
+ }
+ }
+
+ /**
+ * Create a ACI property definition builder.
+ *
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param propertyName
+ * The property name.
+ * @return Returns the new ACI property definition builder.
+ */
+ public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ return new Builder(d, propertyName);
+ }
+
+ // Private constructor.
+ private ACIPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<Aci> defaultBehavior) {
+ super(d, Aci.class, propertyName, options, adminAction, defaultBehavior);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void validateValue(Aci value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ // No additional validation required.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Aci decodeValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ try {
+ return Aci.decode(ByteString.valueOf(value), DN.rootDN());
+ } catch (AciException e) {
+ // TODO: it would be nice to throw the cause.
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
+ return v.visitACI(this, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyValueVisitor<R, P> v, Aci value, P p) {
+ return v.visitACI(this, value, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int compare(Aci o1, Aci o2) {
+ return o1.toString().compareTo(o2.toString());
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/AbsoluteInheritedDefaultBehaviorProvider.java b/opendj-config/src/main/java/org/forgerock/opendj/config/AbsoluteInheritedDefaultBehaviorProvider.java
new file mode 100644
index 0000000..8e23477
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/AbsoluteInheritedDefaultBehaviorProvider.java
@@ -0,0 +1,112 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+/**
+ * A default behavior provider which retrieves default values from a managed
+ * object in an absolute location. It should be used by properties which inherit
+ * their default value(s) from properties held in an other managed object.
+ *
+ * @param <T>
+ * The type of values represented by this provider.
+ */
+public final class AbsoluteInheritedDefaultBehaviorProvider<T> extends DefaultBehaviorProvider<T> {
+
+ // The absolute path to the managed object containing the property.
+ private ManagedObjectPath<?, ?> path = null;
+
+ // The string representation of the managed object path specifying
+ // the absolute location of the managed object.
+ private final String pathString;
+
+ // The name of the property containing the inherited default values.
+ private final String propertyName;
+
+ /**
+ * Create an absolute inherited default behavior provider associated with
+ * the managed object at the specified absolute location.
+ *
+ * @param pathString
+ * The string representation of the managed object path
+ * specifying the absolute location of the managed object.
+ * @param propertyName
+ * The name of the property containing the inherited default
+ * values.
+ */
+ public AbsoluteInheritedDefaultBehaviorProvider(String pathString, String propertyName) {
+ this.pathString = pathString;
+ this.propertyName = propertyName;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p) {
+ return v.visitAbsoluteInherited(this, p);
+ }
+
+ /**
+ * Get the definition of the parent managed object containing the inherited
+ * default values.
+ *
+ * @return Returns the definition of the parent managed object containing
+ * the inherited default values.
+ */
+ public AbstractManagedObjectDefinition<?, ?> getManagedObjectDefinition() {
+ return path.getManagedObjectDefinition();
+ }
+
+ /**
+ * Get the absolute path of the managed object containing the property which
+ * has the default values.
+ *
+ * @return Returns the absolute path of the managed object containing the
+ * property which has the default values.
+ */
+ public ManagedObjectPath<?, ?> getManagedObjectPath() {
+ return path;
+ }
+
+ /**
+ * Gets the name of the property containing the inherited default values.
+ *
+ * @return Returns the name of the property containing the inherited default
+ * values.
+ */
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initialize() throws Exception {
+ // Decode the path.
+ path = ManagedObjectPath.valueOf(pathString);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/AbstractManagedObjectDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/AbstractManagedObjectDefinition.java
new file mode 100644
index 0000000..566fbc3
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/AbstractManagedObjectDefinition.java
@@ -0,0 +1,973 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2010 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.Set;
+import java.util.Vector;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.DefinitionDecodingException.Reason;
+
+/**
+ * Defines the structure of an abstract managed object. Abstract managed objects
+ * cannot be instantiated.
+ * <p>
+ * Applications can query a managed object definition in order to determine the
+ * overall configuration model of an application.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * definition represents.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * definition represents.
+ */
+public abstract class AbstractManagedObjectDefinition<C extends ConfigurationClient, S extends Configuration> {
+
+ // The name of the definition.
+ private final String name;
+
+ // The parent managed object definition if applicable.
+ private final AbstractManagedObjectDefinition<? super C, ? super S> parent;
+
+ // The set of constraints associated with this managed object
+ // definition.
+ private final Collection<Constraint> constraints;
+
+ // The set of property definitions applicable to this managed object
+ // definition.
+ private final Map<String, PropertyDefinition<?>> propertyDefinitions;
+
+ // The set of relation definitions applicable to this managed object
+ // definition.
+ private final Map<String, RelationDefinition<?, ?>> relationDefinitions;
+
+ // The set of relation definitions directly referencing this managed
+ // object definition.
+ private final Set<RelationDefinition<C, S>> reverseRelationDefinitions;
+
+ // The set of all property definitions associated with this managed
+ // object definition including inherited property definitions.
+ private final Map<String, PropertyDefinition<?>> allPropertyDefinitions;
+
+ // The set of all relation definitions associated with this managed
+ // object definition including inherited relation definitions.
+ private final Map<String, RelationDefinition<?, ?>> allRelationDefinitions;
+
+ // The set of aggregation property definitions applicable to this
+ // managed object definition.
+ private final Map<String, AggregationPropertyDefinition<?, ?>> aggregationPropertyDefinitions;
+
+ // The set of aggregation property definitions directly referencing this
+ // managed object definition.
+ private final Vector<AggregationPropertyDefinition<?, ?>> reverseAggregationPropertyDefinitions;
+
+ // The set of all aggregation property definitions associated with this
+ // managed object definition including inherited relation definitions.
+ private final Map<String, AggregationPropertyDefinition<?, ?>> allAggregationPropertyDefinitions;
+
+ // The set of tags associated with this managed object.
+ private final Set<Tag> allTags;
+
+ // Options applicable to this definition.
+ private final Set<ManagedObjectOption> options;
+
+ // The set of managed object definitions which inherit from this definition.
+ private final Map<String, AbstractManagedObjectDefinition<? extends C, ? extends S>> children;
+
+ /**
+ * Create a new abstract managed object definition.
+ *
+ * @param name
+ * The name of the definition.
+ * @param parent
+ * The parent definition, or <code>null</code> if there is no
+ * parent (only the {@link TopCfgDefn} should have a
+ * <code>null</code> parent, unless the definition is being used
+ * for testing).
+ */
+ protected AbstractManagedObjectDefinition(String name,
+ AbstractManagedObjectDefinition<? super C, ? super S> parent) {
+ this.name = name;
+ this.parent = parent;
+ this.constraints = new LinkedList<Constraint>();
+ this.propertyDefinitions = new HashMap<String, PropertyDefinition<?>>();
+ this.relationDefinitions = new HashMap<String, RelationDefinition<?, ?>>();
+ this.reverseRelationDefinitions = new HashSet<RelationDefinition<C, S>>();
+ this.allPropertyDefinitions = new HashMap<String, PropertyDefinition<?>>();
+ this.allRelationDefinitions = new HashMap<String, RelationDefinition<?, ?>>();
+ this.aggregationPropertyDefinitions = new HashMap<String, AggregationPropertyDefinition<?, ?>>();
+ this.reverseAggregationPropertyDefinitions = new Vector<AggregationPropertyDefinition<?, ?>>();
+ this.allAggregationPropertyDefinitions = new HashMap<String, AggregationPropertyDefinition<?, ?>>();
+ this.allTags = new HashSet<Tag>();
+ this.options = EnumSet.noneOf(ManagedObjectOption.class);
+
+ this.children = new HashMap<String, AbstractManagedObjectDefinition<? extends C, ? extends S>>();
+
+ // If we have a parent definition then inherit its features.
+ if (parent != null) {
+ registerInParent();
+
+ for (PropertyDefinition<?> pd : parent.getAllPropertyDefinitions()) {
+ allPropertyDefinitions.put(pd.getName(), pd);
+ }
+
+ for (RelationDefinition<?, ?> rd : parent.getAllRelationDefinitions()) {
+ allRelationDefinitions.put(rd.getName(), rd);
+ }
+
+ for (AggregationPropertyDefinition<?, ?> apd : parent.getAllAggregationPropertyDefinitions()) {
+
+ allAggregationPropertyDefinitions.put(apd.getName(), apd);
+ }
+
+ // Tag inheritance is performed during preprocessing.
+ }
+ }
+
+ /**
+ * Get all the child managed object definitions which inherit from this
+ * managed object definition.
+ *
+ * @return Returns an unmodifiable collection containing all the subordinate
+ * managed object definitions which inherit from this managed object
+ * definition.
+ */
+ public final Collection<AbstractManagedObjectDefinition<? extends C, ? extends S>> getAllChildren() {
+ List<AbstractManagedObjectDefinition<? extends C, ? extends S>> list =
+ new ArrayList<AbstractManagedObjectDefinition<? extends C, ? extends S>>(children.values());
+
+ for (AbstractManagedObjectDefinition<? extends C, ? extends S> child : children.values()) {
+ list.addAll(child.getAllChildren());
+ }
+
+ return Collections.unmodifiableCollection(list);
+ }
+
+ /**
+ * Get all the constraints associated with this type of managed object. The
+ * returned collection will contain inherited constraints.
+ *
+ * @return Returns a collection containing all the constraints associated
+ * with this type of managed object. The caller is free to modify
+ * the collection if required.
+ */
+ public final Collection<Constraint> getAllConstraints() {
+ // This method does not used a cached set of constraints because
+ // constraints may be updated after child definitions have been
+ // defined.
+ List<Constraint> allConstraints = new LinkedList<Constraint>();
+
+ if (parent != null) {
+ allConstraints.addAll(parent.getAllConstraints());
+ }
+ allConstraints.addAll(constraints);
+
+ return allConstraints;
+ }
+
+ /**
+ * Get all the property definitions associated with this type of managed
+ * object. The returned collection will contain inherited property
+ * definitions.
+ *
+ * @return Returns an unmodifiable collection containing all the property
+ * definitions associated with this type of managed object.
+ */
+ public final Collection<PropertyDefinition<?>> getAllPropertyDefinitions() {
+ return Collections.unmodifiableCollection(allPropertyDefinitions.values());
+ }
+
+ /**
+ * Get all the relation definitions associated with this type of managed
+ * object. The returned collection will contain inherited relation
+ * definitions.
+ *
+ * @return Returns an unmodifiable collection containing all the relation
+ * definitions associated with this type of managed object.
+ */
+ public final Collection<RelationDefinition<?, ?>> getAllRelationDefinitions() {
+ return Collections.unmodifiableCollection(allRelationDefinitions.values());
+ }
+
+ /**
+ * Get all the relation definitions which refer to this managed object
+ * definition. The returned collection will contain relation definitions
+ * which refer to parents of this managed object definition.
+ *
+ * @return Returns a collection containing all the relation definitions
+ * which refer to this managed object definition. The caller is free
+ * to modify the collection if required.
+ */
+ public final Collection<RelationDefinition<? super C, ? super S>> getAllReverseRelationDefinitions() {
+ // This method does not used a cached set of relations because
+ // relations may be updated after child definitions have been
+ // defined.
+ List<RelationDefinition<? super C, ? super S>> rdlist =
+ new LinkedList<RelationDefinition<? super C, ? super S>>();
+
+ if (parent != null) {
+ rdlist.addAll(parent.getAllReverseRelationDefinitions());
+ }
+ rdlist.addAll(reverseRelationDefinitions);
+
+ return rdlist;
+ }
+
+ /**
+ * Get all the aggregation property definitions associated with this type of
+ * managed object. The returned collection will contain inherited
+ * aggregation property definitions.
+ *
+ * @return Returns an unmodifiable collection containing all the aggregation
+ * property definitions associated with this type of managed object.
+ */
+ public final Collection<AggregationPropertyDefinition<?, ?>> getAllAggregationPropertyDefinitions() {
+ return Collections.unmodifiableCollection(allAggregationPropertyDefinitions.values());
+ }
+
+ /**
+ * Get all the aggregation property definitions which refer to this managed
+ * object definition. The returned collection will contain aggregation
+ * property definitions which refer to parents of this managed object
+ * definition.
+ *
+ * @return Returns a collection containing all the aggregation property
+ * definitions which refer to this managed object definition. The
+ * caller is free to modify the collection if required.
+ */
+ public final Collection<AggregationPropertyDefinition<?, ?>> getAllReverseAggregationPropertyDefinitions() {
+ // This method does not used a cached set of aggregation properties
+ // because
+ // aggregation properties may be updated after child definitions have
+ // been
+ // defined.
+ List<AggregationPropertyDefinition<?, ?>> apdlist = new LinkedList<AggregationPropertyDefinition<?, ?>>();
+
+ if (parent != null) {
+ apdlist.addAll(parent.getAllReverseAggregationPropertyDefinitions());
+ }
+ apdlist.addAll(reverseAggregationPropertyDefinitions);
+
+ return apdlist;
+ }
+
+ /**
+ * Get all the tags associated with this type of managed object. The
+ * returned collection will contain inherited tags.
+ *
+ * @return Returns an unmodifiable collection containing all the tags
+ * associated with this type of managed object.
+ */
+ public final Collection<Tag> getAllTags() {
+ return Collections.unmodifiableCollection(allTags);
+ }
+
+ /**
+ * Get the named child managed object definition which inherits from this
+ * managed object definition. This method will recursively search down
+ * through the inheritance hierarchy.
+ *
+ * @param name
+ * The name of the managed object definition sub-type.
+ * @return Returns the named child managed object definition which inherits
+ * from this managed object definition.
+ * @throws IllegalArgumentException
+ * If the specified managed object definition name was null or
+ * empty or if the requested subordinate managed object
+ * definition was not found.
+ */
+ public final AbstractManagedObjectDefinition<? extends C, ? extends S> getChild(String name) {
+ if ((name == null) || (name.length() == 0)) {
+ throw new IllegalArgumentException("null or empty managed object name");
+ }
+
+ AbstractManagedObjectDefinition<? extends C, ? extends S> d = children.get(name);
+
+ if (d == null) {
+ // Recursively search.
+ for (AbstractManagedObjectDefinition<? extends C, ? extends S> child : children.values()) {
+ try {
+ d = child.getChild(name);
+ break;
+ } catch (IllegalArgumentException e) {
+ // Try the next child.
+ }
+ }
+ }
+
+ if (d == null) {
+ throw new IllegalArgumentException("child managed object definition \"" + name + "\" not found");
+ }
+
+ return d;
+ }
+
+ /**
+ * Get the child managed object definitions which inherit directly from this
+ * managed object definition.
+ *
+ * @return Returns an unmodifiable collection containing the subordinate
+ * managed object definitions which inherit directly from this
+ * managed object definition.
+ */
+ public final Collection<AbstractManagedObjectDefinition<? extends C, ? extends S>> getChildren() {
+ return Collections.unmodifiableCollection(children.values());
+ }
+
+ /**
+ * Get the constraints defined by this managed object definition. The
+ * returned collection will not contain inherited constraints.
+ *
+ * @return Returns an unmodifiable collection containing the constraints
+ * defined by this managed object definition.
+ */
+ public final Collection<Constraint> getConstraints() {
+ return Collections.unmodifiableCollection(constraints);
+ }
+
+ /**
+ * Gets the optional description of this managed object definition in the
+ * default locale.
+ *
+ * @return Returns the description of this managed object definition in the
+ * default locale, or <code>null</code> if there is no description.
+ * @throws UnsupportedOperationException
+ * If this managed object definition is the {@link TopCfgDefn}.
+ */
+ public final LocalizableMessage getDescription() {
+ return getDescription(Locale.getDefault());
+ }
+
+ /**
+ * Gets the optional description of this managed object definition in the
+ * specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the description of this managed object definition in the
+ * specified locale, or <code>null</code> if there is no
+ * description.
+ * @throws UnsupportedOperationException
+ * If this managed object definition is the {@link TopCfgDefn}.
+ */
+ public final LocalizableMessage getDescription(Locale locale) {
+ try {
+ return ManagedObjectDefinitionI18NResource.getInstance().getMessage(this, "description", locale);
+ } catch (MissingResourceException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Get the name of the definition.
+ *
+ * @return Returns the name of the definition.
+ */
+ public final String getName() {
+ return name;
+ }
+
+ /**
+ * Get the parent managed object definition, if applicable.
+ *
+ * @return Returns the parent of this managed object definition, or
+ * <code>null</code> if this definition is the {@link TopCfgDefn}.
+ */
+ public final AbstractManagedObjectDefinition<? super C, ? super S> getParent() {
+ return parent;
+ }
+
+ /**
+ * Get the specified property definition associated with this type of
+ * managed object. The search will include any inherited property
+ * definitions.
+ *
+ * @param name
+ * The name of the property definition to be retrieved.
+ * @return Returns the specified property definition associated with this
+ * type of managed object.
+ * @throws IllegalArgumentException
+ * If the specified property name was null or empty or if the
+ * requested property definition was not found.
+ */
+ public final PropertyDefinition<?> getPropertyDefinition(String name) {
+ if ((name == null) || (name.length() == 0)) {
+ throw new IllegalArgumentException("null or empty property name");
+ }
+
+ PropertyDefinition<?> d = allPropertyDefinitions.get(name);
+ if (d == null) {
+ throw new IllegalArgumentException("property definition \"" + name + "\" not found");
+ }
+
+ return d;
+ }
+
+ /**
+ * Get the property definitions defined by this managed object definition.
+ * The returned collection will not contain inherited property definitions.
+ *
+ * @return Returns an unmodifiable collection containing the property
+ * definitions defined by this managed object definition.
+ */
+ public final Collection<PropertyDefinition<?>> getPropertyDefinitions() {
+ return Collections.unmodifiableCollection(propertyDefinitions.values());
+ }
+
+ /**
+ * Get the specified relation definition associated with this type of
+ * managed object.The search will include any inherited relation
+ * definitions.
+ *
+ * @param name
+ * The name of the relation definition to be retrieved.
+ * @return Returns the specified relation definition associated with this
+ * type of managed object.
+ * @throws IllegalArgumentException
+ * If the specified relation name was null or empty or if the
+ * requested relation definition was not found.
+ */
+ public final RelationDefinition<?, ?> getRelationDefinition(String name) {
+ if ((name == null) || (name.length() == 0)) {
+ throw new IllegalArgumentException("null or empty relation name");
+ }
+
+ RelationDefinition<?, ?> d = allRelationDefinitions.get(name);
+ if (d == null) {
+ throw new IllegalArgumentException("relation definition \"" + name + "\" not found");
+ }
+
+ return d;
+ }
+
+ /**
+ * Get the relation definitions defined by this managed object definition.
+ * The returned collection will not contain inherited relation definitions.
+ *
+ * @return Returns an unmodifiable collection containing the relation
+ * definitions defined by this managed object definition.
+ */
+ public final Collection<RelationDefinition<?, ?>> getRelationDefinitions() {
+ return Collections.unmodifiableCollection(relationDefinitions.values());
+ }
+
+ /**
+ * Get the relation definitions which refer directly to this managed object
+ * definition. The returned collection will not contain relation definitions
+ * which refer to parents of this managed object definition.
+ *
+ * @return Returns an unmodifiable collection containing the relation
+ * definitions which refer directly to this managed object
+ * definition.
+ */
+ public final Collection<RelationDefinition<C, S>> getReverseRelationDefinitions() {
+ return Collections.unmodifiableCollection(reverseRelationDefinitions);
+ }
+
+ /**
+ * Get the specified aggregation property definition associated with this
+ * type of managed object.The search will include any inherited aggregation
+ * property definitions.
+ *
+ * @param name
+ * The name of the aggregation property definition to be
+ * retrieved.
+ * @return Returns the specified aggregation property definition associated
+ * with this type of managed object.
+ * @throws IllegalArgumentException
+ * If the specified aggregation property name was null or empty
+ * or if the requested aggregation property definition was not
+ * found.
+ */
+ public final AggregationPropertyDefinition<?, ?> getAggregationPropertyDefinition(String name) {
+ if ((name == null) || (name.length() == 0)) {
+ throw new IllegalArgumentException("null or empty aggregation property name");
+ }
+
+ AggregationPropertyDefinition<?, ?> d = allAggregationPropertyDefinitions.get(name);
+ if (d == null) {
+ throw new IllegalArgumentException("aggregation property definition \"" + name + "\" not found");
+ }
+
+ return d;
+ }
+
+ /**
+ * Get the aggregation property definitions defined by this managed object
+ * definition. The returned collection will not contain inherited
+ * aggregation property definitions.
+ *
+ * @return Returns an unmodifiable collection containing the aggregation
+ * property definitions defined by this managed object definition.
+ */
+ public final Collection<AggregationPropertyDefinition<?, ?>> getAggregationPropertyDefinitions() {
+ return Collections.unmodifiableCollection(aggregationPropertyDefinitions.values());
+ }
+
+ /**
+ * Get the aggregation property definitions which refer directly to this
+ * managed object definition. The returned collection will not contain
+ * aggregation property definitions which refer to parents of this managed
+ * object definition.
+ *
+ * @return Returns an unmodifiable collection containing the aggregation
+ * property definitions which refer directly to this managed object
+ * definition.
+ */
+ public final Collection<AggregationPropertyDefinition<?, ?>> getReverseAggregationPropertyDefinitions() {
+ return Collections.unmodifiableCollection(reverseAggregationPropertyDefinitions);
+ }
+
+ /**
+ * Gets the synopsis of this managed object definition in the default
+ * locale.
+ *
+ * @return Returns the synopsis of this managed object definition in the
+ * default locale.
+ * @throws UnsupportedOperationException
+ * If this managed object definition is the {@link TopCfgDefn}.
+ */
+ public final LocalizableMessage getSynopsis() {
+ return getSynopsis(Locale.getDefault());
+ }
+
+ /**
+ * Gets the synopsis of this managed object definition in the specified
+ * locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the synopsis of this managed object definition in the
+ * specified locale.
+ * @throws UnsupportedOperationException
+ * If this managed object definition is the {@link TopCfgDefn}.
+ */
+ public final LocalizableMessage getSynopsis(Locale locale) {
+ return ManagedObjectDefinitionI18NResource.getInstance().getMessage(this, "synopsis", locale);
+ }
+
+ /**
+ * Gets the user friendly name of this managed object definition in the
+ * default locale.
+ *
+ * @return Returns the user friendly name of this managed object definition
+ * in the default locale.
+ * @throws UnsupportedOperationException
+ * If this managed object definition is the {@link TopCfgDefn}.
+ */
+ public final LocalizableMessage getUserFriendlyName() {
+ return getUserFriendlyName(Locale.getDefault());
+ }
+
+ /**
+ * Gets the user friendly name of this managed object definition in the
+ * specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the user friendly name of this managed object definition
+ * in the specified locale.
+ * @throws UnsupportedOperationException
+ * If this managed object definition is the {@link TopCfgDefn}.
+ */
+ public final LocalizableMessage getUserFriendlyName(Locale locale) {
+ return LocalizableMessage.raw(ManagedObjectDefinitionI18NResource.getInstance().getMessage(this,
+ "user-friendly-name", locale));
+ }
+
+ /**
+ * Gets the user friendly plural name of this managed object definition in
+ * the default locale.
+ *
+ * @return Returns the user friendly plural name of this managed object
+ * definition in the default locale.
+ * @throws UnsupportedOperationException
+ * If this managed object definition is the {@link TopCfgDefn}.
+ */
+ public final LocalizableMessage getUserFriendlyPluralName() {
+ return getUserFriendlyPluralName(Locale.getDefault());
+ }
+
+ /**
+ * Gets the user friendly plural name of this managed object definition in
+ * the specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the user friendly plural name of this managed object
+ * definition in the specified locale.
+ * @throws UnsupportedOperationException
+ * If this managed object definition is the {@link TopCfgDefn}.
+ */
+ public final LocalizableMessage getUserFriendlyPluralName(Locale locale) {
+ return ManagedObjectDefinitionI18NResource.getInstance()
+ .getMessage(this, "user-friendly-plural-name", locale);
+ }
+
+ /**
+ * Determine whether there are any child managed object definitions which
+ * inherit from this managed object definition.
+ *
+ * @return Returns <code>true</code> if this type of managed object has any
+ * child managed object definitions, <code>false</code> otherwise.
+ */
+ public final boolean hasChildren() {
+ return !children.isEmpty();
+ }
+
+ /**
+ * Determines whether or not this managed object definition has the
+ * specified option.
+ *
+ * @param option
+ * The option to test.
+ * @return Returns <code>true</code> if the option is set, or
+ * <code>false</code> otherwise.
+ */
+ public final boolean hasOption(ManagedObjectOption option) {
+ return options.contains(option);
+ }
+
+ /**
+ * Determines whether or not this managed object definition has the
+ * specified tag.
+ *
+ * @param t
+ * The tag definition.
+ * @return Returns <code>true</code> if this managed object definition has
+ * the specified tag.
+ */
+ public final boolean hasTag(Tag t) {
+ return allTags.contains(t);
+ }
+
+ /**
+ * Determines whether or not this managed object definition is a sub-type of
+ * the provided managed object definition. This managed object definition is
+ * a sub-type of the provided managed object definition if they are both the
+ * same or if the provided managed object definition can be obtained by
+ * recursive invocations of the {@link #getParent()} method.
+ *
+ * @param d
+ * The managed object definition to be checked.
+ * @return Returns <code>true</code> if this managed object definition is a
+ * sub-type of the provided managed object definition.
+ */
+ public final boolean isChildOf(AbstractManagedObjectDefinition<?, ?> d) {
+ AbstractManagedObjectDefinition<?, ?> i;
+ for (i = this; i != null; i = i.parent) {
+ if (i == d) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Determines whether or not this managed object definition is a super-type
+ * of the provided managed object definition. This managed object definition
+ * is a super-type of the provided managed object definition if they are
+ * both the same or if the provided managed object definition is a member of
+ * the set of children returned from {@link #getAllChildren()}.
+ *
+ * @param d
+ * The managed object definition to be checked.
+ * @return Returns <code>true</code> if this managed object definition is a
+ * super-type of the provided managed object definition.
+ */
+ public final boolean isParentOf(AbstractManagedObjectDefinition<?, ?> d) {
+ return d.isChildOf(this);
+ }
+
+ /**
+ * Determines whether or not this managed object definition is the
+ * {@link TopCfgDefn}.
+ *
+ * @return Returns <code>true</code> if this managed object definition is
+ * the {@link TopCfgDefn}.
+ */
+ public final boolean isTop() {
+ return (this instanceof TopCfgDefn);
+ }
+
+ /**
+ * Finds a sub-type of this managed object definition which most closely
+ * corresponds to the matching criteria of the provided definition resolver.
+ *
+ * @param r
+ * The definition resolver.
+ * @return Returns the sub-type of this managed object definition which most
+ * closely corresponds to the matching criteria of the provided
+ * definition resolver.
+ * @throws DefinitionDecodingException
+ * If no matching sub-type could be found or if the resolved
+ * definition was abstract.
+ * @see DefinitionResolver
+ */
+ public final ManagedObjectDefinition<? extends C, ? extends S> resolveManagedObjectDefinition(DefinitionResolver r)
+ throws DefinitionDecodingException {
+ AbstractManagedObjectDefinition<? extends C, ? extends S> rd;
+ rd = resolveManagedObjectDefinitionAux(this, r);
+ if (rd == null) {
+ // Unable to resolve the definition.
+ throw new DefinitionDecodingException(this, Reason.WRONG_TYPE_INFORMATION);
+ } else if (rd instanceof ManagedObjectDefinition) {
+ return (ManagedObjectDefinition<? extends C, ? extends S>) rd;
+ } else {
+ // Resolved definition was abstract.
+ throw new DefinitionDecodingException(this, Reason.ABSTRACT_TYPE_INFORMATION);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final String toString() {
+ StringBuilder builder = new StringBuilder();
+ toString(builder);
+ return builder.toString();
+ }
+
+ /**
+ * Append a string representation of the managed object definition to the
+ * provided string builder.
+ *
+ * @param builder
+ * The string builder where the string representation should be
+ * appended.
+ */
+ public final void toString(StringBuilder builder) {
+ builder.append(getName());
+ }
+
+ /**
+ * Initializes all of the components associated with this managed object
+ * definition.
+ *
+ * @throws Exception
+ * If this managed object definition could not be initialized.
+ */
+ protected final void initialize() throws Exception {
+ for (PropertyDefinition<?> pd : getAllPropertyDefinitions()) {
+ pd.initialize();
+ pd.getDefaultBehaviorProvider().initialize();
+ }
+
+ for (RelationDefinition<?, ?> rd : getAllRelationDefinitions()) {
+ rd.initialize();
+ }
+
+ for (AggregationPropertyDefinition<?, ?> apd : getAllAggregationPropertyDefinitions()) {
+
+ apd.initialize();
+ // Now register the aggregation property in the referenced managed
+ // object
+ // definition for reverse lookups.
+ registerReverseAggregationPropertyDefinition(apd);
+ }
+
+ for (Constraint constraint : getAllConstraints()) {
+ constraint.initialize();
+ }
+ }
+
+ /**
+ * Register a constraint with this managed object definition.
+ * <p>
+ * This method <b>must not</b> be called by applications.
+ *
+ * @param constraint
+ * The constraint to be registered.
+ */
+ protected final void registerConstraint(Constraint constraint) {
+ constraints.add(constraint);
+ }
+
+ /**
+ * Register a property definition with this managed object definition,
+ * overriding any existing property definition with the same name.
+ * <p>
+ * This method <b>must not</b> be called by applications.
+ *
+ * @param d
+ * The property definition to be registered.
+ */
+ protected final void registerPropertyDefinition(PropertyDefinition<?> d) {
+ String propName = d.getName();
+
+ propertyDefinitions.put(propName, d);
+ allPropertyDefinitions.put(propName, d);
+
+ if (d instanceof AggregationPropertyDefinition<?, ?>) {
+ AggregationPropertyDefinition<?, ?> apd = (AggregationPropertyDefinition<?, ?>) d;
+ aggregationPropertyDefinitions.put(propName, apd);
+ // The key must also contain the managed object name, since several
+ // MOs
+ // in an inheritance tree may aggregate the same aggregation
+ // property name
+ allAggregationPropertyDefinitions.put(apd.getManagedObjectDefinition().getName() + ":" + propName, apd);
+ }
+ }
+
+ /**
+ * Register a relation definition with this managed object definition,
+ * overriding any existing relation definition with the same name.
+ * <p>
+ * This method <b>must not</b> be called by applications.
+ *
+ * @param d
+ * The relation definition to be registered.
+ */
+ protected final void registerRelationDefinition(RelationDefinition<?, ?> d) {
+ // Register the relation in this managed object definition.
+ String relName = d.getName();
+
+ relationDefinitions.put(relName, d);
+ allRelationDefinitions.put(relName, d);
+
+ // Now register the relation in the referenced managed object
+ // definition for reverse lookups.
+ registerReverseRelationDefinition(d);
+ }
+
+ /**
+ * Register an option with this managed object definition.
+ * <p>
+ * This method <b>must not</b> be called by applications.
+ *
+ * @param option
+ * The option to be registered.
+ */
+ protected final void registerOption(ManagedObjectOption option) {
+ options.add(option);
+ }
+
+ /**
+ * Register a tag with this managed object definition.
+ * <p>
+ * This method <b>must not</b> be called by applications.
+ *
+ * @param tag
+ * The tag to be registered.
+ */
+ protected final void registerTag(Tag tag) {
+ allTags.add(tag);
+ }
+
+ /**
+ * Deregister a constraint from the managed object definition.
+ * <p>
+ * This method <b>must not</b> be called by applications and is only
+ * intended for internal testing.
+ *
+ * @param constraint
+ * The constraint to be deregistered.
+ */
+ final void deregisterConstraint(Constraint constraint) {
+ if (!constraints.remove(constraint)) {
+ throw new RuntimeException("Failed to deregister a constraint");
+ }
+ }
+
+ /**
+ * Deregister a relation definition from the managed object definition.
+ * <p>
+ * This method <b>must not</b> be called by applications and is only
+ * intended for internal testing.
+ *
+ * @param d
+ * The relation definition to be deregistered.
+ */
+ final void deregisterRelationDefinition(RelationDefinition<?, ?> d) {
+ // Deregister the relation from this managed object definition.
+ String relName = d.getName();
+ relationDefinitions.remove(relName);
+ allRelationDefinitions.remove(relName);
+
+ // Now deregister the relation from the referenced managed object
+ // definition for reverse lookups.
+ d.getChildDefinition().reverseRelationDefinitions.remove(d);
+ }
+
+ /**
+ * Register this managed object definition in its parent.
+ * <p>
+ * This method <b>must not</b> be called by applications and is only
+ * intended for internal testing.
+ */
+ final void registerInParent() {
+ if (parent != null) {
+ parent.children.put(name, this);
+ }
+ }
+
+ // Register a relation definition in the referenced managed object
+ // definition's reverse lookup table.
+ private <C1 extends ConfigurationClient, S1 extends Configuration> void registerReverseRelationDefinition(
+ RelationDefinition<C1, S1> rd) {
+ rd.getChildDefinition().reverseRelationDefinitions.add(rd);
+ }
+
+ // Register a aggregation property definition in the referenced managed
+ // object
+ // definition's reverse lookup table.
+ private void registerReverseAggregationPropertyDefinition(AggregationPropertyDefinition<?, ?> apd) {
+
+ apd.getRelationDefinition().getChildDefinition().reverseAggregationPropertyDefinitions.add(apd);
+ }
+
+ // Recursively descend definition hierarchy to find the best match
+ // definition.
+ private AbstractManagedObjectDefinition<? extends C, ? extends S> resolveManagedObjectDefinitionAux(
+ AbstractManagedObjectDefinition<? extends C, ? extends S> d, DefinitionResolver r) {
+ if (!r.matches(d)) {
+ return null;
+ }
+
+ for (AbstractManagedObjectDefinition<? extends C, ? extends S> child : d.getChildren()) {
+ AbstractManagedObjectDefinition<? extends C, ? extends S> rd =
+ resolveManagedObjectDefinitionAux(child, r);
+ if (rd != null) {
+ return rd;
+ }
+ }
+
+ return d;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/AdminException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/AdminException.java
new file mode 100644
index 0000000..4e0df01
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/AdminException.java
@@ -0,0 +1,63 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.opends.server.types.OpenDsException;
+
+/**
+ * Exceptions thrown when interacting with administration framework.
+ */
+public abstract class AdminException extends OpenDsException {
+
+ /**
+ * Fake serialization ID.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create an admin exception with a message and cause.
+ *
+ * @param message
+ * The message.
+ * @param cause
+ * The cause.
+ */
+ protected AdminException(LocalizableMessage message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Create an admin exception with a message.
+ *
+ * @param message
+ * The message.
+ */
+ protected AdminException(LocalizableMessage message) {
+ super(message);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/AdminRuntimeException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/AdminRuntimeException.java
new file mode 100644
index 0000000..742a7d0
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/AdminRuntimeException.java
@@ -0,0 +1,78 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * Exceptions thrown when interacting with administration framework that
+ * applications are not expected to catch.
+ */
+public abstract class AdminRuntimeException extends RuntimeException {
+
+ /**
+ * Fake serialization ID.
+ */
+ private static final long serialVersionUID = 1L;
+
+ // LocalizableMessage that explains the problem.
+ private final LocalizableMessage message;
+
+ /**
+ * Create an admin runtime exception with a message and cause.
+ *
+ * @param message
+ * The message.
+ * @param cause
+ * The cause.
+ */
+ protected AdminRuntimeException(LocalizableMessage message, Throwable cause) {
+ super(message.toString(), cause);
+ this.message = message;
+ }
+
+ /**
+ * Create an admin runtime exception with a message.
+ *
+ * @param message
+ * The message.
+ */
+ protected AdminRuntimeException(LocalizableMessage message) {
+ super(message.toString());
+ this.message = message;
+ }
+
+ /**
+ * Returns the message that explains the problem that occurred.
+ *
+ * @return Returns the message describing the problem that occurred (never
+ * <code>null</code>).
+ */
+ public LocalizableMessage getLocalizableMessageObject() {
+ return this.message;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/AdministratorAction.java b/opendj-config/src/main/java/org/forgerock/opendj/config/AdministratorAction.java
new file mode 100644
index 0000000..85ed70f
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/AdministratorAction.java
@@ -0,0 +1,166 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.Locale;
+import java.util.MissingResourceException;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * Defines an optional action which administators must perform after they have
+ * modified a property. By default modifications to properties are assumed to
+ * take effect immediately and require no additional administrative action.
+ * Developers should be aware that, where feasible, they should implement
+ * components such that property modifications require no additional
+ * administrative action. This is required in order to minimize server downtime
+ * during administration and provide a more user-friendly experience.
+ */
+public final class AdministratorAction {
+
+ /**
+ * Specifies the type of administrator action which must be performed in
+ * order for pending changes to take effect.
+ */
+ public static enum Type {
+ /**
+ * Used when modifications to a property require a component restart in
+ * order to take effect (usually by disabling and re-enabling the
+ * component). May have a description describing any additional
+ * administrator action that is required when the component is
+ * restarted.
+ */
+ COMPONENT_RESTART("component-restart"),
+
+ /**
+ * Used when modifications to a property take effect immediately, and no
+ * additional administrator action is required. May have a description
+ * describing how changes to the modified property will take effect.
+ */
+ NONE("none"),
+
+ /**
+ * Used when modifications to a property require an additional
+ * administrative action in order to take effect. This should be used
+ * when neither a server restart nor a component restart are applicable.
+ * Always has a description which describes the additional administrator
+ * action which is required when the property is modified.
+ */
+ OTHER("other"),
+
+ /**
+ * Used when modifications to a property require a server restart in
+ * order to take effect. May have a description describing any
+ * additional administrator action that is required when the component
+ * is restarted.
+ */
+ SERVER_RESTART("server-restart");
+
+ // The user-friendly name of the type.
+ private final String name;
+
+ // Private constructor.
+ private Type(String name) {
+ this.name = name;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ return name;
+ }
+
+ }
+
+ // The managed object definition associated with this administrator
+ // action.
+ private final AbstractManagedObjectDefinition<?, ?> definition;
+
+ // The name of the property definition associated with this
+ // administrator action.
+ private final String propertyName;
+
+ // The type of administration action.
+ private final Type type;
+
+ /**
+ * Create a new administrator action.
+ *
+ * @param type
+ * The type of this administration action.
+ * @param d
+ * The managed object definition associated with this
+ * administrator action.
+ * @param propertyName
+ * The name of the property definition associated with this
+ * administrator action.
+ */
+ public AdministratorAction(Type type, AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ this.type = type;
+ this.definition = d;
+ this.propertyName = propertyName;
+ }
+
+ /**
+ * Gets the synopsis of this administrator action in the default locale.
+ *
+ * @return Returns the synopsis of this administrator action in the default
+ * locale, or <code>null</code> if there is no synopsis defined.
+ */
+ public final LocalizableMessage getSynopsis() {
+ return getSynopsis(Locale.getDefault());
+ }
+
+ /**
+ * Gets the synopsis of this administrator action in the specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the synopsis of this administrator action in the
+ * specified locale, or <code>null</code> if there is no synopsis
+ * defined.
+ */
+ public final LocalizableMessage getSynopsis(Locale locale) {
+ ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
+ String property = "property." + propertyName + ".requires-admin-action.synopsis";
+ try {
+ return resource.getMessage(definition, property, locale);
+ } catch (MissingResourceException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Gets the type of this administrator action.
+ *
+ * @return Returns the type of this administrator action.
+ */
+ public final Type getType() {
+ return type;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/AggregationPropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/AggregationPropertyDefinition.java
new file mode 100644
index 0000000..b23167a
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/AggregationPropertyDefinition.java
@@ -0,0 +1,1033 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+import static com.forgerock.opendj.util.StaticUtils.*;
+
+import org.forgerock.util.Reject;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.SortedSet;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.slf4j.LocalizedLogger;
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.client.ClientConstraintHandler;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagedObjectDecodingException;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.conditions.Condition;
+import org.forgerock.opendj.config.conditions.Conditions;
+import org.forgerock.opendj.config.server.ConfigChangeResult;
+import org.forgerock.opendj.config.server.ConfigException;
+import org.forgerock.opendj.config.server.ConfigurationDeleteListener;
+import org.forgerock.opendj.config.server.ServerConstraintHandler;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.config.server.ServerManagedObjectChangeListener;
+import org.forgerock.opendj.config.server.ServerManagementContext;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.opendj.ldap.ResultCode;
+
+/**
+ * Aggregation property definition.
+ * <p>
+ * An aggregation property names one or more managed objects which are required
+ * by the managed object associated with this property. An aggregation property
+ * definition takes care to perform referential integrity checks: referenced
+ * managed objects cannot be deleted. Nor can an aggregation reference
+ * non-existent managed objects. Referential integrity checks are <b>not</b>
+ * performed during value validation. Instead they are performed when changes to
+ * the managed object are committed.
+ * <p>
+ * An aggregation property definition can optionally identify two properties:
+ * <ul>
+ * <li>an <code>enabled</code> property in the aggregated managed object - the
+ * property must be a {@link BooleanPropertyDefinition} and indicate whether the
+ * aggregated managed object is enabled or not. If specified, the administration
+ * framework will prevent the aggregated managed object from being disabled
+ * while it is referenced
+ * <li>an <code>enabled</code> property in this property's managed object - the
+ * property must be a {@link BooleanPropertyDefinition} and indicate whether
+ * this property's managed object is enabled or not. If specified, and as long
+ * as there is an equivalent <code>enabled</code> property defined for the
+ * aggregated managed object, the <code>enabled</code> property in the
+ * aggregated managed object will only be checked when this property is true.
+ * </ul>
+ * In other words, these properties can be used to make sure that referenced
+ * managed objects are not disabled while they are referenced.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * aggregation property definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * aggregation property definition refers to.
+ */
+public final class AggregationPropertyDefinition<C extends ConfigurationClient, S extends Configuration> extends
+ PropertyDefinition<String> {
+
+ /**
+ * An interface for incrementally constructing aggregation property
+ * definitions.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * aggregation property definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * aggregation property definition refers to.
+ */
+ public static final class Builder<C extends ConfigurationClient, S extends Configuration> extends
+ AbstractBuilder<String, AggregationPropertyDefinition<C, S>> {
+
+ // The string representation of the managed object path specifying
+ // the parent of the aggregated managed objects.
+ private String parentPathString = null;
+
+ // The name of a relation in the parent managed object which
+ // contains the aggregated managed objects.
+ private String rdName = null;
+
+ // The condition which is used to determine if a referenced
+ // managed object is enabled.
+ private Condition targetIsEnabledCondition = Conditions.TRUE;
+
+ // The condition which is used to determine whether or not
+ // referenced managed objects need to be enabled.
+ private Condition targetNeedsEnablingCondition = Conditions.TRUE;
+
+ // Private constructor
+ private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ super(d, propertyName);
+ }
+
+ /**
+ * Sets the name of the managed object which is the parent of the
+ * aggregated managed objects.
+ * <p>
+ * This must be defined before the property definition can be built.
+ *
+ * @param pathString
+ * The string representation of the managed object path
+ * specifying the parent of the aggregated managed objects.
+ */
+ public final void setParentPath(String pathString) {
+ this.parentPathString = pathString;
+ }
+
+ /**
+ * Sets the relation in the parent managed object which contains the
+ * aggregated managed objects.
+ * <p>
+ * This must be defined before the property definition can be built.
+ *
+ * @param rdName
+ * The name of a relation in the parent managed object which
+ * contains the aggregated managed objects.
+ */
+ public final void setRelationDefinition(String rdName) {
+ this.rdName = rdName;
+ }
+
+ /**
+ * Sets the condition which is used to determine if a referenced managed
+ * object is enabled. By default referenced managed objects are assumed
+ * to always be enabled.
+ *
+ * @param condition
+ * The condition which is used to determine if a referenced
+ * managed object is enabled.
+ */
+ public final void setTargetIsEnabledCondition(Condition condition) {
+ this.targetIsEnabledCondition = condition;
+ }
+
+ /**
+ * Sets the condition which is used to determine whether or not
+ * referenced managed objects need to be enabled. By default referenced
+ * managed objects must always be enabled.
+ *
+ * @param condition
+ * The condition which is used to determine whether or not
+ * referenced managed objects need to be enabled.
+ */
+ public final void setTargetNeedsEnablingCondition(Condition condition) {
+ this.targetNeedsEnablingCondition = condition;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected AggregationPropertyDefinition<C, S> buildInstance(AbstractManagedObjectDefinition<?, ?> d,
+ String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<String> defaultBehavior) {
+ // Make sure that the parent path has been defined.
+ if (parentPathString == null) {
+ throw new IllegalStateException("Parent path undefined");
+ }
+
+ // Make sure that the relation definition has been defined.
+ if (rdName == null) {
+ throw new IllegalStateException("Relation definition undefined");
+ }
+
+ return new AggregationPropertyDefinition<C, S>(d, propertyName, options, adminAction, defaultBehavior,
+ parentPathString, rdName, targetNeedsEnablingCondition, targetIsEnabledCondition);
+ }
+
+ }
+
+ /**
+ * A change listener which prevents the named component from being disabled.
+ */
+ private final class ReferentialIntegrityChangeListener implements ServerManagedObjectChangeListener<S> {
+
+ // The error message which should be returned if an attempt is
+ // made to disable the referenced component.
+ private final LocalizableMessage message;
+
+ // The path of the referenced component.
+ private final ManagedObjectPath<C, S> path;
+
+ // Creates a new referential integrity delete listener.
+ private ReferentialIntegrityChangeListener(ManagedObjectPath<C, S> path, LocalizableMessage message) {
+ this.path = path;
+ this.message = message;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ConfigChangeResult applyConfigurationChange(ServerManagedObject<? extends S> mo) {
+ try {
+ if (targetIsEnabledCondition.evaluate(mo)) {
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+ } catch (ConfigException e) {
+ // This should not happen - ignore it and throw an exception
+ // anyway below.
+ }
+
+ // This should not happen - the previous call-back should have
+ // trapped this.
+ throw new IllegalStateException("Attempting to disable a referenced "
+ + relationDefinition.getChildDefinition().getUserFriendlyName());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isConfigurationChangeAcceptable(ServerManagedObject<? extends S> mo,
+ List<LocalizableMessage> unacceptableReasons) {
+ // Always prevent the referenced component from being
+ // disabled.
+ try {
+ if (!targetIsEnabledCondition.evaluate(mo)) {
+ unacceptableReasons.add(message);
+ return false;
+ } else {
+ return true;
+ }
+ } catch (ConfigException e) {
+ // The condition could not be evaluated.
+ debugLogger.trace("Unable to perform post add", e);
+ LocalizableMessage message =
+ ERR_REFINT_UNABLE_TO_EVALUATE_TARGET_CONDITION.get(mo.getManagedObjectDefinition()
+ .getUserFriendlyName(), String.valueOf(mo.getDN()), getExceptionMessage(e));
+ LocalizedLogger logger =
+ LocalizedLogger.getLocalizedLogger(ERR_REFINT_UNABLE_TO_EVALUATE_TARGET_CONDITION.resourceName());
+ logger.error(message);
+ unacceptableReasons.add(message);
+ return false;
+ }
+ }
+
+ // Gets the path associated with this listener.
+ private ManagedObjectPath<C, S> getManagedObjectPath() {
+ return path;
+ }
+
+ }
+
+ /**
+ * A delete listener which prevents the named component from being deleted.
+ */
+ private final class ReferentialIntegrityDeleteListener implements ConfigurationDeleteListener<S> {
+
+ // The DN of the referenced configuration entry.
+ private final DN dn;
+
+ // The error message which should be returned if an attempt is
+ // made to delete the referenced component.
+ private final LocalizableMessage message;
+
+ // Creates a new referential integrity delete listener.
+ private ReferentialIntegrityDeleteListener(DN dn, LocalizableMessage message) {
+ this.dn = dn;
+ this.message = message;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ConfigChangeResult applyConfigurationDelete(S configuration) {
+ // This should not happen - the
+ // isConfigurationDeleteAcceptable() call-back should have
+ // trapped this.
+ if (configuration.dn().equals(dn)) {
+ // This should not happen - the
+ // isConfigurationDeleteAcceptable() call-back should have
+ // trapped this.
+ throw new IllegalStateException("Attempting to delete a referenced "
+ + relationDefinition.getChildDefinition().getUserFriendlyName());
+ } else {
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isConfigurationDeleteAcceptable(S configuration, List<LocalizableMessage> unacceptableReasons) {
+ if (configuration.dn().equals(dn)) {
+ // Always prevent deletion of the referenced component.
+ unacceptableReasons.add(message);
+ return false;
+ }
+
+ return true;
+ }
+
+ }
+
+ /**
+ * The server-side constraint handler implementation.
+ */
+ private class ServerHandler extends ServerConstraintHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isUsable(ServerManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ConfigException {
+ SortedSet<String> names = managedObject.getPropertyValues(AggregationPropertyDefinition.this);
+ ServerManagementContext context = managedObject.getServerContext();
+ LocalizableMessage thisUFN = managedObject.getManagedObjectDefinition().getUserFriendlyName();
+ String thisDN = managedObject.getDN().toString();
+ LocalizableMessage thatUFN = getRelationDefinition().getUserFriendlyName();
+
+ boolean isUsable = true;
+ boolean needsEnabling = targetNeedsEnablingCondition.evaluate(managedObject);
+ for (String name : names) {
+ ManagedObjectPath<C, S> path = getChildPath(name);
+ String thatDN = path.toDN().toString();
+
+ if (!context.managedObjectExists(path)) {
+ LocalizableMessage msg =
+ ERR_SERVER_REFINT_DANGLING_REFERENCE.get(name, getName(), thisUFN, thisDN, thatUFN, thatDN);
+ unacceptableReasons.add(msg);
+ isUsable = false;
+ } else if (needsEnabling) {
+ // Check that the referenced component is enabled if
+ // required.
+ ServerManagedObject<? extends S> ref = context.getManagedObject(path);
+ if (!targetIsEnabledCondition.evaluate(ref)) {
+ LocalizableMessage msg =
+ ERR_SERVER_REFINT_TARGET_DISABLED.get(name, getName(), thisUFN, thisDN, thatUFN, thatDN);
+ unacceptableReasons.add(msg);
+ isUsable = false;
+ }
+ }
+ }
+
+ return isUsable;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void performPostAdd(ServerManagedObject<?> managedObject) throws ConfigException {
+ // First make sure existing listeners associated with this
+ // managed object are removed. This is required in order to
+ // prevent multiple change listener registrations from
+ // occurring, for example if this call-back is invoked multiple
+ // times after the same add event.
+ performPostDelete(managedObject);
+
+ // Add change and delete listeners against all referenced
+ // components.
+ LocalizableMessage thisUFN = managedObject.getManagedObjectDefinition().getUserFriendlyName();
+ String thisDN = managedObject.getDN().toString();
+ LocalizableMessage thatUFN = getRelationDefinition().getUserFriendlyName();
+
+ // Referenced managed objects will only need a change listener
+ // if they have can be disabled.
+ boolean needsChangeListeners = targetNeedsEnablingCondition.evaluate(managedObject);
+
+ // Delete listeners need to be registered against the parent
+ // entry of the referenced components.
+ ServerManagementContext context = managedObject.getServerContext();
+ ManagedObjectPath<?, ?> parentPath = getParentPath();
+ ServerManagedObject<?> parent = context.getManagedObject(parentPath);
+
+ // Create entries in the listener tables.
+ List<ReferentialIntegrityDeleteListener> dlist = new LinkedList<ReferentialIntegrityDeleteListener>();
+ deleteListeners.put(managedObject.getDN(), dlist);
+
+ List<ReferentialIntegrityChangeListener> clist = new LinkedList<ReferentialIntegrityChangeListener>();
+ changeListeners.put(managedObject.getDN(), clist);
+
+ for (String name : managedObject.getPropertyValues(AggregationPropertyDefinition.this)) {
+ ManagedObjectPath<C, S> path = getChildPath(name);
+ DN dn = path.toDN();
+ String thatDN = dn.toString();
+
+ // Register the delete listener.
+ LocalizableMessage msg =
+ ERR_SERVER_REFINT_CANNOT_DELETE.get(thatUFN, thatDN, getName(), thisUFN, thisDN);
+ ReferentialIntegrityDeleteListener dl = new ReferentialIntegrityDeleteListener(dn, msg);
+ parent.registerDeleteListener(getRelationDefinition(), dl);
+ dlist.add(dl);
+
+ // Register the change listener if required.
+ if (needsChangeListeners) {
+ ServerManagedObject<? extends S> ref = context.getManagedObject(path);
+ msg = ERR_SERVER_REFINT_CANNOT_DISABLE.get(thatUFN, thatDN, getName(), thisUFN, thisDN);
+ ReferentialIntegrityChangeListener cl = new ReferentialIntegrityChangeListener(path, msg);
+ ref.registerChangeListener(cl);
+ clist.add(cl);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void performPostDelete(ServerManagedObject<?> managedObject) throws ConfigException {
+ // Remove any registered delete and change listeners.
+ ServerManagementContext context = managedObject.getServerContext();
+ DN dn = managedObject.getDN();
+
+ // Delete listeners need to be deregistered against the parent
+ // entry of the referenced components.
+ ManagedObjectPath<?, ?> parentPath = getParentPath();
+ ServerManagedObject<?> parent = context.getManagedObject(parentPath);
+ if (deleteListeners.containsKey(dn)) {
+ for (ReferentialIntegrityDeleteListener dl : deleteListeners.get(dn)) {
+ parent.deregisterDeleteListener(getRelationDefinition(), dl);
+ }
+ deleteListeners.remove(dn);
+ }
+
+ // Change listeners need to be deregistered from their
+ // associated referenced component.
+ if (changeListeners.containsKey(dn)) {
+ for (ReferentialIntegrityChangeListener cl : changeListeners.get(dn)) {
+ ManagedObjectPath<C, S> path = cl.getManagedObjectPath();
+ ServerManagedObject<? extends S> ref = context.getManagedObject(path);
+ ref.deregisterChangeListener(cl);
+ }
+ changeListeners.remove(dn);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void performPostModify(ServerManagedObject<?> managedObject) throws ConfigException {
+ // Remove all the constraints associated with this managed
+ // object and then re-register them.
+ performPostDelete(managedObject);
+ performPostAdd(managedObject);
+ }
+ }
+
+ /**
+ * The client-side constraint handler implementation which enforces
+ * referential integrity when aggregating managed objects are added or
+ * modified.
+ */
+ private class SourceClientHandler extends ClientConstraintHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAddAcceptable(ManagementContext context, ManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
+ // If all of this managed object's "enabled" properties are true
+ // then any referenced managed objects must also be enabled.
+ boolean needsEnabling = targetNeedsEnablingCondition.evaluate(context, managedObject);
+
+ // Check the referenced managed objects exist and, if required,
+ // are enabled.
+ boolean isAcceptable = true;
+ LocalizableMessage ufn = getRelationDefinition().getUserFriendlyName();
+ for (String name : managedObject.getPropertyValues(AggregationPropertyDefinition.this)) {
+ // Retrieve the referenced managed object and make sure it
+ // exists.
+ ManagedObjectPath<?, ?> path = getChildPath(name);
+ ManagedObject<?> ref;
+ try {
+ ref = context.getManagedObject(path);
+ } catch (DefinitionDecodingException e) {
+ LocalizableMessage msg =
+ ERR_CLIENT_REFINT_TARGET_INVALID.get(ufn, name, getName(), e.getMessageObject());
+ unacceptableReasons.add(msg);
+ isAcceptable = false;
+ continue;
+ } catch (ManagedObjectDecodingException e) {
+ LocalizableMessage msg =
+ ERR_CLIENT_REFINT_TARGET_INVALID.get(ufn, name, getName(), e.getMessageObject());
+ unacceptableReasons.add(msg);
+ isAcceptable = false;
+ continue;
+ } catch (ManagedObjectNotFoundException e) {
+ LocalizableMessage msg = ERR_CLIENT_REFINT_TARGET_DANGLING_REFERENCE.get(ufn, name, getName());
+ unacceptableReasons.add(msg);
+ isAcceptable = false;
+ continue;
+ }
+
+ // Make sure the reference managed object is enabled.
+ if (needsEnabling) {
+ if (!targetIsEnabledCondition.evaluate(context, ref)) {
+ LocalizableMessage msg = ERR_CLIENT_REFINT_TARGET_DISABLED.get(ufn, name, getName());
+ unacceptableReasons.add(msg);
+ isAcceptable = false;
+ }
+ }
+ }
+ return isAcceptable;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isModifyAcceptable(ManagementContext context, ManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
+ // The same constraint applies as for adds.
+ return isAddAcceptable(context, managedObject, unacceptableReasons);
+ }
+
+ }
+
+ /**
+ * The client-side constraint handler implementation which enforces
+ * referential integrity when aggregated managed objects are deleted or
+ * modified.
+ */
+ private class TargetClientHandler extends ClientConstraintHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isDeleteAcceptable(ManagementContext context, ManagedObjectPath<?, ?> path,
+ Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
+ // Any references to the deleted managed object should cause a
+ // constraint violation.
+ boolean isAcceptable = true;
+ for (ManagedObject<?> mo : findReferences(context, getManagedObjectDefinition(), path.getName())) {
+ String name = mo.getManagedObjectPath().getName();
+ if (name == null) {
+ LocalizableMessage msg =
+ ERR_CLIENT_REFINT_CANNOT_DELETE_WITHOUT_NAME.get(getName(), mo.getManagedObjectDefinition()
+ .getUserFriendlyName(), getManagedObjectDefinition().getUserFriendlyName());
+ unacceptableReasons.add(msg);
+ } else {
+ LocalizableMessage msg =
+ ERR_CLIENT_REFINT_CANNOT_DELETE_WITH_NAME.get(getName(), mo.getManagedObjectDefinition()
+ .getUserFriendlyName(), name, getManagedObjectDefinition().getUserFriendlyName());
+ unacceptableReasons.add(msg);
+ }
+ isAcceptable = false;
+ }
+ return isAcceptable;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isModifyAcceptable(ManagementContext context, ManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
+ // If the modified managed object is disabled and there are some
+ // active references then refuse the change.
+ if (targetIsEnabledCondition.evaluate(context, managedObject)) {
+ return true;
+ }
+
+ // The referenced managed object is disabled. Need to check for
+ // active references.
+ boolean isAcceptable = true;
+ for (ManagedObject<?> mo : findReferences(context, getManagedObjectDefinition(), managedObject
+ .getManagedObjectPath().getName())) {
+ if (targetNeedsEnablingCondition.evaluate(context, mo)) {
+ String name = mo.getManagedObjectPath().getName();
+ if (name == null) {
+ LocalizableMessage msg =
+ ERR_CLIENT_REFINT_CANNOT_DISABLE_WITHOUT_NAME.get(managedObject
+ .getManagedObjectDefinition().getUserFriendlyName(), getName(), mo
+ .getManagedObjectDefinition().getUserFriendlyName());
+ unacceptableReasons.add(msg);
+ } else {
+ LocalizableMessage msg =
+ ERR_CLIENT_REFINT_CANNOT_DISABLE_WITH_NAME.get(
+ managedObject.getManagedObjectDefinition().getUserFriendlyName(), getName(),
+ mo.getManagedObjectDefinition().getUserFriendlyName(), name);
+ unacceptableReasons.add(msg);
+ }
+ isAcceptable = false;
+ }
+ }
+ return isAcceptable;
+ }
+
+ // Find all managed objects which reference the named managed
+ // object using this property.
+ private <C1 extends ConfigurationClient> List<ManagedObject<? extends C1>> findReferences(
+ ManagementContext context, AbstractManagedObjectDefinition<C1, ?> mod, String name)
+ throws ErrorResultException {
+ List<ManagedObject<? extends C1>> instances = findInstances(context, mod);
+
+ Iterator<ManagedObject<? extends C1>> i = instances.iterator();
+ while (i.hasNext()) {
+ ManagedObject<? extends C1> mo = i.next();
+ boolean hasReference = false;
+
+ for (String value : mo.getPropertyValues(AggregationPropertyDefinition.this)) {
+ if (compare(value, name) == 0) {
+ hasReference = true;
+ break;
+ }
+ }
+
+ if (!hasReference) {
+ i.remove();
+ }
+ }
+
+ return instances;
+ }
+
+ // Find all instances of a specific type of managed object.
+ @SuppressWarnings("unchecked")
+ private <C1 extends ConfigurationClient> List<ManagedObject<? extends C1>> findInstances(
+ ManagementContext context, AbstractManagedObjectDefinition<C1, ?> mod) throws ErrorResultException {
+ List<ManagedObject<? extends C1>> instances = new LinkedList<ManagedObject<? extends C1>>();
+
+ if (mod == RootCfgDefn.getInstance()) {
+ instances.add((ManagedObject<? extends C1>) context.getRootConfigurationManagedObject());
+ } else {
+ for (RelationDefinition<? super C1, ?> rd : mod.getAllReverseRelationDefinitions()) {
+ for (ManagedObject<?> parent : findInstances(context, rd.getParentDefinition())) {
+ try {
+ if (rd instanceof SingletonRelationDefinition) {
+ SingletonRelationDefinition<? super C1, ?> srd =
+ (SingletonRelationDefinition<? super C1, ?>) rd;
+ ManagedObject<?> mo = parent.getChild(srd);
+ if (mo.getManagedObjectDefinition().isChildOf(mod)) {
+ instances.add((ManagedObject<? extends C1>) mo);
+ }
+ } else if (rd instanceof OptionalRelationDefinition) {
+ OptionalRelationDefinition<? super C1, ?> ord =
+ (OptionalRelationDefinition<? super C1, ?>) rd;
+ ManagedObject<?> mo = parent.getChild(ord);
+ if (mo.getManagedObjectDefinition().isChildOf(mod)) {
+ instances.add((ManagedObject<? extends C1>) mo);
+ }
+ } else if (rd instanceof InstantiableRelationDefinition) {
+ InstantiableRelationDefinition<? super C1, ?> ird =
+ (InstantiableRelationDefinition<? super C1, ?>) rd;
+
+ for (String name : parent.listChildren(ird)) {
+ ManagedObject<?> mo = parent.getChild(ird, name);
+ if (mo.getManagedObjectDefinition().isChildOf(mod)) {
+ instances.add((ManagedObject<? extends C1>) mo);
+ }
+ }
+ }
+ } catch (OperationsException e) {
+ // Ignore all operations exceptions.
+ }
+ }
+ }
+ }
+
+ return instances;
+ }
+ }
+
+ /**
+ * Creates an aggregation property definition builder.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * aggregation property definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * aggregation property definition refers to.
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param propertyName
+ * The property name.
+ * @return Returns the new aggregation property definition builder.
+ */
+ public static <C extends ConfigurationClient, S extends Configuration> Builder<C, S> createBuilder(
+ AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ return new Builder<C, S>(d, propertyName);
+ }
+
+ private static final Logger debugLogger = LoggerFactory.getLogger(AggregationPropertyDefinition.class);
+
+ // The active server-side referential integrity change listeners
+ // associated with this property.
+ private final Map<DN, List<ReferentialIntegrityChangeListener>> changeListeners =
+ new HashMap<DN, List<ReferentialIntegrityChangeListener>>();
+
+ // The active server-side referential integrity delete listeners
+ // associated with this property.
+ private final Map<DN, List<ReferentialIntegrityDeleteListener>> deleteListeners =
+ new HashMap<DN, List<ReferentialIntegrityDeleteListener>>();
+
+ // The name of the managed object which is the parent of the
+ // aggregated managed objects.
+ private ManagedObjectPath<?, ?> parentPath;
+
+ // The string representation of the managed object path specifying
+ // the parent of the aggregated managed objects.
+ private final String parentPathString;
+
+ // The name of a relation in the parent managed object which
+ // contains the aggregated managed objects.
+ private final String rdName;
+
+ // The relation in the parent managed object which contains the
+ // aggregated managed objects.
+ private InstantiableRelationDefinition<C, S> relationDefinition;
+
+ // The source constraint.
+ private final Constraint sourceConstraint;
+
+ // The condition which is used to determine if a referenced managed
+ // object is enabled.
+ private final Condition targetIsEnabledCondition;
+
+ // The condition which is used to determine whether or not
+ // referenced managed objects need to be enabled.
+ private final Condition targetNeedsEnablingCondition;
+
+ // Private constructor.
+ private AggregationPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<String> defaultBehavior, String parentPathString, String rdName,
+ Condition targetNeedsEnablingCondition, Condition targetIsEnabledCondition) {
+ super(d, String.class, propertyName, options, adminAction, defaultBehavior);
+
+ this.parentPathString = parentPathString;
+ this.rdName = rdName;
+ this.targetNeedsEnablingCondition = targetNeedsEnablingCondition;
+ this.targetIsEnabledCondition = targetIsEnabledCondition;
+ this.sourceConstraint = new Constraint() {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<ClientConstraintHandler> getClientConstraintHandlers() {
+ ClientConstraintHandler handler = new SourceClientHandler();
+ return Collections.singleton(handler);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<ServerConstraintHandler> getServerConstraintHandlers() {
+ ServerConstraintHandler handler = new ServerHandler();
+ return Collections.singleton(handler);
+ }
+ };
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
+ return v.visitAggregation(this, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyValueVisitor<R, P> v, String value, P p) {
+ return v.visitAggregation(this, value, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String decodeValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ try {
+ validateValue(value, options);
+ return value;
+ } catch (IllegalPropertyValueException e) {
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+ }
+
+ /**
+ * Constructs a DN for a referenced managed object having the provided name.
+ * This method is implemented by first calling {@link #getChildPath(String)}
+ * and then invoking {@code ManagedObjectPath.toDN()} on the returned path.
+ *
+ * @param name
+ * The name of the child managed object.
+ * @return Returns a DN for a referenced managed object having the provided
+ * name.
+ */
+ public final DN getChildDN(String name) {
+ return getChildPath(name).toDN();
+ }
+
+ /**
+ * Constructs a managed object path for a referenced managed object having
+ * the provided name.
+ *
+ * @param name
+ * The name of the child managed object.
+ * @return Returns a managed object path for a referenced managed object
+ * having the provided name.
+ */
+ public final ManagedObjectPath<C, S> getChildPath(String name) {
+ return parentPath.child(relationDefinition, name);
+ }
+
+ /**
+ * Gets the name of the managed object which is the parent of the aggregated
+ * managed objects.
+ *
+ * @return Returns the name of the managed object which is the parent of the
+ * aggregated managed objects.
+ */
+ public final ManagedObjectPath<?, ?> getParentPath() {
+ return parentPath;
+ }
+
+ /**
+ * Gets the relation in the parent managed object which contains the
+ * aggregated managed objects.
+ *
+ * @return Returns the relation in the parent managed object which contains
+ * the aggregated managed objects.
+ */
+ public final InstantiableRelationDefinition<C, S> getRelationDefinition() {
+ return relationDefinition;
+ }
+
+ /**
+ * Gets the constraint which should be enforced on the aggregating managed
+ * object.
+ *
+ * @return Returns the constraint which should be enforced on the
+ * aggregating managed object.
+ */
+ public final Constraint getSourceConstraint() {
+ return sourceConstraint;
+ }
+
+ /**
+ * Gets the optional constraint synopsis of this aggregation property
+ * definition in the default locale. The constraint synopsis describes when
+ * and how referenced managed objects must be enabled. When there are no
+ * constraints between the source managed object and the objects it
+ * references through this aggregation, <code>null</code> is returned.
+ *
+ * @return Returns the optional constraint synopsis of this aggregation
+ * property definition in the default locale, or <code>null</code>
+ * if there is no constraint synopsis.
+ */
+ public final LocalizableMessage getSourceConstraintSynopsis() {
+ return getSourceConstraintSynopsis(Locale.getDefault());
+ }
+
+ /**
+ * Gets the optional constraint synopsis of this aggregation property
+ * definition in the specified locale.The constraint synopsis describes when
+ * and how referenced managed objects must be enabled. When there are no
+ * constraints between the source managed object and the objects it
+ * references through this aggregation, <code>null</code> is returned.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the optional constraint synopsis of this aggregation
+ * property definition in the specified locale, or <code>null</code>
+ * if there is no constraint synopsis.
+ */
+ public final LocalizableMessage getSourceConstraintSynopsis(Locale locale) {
+ ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
+ String property = "property." + getName() + ".syntax.aggregation.constraint-synopsis";
+ try {
+ return resource.getMessage(getManagedObjectDefinition(), property, locale);
+ } catch (MissingResourceException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Gets the condition which is used to determine if a referenced managed
+ * object is enabled.
+ *
+ * @return Returns the condition which is used to determine if a referenced
+ * managed object is enabled.
+ */
+ public final Condition getTargetIsEnabledCondition() {
+ return targetIsEnabledCondition;
+ }
+
+ /**
+ * Gets the condition which is used to determine whether or not referenced
+ * managed objects need to be enabled.
+ *
+ * @return Returns the condition which is used to determine whether or not
+ * referenced managed objects need to be enabled.
+ */
+ public final Condition getTargetNeedsEnablingCondition() {
+ return targetNeedsEnablingCondition;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String normalizeValue(String value) {
+ try {
+ Reference<C, S> reference = Reference.parseName(parentPath, relationDefinition, value);
+ return reference.getNormalizedName();
+ } catch (IllegalArgumentException e) {
+ throw new IllegalPropertyValueException(this, value);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void toString(StringBuilder builder) {
+ super.toString(builder);
+
+ builder.append(" parentPath=");
+ builder.append(parentPath);
+
+ builder.append(" relationDefinition=");
+ builder.append(relationDefinition.getName());
+
+ builder.append(" targetNeedsEnablingCondition=");
+ builder.append(String.valueOf(targetNeedsEnablingCondition));
+
+ builder.append(" targetIsEnabledCondition=");
+ builder.append(String.valueOf(targetIsEnabledCondition));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void validateValue(String value, PropertyDefinitionsOptions options) {
+ try {
+ Reference.parseName(parentPath, relationDefinition, value);
+ } catch (IllegalArgumentException e) {
+ throw new IllegalPropertyValueException(this, value);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void initialize() throws Exception {
+ // Decode the path.
+ parentPath = ManagedObjectPath.valueOf(parentPathString);
+
+ // Decode the relation definition.
+ AbstractManagedObjectDefinition<?, ?> parent = parentPath.getManagedObjectDefinition();
+ RelationDefinition<?, ?> rd = parent.getRelationDefinition(rdName);
+ relationDefinition = (InstantiableRelationDefinition<C, S>) rd;
+
+ // Now decode the conditions.
+ targetNeedsEnablingCondition.initialize(getManagedObjectDefinition());
+ targetIsEnabledCondition.initialize(rd.getChildDefinition());
+
+ // Register a client-side constraint with the referenced
+ // definition. This will be used to enforce referential integrity
+ // for actions performed against referenced managed objects.
+ Constraint constraint = new Constraint() {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<ClientConstraintHandler> getClientConstraintHandlers() {
+ ClientConstraintHandler handler = new TargetClientHandler();
+ return Collections.singleton(handler);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<ServerConstraintHandler> getServerConstraintHandlers() {
+ return Collections.emptyList();
+ }
+ };
+
+ rd.getChildDefinition().registerConstraint(constraint);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/AliasDefaultBehaviorProvider.java b/opendj-config/src/main/java/org/forgerock/opendj/config/AliasDefaultBehaviorProvider.java
new file mode 100644
index 0000000..46cac8c
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/AliasDefaultBehaviorProvider.java
@@ -0,0 +1,99 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.Locale;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * A default behavior provider which indicates special behavior. It should be
+ * used by properties which have a default behavior which cannot be directly
+ * represented using real values of the property. For example, a property
+ * containing a set of user names might default to "all users" when no values
+ * are provided. This meaning cannot be represented using a finite set of
+ * values.
+ *
+ * @param <T>
+ * The type of values represented by this provider.
+ */
+public final class AliasDefaultBehaviorProvider<T> extends DefaultBehaviorProvider<T> {
+
+ // The managed object definition associated with this default
+ // behavior.
+ private final AbstractManagedObjectDefinition<?, ?> definition;
+
+ // The name of the property definition associated with this default
+ // behavior.
+ private final String propertyName;
+
+ /**
+ * Create an alias default behavior provider.
+ *
+ * @param d
+ * The managed object definition associated with this default
+ * behavior.
+ * @param propertyName
+ * The name of the property definition associated with this
+ * default behavior.
+ */
+ public AliasDefaultBehaviorProvider(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ this.definition = d;
+ this.propertyName = propertyName;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p) {
+ return v.visitAlias(this, p);
+ }
+
+ /**
+ * Gets the synopsis of this alias default behavior in the default locale.
+ *
+ * @return Returns the synopsis of this alias default behavior in the
+ * default locale.
+ */
+ public final LocalizableMessage getSynopsis() {
+ return getSynopsis(Locale.getDefault());
+ }
+
+ /**
+ * Gets the synopsis of this alias default behavior in the specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the synopsis of this alias default behavior in the
+ * specified locale.
+ */
+ public final LocalizableMessage getSynopsis(Locale locale) {
+ ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
+ String property = "property." + propertyName + ".default-behavior.alias.synopsis";
+ return resource.getMessage(definition, property, locale);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/AttributeTypePropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/AttributeTypePropertyDefinition.java
new file mode 100644
index 0000000..4a0387e
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/AttributeTypePropertyDefinition.java
@@ -0,0 +1,147 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.util.EnumSet;
+
+import org.forgerock.opendj.ldap.schema.AttributeType;
+import org.opends.server.core.DirectoryServer;
+
+/**
+ * Attribute type property definition.
+ */
+public final class AttributeTypePropertyDefinition extends PropertyDefinition<AttributeType> {
+
+ /**
+ * An interface for incrementally constructing attribute type property
+ * definitions.
+ */
+ public static final class Builder extends AbstractBuilder<AttributeType, AttributeTypePropertyDefinition> {
+
+ // Private constructor
+ private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ super(d, propertyName);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected AttributeTypePropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
+ String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<AttributeType> defaultBehavior) {
+ return new AttributeTypePropertyDefinition(d, propertyName, options, adminAction, defaultBehavior);
+ }
+ }
+
+ /**
+ * Create a attribute type property definition builder.
+ *
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param propertyName
+ * The property name.
+ * @return Returns the new attribute type property definition builder.
+ */
+ public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ return new Builder(d, propertyName);
+ }
+
+ // Private constructor.
+ private AttributeTypePropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<AttributeType> defaultBehavior) {
+ super(d, AttributeType.class, propertyName, options, adminAction, defaultBehavior);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
+ return v.visitAttributeType(this, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyValueVisitor<R, P> v, AttributeType value, P p) {
+ return v.visitAttributeType(this, value, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int compare(AttributeType o1, AttributeType o2) {
+ return o1.getNameOrOID().compareToIgnoreCase(o2.getNameOrOID());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public AttributeType decodeValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ String name = value.trim().toLowerCase();
+ AttributeType type = DirectoryServer.getAttributeType(name, !options.checkSchemaForAttributes());
+
+ if (type == null) {
+ throw new IllegalPropertyValueStringException(this, value);
+ } else {
+ try {
+ validateValue(type, options);
+ return type;
+ } catch (IllegalPropertyValueException e) {
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String encodeValue(AttributeType value) {
+ return value.getNameOrOID();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void validateValue(AttributeType value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ // No implementation required.
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/BooleanPropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/BooleanPropertyDefinition.java
new file mode 100644
index 0000000..be12210
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/BooleanPropertyDefinition.java
@@ -0,0 +1,146 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Boolean property definition.
+ */
+public final class BooleanPropertyDefinition extends PropertyDefinition<Boolean> {
+
+ /**
+ * Mapping used for parsing boolean values. This mapping is more flexible
+ * than the standard boolean string parser and supports common true/false
+ * synonyms used in configuration.
+ */
+ private static final Map<String, Boolean> VALUE_MAP;
+ static {
+ VALUE_MAP = new HashMap<String, Boolean>();
+
+ // We could have more possibilities but decided against in issue 1960.
+ VALUE_MAP.put("false", Boolean.FALSE);
+ VALUE_MAP.put("true", Boolean.TRUE);
+ }
+
+ /**
+ * An interface for incrementally constructing boolean property definitions.
+ */
+ public static final class Builder extends AbstractBuilder<Boolean, BooleanPropertyDefinition> {
+
+ // Private constructor
+ private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ super(d, propertyName);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected BooleanPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
+ String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<Boolean> defaultBehavior) {
+ return new BooleanPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior);
+ }
+
+ }
+
+ /**
+ * Create a boolean property definition builder.
+ *
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param propertyName
+ * The property name.
+ * @return Returns the new boolean property definition builder.
+ */
+ public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ return new Builder(d, propertyName);
+ }
+
+ // Private constructor.
+ private BooleanPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<Boolean> defaultBehavior) {
+ super(d, Boolean.class, propertyName, options, adminAction, defaultBehavior);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void validateValue(Boolean value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ // No additional validation required.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Boolean decodeValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ String nvalue = value.trim().toLowerCase();
+ Boolean b = VALUE_MAP.get(nvalue);
+
+ if (b == null) {
+ throw new IllegalPropertyValueStringException(this, value);
+ } else {
+ return b;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
+ return v.visitBoolean(this, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyValueVisitor<R, P> v, Boolean value, P p) {
+ return v.visitBoolean(this, value, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int compare(Boolean o1, Boolean o2) {
+ return o1.compareTo(o2);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/ClassLoaderProvider.java b/opendj-config/src/main/java/org/forgerock/opendj/config/ClassLoaderProvider.java
new file mode 100644
index 0000000..c42c932
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/ClassLoaderProvider.java
@@ -0,0 +1,730 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
+ */
+package org.forgerock.opendj.config;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+import static com.forgerock.opendj.ldap.ExtensionMessages.*;
+import static com.forgerock.opendj.util.StaticUtils.*;
+import org.forgerock.util.Reject;
+
+import java.io.ByteArrayOutputStream;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+import java.util.jar.Attributes;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.slf4j.LocalizedLogger;
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.opends.server.core.DirectoryServer;
+import org.opends.server.types.InitializationException;
+import org.forgerock.opendj.server.util.DynamicConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.forgerock.opendj.ldap.AdminMessages;
+
+/**
+ * Manages the class loader which should be used for loading configuration
+ * definition classes and associated extensions.
+ * <p>
+ * For extensions which define their own extended configuration definitions, the
+ * class loader will make sure that the configuration definition classes are
+ * loaded and initialized.
+ * <p>
+ * Initially the class loader provider is disabled, and calls to the
+ * {@link #getClassLoader()} will return the system default class loader.
+ * <p>
+ * Applications <b>MUST NOT</b> maintain persistent references to the class
+ * loader as it can change at run-time.
+ */
+public final class ClassLoaderProvider {
+
+ private static final LocalizedLogger adminLogger = LocalizedLogger.getLocalizedLogger(AdminMessages
+ .resourceName());
+ private static final Logger debugLogger = LoggerFactory.getLogger(ClassLoaderProvider.class);
+
+ /**
+ * Private URLClassLoader implementation. This is only required so that we
+ * can provide access to the addURL method.
+ */
+ private static final class MyURLClassLoader extends URLClassLoader {
+
+ /**
+ * Create a class loader with the default parent class loader.
+ */
+ public MyURLClassLoader() {
+ super(new URL[0]);
+ }
+
+ /**
+ * Create a class loader with the provided parent class loader.
+ *
+ * @param parent
+ * The parent class loader.
+ */
+ public MyURLClassLoader(ClassLoader parent) {
+ super(new URL[0], parent);
+ }
+
+ /**
+ * Add a Jar file to this class loader.
+ *
+ * @param jarFile
+ * The name of the Jar file.
+ * @throws MalformedURLException
+ * If a protocol handler for the URL could not be found, or
+ * if some other error occurred while constructing the URL.
+ * @throws SecurityException
+ * If a required system property value cannot be accessed.
+ */
+ public void addJarFile(File jarFile) throws MalformedURLException {
+ addURL(jarFile.toURI().toURL());
+ }
+
+ }
+
+ // The name of the manifest file listing the core configuration
+ // definition classes.
+ private static final String CORE_MANIFEST = "core.manifest";
+
+ // The name of the manifest file listing a extension's configuration
+ // definition classes.
+ private static final String EXTENSION_MANIFEST = "extension.manifest";
+
+ // The name of the lib directory.
+ private static final String LIB_DIR = "lib";
+
+ // The name of the extensions directory.
+ private static final String EXTENSIONS_DIR = "extensions";
+
+ // The singleton instance.
+ private static final ClassLoaderProvider INSTANCE = new ClassLoaderProvider();
+
+ // Attribute name in jar's MANIFEST corresponding to the revision number.
+ private static final String REVISION_NUMBER = "Revision-Number";
+
+ // The attribute names for build information is name, version and revision
+ // number
+ private static final String[] BUILD_INFORMATION_ATTRIBUTE_NAMES =
+ new String[] { Attributes.Name.EXTENSION_NAME.toString(), Attributes.Name.IMPLEMENTATION_VERSION.toString(),
+ REVISION_NUMBER };
+
+ /**
+ * Get the single application wide class loader provider instance.
+ *
+ * @return Returns the single application wide class loader provider
+ * instance.
+ */
+ public static ClassLoaderProvider getInstance() {
+ return INSTANCE;
+ }
+
+ // Set of registered Jar files.
+ private Set<File> jarFiles = new HashSet<File>();
+
+ // Underlying class loader used to load classes and resources (null
+ // if disabled).
+ //
+ // We contain a reference to the URLClassLoader rather than
+ // sub-class it so that it is possible to replace the loader at
+ // run-time. For example, when removing or replacing extension Jar
+ // files (the URLClassLoader only supports adding new
+ // URLs, not removal).
+ private MyURLClassLoader loader = null;
+
+ // Private constructor.
+ private ClassLoaderProvider() {
+ // No implementation required.
+ }
+
+ /**
+ * Add the named extensions to this class loader provider.
+ *
+ * @param extensions
+ * The names of the extensions to be loaded. The names should not
+ * contain any path elements and must be located within the
+ * extensions folder.
+ * @throws InitializationException
+ * If one of the extensions could not be loaded and initialized.
+ * @throws IllegalStateException
+ * If this class loader provider is disabled.
+ * @throws IllegalArgumentException
+ * If one of the extension names was not a single relative path
+ * name element or was an absolute path.
+ */
+ public synchronized void addExtension(String... extensions) throws InitializationException {
+ Reject.ifNull(extensions);
+
+ if (loader == null) {
+ throw new IllegalStateException("Class loader provider is disabled.");
+ }
+
+ File libPath = new File(DirectoryServer.getInstanceRoot(), LIB_DIR);
+ File extensionsPath = new File(libPath, EXTENSIONS_DIR);
+
+ ArrayList<File> files = new ArrayList<File>(extensions.length);
+ for (String extension : extensions) {
+ File file = new File(extensionsPath, extension);
+
+ // For security reasons we need to make sure that the file name
+ // passed in did not contain any path elements and names a file
+ // in the extensions folder.
+
+ // Can handle potential null parent.
+ if (!extensionsPath.equals(file.getParentFile())) {
+ throw new IllegalArgumentException("Illegal file name: " + extension);
+ }
+
+ // The file is valid.
+ files.add(file);
+ }
+
+ // Add the extensions.
+ addExtension(files.toArray(new File[files.size()]));
+ }
+
+ /**
+ * Disable this class loader provider and removed any registered extensions.
+ *
+ * @throws IllegalStateException
+ * If this class loader provider is already disabled.
+ */
+ public synchronized void disable() {
+ if (loader == null) {
+ throw new IllegalStateException("Class loader provider already disabled.");
+ }
+ loader = null;
+ jarFiles = new HashSet<File>();
+ }
+
+ /**
+ * Enable this class loader provider using the application's class loader as
+ * the parent class loader.
+ *
+ * @throws InitializationException
+ * If the class loader provider could not initialize
+ * successfully.
+ * @throws IllegalStateException
+ * If this class loader provider is already enabled.
+ */
+ public synchronized void enable() throws InitializationException {
+ enable(RootCfgDefn.class.getClassLoader());
+ }
+
+ /**
+ * Enable this class loader provider using the provided parent class loader.
+ *
+ * @param parent
+ * The parent class loader.
+ * @throws InitializationException
+ * If the class loader provider could not initialize
+ * successfully.
+ * @throws IllegalStateException
+ * If this class loader provider is already enabled.
+ */
+ public synchronized void enable(ClassLoader parent) throws InitializationException {
+ if (loader != null) {
+ throw new IllegalStateException("Class loader provider already enabled.");
+ }
+
+ if (parent != null) {
+ loader = new MyURLClassLoader(parent);
+ } else {
+ loader = new MyURLClassLoader();
+ }
+
+ // Forcefully load all configuration definition classes in
+ // OpenDS.jar.
+ initializeCoreComponents();
+
+ // Put extensions jars into the class loader and load all
+ // configuration definition classes in that they contain.
+ // First load the extension from the install directory, then
+ // from the instance directory.
+ File libDir;
+ File installExtensionsPath;
+ File instanceExtensionsPath;
+
+ // load install dir extension
+ libDir = new File(DirectoryServer.getServerRoot(), LIB_DIR);
+ try {
+ installExtensionsPath = new File(libDir, EXTENSIONS_DIR).getCanonicalFile();
+ } catch (Exception e) {
+ installExtensionsPath = new File(libDir, EXTENSIONS_DIR);
+ }
+ initializeAllExtensions(installExtensionsPath);
+
+ // load instance dir extension
+ libDir = new File(DirectoryServer.getInstanceRoot(), LIB_DIR);
+ try {
+ instanceExtensionsPath = new File(libDir, EXTENSIONS_DIR).getCanonicalFile();
+ } catch (Exception e) {
+ instanceExtensionsPath = new File(libDir, EXTENSIONS_DIR);
+ }
+ if (!installExtensionsPath.getAbsolutePath().equals(instanceExtensionsPath.getAbsolutePath())) {
+ initializeAllExtensions(instanceExtensionsPath);
+ }
+ }
+
+ /**
+ * Gets the class loader which should be used for loading classes and
+ * resources. When this class loader provider is disabled, the system
+ * default class loader will be returned by default.
+ * <p>
+ * Applications <b>MUST NOT</b> maintain persistent references to the class
+ * loader as it can change at run-time.
+ *
+ * @return Returns the class loader which should be used for loading classes
+ * and resources.
+ */
+ public synchronized ClassLoader getClassLoader() {
+ if (loader != null) {
+ return loader;
+ } else {
+ return ClassLoader.getSystemClassLoader();
+ }
+ }
+
+ /**
+ * Indicates whether this class loader provider is enabled.
+ *
+ * @return Returns <code>true</code> if this class loader provider is
+ * enabled.
+ */
+ public synchronized boolean isEnabled() {
+ return loader != null;
+ }
+
+ /**
+ * Add the named extensions to this class loader.
+ *
+ * @param extensions
+ * The names of the extensions to be loaded.
+ * @throws InitializationException
+ * If one of the extensions could not be loaded and initialized.
+ */
+ private synchronized void addExtension(File... extensions) throws InitializationException {
+ // First add the Jar files to the class loader.
+ List<JarFile> jars = new LinkedList<JarFile>();
+ for (File extension : extensions) {
+ if (jarFiles.contains(extension)) {
+ // Skip this file as it is already loaded.
+ continue;
+ }
+
+ // Attempt to load it.
+ jars.add(loadJarFile(extension));
+
+ // Register the Jar file with the class loader.
+ try {
+ loader.addJarFile(extension);
+ } catch (Exception e) {
+ debugLogger.trace("Unable to register the jar file with the class loader", e);
+ LocalizableMessage message =
+ ERR_ADMIN_CANNOT_OPEN_JAR_FILE.get(extension.getName(), extension.getParent(),
+ stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
+ throw new InitializationException(message);
+ }
+ jarFiles.add(extension);
+ }
+
+ // Now forcefully load the configuration definition classes.
+ for (JarFile jar : jars) {
+ initializeExtension(jar);
+ }
+ }
+
+ /**
+ * Prints out all information about extensions.
+ *
+ * @return a String instance representing all information about extensions;
+ * <code>null</code> if there is no information available.
+ */
+ public String printExtensionInformation() {
+ File extensionsPath =
+ new File(new StringBuilder(DirectoryServer.getServerRoot()).append(File.separator).append(LIB_DIR)
+ .append(File.separator).append(EXTENSIONS_DIR).toString());
+
+ if (!extensionsPath.exists() || !extensionsPath.isDirectory()) {
+ // no extensions' directory
+ return null;
+ }
+
+ File[] extensions = extensionsPath.listFiles(new FileFilter() {
+ public boolean accept(File pathname) {
+ // only files with names ending with ".jar"
+ return pathname.isFile() && pathname.getName().endsWith(".jar");
+ }
+ });
+
+ if (extensions.length == 0) {
+ return null;
+ }
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ PrintStream ps = new PrintStream(baos);
+ // prints:
+ // --
+ // Name Build number Revision number
+ ps.printf("--%s %-20s %-20s %-20s%s", EOL, "Name", "Build number", "Revision number", EOL);
+
+ for (File extension : extensions) {
+ // retrieve MANIFEST entry and display name, build number and
+ // revision
+ // number
+ try {
+ JarFile jarFile = new JarFile(extension);
+ JarEntry entry = jarFile.getJarEntry("admin/" + EXTENSION_MANIFEST);
+ if (entry == null) {
+ continue;
+ }
+
+ String[] information = getBuildInformation(jarFile);
+
+ ps.append("Extension: ");
+ boolean addBlank = false;
+ for (String name : information) {
+ if (addBlank) {
+ ps.append(addBlank ? " " : ""); // add blank if not
+ // first append
+ } else {
+ addBlank = true;
+ }
+
+ ps.printf("%-20s", name);
+ }
+ ps.append(EOL);
+ } catch (Exception e) {
+ // ignore extra information for this extension
+ }
+ }
+
+ return baos.toString();
+ }
+
+ /**
+ * Returns a String array with the following information : <br>
+ * index 0: the name of the extension. <br>
+ * index 1: the build number of the extension. <br>
+ * index 2: the revision number of the extension.
+ *
+ * @param extension
+ * the jar file of the extension
+ * @return a String array containing the name, the build number and the
+ * revision number of the extension given in argument
+ * @throws java.io.IOException
+ * thrown if the jar file has been closed.
+ */
+ private String[] getBuildInformation(JarFile extension) throws IOException {
+ String[] result = new String[3];
+
+ // retrieve MANIFEST entry and display name, version and revision
+ Manifest manifest = extension.getManifest();
+
+ if (manifest != null) {
+ Attributes attributes = manifest.getMainAttributes();
+
+ int index = 0;
+ for (String name : BUILD_INFORMATION_ATTRIBUTE_NAMES) {
+ String value = attributes.getValue(name);
+ if (value == null) {
+ value = "<unknown>";
+ }
+ result[index++] = value;
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Put extensions jars into the class loader and load all configuration
+ * definition classes in that they contain.
+ *
+ * @param extensionsPath
+ * Indicates where extensions are located.
+ * @throws InitializationException
+ * If the extensions folder could not be accessed or if a
+ * extension jar file could not be accessed or if one of the
+ * configuration definition classes could not be initialized.
+ */
+ private void initializeAllExtensions(File extensionsPath) throws InitializationException {
+
+ try {
+ if (!extensionsPath.exists()) {
+ // The extensions directory does not exist. This is not a
+ // critical problem.
+ adminLogger.error(ERR_ADMIN_NO_EXTENSIONS_DIR, String.valueOf(extensionsPath));
+ return;
+ }
+
+ if (!extensionsPath.isDirectory()) {
+ // The extensions directory is not a directory. This is more
+ // critical.
+ LocalizableMessage message =
+ ERR_ADMIN_EXTENSIONS_DIR_NOT_DIRECTORY.get(String.valueOf(extensionsPath));
+ throw new InitializationException(message);
+ }
+
+ // Get each extension file name.
+ FileFilter filter = new FileFilter() {
+
+ /**
+ * Must be a Jar file.
+ */
+ public boolean accept(File pathname) {
+ if (!pathname.isFile()) {
+ return false;
+ }
+
+ String name = pathname.getName();
+ return name.endsWith(".jar");
+ }
+
+ };
+
+ // Add and initialize the extensions.
+ addExtension(extensionsPath.listFiles(filter));
+ } catch (InitializationException e) {
+ debugLogger.trace("Unable to initialize all extensions", e);
+ throw e;
+ } catch (Exception e) {
+ debugLogger.trace("Unable to initialize all extensions", e);
+ LocalizableMessage message =
+ ERR_ADMIN_EXTENSIONS_CANNOT_LIST_FILES.get(String.valueOf(extensionsPath),
+ stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
+ throw new InitializationException(message, e);
+ }
+ }
+
+ /**
+ * Make sure all core configuration definitions are loaded.
+ *
+ * @throws InitializationException
+ * If the core manifest file could not be read or if one of the
+ * configuration definition classes could not be initialized.
+ */
+ private void initializeCoreComponents() throws InitializationException {
+ InputStream is = RootCfgDefn.class.getResourceAsStream("/admin/" + CORE_MANIFEST);
+
+ if (is == null) {
+ LocalizableMessage message = ERR_ADMIN_CANNOT_FIND_CORE_MANIFEST.get(CORE_MANIFEST);
+ throw new InitializationException(message);
+ }
+
+ try {
+ loadDefinitionClasses(is);
+ } catch (InitializationException e) {
+ debugLogger.trace("Unable to initialize core components", e);
+ LocalizableMessage message =
+ ERR_CLASS_LOADER_CANNOT_LOAD_CORE.get(CORE_MANIFEST,
+ stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
+ throw new InitializationException(message);
+ }
+ }
+
+ /**
+ * Make sure all the configuration definition classes in a extension are
+ * loaded.
+ *
+ * @param jarFile
+ * The extension's Jar file.
+ * @throws InitializationException
+ * If the extension jar file could not be accessed or if one of
+ * the configuration definition classes could not be
+ * initialized.
+ */
+ private void initializeExtension(JarFile jarFile) throws InitializationException {
+ JarEntry entry = jarFile.getJarEntry("admin/" + EXTENSION_MANIFEST);
+ if (entry != null) {
+ InputStream is;
+ try {
+ is = jarFile.getInputStream(entry);
+ } catch (Exception e) {
+ debugLogger.trace("Unable to get input stream from jar", e);
+ LocalizableMessage message =
+ ERR_ADMIN_CANNOT_READ_EXTENSION_MANIFEST.get(EXTENSION_MANIFEST, jarFile.getName(),
+ stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
+ throw new InitializationException(message);
+ }
+
+ try {
+ loadDefinitionClasses(is);
+ } catch (InitializationException e) {
+ debugLogger.trace("Unable to load classes from input stream", e);
+ LocalizableMessage message =
+ ERR_CLASS_LOADER_CANNOT_LOAD_EXTENSION.get(jarFile.getName(), EXTENSION_MANIFEST,
+ stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
+ throw new InitializationException(message);
+ }
+ try {
+ // Log build information of extensions in the error log
+ String[] information = getBuildInformation(jarFile);
+ LocalizableMessage message =
+ NOTE_LOG_EXTENSION_INFORMATION.get(jarFile.getName(), information[1], information[2]);
+ LocalizedLogger.getLocalizedLogger(message.resourceName()).error(message);
+ } catch (Exception e) {
+ // Do not log information for that extension
+ }
+ }
+ }
+
+ /**
+ * Forcefully load configuration definition classes named in a manifest
+ * file.
+ *
+ * @param is
+ * The manifest file input stream.
+ * @throws InitializationException
+ * If the definition classes could not be loaded and
+ * initialized.
+ */
+ private void loadDefinitionClasses(InputStream is) throws InitializationException {
+ BufferedReader reader = new BufferedReader(new InputStreamReader(is));
+ List<AbstractManagedObjectDefinition<?, ?>> definitions =
+ new LinkedList<AbstractManagedObjectDefinition<?, ?>>();
+ while (true) {
+ String className;
+ try {
+ className = reader.readLine();
+ } catch (IOException e) {
+ LocalizableMessage msg =
+ ERR_CLASS_LOADER_CANNOT_READ_MANIFEST_FILE.get(String.valueOf(e.getMessage()));
+ throw new InitializationException(msg, e);
+ }
+
+ // Break out when the end of the manifest is reached.
+ if (className == null) {
+ break;
+ }
+
+ // Skip blank lines.
+ className = className.trim();
+ if (className.length() == 0) {
+ continue;
+ }
+
+ // Skip lines beginning with #.
+ if (className.startsWith("#")) {
+ continue;
+ }
+
+ debugLogger.trace("Loading class " + className);
+
+ // Load the class and get an instance of it if it is a definition.
+ Class<?> theClass;
+ try {
+ theClass = Class.forName(className, true, loader);
+ } catch (Exception e) {
+ LocalizableMessage msg =
+ ERR_CLASS_LOADER_CANNOT_LOAD_CLASS.get(className, String.valueOf(e.getMessage()));
+ throw new InitializationException(msg, e);
+ }
+ if (AbstractManagedObjectDefinition.class.isAssignableFrom(theClass)) {
+ // We need to instantiate it using its getInstance() static
+ // method.
+ Method method;
+ try {
+ method = theClass.getMethod("getInstance");
+ } catch (Exception e) {
+ LocalizableMessage msg =
+ ERR_CLASS_LOADER_CANNOT_FIND_GET_INSTANCE_METHOD.get(className,
+ String.valueOf(e.getMessage()));
+ throw new InitializationException(msg, e);
+ }
+
+ // Get the definition instance.
+ AbstractManagedObjectDefinition<?, ?> d;
+ try {
+ d = (AbstractManagedObjectDefinition<?, ?>) method.invoke(null);
+ } catch (Exception e) {
+ LocalizableMessage msg =
+ ERR_CLASS_LOADER_CANNOT_INVOKE_GET_INSTANCE_METHOD.get(className,
+ String.valueOf(e.getMessage()));
+ throw new InitializationException(msg, e);
+ }
+ definitions.add(d);
+ }
+ }
+
+ // Initialize any definitions that were loaded.
+ for (AbstractManagedObjectDefinition<?, ?> d : definitions) {
+ try {
+ d.initialize();
+ } catch (Exception e) {
+ LocalizableMessage msg =
+ ERR_CLASS_LOADER_CANNOT_INITIALIZE_DEFN.get(d.getName(), d.getClass().getName(),
+ String.valueOf(e.getMessage()));
+ throw new InitializationException(msg, e);
+ }
+ }
+ }
+
+ /**
+ * Load the named Jar file.
+ *
+ * @param jar
+ * The name of the Jar file to load.
+ * @return Returns the loaded Jar file.
+ * @throws InitializationException
+ * If the Jar file could not be loaded.
+ */
+ private JarFile loadJarFile(File jar) throws InitializationException {
+ JarFile jarFile;
+
+ try {
+ // Load the extension jar file.
+ jarFile = new JarFile(jar);
+ } catch (Exception e) {
+ debugLogger.trace("Unable to load jar file: " + jar, e);
+
+ LocalizableMessage message =
+ ERR_ADMIN_CANNOT_OPEN_JAR_FILE.get(jar.getName(), jar.getParent(),
+ stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
+ throw new InitializationException(message);
+ }
+ return jarFile;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/ClassPropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/ClassPropertyDefinition.java
new file mode 100644
index 0000000..b9bc49e
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/ClassPropertyDefinition.java
@@ -0,0 +1,273 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ * Portions copyright 2013 ForgeRock AS.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * Class property definition.
+ * <p>
+ * A class property definition defines a property whose values represent a Java
+ * class. It is possible to restrict the type of java class by specifying
+ * "instance of" constraints.
+ * <p>
+ * Note that in a client/server environment, the client is probably not capable
+ * of validating the Java class (e.g. it will not be able to load it nor have
+ * access to the interfaces it is supposed to implement). For this reason, it is
+ * possible to switch off validation in the client by using the appropriate
+ * {@link PropertyDefinitionsOptions}.
+ */
+public final class ClassPropertyDefinition extends PropertyDefinition<String> {
+
+ /**
+ * An interface for incrementally constructing class property definitions.
+ */
+ public static final class Builder extends AbstractBuilder<String, ClassPropertyDefinition> {
+
+ // List of interfaces which property values must implement.
+ private List<String> instanceOfInterfaces;
+
+ // Private constructor
+ private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ super(d, propertyName);
+
+ this.instanceOfInterfaces = new LinkedList<String>();
+ }
+
+ /**
+ * Add an class name which property values must implement.
+ *
+ * @param className
+ * The name of a class which property values must implement.
+ */
+ public final void addInstanceOf(String className) {
+ Reject.ifNull(className);
+
+ /*
+ * Do some basic checks to make sure the string representation is
+ * valid.
+ */
+ String value = className.trim();
+ if (!value.matches(CLASS_RE)) {
+ throw new IllegalArgumentException("\"" + value + "\" is not a valid Java class name");
+ }
+
+ instanceOfInterfaces.add(value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ClassPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<String> defaultBehavior) {
+ return new ClassPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior,
+ instanceOfInterfaces);
+ }
+
+ }
+
+ // Regular expression for validating class names.
+ private static final String CLASS_RE = "^([A-Za-z][A-Za-z0-9_]*\\.)*[A-Za-z][A-Za-z0-9_]*(\\$[A-Za-z0-9_]+)*$";
+
+ /**
+ * Create a class property definition builder.
+ *
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param propertyName
+ * The property name.
+ * @return Returns the new class property definition builder.
+ */
+ public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ return new Builder(d, propertyName);
+ }
+
+ // Load a named class.
+ private static Class<?> loadClass(String className, boolean initialize) throws ClassNotFoundException {
+ return Class.forName(className, initialize, ClassLoaderProvider.getInstance().getClassLoader());
+ }
+
+ // List of interfaces which property values must implement.
+ private final List<String> instanceOfInterfaces;
+
+ // Private constructor.
+ private ClassPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<String> defaultBehavior, List<String> instanceOfInterfaces) {
+ super(d, String.class, propertyName, options, adminAction, defaultBehavior);
+
+ this.instanceOfInterfaces = Collections.unmodifiableList(new LinkedList<String>(instanceOfInterfaces));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
+ return v.visitClass(this, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyValueVisitor<R, P> v, String value, P p) {
+ return v.visitClass(this, value, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String decodeValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ try {
+ validateValue(value, options);
+ } catch (IllegalPropertyValueException e) {
+ throw new IllegalPropertyValueStringException(this, value, e.getCause());
+ }
+
+ return value;
+ }
+
+ /**
+ * Get an unmodifiable list of classes which values of this property must
+ * implement.
+ *
+ * @return Returns an unmodifiable list of classes which values of this
+ * property must implement.
+ */
+ public List<String> getInstanceOfInterface() {
+ return instanceOfInterfaces;
+ }
+
+ /**
+ * Validate and load the named class, and cast it to a subclass of the
+ * specified class.
+ *
+ * @param <T>
+ * The requested type.
+ * @param className
+ * The name of the class to validate and load.
+ * @param instanceOf
+ * The class representing the requested type.
+ * @return Returns the named class cast to a subclass of the specified
+ * class.
+ * @throws IllegalPropertyValueException
+ * If the named class was invalid, could not be loaded, or did
+ * not implement the required interfaces.
+ * @throws ClassCastException
+ * If the referenced class does not implement the requested
+ * type.
+ */
+ public <T> Class<? extends T> loadClass(String className, Class<T> instanceOf) {
+ Reject.ifNull(className, instanceOf);
+
+ // Make sure that the named class is valid.
+ validateClassName(className);
+ Class<?> theClass = validateClassInterfaces(className, true);
+
+ // Cast it to the required type.
+ return theClass.asSubclass(instanceOf);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String normalizeValue(String value) {
+ Reject.ifNull(value);
+
+ return value.trim();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void validateValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ // Always make sure the name is a valid class name.
+ validateClassName(value);
+
+ /*
+ * If additional validation is enabled then attempt to load the class
+ * and check the interfaces that it implements/extends.
+ */
+ if (options.allowClassValidation()) {
+ validateClassInterfaces(value, false);
+ }
+ }
+
+ /*
+ * Do some basic checks to make sure the string representation is valid.
+ */
+ private void validateClassName(String className) {
+ String nvalue = className.trim();
+ if (!nvalue.matches(CLASS_RE)) {
+ throw new IllegalPropertyValueException(this, className);
+ }
+ }
+
+ /*
+ * Make sure that named class implements the interfaces named by this
+ * definition.
+ */
+ private Class<?> validateClassInterfaces(String className, boolean initialize) {
+ Class<?> theClass = loadClassForValidation(className, className, initialize);
+ for (String i : instanceOfInterfaces) {
+ Class<?> instanceOfClass = loadClassForValidation(className, i, initialize);
+ if (!instanceOfClass.isAssignableFrom(theClass)) {
+ throw new IllegalPropertyValueException(this, className);
+ }
+ }
+ return theClass;
+ }
+
+ private Class<?> loadClassForValidation(String componentClassName, String classToBeLoaded, boolean initialize) {
+ try {
+ return loadClass(classToBeLoaded.trim(), initialize);
+ } catch (ClassNotFoundException e) {
+ // If the class cannot be loaded then it is an invalid value.
+ throw new IllegalPropertyValueException(this, componentClassName, e);
+ } catch (LinkageError e) {
+ // If the class cannot be initialized then it is an invalid value.
+ throw new IllegalPropertyValueException(this, componentClassName, e);
+ }
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/Configuration.java b/opendj-config/src/main/java/org/forgerock/opendj/config/Configuration.java
new file mode 100644
index 0000000..86694cd
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/Configuration.java
@@ -0,0 +1,51 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.opendj.ldap.DN;
+
+/**
+ * A common base interface for all server managed object configurations.
+ */
+public interface Configuration {
+
+ /**
+ * Gets the DN of the LDAP entry associated with this configuration.
+ *
+ * @return Returns the DN of the LDAP entry associated with this
+ * configuration.
+ */
+ DN dn();
+
+ /**
+ * Gets the configuration class associated with this configuration.
+ *
+ * @return Returns the configuration class associated with this
+ * configuration.
+ */
+ Class<? extends Configuration> configurationClass();
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/ConfigurationClient.java b/opendj-config/src/main/java/org/forgerock/opendj/config/ConfigurationClient.java
new file mode 100644
index 0000000..aa243ba
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/ConfigurationClient.java
@@ -0,0 +1,78 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.opendj.config.client.ConcurrentModificationException;
+import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException;
+import org.forgerock.opendj.config.client.OperationRejectedException;
+import org.forgerock.opendj.ldap.ErrorResultException;
+
+/**
+ * A common base interface for all managed object configuration clients.
+ */
+public interface ConfigurationClient {
+
+ /**
+ * Get the configuration definition associated with this configuration.
+ *
+ * @return Returns the configuration definition associated with this
+ * configuration.
+ */
+ ManagedObjectDefinition<? extends ConfigurationClient, ? extends Configuration> definition();
+
+ /**
+ * Get a property provider view of this configuration.
+ *
+ * @return Returns a property provider view of this configuration.
+ */
+ PropertyProvider properties();
+
+ /**
+ * If this is a new configuration this method will attempt to add it to the
+ * server, otherwise it will commit any changes made to this configuration.
+ *
+ * @throws ManagedObjectAlreadyExistsException
+ * If this is a new configuration but it could not be added to
+ * the server because it already exists.
+ * @throws MissingMandatoryPropertiesException
+ * If this configuration contains some mandatory properties
+ * which have been left undefined.
+ * @throws ConcurrentModificationException
+ * If this is a new configuration which is being added to the
+ * server but its parent has been removed by another client, or
+ * if this configuration is being modified but it has been
+ * removed from the server by another client.
+ * @throws OperationRejectedException
+ * If the server refuses to add or modify this configuration due
+ * to some server-side constraint which cannot be satisfied.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ void commit() throws ManagedObjectAlreadyExistsException, MissingMandatoryPropertiesException,
+ ConcurrentModificationException, OperationRejectedException, ErrorResultException;
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/Constraint.java b/opendj-config/src/main/java/org/forgerock/opendj/config/Constraint.java
new file mode 100644
index 0000000..b5fde70
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/Constraint.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.forgerock.opendj.config.client.ClientConstraintHandler;
+import org.forgerock.opendj.config.server.ServerConstraintHandler;
+
+/**
+ * An interface for enforcing constraints and dependencies between managed
+ * objects and their properties. Constraints express relationships between
+ * managed objects and their properties, for example:
+ * <ul>
+ * <li>referential integrity: where one managed object references another a
+ * constraint can enforce referential integrity. The constraint can prevent
+ * creation of references to non-existent managed objects, and also prevent
+ * deletion of referenced managed objects
+ * <li>property dependencies: for example, when a boolean property is
+ * <code>true</code>, one or more additional properties must be specified. This
+ * is useful for features like SSL, which when enabled, requires that various
+ * SSL related configuration options are specified
+ * <li>property constraints: for example, when an upper limit property must not
+ * have a value which is less than the lower limit property.
+ * </ul>
+ * On the client-side constraints are enforced immediately before a write
+ * operation is performed. That is to say, immediately before a new managed
+ * object is created, changes to a managed object are applied, or an existing
+ * managed object is deleted.
+ */
+public abstract class Constraint {
+
+ /**
+ * Creates a new constraint.
+ */
+ protected Constraint() {
+ // No implementation required.
+ }
+
+ /**
+ * Gets the client-side constraint handlers which will be used to enforce
+ * this constraint in client applications. The default implementation is to
+ * return an empty set of client constraint handlers.
+ *
+ * @return Returns the client-side constraint handlers which will be used to
+ * enforce this constraint in client applications. The returned
+ * collection must not be <code>null</code> but maybe empty
+ * (indicating that the constraint can only be enforced on the
+ * server-side).
+ */
+ public Collection<ClientConstraintHandler> getClientConstraintHandlers() {
+ return Collections.emptySet();
+ }
+
+ /**
+ * Gets the server-side constraint handlers which will be used to enforce
+ * this constraint within the server. The default implementation is to
+ * return an empty set of server constraint handlers.
+ *
+ * @return Returns the server-side constraint handlers which will be used to
+ * enforce this constraint within the server. The returned
+ * collection must not be <code>null</code> and must not be empty,
+ * since constraints must always be enforced on the server.
+ */
+ public Collection<ServerConstraintHandler> getServerConstraintHandlers() {
+ return Collections.emptySet();
+ }
+
+ /**
+ * Initializes this constraint. The default implementation is to do nothing.
+ *
+ * @throws Exception
+ * If this constraint could not be initialized.
+ */
+ protected void initialize() throws Exception {
+ // Default implementation is to do nothing.
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/DNPropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/DNPropertyDefinition.java
new file mode 100644
index 0000000..670bc0c
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/DNPropertyDefinition.java
@@ -0,0 +1,192 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.util.EnumSet;
+
+import org.forgerock.opendj.ldap.DN;
+
+/**
+ * DN property definition.
+ */
+public final class DNPropertyDefinition extends PropertyDefinition<DN> {
+
+ // Optional base DN which all valid values must be immediately
+ // subordinate to.
+ private final DN baseDN;
+
+ /**
+ * An interface for incrementally constructing DN property definitions.
+ */
+ public static final class Builder extends AbstractBuilder<DN, DNPropertyDefinition> {
+
+ // Optional base DN which all valid values must be immediately
+ // subordinate to.
+ private DN baseDN = null;
+
+ // Private constructor
+ private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ super(d, propertyName);
+ }
+
+ /**
+ * Set the base DN which all valid values must be immediately
+ * subordinate to. By default there is no based DN.
+ *
+ * @param baseDN
+ * The string representation of the base DN.
+ * @throws IllegalArgumentException
+ * If the provided string is not a valid DN string
+ * representation.
+ */
+ public void setBaseDN(String baseDN) {
+ if (baseDN == null) {
+ setBaseDN((DN) null);
+ } else {
+ // TODO: is it correct to replace server DN.decode by SDK
+ // valueOf ?
+ setBaseDN(DN.valueOf(baseDN));
+ }
+ }
+
+ /**
+ * Set the base DN which all valid values must be immediately
+ * subordinate to. By default there is no based DN.
+ *
+ * @param baseDN
+ * The base DN.
+ */
+ public void setBaseDN(DN baseDN) {
+ this.baseDN = baseDN;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected DNPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<DN> defaultBehavior) {
+ return new DNPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior, baseDN);
+ }
+ }
+
+ /**
+ * Create a DN property definition builder.
+ *
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param propertyName
+ * The property name.
+ * @return Returns the new boolean property definition builder.
+ */
+ public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ return new Builder(d, propertyName);
+ }
+
+ // Private constructor.
+ private DNPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<DN> defaultBehavior, DN baseDN) {
+ super(d, DN.class, propertyName, options, adminAction, defaultBehavior);
+ this.baseDN = baseDN;
+ }
+
+ /**
+ * Get the base DN which all valid values must be immediately subordinate
+ * to, or <code>null</code> if there is no based DN.
+ *
+ * @return Returns the base DN which all valid values must be immediately
+ * subordinate to.
+ */
+ public DN getBaseDN() {
+ return baseDN;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void validateValue(DN value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ if (baseDN != null) {
+ DN parent = value.parent();
+
+ if (parent == null) {
+ parent = DN.rootDN();
+ }
+
+ if (!parent.equals(baseDN)) {
+ throw new IllegalPropertyValueException(this, value);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DN decodeValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ try {
+ DN dn = DN.valueOf(value);
+ validateValue(dn, options);
+ return dn;
+ } catch (IllegalPropertyValueException e) {
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
+ return v.visitDN(this, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyValueVisitor<R, P> v, DN value, P p) {
+ return v.visitDN(this, value, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int compare(DN o1, DN o2) {
+ return o1.compareTo(o2);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/DecodingException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/DecodingException.java
new file mode 100644
index 0000000..5f38d01
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/DecodingException.java
@@ -0,0 +1,51 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * The requested managed object was found but it could not be decoded.
+ */
+public abstract class DecodingException extends OperationsException {
+
+ /**
+ * Fake serialization ID.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create a decoding exception with a message.
+ *
+ * @param message
+ * The message.
+ */
+ protected DecodingException(LocalizableMessage message) {
+ super(message);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/DefaultBehaviorException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/DefaultBehaviorException.java
new file mode 100644
index 0000000..4537184
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/DefaultBehaviorException.java
@@ -0,0 +1,61 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+/**
+ * This exception is thrown when a property's default values cannot be
+ * determined. This can occur in the following situations:
+ * <ul>
+ * <li>the property has a well-defined set of default values but they are
+ * invalid according to the property's syntax
+ * <li>the property inherits its default values from another managed object but
+ * they could not be retrieved, perhaps because of a communication problem.
+ * </ul>
+ */
+public class DefaultBehaviorException extends PropertyException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = -2542117466747573053L;
+
+ /**
+ * Create a new default behavior exception with a cause.
+ *
+ * @param pd
+ * The property definition whose default values could not be
+ * determined.
+ * @param cause
+ * The exception that prevented the default values from being
+ * determined.
+ */
+ public DefaultBehaviorException(PropertyDefinition<?> pd, Throwable cause) {
+ super(pd, ERR_DEFAULT_BEHAVIOR_PROPERTY_EXCEPTION.get(pd.getName()), cause);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/DefaultBehaviorProvider.java b/opendj-config/src/main/java/org/forgerock/opendj/config/DefaultBehaviorProvider.java
new file mode 100644
index 0000000..81addd2
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/DefaultBehaviorProvider.java
@@ -0,0 +1,92 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+/**
+ * An interface for determining the default behavior of a property. A property
+ * exhibits default behavior when it has no values defined. There are four
+ * different types of default behavior:
+ * <ol>
+ * <li>there is no default behavior - e.g. leaving a "description" unset has no
+ * side-effects. This default behavior is represented using the
+ * {@link UndefinedDefaultBehaviorProvider} implementation
+ * <li>the property defaults to one or more real values of the property. This
+ * default behavior is represented using the
+ * {@link DefinedDefaultBehaviorProvider} implementation
+ * <li>the property defaults to some special behavior that cannot be represented
+ * using real property values. This default behavior is represented using the
+ * {@link AliasDefaultBehaviorProvider} implementation
+ * <li>the property inherits its values from property held in another managed
+ * object (e.g. the parent managed object). This default behavior is represented
+ * using the {@link AbsoluteInheritedDefaultBehaviorProvider} and
+ * {@link RelativeInheritedDefaultBehaviorProvider} implementations.
+ * </ol>
+ * An application can perform actions based on the type of the default behavior
+ * by implementing the {@link DefaultBehaviorProviderVisitor} interface.
+ *
+ * @param <T>
+ * The type of values represented by this provider.
+ */
+public abstract class DefaultBehaviorProvider<T> {
+
+ /**
+ * Creates a new default behavior provider.
+ */
+ protected DefaultBehaviorProvider() {
+ // No implementation required.
+ }
+
+ /**
+ * Apply a visitor to this default behavior provider.
+ *
+ * @param <R>
+ * The return type of the visitor's methods.
+ * @param <P>
+ * The type of the additional parameters to the visitor's
+ * methods.
+ * @param v
+ * The default behavior visitor.
+ * @param p
+ * Optional additional visitor parameter.
+ * @return Returns a result as specified by the visitor.
+ */
+ public abstract <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p);
+
+ /**
+ * Performs any run-time initialization required by this default behavior
+ * provider. This may include resolving managed object paths and property
+ * names.
+ * <p>
+ * The default implementation is to do nothing.
+ *
+ * @throws Exception
+ * If this default behavior provider could not be initialized.
+ */
+ protected void initialize() throws Exception {
+ // Default implementation is to do nothing.
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/DefaultBehaviorProviderVisitor.java b/opendj-config/src/main/java/org/forgerock/opendj/config/DefaultBehaviorProviderVisitor.java
new file mode 100644
index 0000000..00dff00
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/DefaultBehaviorProviderVisitor.java
@@ -0,0 +1,104 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+/**
+ * A visitor of default behavior providers, in the style of the visitor design
+ * pattern. Classes implementing this interface can query default behavior
+ * providers in a type-safe manner when the kind of default behavior provider is
+ * unknown at compile time. When a visitor is passed to a default behavior
+ * provider's accept method, the corresponding visit method most applicable to
+ * that default behavior provider is invoked.
+ *
+ * @param <T>
+ * The type of values represented by the default value provider.
+ * @param <R>
+ * The return type of this visitor's methods. Use
+ * {@link java.lang.Void} for visitors that do not need to return
+ * results.
+ * @param <P>
+ * The type of the additional parameter to this visitor's methods.
+ * Use {@link java.lang.Void} for visitors that do not need an
+ * additional parameter.
+ */
+public interface DefaultBehaviorProviderVisitor<T, R, P> {
+
+ /**
+ * Visit an absolute inherited default behavior provider.
+ *
+ * @param d
+ * The absolute inherited default behavior provider to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ R visitAbsoluteInherited(AbsoluteInheritedDefaultBehaviorProvider<T> d, P p);
+
+ /**
+ * Visit an alias default behavior provider.
+ *
+ * @param d
+ * The alias default behavior provider to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ R visitAlias(AliasDefaultBehaviorProvider<T> d, P p);
+
+ /**
+ * Visit an defined default behavior provider.
+ *
+ * @param d
+ * The defined default behavior provider to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ R visitDefined(DefinedDefaultBehaviorProvider<T> d, P p);
+
+ /**
+ * Visit a relative inherited default behavior provider.
+ *
+ * @param d
+ * The relative inherited default behavior provider to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ R visitRelativeInherited(RelativeInheritedDefaultBehaviorProvider<T> d, P p);
+
+ /**
+ * Visit an undefined default behavior provider.
+ *
+ * @param d
+ * The undefined default behavior provider to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ R visitUndefined(UndefinedDefaultBehaviorProvider<T> d, P p);
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/DefaultManagedObject.java b/opendj-config/src/main/java/org/forgerock/opendj/config/DefaultManagedObject.java
new file mode 100644
index 0000000..247c132
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/DefaultManagedObject.java
@@ -0,0 +1,173 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+/**
+ * A default managed object which should be created when a parent managed object
+ * is created. Default managed objects are associated with a
+ * {@link RelationDefinition}.
+ *
+ * @param <C>
+ * The type of client default managed object configuration.
+ * @param <S>
+ * The type of server default managed object configuration.
+ */
+public final class DefaultManagedObject<C extends ConfigurationClient, S extends Configuration> implements
+ PropertyProvider {
+
+ /**
+ * An interface for incrementally constructing default managed objects.
+ *
+ * @param <C>
+ * The type of client default managed object configuration.
+ * @param <S>
+ * The type of server default managed object configuration.
+ */
+ public static final class Builder<C extends ConfigurationClient, S extends Configuration> {
+
+ // The default managed object's definition.
+ private final ManagedObjectDefinition<C, S> definition;
+
+ // The string encoded default managed object's properties.
+ private final Map<String, List<String>> propertyStringValues = new HashMap<String, List<String>>();
+
+ /**
+ * Creates a new default managed object builder.
+ *
+ * @param definition
+ * The default managed object's definition.
+ */
+ public Builder(ManagedObjectDefinition<C, S> definition) {
+ this.definition = definition;
+ }
+
+ /**
+ * Construct a default managed object based on the properties of this
+ * builder.
+ *
+ * @return Returns the new default managed object.
+ */
+ public DefaultManagedObject<C, S> getInstance() {
+ return new DefaultManagedObject<C, S>(definition, propertyStringValues);
+ }
+
+ /**
+ * Defines a property's values for the default managed object.
+ *
+ * @param name
+ * The name of the property.
+ * @param values
+ * One or more property values in the string representation.
+ */
+ public void setPropertyValues(String name, String... values) {
+ if (values == null || values.length == 0) {
+ throw new IllegalArgumentException("null or empty values specified for property " + name);
+ }
+
+ propertyStringValues.put(name, Arrays.asList(values));
+ }
+ }
+
+ // The default managed object's definition.
+ private final ManagedObjectDefinition<C, S> definition;
+
+ // The string encoded default managed object's properties.
+ private final Map<String, List<String>> propertyStringValues;
+
+ // Private constructor.
+ private DefaultManagedObject(ManagedObjectDefinition<C, S> definition,
+ Map<String, List<String>> propertyStringValues) {
+ this.definition = definition;
+ this.propertyStringValues = propertyStringValues;
+ }
+
+ /**
+ * Gets the managed object definition associated with this default managed
+ * object.
+ *
+ * @return Returns the managed object definition associated with this
+ * default managed object.
+ */
+ public ManagedObjectDefinition<C, S> getManagedObjectDefinition() {
+ return definition;
+ }
+
+ /**
+ * Gets a mutable copy of the set of property values for the specified
+ * property.
+ *
+ * @param <T>
+ * The type of the property to be retrieved.
+ * @param pd
+ * The property to be retrieved.
+ * @return Returns a newly allocated set containing a copy of the property's
+ * values. An empty set indicates that the property has no values
+ * defined and any default behavior is applicable.
+ * @throws IllegalArgumentException
+ * If the property definition is not associated with this
+ * managed object's definition.
+ */
+ public <T> SortedSet<T> getPropertyValues(PropertyDefinition<T> pd) {
+ // Validate the property definition.
+ definition.getPropertyDefinition(pd.getName());
+
+ // Do a defensive copy.
+ SortedSet<T> values = new TreeSet<T>(pd);
+ List<String> stringValues = propertyStringValues.get(pd.getName());
+ if (stringValues != null) {
+ for (String stringValue : stringValues) {
+ // TODO : is it correct to have no validation ?
+ values.add(pd.decodeValue(stringValue, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS));
+ }
+ }
+ return values;
+ }
+
+ /**
+ * Performs run-time initialization of properties.
+ *
+ * @throws Exception
+ * If this default managed object could not be initialized.
+ */
+ void initialize() throws Exception {
+ // FIXME: it would be nice if we could decode all property values
+ // at this point. However this is not possible on the server side
+ // since some properties will be determined to be invalid since
+ // the schema is not loaded.
+
+ // Validate provided property names.
+ for (String name : propertyStringValues.keySet()) {
+ definition.getPropertyDefinition(name);
+ }
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/DefinedDefaultBehaviorProvider.java b/opendj-config/src/main/java/org/forgerock/opendj/config/DefinedDefaultBehaviorProvider.java
new file mode 100644
index 0000000..0e15171
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/DefinedDefaultBehaviorProvider.java
@@ -0,0 +1,79 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ * A default behavior provider which represents a well-defined set of default
+ * values. It should be used by properties which have default value(s) which are
+ * valid value(s) according to the constraints of the property's definition.
+ *
+ * @param <T>
+ * The type of values represented by this provider.
+ */
+public final class DefinedDefaultBehaviorProvider<T> extends DefaultBehaviorProvider<T> {
+
+ // The collection of default values.
+ private final Collection<String> values;
+
+ /**
+ * Create a new defined default behavior provider associated with the
+ * specified list of values.
+ *
+ * @param values
+ * The list of values (must be non-<code>null</code> and not
+ * empty) in their string representation.
+ * @throws IllegalArgumentException
+ * If the list of values was <code>null</code> or empty.
+ */
+ public DefinedDefaultBehaviorProvider(String... values) {
+ if (values == null || values.length == 0) {
+ throw new IllegalArgumentException("Null or empty list of default values");
+ }
+ this.values = Arrays.asList(values);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p) {
+ return v.visitDefined(this, p);
+ }
+
+ /**
+ * Get a copy of the default values.
+ *
+ * @return Returns a newly allocated collection containing a copy of the
+ * default values.
+ */
+ public Collection<String> getDefaultValues() {
+ return new ArrayList<String>(values);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/DefinitionDecodingException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/DefinitionDecodingException.java
new file mode 100644
index 0000000..ad4a302
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/DefinitionDecodingException.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * The requested managed object was found but its type could not be determined.
+ */
+public class DefinitionDecodingException extends DecodingException {
+
+ /**
+ * An enumeration defining the reasons why the definition could not be
+ * resolved.
+ */
+ public static enum Reason {
+ /**
+ * The managed object could be found but its type resolved to an
+ * abstract managed object definition.
+ */
+ ABSTRACT_TYPE_INFORMATION(),
+
+ /**
+ * The managed object could be found but did not contain any type
+ * information (eg missing object classes in LDAP).
+ */
+ NO_TYPE_INFORMATION(),
+
+ /**
+ * The managed object could be found but did not contain the expected
+ * type information (eg incorrect object classes in LDAP).
+ */
+ WRONG_TYPE_INFORMATION();
+
+ }
+
+ /**
+ * Version ID required by serializable classes.
+ */
+ private static final long serialVersionUID = 3459033551415663416L;
+
+ // Create the message.
+ private static LocalizableMessage createLocalizableMessage(AbstractManagedObjectDefinition<?, ?> d, Reason reason) {
+ LocalizableMessage ufn = d.getUserFriendlyName();
+ switch (reason) {
+ case NO_TYPE_INFORMATION:
+ return ERR_DECODING_EXCEPTION_NO_TYPE_INFO.get(ufn);
+ case WRONG_TYPE_INFORMATION:
+ return ERR_DECODING_EXCEPTION_WRONG_TYPE_INFO.get(ufn);
+ default:
+ return ERR_DECODING_EXCEPTION_ABSTRACT_TYPE_INFO.get(ufn);
+ }
+ }
+
+ // The expected type of managed object.
+ private final AbstractManagedObjectDefinition<?, ?> d;
+
+ // The reason why the definition could not be determined.
+ private final Reason reason;
+
+ /**
+ * Create a new definition decoding exception.
+ *
+ * @param d
+ * The expected type of managed object.
+ * @param reason
+ * The reason why the definition could not be determined.
+ */
+ public DefinitionDecodingException(AbstractManagedObjectDefinition<?, ?> d, Reason reason) {
+ super(createLocalizableMessage(d, reason));
+ this.d = d;
+ this.reason = reason;
+ }
+
+ /**
+ * Gets the expected managed object definition.
+ *
+ * @return Returns the expected managed object definition.
+ */
+ public AbstractManagedObjectDefinition<?, ?> getManagedObjectDefinition() {
+ return d;
+ }
+
+ /**
+ * Gets the reason why the definition could not be determined.
+ *
+ * @return Returns the reason why the definition could not be determined.
+ */
+ public Reason getReason() {
+ return reason;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/DefinitionResolver.java b/opendj-config/src/main/java/org/forgerock/opendj/config/DefinitionResolver.java
new file mode 100644
index 0000000..203e406
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/DefinitionResolver.java
@@ -0,0 +1,66 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+/**
+ * This interface is used to determine the "best match" managed object
+ * definition in a definition hierarchy.
+ * <p>
+ * Managed object definitions, like Java classes, are arranged in an inheritance
+ * hierarchy. When managed objects are decoded (e.g. from LDAP entries), the
+ * driver implementation is provided with an
+ * "expected managed object definition". However, the actual decoded managed
+ * object is often an instance of a sub-type of this definition. For example,
+ * when decoding a connection handler managed object, the actual type can never
+ * be a connection handler because it is an abstract managed object type.
+ * Instead, the decoded managed object must be a "concrete" sub-type: an LDAP
+ * connection handler or JMX connection handler.
+ * <p>
+ * This resolution process is coordinated by the
+ * <code>resolveManagedObjectDefinition</code> method in managed object
+ * definitions, where it is passed a <code>DefinitionResolver</code>
+ * implementation. The <code>resolveManagedObjectDefinition</code> method takes
+ * care of recursively descending through the definition hierarchy and invokes
+ * the {@link #matches(AbstractManagedObjectDefinition)} method against each
+ * potential sub-type. It is the job of the resolver to indicate whether the
+ * provided managed object definition is a candidate definition. For example,
+ * the LDAP driver provides a definition resolver which uses the decoded LDAP
+ * entry's object classes to determine the final appropriate managed object
+ * definition.
+ */
+public interface DefinitionResolver {
+
+ /**
+ * Determines whether or not the provided managed object definition matches
+ * this resolver's criteria.
+ *
+ * @param d
+ * The managed object definition.
+ * @return Returns <code>true</code> if the the provided managed object
+ * definition matches this resolver's criteria.
+ */
+ boolean matches(AbstractManagedObjectDefinition<?, ?> d);
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/DurationPropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/DurationPropertyDefinition.java
new file mode 100644
index 0000000..868e81a
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/DurationPropertyDefinition.java
@@ -0,0 +1,526 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.util.EnumSet;
+
+/**
+ * Duration property definition.
+ * <p>
+ * A duration property definition comprises of:
+ * <ul>
+ * <li>a <i>base unit</i> - specifies the minimum granularity which can be used
+ * to specify duration property values. For example, if the base unit is in
+ * seconds then values represented in milliseconds will not be permitted. The
+ * default base unit is seconds
+ * <li>an optional <i>maximum unit</i> - specifies the biggest duration unit
+ * which can be used to specify duration property values. Values presented in
+ * units greater than this unit will not be permitted. There is no default
+ * maximum unit
+ * <li><i>lower limit</i> - specifies the smallest duration permitted by the
+ * property. The default lower limit is 0 and can never be less than 0
+ * <li>an optional <i>upper limit</i> - specifies the biggest duration permitted
+ * by the property. By default, there is no upper limit
+ * <li>support for <i>unlimited</i> durations - when permitted users can specify
+ * "unlimited" durations. These are represented using the decoded value, -1, or
+ * the encoded string value "unlimited". By default, unlimited durations are not
+ * permitted. In addition, it is not possible to define an upper limit and
+ * support unlimited values.
+ * </ul>
+ * Decoded values are represented using <code>long</code> values in the base
+ * unit defined for the duration property definition.
+ */
+public final class DurationPropertyDefinition extends PropertyDefinition<Long> {
+
+ // String used to represent unlimited durations.
+ private static final String UNLIMITED = "unlimited";
+
+ // The base unit for this property definition.
+ private final DurationUnit baseUnit;
+
+ // The optional maximum unit for this property definition.
+ private final DurationUnit maximumUnit;
+
+ // The lower limit of the property value in milli-seconds.
+ private final long lowerLimit;
+
+ // The optional upper limit of the property value in milli-seconds.
+ private final Long upperLimit;
+
+ // Indicates whether this property allows the use of the "unlimited"
+ // duration value (represented using a -1L or the string
+ // "unlimited").
+ private final boolean allowUnlimited;
+
+ /**
+ * An interface for incrementally constructing duration property
+ * definitions.
+ */
+ public static final class Builder extends AbstractBuilder<Long, DurationPropertyDefinition> {
+
+ // The base unit for this property definition.
+ private DurationUnit baseUnit = DurationUnit.SECONDS;
+
+ // The optional maximum unit for this property definition.
+ private DurationUnit maximumUnit = null;
+
+ // The lower limit of the property value in milli-seconds.
+ private long lowerLimit = 0L;
+
+ // The optional upper limit of the property value in
+ // milli-seconds.
+ private Long upperLimit = null;
+
+ // Indicates whether this property allows the use of the
+ // "unlimited" duration value (represented using a -1L or the
+ // string "unlimited").
+ private boolean allowUnlimited = false;
+
+ // Private constructor
+ private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ super(d, propertyName);
+ }
+
+ /**
+ * Set the base unit for this property definition (values including
+ * limits are specified in this unit). By default a duration property
+ * definition uses seconds.
+ *
+ * @param unit
+ * The string representation of the base unit (must not be
+ * <code>null</code>).
+ * @throws IllegalArgumentException
+ * If the provided unit name did not correspond to a known
+ * duration unit, or if the base unit is bigger than the
+ * maximum unit.
+ */
+ public final void setBaseUnit(String unit) {
+ Reject.ifNull(unit);
+
+ setBaseUnit(DurationUnit.getUnit(unit));
+ }
+
+ /**
+ * Set the base unit for this property definition (values including
+ * limits are specified in this unit). By default a duration property
+ * definition uses seconds.
+ *
+ * @param unit
+ * The base unit (must not be <code>null</code>).
+ * @throws IllegalArgumentException
+ * If the provided base unit is bigger than the maximum
+ * unit.
+ */
+ public final void setBaseUnit(DurationUnit unit) {
+ Reject.ifNull(unit);
+
+ // Make sure that the base unit is not bigger than the maximum
+ // unit.
+ if (maximumUnit != null) {
+ if (unit.getDuration() > maximumUnit.getDuration()) {
+ throw new IllegalArgumentException("Base unit greater than maximum unit");
+ }
+ }
+
+ this.baseUnit = unit;
+ }
+
+ /**
+ * Set the maximum unit for this property definition. By default there
+ * is no maximum unit.
+ *
+ * @param unit
+ * The string representation of the maximum unit, or
+ * <code>null</code> if there should not be a maximum unit.
+ * @throws IllegalArgumentException
+ * If the provided unit name did not correspond to a known
+ * duration unit, or if the maximum unit is smaller than the
+ * base unit.
+ */
+ public final void setMaximumUnit(String unit) {
+ if (unit == null) {
+ setMaximumUnit((DurationUnit) null);
+ } else {
+ setMaximumUnit(DurationUnit.getUnit(unit));
+ }
+ }
+
+ /**
+ * Set the maximum unit for this property definition. By default there
+ * is no maximum unit.
+ *
+ * @param unit
+ * The maximum unit, or <code>null</code> if there should not
+ * be a maximum unit.
+ * @throws IllegalArgumentException
+ * If the provided maximum unit is smaller than the base
+ * unit.
+ */
+ public final void setMaximumUnit(DurationUnit unit) {
+ if (unit != null) {
+ // Make sure that the maximum unit is not smaller than the
+ // base unit.
+ if (unit.getDuration() < baseUnit.getDuration()) {
+ throw new IllegalArgumentException("Maximum unit smaller than base unit");
+ }
+ }
+
+ this.maximumUnit = unit;
+ }
+
+ /**
+ * Set the lower limit in milli-seconds.
+ *
+ * @param lowerLimit
+ * The new lower limit (must be >= 0) in milli-seconds.
+ * @throws IllegalArgumentException
+ * If a negative lower limit was specified, or the lower
+ * limit is greater than the upper limit.
+ */
+ public final void setLowerLimit(long lowerLimit) {
+ if (lowerLimit < 0) {
+ throw new IllegalArgumentException("Negative lower limit");
+ }
+
+ if (upperLimit != null && lowerLimit > upperLimit) {
+ throw new IllegalArgumentException("Lower limit greater than upper limit");
+ }
+
+ this.lowerLimit = lowerLimit;
+ }
+
+ /**
+ * Set the lower limit using a string representation of the limit. If
+ * the string does not specify a unit, the current base unit will be
+ * used.
+ *
+ * @param lowerLimit
+ * The string representation of the new lower limit.
+ * @throws IllegalArgumentException
+ * If the lower limit could not be parsed, or if a negative
+ * lower limit was specified, or the lower limit is greater
+ * than the upper limit.
+ */
+ public final void setLowerLimit(String lowerLimit) {
+ setLowerLimit(DurationUnit.parseValue(lowerLimit, baseUnit));
+ }
+
+ /**
+ * Set the upper limit in milli-seconds.
+ *
+ * @param upperLimit
+ * The new upper limit in milli-seconds, or <code>null</code>
+ * if there is no upper limit.
+ * @throws IllegalArgumentException
+ * If a negative upper limit was specified, or the lower
+ * limit is greater than the upper limit or unlimited
+ * durations are permitted.
+ */
+ public final void setUpperLimit(Long upperLimit) {
+ if (upperLimit != null) {
+ if (upperLimit < 0) {
+ throw new IllegalArgumentException("Negative upper limit");
+ }
+
+ if (lowerLimit > upperLimit) {
+ throw new IllegalArgumentException("Lower limit greater than upper limit");
+ }
+
+ if (allowUnlimited) {
+ throw new IllegalArgumentException("Upper limit specified when unlimited durations are permitted");
+ }
+ }
+
+ this.upperLimit = upperLimit;
+ }
+
+ /**
+ * Set the upper limit using a string representation of the limit. If
+ * the string does not specify a unit, the current base unit will be
+ * used.
+ *
+ * @param upperLimit
+ * The string representation of the new upper limit, or
+ * <code>null</code> if there is no upper limit.
+ * @throws IllegalArgumentException
+ * If the upper limit could not be parsed, or if the lower
+ * limit is greater than the upper limit.
+ */
+ public final void setUpperLimit(String upperLimit) {
+ if (upperLimit == null) {
+ setUpperLimit((Long) null);
+ } else {
+ setUpperLimit(DurationUnit.parseValue(upperLimit, baseUnit));
+ }
+ }
+
+ /**
+ * Specify whether or not this property definition will allow unlimited
+ * values (default is false).
+ *
+ * @param allowUnlimited
+ * <code>true</code> if the property will allow unlimited
+ * values, or <code>false</code> otherwise.
+ * @throws IllegalArgumentException
+ * If unlimited values are to be permitted but there is an
+ * upper limit specified.
+ */
+ public final void setAllowUnlimited(boolean allowUnlimited) {
+ if (allowUnlimited && upperLimit != null) {
+ throw new IllegalArgumentException("Upper limit specified when unlimited durations are permitted");
+ }
+
+ this.allowUnlimited = allowUnlimited;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected DurationPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
+ String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<Long> defaultBehavior) {
+ return new DurationPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior, baseUnit,
+ maximumUnit, lowerLimit, upperLimit, allowUnlimited);
+ }
+ }
+
+ /**
+ * Create a duration property definition builder.
+ *
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param propertyName
+ * The property name.
+ * @return Returns the new integer property definition builder.
+ */
+ public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ return new Builder(d, propertyName);
+ }
+
+ // Private constructor.
+ private DurationPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<Long> defaultBehavior, DurationUnit baseUnit, DurationUnit maximumUnit,
+ Long lowerLimit, Long upperLimit, boolean allowUnlimited) {
+ super(d, Long.class, propertyName, options, adminAction, defaultBehavior);
+ this.baseUnit = baseUnit;
+ this.maximumUnit = maximumUnit;
+ this.lowerLimit = lowerLimit;
+ this.upperLimit = upperLimit;
+ this.allowUnlimited = allowUnlimited;
+ }
+
+ /**
+ * Get the base unit for this property definition (values including limits
+ * are specified in this unit).
+ *
+ * @return Returns the base unit for this property definition (values
+ * including limits are specified in this unit).
+ */
+ public DurationUnit getBaseUnit() {
+ return baseUnit;
+ }
+
+ /**
+ * Get the maximum unit for this property definition if specified.
+ *
+ * @return Returns the maximum unit for this property definition, or
+ * <code>null</code> if there is no maximum unit.
+ */
+ public DurationUnit getMaximumUnit() {
+ return maximumUnit;
+ }
+
+ /**
+ * Get the lower limit in milli-seconds.
+ *
+ * @return Returns the lower limit in milli-seconds.
+ */
+ public long getLowerLimit() {
+ return lowerLimit;
+ }
+
+ /**
+ * Get the upper limit in milli-seconds.
+ *
+ * @return Returns the upper limit in milli-seconds, or <code>null</code> if
+ * there is no upper limit.
+ */
+ public Long getUpperLimit() {
+ return upperLimit;
+ }
+
+ /**
+ * Determine whether this property allows unlimited durations.
+ *
+ * @return Returns <code>true</code> if this this property allows unlimited
+ * durations.
+ */
+ public boolean isAllowUnlimited() {
+ return allowUnlimited;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void validateValue(Long value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ long nvalue = baseUnit.toMilliSeconds(value);
+ if (!allowUnlimited && nvalue < lowerLimit) {
+ throw new IllegalPropertyValueException(this, value);
+
+ // unlimited allowed
+ } else if (nvalue >= 0 && nvalue < lowerLimit) {
+ throw new IllegalPropertyValueException(this, value);
+ }
+
+ if ((upperLimit != null) && (nvalue > upperLimit)) {
+ throw new IllegalPropertyValueException(this, value);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String encodeValue(Long value) {
+ Reject.ifNull(value);
+
+ // Make sure that we correctly encode negative values as
+ // "unlimited".
+ if (allowUnlimited) {
+ if (value < 0) {
+ return UNLIMITED;
+ }
+ }
+
+ // Encode the size value using the base unit.
+ StringBuilder builder = new StringBuilder();
+ builder.append(value);
+ builder.append(' ');
+ builder.append(baseUnit.toString());
+ return builder.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Long decodeValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ // First check for the special "unlimited" value when necessary.
+ if (allowUnlimited) {
+ if (value.trim().equalsIgnoreCase(UNLIMITED)) {
+ return -1L;
+ }
+ }
+
+ // Parse the string representation.
+ long ms;
+ try {
+ ms = DurationUnit.parseValue(value);
+ } catch (NumberFormatException e) {
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+
+ // Check the unit is in range - values must not be more granular
+ // than the base unit.
+ if ((ms % baseUnit.getDuration()) != 0) {
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+
+ // Convert the value a long in the property's required unit.
+ Long i = (long) baseUnit.fromMilliSeconds(ms);
+ try {
+ validateValue(i, options);
+ } catch (IllegalPropertyValueException e) {
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+ return i;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
+ return v.visitDuration(this, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyValueVisitor<R, P> v, Long value, P p) {
+ return v.visitDuration(this, value, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void toString(StringBuilder builder) {
+ super.toString(builder);
+
+ builder.append(" baseUnit=");
+ builder.append(baseUnit);
+
+ if (maximumUnit != null) {
+ builder.append(" maximumUnit=");
+ builder.append(maximumUnit);
+ }
+
+ builder.append(" lowerLimit=");
+ builder.append(lowerLimit);
+ builder.append("ms");
+
+ if (upperLimit != null) {
+ builder.append(" upperLimit=");
+ builder.append(upperLimit);
+ builder.append("ms");
+ }
+
+ builder.append(" allowUnlimited=");
+ builder.append(allowUnlimited);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int compare(Long o1, Long o2) {
+ return o1.compareTo(o2);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/DurationUnit.java b/opendj-config/src/main/java/org/forgerock/opendj/config/DurationUnit.java
new file mode 100644
index 0000000..269bd82
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/DurationUnit.java
@@ -0,0 +1,349 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * This enumeration defines various duration units.
+ */
+public enum DurationUnit {
+
+ /**
+ * A day unit.
+ */
+ DAYS((long) 24 * 60 * 60 * 1000, "d", "days"),
+
+ /**
+ * An hour unit.
+ */
+ HOURS((long) 60 * 60 * 1000, "h", "hours"),
+
+ /**
+ * A millisecond unit.
+ */
+ MILLI_SECONDS(1L, "ms", "milliseconds"),
+
+ /**
+ * A minute unit.
+ */
+ MINUTES((long) 60 * 1000, "m", "minutes"),
+
+ /**
+ * A second unit.
+ */
+ SECONDS(1000L, "s", "seconds"),
+
+ /**
+ * A week unit.
+ */
+ WEEKS((long) 7 * 24 * 60 * 60 * 1000, "w", "weeks");
+
+ // A lookup table for resolving a unit from its name.
+ private static final Map<String, DurationUnit> NAME_TO_UNIT;
+ static {
+ NAME_TO_UNIT = new HashMap<String, DurationUnit>();
+
+ for (DurationUnit unit : DurationUnit.values()) {
+ NAME_TO_UNIT.put(unit.shortName, unit);
+ NAME_TO_UNIT.put(unit.longName, unit);
+ }
+ }
+
+ /**
+ * Get the unit corresponding to the provided unit name.
+ *
+ * @param s
+ * The name of the unit. Can be the abbreviated or long name and
+ * can contain white space and mixed case characters.
+ * @return Returns the unit corresponding to the provided unit name.
+ * @throws IllegalArgumentException
+ * If the provided name did not correspond to a known duration
+ * unit.
+ */
+ public static DurationUnit getUnit(String s) {
+ DurationUnit unit = NAME_TO_UNIT.get(s.trim().toLowerCase());
+ if (unit == null) {
+ throw new IllegalArgumentException("Illegal duration unit \"" + s + "\"");
+ }
+ return unit;
+ }
+
+ /**
+ * Parse the provided duration string and return its equivalent duration in
+ * milliseconds. The duration string must specify the unit e.g. "10s". This
+ * method will parse duration string representations produced from the
+ * {@link #toString(long)} method. Therefore, a duration can comprise of
+ * multiple duration specifiers, for example <code>1d15m25s</code>.
+ *
+ * @param s
+ * The duration string to be parsed.
+ * @return Returns the parsed duration in milliseconds.
+ * @throws NumberFormatException
+ * If the provided duration string could not be parsed.
+ * @see #toString(long)
+ */
+ public static long parseValue(String s) {
+ return parseValue(s, null);
+ }
+
+ /**
+ * Parse the provided duration string and return its equivalent duration in
+ * milliseconds. This method will parse duration string representations
+ * produced from the {@link #toString(long)} method. Therefore, a duration
+ * can comprise of multiple duration specifiers, for example
+ * <code>1d15m25s</code>.
+ *
+ * @param s
+ * The duration string to be parsed.
+ * @param defaultUnit
+ * The default unit to use if there is no unit specified in the
+ * duration string, or <code>null</code> if the string must
+ * always contain a unit.
+ * @return Returns the parsed duration in milliseconds.
+ * @throws NumberFormatException
+ * If the provided duration string could not be parsed.
+ * @see #toString(long)
+ */
+ public static long parseValue(String s, DurationUnit defaultUnit) {
+ String ns = s.trim();
+ if (ns.length() == 0) {
+ throw new NumberFormatException("Empty duration value \"" + s + "\"");
+ }
+
+ Pattern p1 =
+ Pattern.compile("^\\s*((\\d+)\\s*w)?" + "\\s*((\\d+)\\s*d)?" + "\\s*((\\d+)\\s*h)?"
+ + "\\s*((\\d+)\\s*m)?" + "\\s*((\\d+)\\s*s)?" + "\\s*((\\d+)\\s*ms)?\\s*$", Pattern.CASE_INSENSITIVE);
+ Matcher m1 = p1.matcher(ns);
+ if (m1.matches()) {
+ // Value must be of the form produced by toString(long).
+ String weeks = m1.group(2);
+ String days = m1.group(4);
+ String hours = m1.group(6);
+ String minutes = m1.group(8);
+ String seconds = m1.group(10);
+ String ms = m1.group(12);
+
+ long duration = 0;
+
+ try {
+ if (weeks != null) {
+ duration += Long.valueOf(weeks) * WEEKS.getDuration();
+ }
+
+ if (days != null) {
+ duration += Long.valueOf(days) * DAYS.getDuration();
+ }
+
+ if (hours != null) {
+ duration += Long.valueOf(hours) * HOURS.getDuration();
+ }
+
+ if (minutes != null) {
+ duration += Long.valueOf(minutes) * MINUTES.getDuration();
+ }
+
+ if (seconds != null) {
+ duration += Long.valueOf(seconds) * SECONDS.getDuration();
+ }
+
+ if (ms != null) {
+ duration += Long.valueOf(ms) * MILLI_SECONDS.getDuration();
+ }
+ } catch (NumberFormatException e) {
+ throw new NumberFormatException("Invalid duration value \"" + s + "\"");
+ }
+
+ return duration;
+ } else {
+ // Value must be a floating point number followed by a unit.
+ Pattern p2 = Pattern.compile("^\\s*(\\d+(\\.\\d+)?)\\s*(\\w+)?\\s*$");
+ Matcher m2 = p2.matcher(ns);
+
+ if (!m2.matches()) {
+ throw new NumberFormatException("Invalid duration value \"" + s + "\"");
+ }
+
+ // Group 1 is the float.
+ double d;
+ try {
+ d = Double.valueOf(m2.group(1));
+ } catch (NumberFormatException e) {
+ throw new NumberFormatException("Invalid duration value \"" + s + "\"");
+ }
+
+ // Group 3 is the unit.
+ String unitString = m2.group(3);
+ DurationUnit unit;
+ if (unitString == null) {
+ if (defaultUnit == null) {
+ throw new NumberFormatException("Invalid duration value \"" + s + "\"");
+ } else {
+ unit = defaultUnit;
+ }
+ } else {
+ try {
+ unit = getUnit(unitString);
+ } catch (IllegalArgumentException e) {
+ throw new NumberFormatException("Invalid duration value \"" + s + "\"");
+ }
+ }
+
+ return unit.toMilliSeconds(d);
+ }
+ }
+
+ /**
+ * Returns a string representation of the provided duration. The string
+ * representation can be parsed using the {@link #parseValue(String)}
+ * method. The string representation is comprised of one or more of the
+ * number of weeks, days, hours, minutes, seconds, and milliseconds. Here
+ * are some examples:
+ *
+ * <pre>
+ * toString(0) // 0 ms
+ * toString(999) // 999 ms
+ * toString(1000) // 1 s
+ * toString(1500) // 1 s 500 ms
+ * toString(3650000) // 1 h 50 s
+ * toString(3700000) // 1 h 1 m 40 s
+ * </pre>
+ *
+ * @param duration
+ * The duration in milliseconds.
+ * @return Returns a string representation of the provided duration.
+ * @throws IllegalArgumentException
+ * If the provided duration is negative.
+ * @see #parseValue(String)
+ * @see #parseValue(String, DurationUnit)
+ */
+ public static String toString(long duration) {
+ if (duration < 0) {
+ throw new IllegalArgumentException("Negative duration " + duration);
+ }
+
+ if (duration == 0) {
+ return "0 ms";
+ }
+
+ DurationUnit[] units = new DurationUnit[] { WEEKS, DAYS, HOURS, MINUTES, SECONDS, MILLI_SECONDS };
+ long remainder = duration;
+ StringBuilder builder = new StringBuilder();
+ boolean isFirst = true;
+ for (DurationUnit unit : units) {
+ long count = remainder / unit.getDuration();
+ if (count > 0) {
+ if (!isFirst) {
+ builder.append(' ');
+ }
+ builder.append(count);
+ builder.append(' ');
+ builder.append(unit.getShortName());
+ remainder = remainder - (count * unit.getDuration());
+ isFirst = false;
+ }
+ }
+ return builder.toString();
+ }
+
+ // The long name of the unit.
+ private final String longName;
+
+ // The abbreviation of the unit.
+ private final String shortName;
+
+ // The size of the unit in milliseconds.
+ private final long sz;
+
+ // Private constructor.
+ private DurationUnit(long sz, String shortName, String longName) {
+ this.sz = sz;
+ this.shortName = shortName;
+ this.longName = longName;
+ }
+
+ /**
+ * Converts the specified duration in milliseconds to this unit.
+ *
+ * @param duration
+ * The duration in milliseconds.
+ * @return Returns milliseconds in this unit.
+ */
+ public double fromMilliSeconds(long duration) {
+ return ((double) duration / sz);
+ }
+
+ /**
+ * Get the number of milliseconds that this unit represents.
+ *
+ * @return Returns the number of milliseconds that this unit represents.
+ */
+ public long getDuration() {
+ return sz;
+ }
+
+ /**
+ * Get the long name of this unit.
+ *
+ * @return Returns the long name of this unit.
+ */
+ public String getLongName() {
+ return longName;
+ }
+
+ /**
+ * Get the abbreviated name of this unit.
+ *
+ * @return Returns the abbreviated name of this unit.
+ */
+ public String getShortName() {
+ return shortName;
+ }
+
+ /**
+ * Converts the specified duration in this unit to milliseconds.
+ *
+ * @param duration
+ * The duration as a quantity of this unit.
+ * @return Returns the number of milliseconds that the duration represents.
+ */
+ public long toMilliSeconds(double duration) {
+ return (long) (sz * duration);
+ }
+
+ /**
+ * {@inheritDoc}
+ * <p>
+ * This implementation returns the abbreviated name of this duration unit.
+ */
+ @Override
+ public String toString() {
+ return shortName;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/EnumPropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/EnumPropertyDefinition.java
new file mode 100644
index 0000000..0a2fe71
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/EnumPropertyDefinition.java
@@ -0,0 +1,227 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.MissingResourceException;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * Enumeration property definition.
+ *
+ * @param <E>
+ * The enumeration that should be used for values of this property
+ * definition.
+ */
+public final class EnumPropertyDefinition<E extends Enum<E>> extends PropertyDefinition<E> {
+
+ /**
+ * An interface for incrementally constructing enumeration property
+ * definitions.
+ *
+ * @param <E>
+ * The enumeration that should be used for values of this
+ * property definition.
+ */
+ public final static class Builder<E extends Enum<E>> extends AbstractBuilder<E, EnumPropertyDefinition<E>> {
+
+ // The enumeration class.
+ private Class<E> enumClass;
+
+ // Private constructor
+ private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ super(d, propertyName);
+ this.enumClass = null;
+ }
+
+ /**
+ * Set the enumeration class which should be used for values of this
+ * property definition.
+ *
+ * @param enumClass
+ * The enumeration class which should be used for values of
+ * this property definition.
+ */
+ public final void setEnumClass(Class<E> enumClass) {
+ this.enumClass = enumClass;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected EnumPropertyDefinition<E> buildInstance(AbstractManagedObjectDefinition<?, ?> d,
+ String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<E> defaultBehavior) {
+ // Make sure that the enumeration class has been defined.
+ if (enumClass == null) {
+ throw new IllegalStateException("Enumeration class undefined");
+ }
+
+ return new EnumPropertyDefinition<E>(d, propertyName, options, adminAction, defaultBehavior, enumClass);
+ }
+ }
+
+ /**
+ * Create an enumeration property definition builder.
+ *
+ * @param <E>
+ * The enumeration that should be used for values of this
+ * property definition.
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param propertyName
+ * The property name.
+ * @return Returns the new enumeration property definition builder.
+ */
+ public static <E extends Enum<E>> Builder<E> createBuilder(AbstractManagedObjectDefinition<?, ?> d,
+ String propertyName) {
+ return new Builder<E>(d, propertyName);
+ }
+
+ // The enumeration class.
+ private final Class<E> enumClass;
+
+ // Map used for decoding values.
+ private final Map<String, E> decodeMap;
+
+ // Private constructor.
+ private EnumPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction, DefaultBehaviorProvider<E> defaultBehavior,
+ Class<E> enumClass) {
+ super(d, enumClass, propertyName, options, adminAction, defaultBehavior);
+ this.enumClass = enumClass;
+
+ // Initialize the decoding map.
+ this.decodeMap = new HashMap<String, E>();
+ for (E value : EnumSet.<E> allOf(enumClass)) {
+ String s = value.toString().trim().toLowerCase();
+ this.decodeMap.put(s, value);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
+ return v.visitEnum(this, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyValueVisitor<R, P> v, E value, P p) {
+ return v.visitEnum(this, value, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public E decodeValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ String nvalue = value.trim().toLowerCase();
+ E eValue = decodeMap.get(nvalue);
+ if (eValue == null) {
+ throw new IllegalPropertyValueStringException(this, value);
+ } else {
+ return eValue;
+ }
+ }
+
+ /**
+ * Get the enumeration class used for values of this property.
+ *
+ * @return Returns the enumeration class used for values of this property.
+ */
+ public Class<E> getEnumClass() {
+ return enumClass;
+ }
+
+ /**
+ * Gets the synopsis of the specified enumeration value of this enumeration
+ * property definition in the default locale.
+ *
+ * @param value
+ * The enumeration value.
+ * @return Returns the synopsis of the specified enumeration value of this
+ * enumeration property definition in the default locale.
+ */
+ public final LocalizableMessage getValueSynopsis(E value) {
+ return getValueSynopsis(Locale.getDefault(), value);
+ }
+
+ /**
+ * Gets the synopsis of the specified enumeration value of this enumeration
+ * property definition in the specified locale.
+ *
+ * @param value
+ * The enumeration value.
+ * @param locale
+ * The locale.
+ * @return Returns the synopsis of the specified enumeration value of this
+ * enumeration property definition in the specified locale.
+ */
+ public final LocalizableMessage getValueSynopsis(Locale locale, E value) {
+ ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
+ String property = "property." + getName() + ".syntax.enumeration.value." + value.toString() + ".synopsis";
+ try {
+ return resource.getMessage(getManagedObjectDefinition(), property, locale);
+ } catch (MissingResourceException e) {
+ return null;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String normalizeValue(E value) {
+ Reject.ifNull(value);
+
+ return value.toString().trim().toLowerCase();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void validateValue(E value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ // No additional validation required.
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/GenericConstraint.java b/opendj-config/src/main/java/org/forgerock/opendj/config/GenericConstraint.java
new file mode 100644
index 0000000..776c60f
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/GenericConstraint.java
@@ -0,0 +1,190 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Locale;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.client.ClientConstraintHandler;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.conditions.Condition;
+import org.forgerock.opendj.config.server.ConfigException;
+import org.forgerock.opendj.config.server.ServerConstraintHandler;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.ldap.ErrorResultException;
+
+/**
+ * A generic constraint which comprises of an underlying condition and a
+ * description. The condition must evaluate to <code>true</code> in order for a
+ * new managed object to be created or modified.
+ */
+public class GenericConstraint extends Constraint {
+
+ /**
+ * The client-side constraint handler.
+ */
+ private final class ClientHandler extends ClientConstraintHandler {
+
+ // Private constructor.
+ private ClientHandler() {
+ // No implementation required.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAddAcceptable(ManagementContext context, ManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
+ if (!condition.evaluate(context, managedObject)) {
+ unacceptableReasons.add(getSynopsis());
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isModifyAcceptable(ManagementContext context, ManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
+ if (!condition.evaluate(context, managedObject)) {
+ unacceptableReasons.add(getSynopsis());
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ };
+
+ /**
+ * The server-side constraint handler.
+ */
+ private final class ServerHandler extends ServerConstraintHandler {
+
+ // Private constructor.
+ private ServerHandler() {
+ // No implementation required.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isUsable(ServerManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ConfigException {
+ if (!condition.evaluate(managedObject)) {
+ unacceptableReasons.add(getSynopsis());
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ };
+
+ // The client-side constraint handler.
+ private final ClientConstraintHandler clientHandler = new ClientHandler();
+
+ // The condition associated with this constraint.
+ private final Condition condition;
+
+ // The managed object definition associated with this constraint.
+ private final AbstractManagedObjectDefinition<?, ?> definition;
+
+ // The constraint ID.
+ private final int id;
+
+ // The server-side constraint handler.
+ private final ServerConstraintHandler serverHandler = new ServerHandler();
+
+ /**
+ * Creates a new generic constraint.
+ *
+ * @param definition
+ * The managed object definition associated with this constraint.
+ * @param id
+ * The constraint ID.
+ * @param condition
+ * The condition associated with this constraint.
+ */
+ public GenericConstraint(AbstractManagedObjectDefinition<?, ?> definition, int id, Condition condition) {
+ this.definition = definition;
+ this.id = id;
+ this.condition = condition;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<ClientConstraintHandler> getClientConstraintHandlers() {
+ return Collections.singleton(clientHandler);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<ServerConstraintHandler> getServerConstraintHandlers() {
+ return Collections.singleton(serverHandler);
+ }
+
+ /**
+ * Gets the synopsis of this constraint in the default locale.
+ *
+ * @return Returns the synopsis of this constraint in the default locale.
+ */
+ public final LocalizableMessage getSynopsis() {
+ return getSynopsis(Locale.getDefault());
+ }
+
+ /**
+ * Gets the synopsis of this constraint in the specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the synopsis of this constraint in the specified locale.
+ */
+ public final LocalizableMessage getSynopsis(Locale locale) {
+ ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
+ String property = "constraint." + id + ".synopsis";
+ return resource.getMessage(definition, property, locale);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initialize() throws Exception {
+ condition.initialize(definition);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/IPAddressMaskPropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/IPAddressMaskPropertyDefinition.java
new file mode 100644
index 0000000..7bba194
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/IPAddressMaskPropertyDefinition.java
@@ -0,0 +1,133 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.opendj.config.server.ConfigException;
+import org.forgerock.util.Reject;
+
+import java.util.EnumSet;
+
+import org.opends.server.types.AddressMask;
+
+/**
+ * IP address mask property definition.
+ */
+public final class IPAddressMaskPropertyDefinition extends PropertyDefinition<AddressMask> {
+
+ /**
+ * An interface for incrementally constructing IP address mask property
+ * definitions.
+ */
+ public static final class Builder extends AbstractBuilder<AddressMask, IPAddressMaskPropertyDefinition> {
+
+ // Private constructor
+ private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ super(d, propertyName);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IPAddressMaskPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
+ String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<AddressMask> defaultBehavior) {
+ return new IPAddressMaskPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior);
+ }
+
+ }
+
+ /**
+ * Create a IP address mask property definition builder.
+ *
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param propertyName
+ * The property name.
+ * @return Returns the new IP address mask property definition builder.
+ */
+ public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ return new Builder(d, propertyName);
+ }
+
+ // Private constructor.
+ private IPAddressMaskPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<AddressMask> defaultBehavior) {
+ super(d, AddressMask.class, propertyName, options, adminAction, defaultBehavior);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void validateValue(AddressMask value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ // No additional validation required.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public AddressMask decodeValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ try {
+ return AddressMask.decode(value);
+ } catch (ConfigException e) {
+ // TODO: it would be nice to throw the cause.
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
+ return v.visitIPAddressMask(this, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyValueVisitor<R, P> v, AddressMask value, P p) {
+ return v.visitIPAddressMask(this, value, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int compare(AddressMask o1, AddressMask o2) {
+ return o1.toString().compareTo(o2.toString());
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/IPAddressPropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/IPAddressPropertyDefinition.java
new file mode 100644
index 0000000..aa21481
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/IPAddressPropertyDefinition.java
@@ -0,0 +1,152 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.EnumSet;
+
+/**
+ * IP address property definition.
+ */
+public final class IPAddressPropertyDefinition extends PropertyDefinition<InetAddress> {
+
+ /**
+ * An interface for incrementally constructing IP address property
+ * definitions.
+ */
+ public static final class Builder extends AbstractBuilder<InetAddress, IPAddressPropertyDefinition> {
+
+ // Private constructor
+ private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ super(d, propertyName);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IPAddressPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
+ String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<InetAddress> defaultBehavior) {
+ return new IPAddressPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior);
+ }
+
+ }
+
+ /**
+ * Create a IP address property definition builder.
+ *
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param propertyName
+ * The property name.
+ * @return Returns the new IP address property definition builder.
+ */
+ public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ return new Builder(d, propertyName);
+ }
+
+ // Private constructor.
+ private IPAddressPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<InetAddress> defaultBehavior) {
+ super(d, InetAddress.class, propertyName, options, adminAction, defaultBehavior);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void validateValue(InetAddress value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ // No additional validation required.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public InetAddress decodeValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ try {
+ return InetAddress.getByName(value);
+ } catch (UnknownHostException e) {
+ // TODO: it would be nice to throw the cause.
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String encodeValue(InetAddress value) {
+ // We should return the host name if it is available, or the IP
+ // address if not.
+
+ // Unforunately, there is no InetAddress method for doing this, so
+ // we have to resort to hacking at the toString() encoding.
+ String s = value.toString();
+ int i = s.indexOf('/');
+ if (i > 0) {
+ // Host address is before the forward slash.
+ return s.substring(0, i);
+ } else {
+ return value.getHostAddress();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
+ return v.visitIPAddress(this, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyValueVisitor<R, P> v, InetAddress value, P p) {
+ return v.visitIPAddress(this, value, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int compare(InetAddress o1, InetAddress o2) {
+ return o1.getHostAddress().compareTo(o2.getHostAddress());
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/IllegalPropertyValueException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/IllegalPropertyValueException.java
new file mode 100644
index 0000000..e7c8c7e
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/IllegalPropertyValueException.java
@@ -0,0 +1,90 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ * Portions copyright 2013 ForgeRock AS.
+ */
+package org.forgerock.opendj.config;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * Thrown to indicate that a property value was invalid according to its
+ * associated property definition.
+ */
+public class IllegalPropertyValueException extends PropertyException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = -3145632074909281823L;
+
+ // The illegal property value.
+ private final Object value;
+
+ /**
+ * Create a new illegal property value exception.
+ *
+ * @param pd
+ * The property definition.
+ * @param value
+ * The illegal property value.
+ */
+ public IllegalPropertyValueException(PropertyDefinition<?> pd, Object value) {
+ super(pd, createMessage(pd, value));
+ this.value = value;
+ }
+
+ /**
+ * Create a new illegal property value exception.
+ *
+ * @param pd
+ * The property definition.
+ * @param value
+ * The illegal property value.
+ * @param cause
+ * The cause.
+ */
+ public IllegalPropertyValueException(PropertyDefinition<?> pd, Object value, Throwable cause) {
+ super(pd, createMessage(pd, value), cause);
+ this.value = value;
+ }
+
+ /**
+ * Get the illegal property value that caused the exception.
+ *
+ * @return Returns the illegal property value.
+ */
+ public final Object getIllegalValue() {
+ return value;
+ }
+
+ // Create the message.
+ private static LocalizableMessage createMessage(PropertyDefinition<?> pd, Object value) {
+ PropertyDefinitionUsageBuilder builder = new PropertyDefinitionUsageBuilder(true);
+ return ERR_ILLEGAL_PROPERTY_VALUE_EXCEPTION.get(String.valueOf(value), pd.getName(), builder.getUsage(pd));
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/IllegalPropertyValueStringException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/IllegalPropertyValueStringException.java
new file mode 100644
index 0000000..e6768ea
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/IllegalPropertyValueStringException.java
@@ -0,0 +1,90 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ * Portions copyright 2013 ForgeRock AS.
+ */
+package org.forgerock.opendj.config;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+/**
+ * Thrown to indicate that a property value string was invalid according to its
+ * associated property definition.
+ */
+public class IllegalPropertyValueStringException extends PropertyException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = -3145632074909281823L;
+
+ // The illegal property value string.
+ private final String value;
+
+ /**
+ * Create a new illegal property value string exception.
+ *
+ * @param pd
+ * The property definition.
+ * @param value
+ * The illegal property value string.
+ */
+ public IllegalPropertyValueStringException(PropertyDefinition<?> pd, String value) {
+ super(pd, createMessage(pd, value));
+ this.value = value;
+ }
+
+ /**
+ * Create a new illegal property value string exception.
+ *
+ * @param pd
+ * The property definition.
+ * @param value
+ * The illegal property value string.
+ * @param cause
+ * The cause.
+ */
+ public IllegalPropertyValueStringException(PropertyDefinition<?> pd, String value, Throwable cause) {
+ super(pd, createMessage(pd, value), cause);
+ this.value = value;
+ }
+
+ /**
+ * Get the illegal property value string that caused the exception.
+ *
+ * @return Returns the illegal property value string.
+ */
+ public final String getIllegalValueString() {
+ return value;
+ }
+
+ // Create the message.
+ private static LocalizableMessage createMessage(PropertyDefinition<?> pd, String value) {
+ PropertyDefinitionUsageBuilder builder = new PropertyDefinitionUsageBuilder(true);
+ return ERR_ILLEGAL_PROPERTY_VALUE_STRING_EXCEPTION.get(value, pd.getName(), builder.getUsage(pd));
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/InstantiableRelationDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/InstantiableRelationDefinition.java
new file mode 100644
index 0000000..8058fb1
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/InstantiableRelationDefinition.java
@@ -0,0 +1,260 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * A managed object composite relationship definition which represents a
+ * composition of zero or more managed objects.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this relation
+ * definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this relation
+ * definition refers to.
+ */
+public final class InstantiableRelationDefinition<C extends ConfigurationClient, S extends Configuration> extends
+ RelationDefinition<C, S> {
+
+ /**
+ * An interface for incrementally constructing instantiable relation
+ * definitions.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * relation definition refers to.
+ */
+ public static final class Builder<C extends ConfigurationClient, S extends Configuration> extends
+ AbstractBuilder<C, S, InstantiableRelationDefinition<C, S>> {
+
+ // The optional naming property definition.
+ private PropertyDefinition<?> namingPropertyDefinition = null;
+
+ // The plural name of the relation.
+ private final String pluralName;
+
+ // The optional default managed objects associated with this
+ // instantiable relation definition.
+ private final Map<String, DefaultManagedObject<? extends C, ? extends S>> defaultManagedObjects =
+ new HashMap<String, DefaultManagedObject<? extends C, ? extends S>>();
+
+ /**
+ * Creates a new builder which can be used to incrementally build an
+ * instantiable relation definition.
+ *
+ * @param pd
+ * The parent managed object definition.
+ * @param name
+ * The name of the relation.
+ * @param pluralName
+ * The plural name of the relation.
+ * @param cd
+ * The child managed object definition.
+ */
+ public Builder(AbstractManagedObjectDefinition<?, ?> pd, String name, String pluralName,
+ AbstractManagedObjectDefinition<C, S> cd) {
+ super(pd, name, cd);
+ this.pluralName = pluralName;
+ }
+
+ /**
+ * Adds the named default managed object to this instantiable relation
+ * definition.
+ *
+ * @param name
+ * The name of the default managed object.
+ * @param defaultManagedObject
+ * The default managed object.
+ */
+ public void setDefaultManagedObject(String name,
+ DefaultManagedObject<? extends C, ? extends S> defaultManagedObject) {
+ this.defaultManagedObjects.put(name, defaultManagedObject);
+ }
+
+ /**
+ * Sets the naming property for the instantiable relation definition.
+ *
+ * @param namingPropertyDefinition
+ * The property of the child managed object definition which
+ * should be used for naming, or <code>null</code> if this
+ * relation does not use a property for naming.
+ */
+ public void setNamingProperty(PropertyDefinition<?> namingPropertyDefinition) {
+ Reject.ifNull(namingPropertyDefinition);
+ this.namingPropertyDefinition = namingPropertyDefinition;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected InstantiableRelationDefinition<C, S> buildInstance(Common<C, S> common) {
+ return new InstantiableRelationDefinition<C, S>(common, pluralName, namingPropertyDefinition,
+ defaultManagedObjects);
+ }
+
+ }
+
+ // The optional naming property definition.
+ private final PropertyDefinition<?> namingPropertyDefinition;
+
+ // The plural name of the relation.
+ private final String pluralName;
+
+ // The optional default managed objects associated with this
+ // instantiable relation definition.
+ private final Map<String, DefaultManagedObject<? extends C, ? extends S>> defaultManagedObjects;
+
+ // Private constructor.
+ private InstantiableRelationDefinition(Common<C, S> common, String pluralName,
+ PropertyDefinition<?> namingPropertyDefinition,
+ Map<String, DefaultManagedObject<? extends C, ? extends S>> defaultManagedObjects) {
+ super(common);
+ this.pluralName = pluralName;
+ this.namingPropertyDefinition = namingPropertyDefinition;
+ this.defaultManagedObjects = defaultManagedObjects;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(RelationDefinitionVisitor<R, P> v, P p) {
+ return v.visitInstantiable(this, p);
+ }
+
+ /**
+ * Gets the named default managed object associated with this instantiable
+ * relation definition.
+ *
+ * @param name
+ * The name of the default managed object.
+ * @return Returns the named default managed object.
+ * @throws IllegalArgumentException
+ * If there is no default managed object associated with the
+ * provided name.
+ */
+ public DefaultManagedObject<? extends C, ? extends S> getDefaultManagedObject(String name) {
+ if (!defaultManagedObjects.containsKey(name)) {
+ throw new IllegalArgumentException("unrecognized default managed object \"" + name + "\"");
+ }
+ return defaultManagedObjects.get(name);
+ }
+
+ /**
+ * Gets the names of the default managed objects associated with this
+ * instantiable relation definition.
+ *
+ * @return Returns an unmodifiable set containing the names of the default
+ * managed object.
+ */
+ public Set<String> getDefaultManagedObjectNames() {
+ return Collections.unmodifiableSet(defaultManagedObjects.keySet());
+ }
+
+ /**
+ * Get the property of the child managed object definition which should be
+ * used for naming children.
+ *
+ * @return Returns the property of the child managed object definition which
+ * should be used for naming, or <code>null</code> if this relation
+ * does not use a property for naming.
+ */
+ public PropertyDefinition<?> getNamingPropertyDefinition() {
+ return namingPropertyDefinition;
+ }
+
+ /**
+ * Get the plural name of the relation.
+ *
+ * @return Returns the plural name of the relation.
+ */
+ public String getPluralName() {
+ return pluralName;
+ }
+
+ /**
+ * Gets the user friendly plural name of this relation definition in the
+ * default locale.
+ *
+ * @return Returns the user friendly plural name of this relation definition
+ * in the default locale.
+ */
+ public LocalizableMessage getUserFriendlyPluralName() {
+ return getUserFriendlyPluralName(Locale.getDefault());
+ }
+
+ /**
+ * Gets the user friendly plural name of this relation definition in the
+ * specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the user friendly plural name of this relation definition
+ * in the specified locale.
+ */
+ public LocalizableMessage getUserFriendlyPluralName(Locale locale) {
+ String property = "relation." + getName() + ".user-friendly-plural-name";
+ return ManagedObjectDefinitionI18NResource.getInstance().getMessage(getParentDefinition(), property, locale);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void toString(StringBuilder builder) {
+ builder.append("name=");
+ builder.append(getName());
+ builder.append(" type=collection parent=");
+ builder.append(getParentDefinition().getName());
+ builder.append(" child=");
+ builder.append(getChildDefinition().getName());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initialize() throws Exception {
+ for (DefaultManagedObject<?, ?> dmo : defaultManagedObjects.values()) {
+ dmo.initialize();
+ }
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/IntegerPropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/IntegerPropertyDefinition.java
new file mode 100644
index 0000000..a031f2e
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/IntegerPropertyDefinition.java
@@ -0,0 +1,337 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.util.EnumSet;
+import java.util.Locale;
+import java.util.MissingResourceException;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * Integer property definition.
+ * <p>
+ * All values must be zero or positive and within the lower/upper limit
+ * constraints. Support is provided for "unlimited" values. These are
+ * represented using a negative value or using the string "unlimited".
+ */
+public final class IntegerPropertyDefinition extends PropertyDefinition<Integer> {
+
+ // String used to represent unlimited.
+ private static final String UNLIMITED = "unlimited";
+
+ // The lower limit of the property value.
+ private final int lowerLimit;
+
+ // The optional upper limit of the property value.
+ private final Integer upperLimit;
+
+ // Indicates whether this property allows the use of the "unlimited" value
+ // (represented using a -1 or the string "unlimited").
+ private final boolean allowUnlimited;
+
+ /**
+ * An interface for incrementally constructing integer property definitions.
+ */
+ public static final class Builder extends AbstractBuilder<Integer, IntegerPropertyDefinition> {
+
+ // The lower limit of the property value.
+ private int lowerLimit = 0;
+
+ // The optional upper limit of the property value.
+ private Integer upperLimit = null;
+
+ // Indicates whether this property allows the use of the "unlimited"
+ // value
+ // (represented using a -1 or the string "unlimited").
+ private boolean allowUnlimited = false;
+
+ // Private constructor
+ private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ super(d, propertyName);
+ }
+
+ /**
+ * Set the lower limit.
+ *
+ * @param lowerLimit
+ * The new lower limit (must be >= 0).
+ * @throws IllegalArgumentException
+ * If a negative lower limit was specified or the lower
+ * limit is greater than the upper limit.
+ */
+ public final void setLowerLimit(int lowerLimit) {
+ if (lowerLimit < 0) {
+ throw new IllegalArgumentException("Negative lower limit");
+ }
+ if (upperLimit != null && lowerLimit > upperLimit) {
+ throw new IllegalArgumentException("Lower limit greater than upper limit");
+ }
+ this.lowerLimit = lowerLimit;
+ }
+
+ /**
+ * Set the upper limit.
+ *
+ * @param upperLimit
+ * The new upper limit or <code>null</code> if there is no
+ * upper limit.
+ */
+ public final void setUpperLimit(Integer upperLimit) {
+ if (upperLimit != null) {
+ if (upperLimit < 0) {
+ throw new IllegalArgumentException("Negative lower limit");
+ }
+ if (lowerLimit > upperLimit) {
+ throw new IllegalArgumentException("Lower limit greater than upper limit");
+ }
+ }
+ this.upperLimit = upperLimit;
+ }
+
+ /**
+ * Specify whether or not this property definition will allow unlimited
+ * values (default is false).
+ *
+ * @param allowUnlimited
+ * <code>true</code> if the property will allow unlimited
+ * values, or <code>false</code> otherwise.
+ */
+ public final void setAllowUnlimited(boolean allowUnlimited) {
+ this.allowUnlimited = allowUnlimited;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IntegerPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
+ String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<Integer> defaultBehavior) {
+ return new IntegerPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior, lowerLimit,
+ upperLimit, allowUnlimited);
+ }
+
+ }
+
+ /**
+ * Create an integer property definition builder.
+ *
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param propertyName
+ * The property name.
+ * @return Returns the new integer property definition builder.
+ */
+ public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ return new Builder(d, propertyName);
+ }
+
+ // Private constructor.
+ private IntegerPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<Integer> defaultBehavior, int lowerLimit, Integer upperLimit, boolean allowUnlimited) {
+ super(d, Integer.class, propertyName, options, adminAction, defaultBehavior);
+ this.lowerLimit = lowerLimit;
+ this.upperLimit = upperLimit;
+ this.allowUnlimited = allowUnlimited;
+ }
+
+ /**
+ * Get the lower limit.
+ *
+ * @return Returns the lower limit.
+ */
+ public int getLowerLimit() {
+ return lowerLimit;
+ }
+
+ /**
+ * Get the upper limit.
+ *
+ * @return Returns the upper limit or <code>null</code> if there is no upper
+ * limit.
+ */
+ public Integer getUpperLimit() {
+ return upperLimit;
+ }
+
+ /**
+ * Gets the optional unit synopsis of this integer property definition in
+ * the default locale.
+ *
+ * @return Returns the unit synopsis of this integer property definition in
+ * the default locale, or <code>null</code> if there is no unit
+ * synopsis.
+ */
+ public LocalizableMessage getUnitSynopsis() {
+ return getUnitSynopsis(Locale.getDefault());
+ }
+
+ /**
+ * Gets the optional unit synopsis of this integer property definition in
+ * the specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the unit synopsis of this integer property definition in
+ * the specified locale, or <code>null</code> if there is no unit
+ * synopsis.
+ */
+ public LocalizableMessage getUnitSynopsis(Locale locale) {
+ ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
+ String property = "property." + getName() + ".syntax.integer.unit-synopsis";
+ try {
+ return resource.getMessage(getManagedObjectDefinition(), property, locale);
+ } catch (MissingResourceException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Determine whether this property allows unlimited values.
+ *
+ * @return Returns <code>true</code> if this this property allows unlimited
+ * values.
+ */
+ public boolean isAllowUnlimited() {
+ return allowUnlimited;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void validateValue(Integer value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ if (!allowUnlimited && value < lowerLimit) {
+ throw new IllegalPropertyValueException(this, value);
+
+ // unlimited allowed
+ } else if (value >= 0 && value < lowerLimit) {
+ throw new IllegalPropertyValueException(this, value);
+ }
+
+ if ((upperLimit != null) && (value > upperLimit)) {
+ throw new IllegalPropertyValueException(this, value);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String encodeValue(Integer value) {
+ Reject.ifNull(value);
+
+ // Make sure that we correctly encode negative values as "unlimited".
+ if (allowUnlimited) {
+ if (value < 0) {
+ return UNLIMITED;
+ }
+ }
+
+ return value.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Integer decodeValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ if (allowUnlimited) {
+ if (value.trim().equalsIgnoreCase(UNLIMITED)) {
+ return -1;
+ }
+ }
+
+ Integer i;
+ try {
+ i = Integer.valueOf(value);
+ } catch (NumberFormatException e) {
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+
+ try {
+ validateValue(i, options);
+ } catch (IllegalPropertyValueException e) {
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+
+ return i;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
+ return v.visitInteger(this, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyValueVisitor<R, P> v, Integer value, P p) {
+ return v.visitInteger(this, value, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void toString(StringBuilder builder) {
+ super.toString(builder);
+
+ builder.append(" lowerLimit=");
+ builder.append(lowerLimit);
+
+ if (upperLimit != null) {
+ builder.append(" upperLimit=");
+ builder.append(upperLimit);
+ }
+
+ builder.append(" allowUnlimited=");
+ builder.append(allowUnlimited);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int compare(Integer o1, Integer o2) {
+ return o1.compareTo(o2);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/LDAPProfile.java b/opendj-config/src/main/java/org/forgerock/opendj/config/LDAPProfile.java
new file mode 100644
index 0000000..ca43507
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/LDAPProfile.java
@@ -0,0 +1,361 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.MissingResourceException;
+import java.util.NoSuchElementException;
+import java.util.Set;
+
+/**
+ * This class is used to map configuration elements to their LDAP schema names.
+ * <p>
+ * It is possible to augment the core LDAP profile with additional profile
+ * mappings at run-time using instances of {@link Wrapper}. This is useful for
+ * unit tests which need to add and remove mock components.
+ */
+public final class LDAPProfile {
+
+ /**
+ * LDAP profile wrappers can be used to provide temporary LDAP profile
+ * information for components which do not have LDAP profile property files.
+ * These components are typically "mock" components used in unit-tests.
+ */
+ public static abstract class Wrapper {
+
+ /**
+ * Default constructor.
+ */
+ protected Wrapper() {
+ // No implementation required.
+ }
+
+ /**
+ * Get the name of the LDAP attribute associated with the specified
+ * property definition.
+ * <p>
+ * The default implementation of this method is to return
+ * <code>null</code>.
+ *
+ * @param d
+ * The managed object definition.
+ * @param pd
+ * The property definition.
+ * @return Returns the name of the LDAP attribute associated with the
+ * specified property definition, or <code>null</code> if the
+ * property definition is not handled by this LDAP profile
+ * wrapper.
+ */
+ public String getAttributeName(AbstractManagedObjectDefinition<?, ?> d, PropertyDefinition<?> pd) {
+ return null;
+ }
+
+ /**
+ * Gets the LDAP RDN attribute type for child entries of an instantiable
+ * relation.
+ * <p>
+ * The default implementation of this method is to return
+ * <code>null</code>.
+ *
+ * @param r
+ * The instantiable relation.
+ * @return Returns the LDAP RDN attribute type for child entries of an
+ * instantiable relation, or <code>null</code> if the
+ * instantiable relation is not handled by this LDAP profile
+ * wrapper.
+ */
+ public String getRelationChildRDNType(InstantiableRelationDefinition<?, ?> r) {
+ return null;
+ }
+
+ /**
+ * Gets the LDAP RDN attribute type for child entries of an set
+ * relation.
+ * <p>
+ * The default implementation of this method is to return
+ * <code>null</code>.
+ *
+ * @param r
+ * The set relation.
+ * @return Returns the LDAP RDN attribute type for child entries of an
+ * set relation, or <code>null</code> if the set relation is not
+ * handled by this LDAP profile wrapper.
+ */
+ public String getRelationChildRDNType(SetRelationDefinition<?, ?> r) {
+ return null;
+ }
+
+ /**
+ * Get the principle object class associated with the specified
+ * definition.
+ * <p>
+ * The default implementation of this method is to return
+ * <code>null</code>.
+ *
+ * @param d
+ * The managed object definition.
+ * @return Returns the principle object class associated with the
+ * specified definition, or <code>null</code> if the managed
+ * object definition is not handled by this LDAP profile
+ * wrapper.
+ */
+ public String getObjectClass(AbstractManagedObjectDefinition<?, ?> d) {
+ return null;
+ }
+
+ /**
+ * Get an LDAP RDN sequence associatied with a relation.
+ * <p>
+ * The default implementation of this method is to return
+ * <code>null</code>.
+ *
+ * @param r
+ * The relation.
+ * @return Returns the LDAP RDN sequence associatied with a relation, or
+ * <code>null</code> if the relation is not handled by this LDAP
+ * profile wrapper.
+ */
+ public String getRelationRDNSequence(RelationDefinition<?, ?> r) {
+ return null;
+ }
+ }
+
+ // The singleton instance.
+ private static final LDAPProfile INSTANCE = new LDAPProfile();
+
+ /**
+ * Get the global LDAP profile instance.
+ *
+ * @return Returns the global LDAP profile instance.
+ */
+ public static LDAPProfile getInstance() {
+ return INSTANCE;
+ }
+
+ // The list of profile wrappers.
+ private final LinkedList<Wrapper> profiles = new LinkedList<Wrapper>();;
+
+ // The LDAP profile property table.
+ private final ManagedObjectDefinitionResource resource = ManagedObjectDefinitionResource.createForProfile("ldap");
+
+ // Prevent construction.
+ private LDAPProfile() {
+ // No implementation required.
+ }
+
+ /**
+ * Get the name of the LDAP attribute associated with the specified property
+ * definition.
+ *
+ * @param d
+ * The managed object definition.
+ * @param pd
+ * The property definition.
+ * @return Returns the name of the LDAP attribute associated with the
+ * specified property definition.
+ * @throws MissingResourceException
+ * If the LDAP profile properties file associated with the
+ * provided managed object definition could not be loaded.
+ */
+ public String getAttributeName(AbstractManagedObjectDefinition<?, ?> d, PropertyDefinition<?> pd) {
+ for (Wrapper profile : profiles) {
+ String attributeName = profile.getAttributeName(d, pd);
+ if (attributeName != null) {
+ return attributeName;
+ }
+ }
+ return resource.getString(d, "attribute." + pd.getName());
+ }
+
+ /**
+ * Gets the LDAP RDN attribute type for child entries of an instantiable
+ * relation.
+ *
+ * @param r
+ * The instantiable relation.
+ * @return Returns the LDAP RDN attribute type for child entries of an
+ * instantiable relation.
+ * @throws MissingResourceException
+ * If the LDAP profile properties file associated with the
+ * provided managed object definition could not be loaded.
+ */
+ public String getRelationChildRDNType(InstantiableRelationDefinition<?, ?> r) {
+ if (r.getNamingPropertyDefinition() != null) {
+ // Use the attribute associated with the naming property.
+ return getAttributeName(r.getChildDefinition(), r.getNamingPropertyDefinition());
+ } else {
+ for (Wrapper profile : profiles) {
+ String rdnType = profile.getRelationChildRDNType(r);
+ if (rdnType != null) {
+ return rdnType;
+ }
+ }
+ return resource.getString(r.getParentDefinition(), "naming-attribute." + r.getName());
+ }
+ }
+
+ /**
+ * Gets the LDAP object classes associated with an instantiable or set
+ * relation branch. The branch is the parent entry of child managed objects.
+ *
+ * @param r
+ * The instantiable or set relation.
+ * @return Returns the LDAP object classes associated with an instantiable
+ * or set relation branch.
+ */
+ public List<String> getRelationObjectClasses(RelationDefinition<?, ?> r) {
+ return Arrays.asList(new String[] { "top", "ds-cfg-branch" });
+ }
+
+ /**
+ * Gets the LDAP RDN attribute type for child entries of an set relation.
+ *
+ * @param r
+ * The set relation.
+ * @return Returns the LDAP RDN attribute type for child entries of an set
+ * relation.
+ * @throws MissingResourceException
+ * If the LDAP profile properties file associated with the
+ * provided managed object definition could not be loaded.
+ */
+ public String getRelationChildRDNType(SetRelationDefinition<?, ?> r) {
+ for (Wrapper profile : profiles) {
+ String rdnType = profile.getRelationChildRDNType(r);
+ if (rdnType != null) {
+ return rdnType;
+ }
+ }
+ return resource.getString(r.getParentDefinition(), "naming-attribute." + r.getName());
+ }
+
+ /**
+ * Get the principle object class associated with the specified definition.
+ *
+ * @param d
+ * The managed object definition.
+ * @return Returns the principle object class associated with the specified
+ * definition.
+ * @throws MissingResourceException
+ * If the LDAP profile properties file associated with the
+ * provided managed object definition could not be loaded.
+ */
+ public String getObjectClass(AbstractManagedObjectDefinition<?, ?> d) {
+ if (d.isTop()) {
+ return "top";
+ }
+
+ for (Wrapper profile : profiles) {
+ String objectClass = profile.getObjectClass(d);
+ if (objectClass != null) {
+ return objectClass;
+ }
+ }
+ return resource.getString(d, "objectclass");
+ }
+
+ /**
+ * Get all the object classes associated with the specified definition.
+ * <p>
+ * The returned list is ordered such that the uppermost object classes
+ * appear first (e.g. top).
+ *
+ * @param d
+ * The managed object definition.
+ * @return Returns all the object classes associated with the specified
+ * definition.
+ * @throws MissingResourceException
+ * If the LDAP profile properties file associated with the
+ * provided managed object definition could not be loaded.
+ */
+ public List<String> getObjectClasses(AbstractManagedObjectDefinition<?, ?> d) {
+ LinkedList<String> objectClasses = new LinkedList<String>();
+ Set<String> s = new HashSet<String>();
+
+ // Add the object classes from the parent hierarchy.
+ while (d != null) {
+ String oc = getObjectClass(d);
+ if (!s.contains(oc)) {
+ objectClasses.addFirst(oc);
+ s.add(oc);
+ }
+ d = d.getParent();
+ }
+
+ if (!s.contains("top")) {
+ objectClasses.addFirst("top");
+ }
+
+ return objectClasses;
+ }
+
+ /**
+ * Get an LDAP RDN sequence associatied with a relation.
+ *
+ * @param r
+ * The relation.
+ * @return Returns the LDAP RDN sequence associatied with a relation.
+ * @throws MissingResourceException
+ * If the LDAP profile properties file associated with the
+ * provided managed object definition could not be loaded.
+ */
+ public String getRelationRDNSequence(RelationDefinition<?, ?> r) {
+ for (Wrapper profile : profiles) {
+ String rdnSequence = profile.getRelationRDNSequence(r);
+ if (rdnSequence != null) {
+ return rdnSequence;
+ }
+ }
+ return resource.getString(r.getParentDefinition(), "rdn." + r.getName());
+ }
+
+ /**
+ * Removes the last LDAP profile wrapper added using
+ * {@link #pushWrapper(org.forgerock.opendj.config.LDAPProfile.Wrapper)}.
+ *
+ * @throws NoSuchElementException
+ * If there are no LDAP profile wrappers.
+ */
+ public void popWrapper() {
+ profiles.removeFirst();
+ }
+
+ /**
+ * Decorates the core LDAP profile with the provided LDAP profile wrapper.
+ * All profile requests will be directed to the provided wrapper before
+ * being forwarded onto the core profile if the request could not be
+ * satisfied.
+ *
+ * @param wrapper
+ * The LDAP profile wrapper.
+ */
+ public void pushWrapper(Wrapper wrapper) {
+ profiles.addFirst(wrapper);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectAlreadyExistsException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectAlreadyExistsException.java
new file mode 100644
index 0000000..fad17c8
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectAlreadyExistsException.java
@@ -0,0 +1,47 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+/**
+ * A managed object could not be created because there is an existing managed
+ * object with the same name.
+ */
+public final class ManagedObjectAlreadyExistsException extends OperationsException {
+
+ /**
+ * Version ID required by serializable classes.
+ */
+ private static final long serialVersionUID = -2344653674171609366L;
+
+ /**
+ * Create a managed object already exists exception.
+ */
+ public ManagedObjectAlreadyExistsException() {
+ super(ERR_MANAGED_OBJECT_ALREADY_EXISTS_EXCEPTION.get());
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectDefinition.java
new file mode 100644
index 0000000..ea88a84
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectDefinition.java
@@ -0,0 +1,88 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+
+/**
+ * Defines the structure of a managed object which can be instantiated.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * definition represents.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * definition represents.
+ */
+public abstract class ManagedObjectDefinition<C extends ConfigurationClient, S extends Configuration> extends
+ AbstractManagedObjectDefinition<C, S> {
+
+ /**
+ * Create a new managed object definition.
+ *
+ * @param name
+ * The name of the definition.
+ * @param parent
+ * The parent definition, or <code>null</code> if there is no
+ * parent.
+ */
+ protected ManagedObjectDefinition(String name, AbstractManagedObjectDefinition<? super C, ? super S> parent) {
+ super(name, parent);
+ }
+
+ /**
+ * Creates a client configuration view of the provided managed object.
+ * Modifications made to the underlying managed object will be reflected in
+ * the client configuration view and vice versa.
+ *
+ * @param managedObject
+ * The managed object.
+ * @return Returns a client configuration view of the provided managed
+ * object.
+ */
+ public abstract C createClientConfiguration(ManagedObject<? extends C> managedObject);
+
+ /**
+ * Creates a server configuration view of the provided server managed
+ * object.
+ *
+ * @param managedObject
+ * The server managed object.
+ * @return Returns a server configuration view of the provided server
+ * managed object.
+ */
+ public abstract S createServerConfiguration(ServerManagedObject<? extends S> managedObject);
+
+ /**
+ * Gets the server configuration class instance associated with this managed
+ * object definition.
+ *
+ * @return Returns the server configuration class instance associated with
+ * this managed object definition.
+ */
+ public abstract Class<S> getServerConfigurationClass();
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectDefinitionI18NResource.java b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectDefinitionI18NResource.java
new file mode 100644
index 0000000..6d4a132
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectDefinitionI18NResource.java
@@ -0,0 +1,291 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * A class for retrieving internationalized resource properties associated with
+ * a managed object definition.
+ * <p>
+ * I18N resource properties are not available for the {@link TopCfgDefn}.
+ */
+public final class ManagedObjectDefinitionI18NResource {
+
+ // Application-wide set of instances.
+ private static final Map<String, ManagedObjectDefinitionI18NResource> INSTANCES =
+ new HashMap<String, ManagedObjectDefinitionI18NResource>();
+
+ /**
+ * Gets the internationalized resource instance which can be used to
+ * retrieve the localized descriptions for the managed objects and their
+ * associated properties and relations.
+ *
+ * @return Returns the I18N resource instance.
+ */
+ public static ManagedObjectDefinitionI18NResource getInstance() {
+ return getInstance("config.messages");
+ }
+
+ /**
+ * Gets the internationalized resource instance for the named profile.
+ *
+ * @param profile
+ * The name of the profile.
+ * @return Returns the I18N resource instance for the named profile.
+ */
+ public static ManagedObjectDefinitionI18NResource getInstanceForProfile(String profile) {
+ return getInstance("config.profiles." + profile);
+ }
+
+ // Get a resource instance creating it if necessary.
+ private synchronized static ManagedObjectDefinitionI18NResource getInstance(String prefix) {
+ ManagedObjectDefinitionI18NResource instance = INSTANCES.get(prefix);
+
+ if (instance == null) {
+ instance = new ManagedObjectDefinitionI18NResource(prefix);
+ INSTANCES.put(prefix, instance);
+ }
+
+ return instance;
+ }
+
+ // Mapping from definition to locale-based resource bundle.
+ private final Map<AbstractManagedObjectDefinition<?, ?>, Map<Locale, ResourceBundle>> resources;
+
+ // The resource name prefix.
+ private final String prefix;
+
+ // Private constructor.
+ private ManagedObjectDefinitionI18NResource(String prefix) {
+ this.resources = new HashMap<AbstractManagedObjectDefinition<?, ?>, Map<Locale, ResourceBundle>>();
+ this.prefix = prefix;
+ }
+
+ /**
+ * Get the internationalized message associated with the specified key in
+ * the default locale.
+ *
+ * @param d
+ * The managed object definition.
+ * @param key
+ * The resource key.
+ * @return Returns the internationalized message associated with the
+ * specified key in the default locale.
+ * @throws MissingResourceException
+ * If the key was not found.
+ * @throws UnsupportedOperationException
+ * If the provided managed object definition was the
+ * {@link TopCfgDefn}.
+ */
+ public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, String key) {
+ return getMessage(d, key, Locale.getDefault(), (String[]) null);
+ }
+
+ /**
+ * Get the internationalized message associated with the specified key and
+ * locale.
+ *
+ * @param d
+ * The managed object definition.
+ * @param key
+ * The resource key.
+ * @param locale
+ * The locale.
+ * @return Returns the internationalized message associated with the
+ * specified key and locale.
+ * @throws MissingResourceException
+ * If the key was not found.
+ * @throws UnsupportedOperationException
+ * If the provided managed object definition was the
+ * {@link TopCfgDefn}.
+ */
+ public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, String key, Locale locale) {
+ return getMessage(d, key, locale, (String[]) null);
+ }
+
+ /**
+ * Get the parameterized internationalized message associated with the
+ * specified key and locale.
+ *
+ * @param d
+ * The managed object definition.
+ * @param key
+ * The resource key.
+ * @param locale
+ * The locale.
+ * @param args
+ * Arguments that should be inserted into the retrieved message.
+ * @return Returns the internationalized message associated with the
+ * specified key and locale.
+ * @throws MissingResourceException
+ * If the key was not found.
+ * @throws UnsupportedOperationException
+ * If the provided managed object definition was the
+ * {@link TopCfgDefn}.
+ */
+ public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, String key, Locale locale,
+ String... args) {
+ ResourceBundle resource = getResourceBundle(d, locale);
+
+ // TODO: use message framework directly
+ if (args == null) {
+ return LocalizableMessage.raw(resource.getString(key));
+ } else {
+ return LocalizableMessage.raw(resource.getString(key), (Object[]) args);
+ }
+ }
+
+ /**
+ * Get the parameterized internationalized message associated with the
+ * specified key in the default locale.
+ *
+ * @param d
+ * The managed object definition.
+ * @param key
+ * The resource key.
+ * @param args
+ * Arguments that should be inserted into the retrieved message.
+ * @return Returns the internationalized message associated with the
+ * specified key in the default locale.
+ * @throws MissingResourceException
+ * If the key was not found.
+ * @throws UnsupportedOperationException
+ * If the provided managed object definition was the
+ * {@link TopCfgDefn}.
+ */
+ public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, String key, String... args) {
+ return getMessage(d, key, Locale.getDefault(), args);
+ }
+
+ /**
+ * Forcefully removes any resource bundles associated with the provided
+ * definition and using the default locale.
+ * <p>
+ * This method is intended for internal testing only.
+ *
+ * @param d
+ * The managed object definition.
+ */
+ synchronized void removeResourceBundle(AbstractManagedObjectDefinition<?, ?> d) {
+ removeResourceBundle(d, Locale.getDefault());
+ }
+
+ /**
+ * Forcefully removes any resource bundles associated with the provided
+ * definition and locale.
+ * <p>
+ * This method is intended for internal testing only.
+ *
+ * @param d
+ * The managed object definition.
+ * @param locale
+ * The locale.
+ */
+ synchronized void removeResourceBundle(AbstractManagedObjectDefinition<?, ?> d, Locale locale) {
+ // Get the locale resource mapping.
+ Map<Locale, ResourceBundle> map = resources.get(d);
+ if (map != null) {
+ map.remove(locale);
+ }
+ }
+
+ /**
+ * Forcefully adds the provided resource bundle to this I18N resource for
+ * the default locale.
+ * <p>
+ * This method is intended for internal testing only.
+ *
+ * @param d
+ * The managed object definition.
+ * @param resoureBundle
+ * The resource bundle to be used.
+ */
+ synchronized void setResourceBundle(AbstractManagedObjectDefinition<?, ?> d, ResourceBundle resoureBundle) {
+ setResourceBundle(d, Locale.getDefault(), resoureBundle);
+ }
+
+ /**
+ * Forcefully adds the provided resource bundle to this I18N resource.
+ * <p>
+ * This method is intended for internal testing only.
+ *
+ * @param d
+ * The managed object definition.
+ * @param locale
+ * The locale.
+ * @param resoureBundle
+ * The resource bundle to be used.
+ */
+ synchronized void setResourceBundle(AbstractManagedObjectDefinition<?, ?> d, Locale locale,
+ ResourceBundle resoureBundle) {
+ // First get the locale-resource mapping, creating it if
+ // necessary.
+ Map<Locale, ResourceBundle> map = resources.get(d);
+ if (map == null) {
+ map = new HashMap<Locale, ResourceBundle>();
+ resources.put(d, map);
+ }
+
+ // Add the resource bundle.
+ map.put(locale, resoureBundle);
+ }
+
+ // Retrieve the resource bundle associated with a managed object and
+ // locale, lazily loading it if necessary.
+ private synchronized ResourceBundle getResourceBundle(AbstractManagedObjectDefinition<?, ?> d, Locale locale) {
+ if (d.isTop()) {
+ throw new UnsupportedOperationException("I18n resources are not available for the "
+ + "Top configuration definition");
+ }
+
+ // First get the locale-resource mapping, creating it if
+ // necessary.
+ Map<Locale, ResourceBundle> map = resources.get(d);
+ if (map == null) {
+ map = new HashMap<Locale, ResourceBundle>();
+ resources.put(d, map);
+ }
+
+ // Now get the resource based on the locale, loading it if
+ // necessary.
+ ResourceBundle resourceBundle = map.get(locale);
+ if (resourceBundle == null) {
+ String baseName = prefix + "." + d.getClass().getName();
+ resourceBundle =
+ ResourceBundle.getBundle(baseName, locale, ClassLoaderProvider.getInstance().getClassLoader());
+ map.put(locale, resourceBundle);
+ }
+
+ return resourceBundle;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectDefinitionResource.java b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectDefinitionResource.java
new file mode 100644
index 0000000..443fbd1
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectDefinitionResource.java
@@ -0,0 +1,130 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.Properties;
+
+/**
+ * A class for retrieving non-internationalized resource properties associated
+ * with a managed object definition.
+ * <p>
+ * Resource properties are not available for the {@link TopCfgDefn}.
+ */
+public final class ManagedObjectDefinitionResource {
+
+ // Mapping from definition to property tables.
+ private final Map<AbstractManagedObjectDefinition<?, ?>, Properties> properties;
+
+ // The resource name prefix.
+ private final String prefix;
+
+ /**
+ * Creates a new resource instance for the named profile.
+ *
+ * @param profile
+ * The name of the profile.
+ * @return Returns the resource instance for the named profile.
+ */
+ public static ManagedObjectDefinitionResource createForProfile(String profile) {
+ return new ManagedObjectDefinitionResource("config.profiles." + profile);
+ }
+
+ // Private constructor.
+ private ManagedObjectDefinitionResource(String prefix) {
+ this.properties = new HashMap<AbstractManagedObjectDefinition<?, ?>, Properties>();
+ this.prefix = prefix;
+ }
+
+ /**
+ * Get the resource value associated with the specified key.
+ *
+ * @param d
+ * The managed object definition.
+ * @param key
+ * The resource key.
+ * @return Returns the resource value associated with the specified key.
+ * @throws MissingResourceException
+ * If the key was not found.
+ * @throws UnsupportedOperationException
+ * If the provided managed object definition was the
+ * {@link TopCfgDefn}.
+ */
+ public String getString(AbstractManagedObjectDefinition<?, ?> d, String key) {
+ if (d.isTop()) {
+ throw new UnsupportedOperationException("Profile resources are not available for the "
+ + "Top configuration definition");
+ }
+
+ Properties p = getProperties(d);
+ String result = p.getProperty(key);
+
+ if (result == null) {
+ String baseName = prefix + "." + d.getClass().getName();
+ String path = baseName.replace('.', '/') + ".properties";
+
+ throw new MissingResourceException("Can't find resource " + path + ", key " + key, baseName, key);
+ }
+
+ return result;
+ }
+
+ // Retrieve the properties table associated with a managed object,
+ // lazily loading it if necessary.
+ private synchronized Properties getProperties(AbstractManagedObjectDefinition<?, ?> d) {
+ Properties p = properties.get(d);
+
+ if (p == null) {
+ // Load the resource file.
+ String baseName = prefix + "." + d.getClass().getName();
+ String path = baseName.replace('.', '/') + ".properties";
+ InputStream stream = ClassLoaderProvider.getInstance().getClassLoader().getResourceAsStream(path);
+
+ if (stream == null) {
+ throw new MissingResourceException("Can't find resource " + path, baseName, "");
+ }
+
+ p = new Properties();
+ try {
+ p.load(new BufferedInputStream(stream));
+ } catch (IOException e) {
+ throw new MissingResourceException("Can't load resource " + path + " due to IO exception: "
+ + e.getMessage(), baseName, "");
+ }
+
+ // Cache the resource.
+ properties.put(d, p);
+ }
+
+ return p;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectNotFoundException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectNotFoundException.java
new file mode 100644
index 0000000..1afb606
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectNotFoundException.java
@@ -0,0 +1,56 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+/**
+ * The requested managed object could not be located.
+ */
+public class ManagedObjectNotFoundException extends OperationsException {
+
+ /**
+ * Version ID required by serializable classes.
+ */
+ private static final long serialVersionUID = -477551786551892978L;
+
+ /**
+ * Create a managed object not found exception.
+ */
+ public ManagedObjectNotFoundException() {
+ super(ERR_MANAGED_OBJECT_NOT_FOUND_EXCEPTION.get());
+ }
+
+ /**
+ * Create a managed object not found exception with the specified cause.
+ *
+ * @param cause
+ * The cause of this exception.
+ */
+ public ManagedObjectNotFoundException(Throwable cause) {
+ super(ERR_MANAGED_OBJECT_NOT_FOUND_EXCEPTION.get(), cause);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectOption.java b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectOption.java
new file mode 100644
index 0000000..09841da
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectOption.java
@@ -0,0 +1,46 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+/**
+ * This enumeration contains various options that can be associated with managed
+ * object definitions.
+ */
+public enum ManagedObjectOption {
+ /**
+ * Use this option to identify managed object types which should be
+ * considered as advanced and should not be exposed by default in client
+ * applications.
+ */
+ ADVANCED,
+
+ /**
+ * Use this option to identify managed object types which must not be
+ * directly exposed in client applications.
+ */
+ HIDDEN;
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectPath.java b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectPath.java
new file mode 100644
index 0000000..f319ee7
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectPath.java
@@ -0,0 +1,1186 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ * Portions Copyright 2011 ForgeRock AS
+ */
+
+package org.forgerock.opendj.config;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.forgerock.opendj.server.config.client.RootCfgClient;
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.server.config.server.RootCfg;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.RDN;
+import org.forgerock.opendj.ldap.schema.AttributeType;
+import org.opends.server.core.DirectoryServer;
+
+/**
+ * A path which can be used to determine the location of a managed object
+ * instance.
+ * <p>
+ * A path is made up of zero or more elements each of which represents a managed
+ * object. Managed objects are arranged hierarchically with the root
+ * configuration being the top-most managed object. Elements are ordered such
+ * that the root configuration managed object is the first element and
+ * subsequent elements representing managed objects further down the hierarchy.
+ * <p>
+ * A path can be encoded into a string representation using the
+ * {@link #toString()} and {@link #toString(StringBuilder)} methods. Conversely,
+ * this string representation can be parsed using the {@link #valueOf(String)}
+ * method.
+ * <p>
+ * The string representation of a managed object path is similar in principle to
+ * a UNIX file-system path and is defined as follows:
+ * <ul>
+ * <li>the root element is represented by the string <code>/</code>
+ * <li>subordinate elements are arranged in big-endian order separated by a
+ * forward slash <code>/</code> character
+ * <li>an element representing a managed object associated with a one-to-one
+ * (singleton) or one-to-zero-or-one (optional) relation has the form
+ * <code>relation=</code><i>relation</i> <code>[+type=</code><i>definition</i>
+ * <code>]</code>, where <i>relation</i> is the name of the relation and
+ * <i>definition</i> is the name of the referenced managed object's definition
+ * if required (usually this is implied by the relation itself)
+ * <li>an element representing a managed object associated with a one-to-many
+ * (instantiable) relation has the form <code>relation=</code><i>relation</i>
+ * <code>[+type=</code> <i>definition</i><code>]</code><code>+name=</code>
+ * <i>name</i>, where <i>relation</i> is the name of the relation and
+ * <i>definition</i> is the name of the referenced managed object's definition
+ * if required (usually this is implied by the relation itself), and <i>name</i>
+ * is the name of the managed object instance
+ * <li>an element representing a managed object associated with a one-to-many
+ * (set) relation has the form <code>relation=</code><i>relation</i>
+ * <code>[+type=</code> <i>definition</i><code>]</code>, where <i>relation</i>
+ * is the name of the relation and <i>definition</i> is the name of the
+ * referenced managed object's definition.
+ * </ul>
+ * The following path string representation identifies a connection handler
+ * instance (note that the <code>type</code> is not specified indicating that
+ * the path identifies a connection handler called <i>my handler</i> which can
+ * be any type of connection handler):
+ *
+ * <pre>
+ * /relation=connection-handler+name=my handler
+ * </pre>
+ *
+ * If the identified connection handler must be an LDAP connection handler then
+ * the above path should include the <code>type</code>:
+ *
+ * <pre>
+ * /relation=connection-handler+type=ldap-connection-handler+name=my handler
+ * </pre>
+ *
+ * The final example identifies the global configuration:
+ *
+ * <pre>
+ * /relation=global-configuration
+ * </pre>
+ *
+ * @param <C>
+ * The type of client managed object configuration that this path
+ * references.
+ * @param <S>
+ * The type of server managed object configuration that this path
+ * references.
+ */
+public final class ManagedObjectPath<C extends ConfigurationClient, S extends Configuration> {
+
+ /**
+ * A serialize which is used to generate the toDN representation.
+ */
+ private static final class DNSerializer implements ManagedObjectPathSerializer {
+
+ // The current DN.
+ private DN dn;
+
+ // The LDAP profile.
+ private final LDAPProfile profile;
+
+ // Create a new DN builder.
+ private DNSerializer() {
+ this.dn = DN.rootDN();
+ this.profile = LDAPProfile.getInstance();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
+ InstantiableRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d,
+ String name) {
+ // Add the RDN sequence representing the relation.
+ appendManagedObjectPathElement(r);
+
+ // Now add the single RDN representing the named instance.
+ String type = profile.getRelationChildRDNType(r);
+ AttributeType attrType = DirectoryServer.getAttributeType(type.toLowerCase(), true);
+ dn = dn.child(new RDN(attrType, name));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
+ SetRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
+ // Add the RDN sequence representing the relation.
+ appendManagedObjectPathElement(r);
+
+ // Now add the single RDN representing the instance.
+ String type = profile.getRelationChildRDNType(r);
+ AttributeType attrType = DirectoryServer.getAttributeType(type.toLowerCase(), true);
+ dn = dn.child(new RDN(attrType, d.getName()));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
+ OptionalRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
+ // Add the RDN sequence representing the relation.
+ appendManagedObjectPathElement(r);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
+ SingletonRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
+ // Add the RDN sequence representing the relation.
+ appendManagedObjectPathElement(r);
+ }
+
+ // Appends the RDN sequence representing the provided relation.
+ private void appendManagedObjectPathElement(RelationDefinition<?, ?> r) {
+ DN localName = DN.valueOf(profile.getRelationRDNSequence(r));
+ dn = dn.child(localName);
+ }
+
+ // Gets the serialized DN value.
+ private DN toDN() {
+ return dn;
+ }
+ }
+
+ /**
+ * Abstract path element.
+ */
+ private static abstract class Element<C extends ConfigurationClient, S extends Configuration> {
+
+ // The type of managed object referenced by this element.
+ private final AbstractManagedObjectDefinition<C, S> definition;
+
+ /**
+ * Protected constructor.
+ *
+ * @param definition
+ * The type of managed object referenced by this element.
+ */
+ protected Element(AbstractManagedObjectDefinition<C, S> definition) {
+ this.definition = definition;
+ }
+
+ /**
+ * Get the managed object definition associated with this element.
+ *
+ * @return Returns the managed object definition associated with this
+ * element.
+ */
+ public final AbstractManagedObjectDefinition<C, S> getManagedObjectDefinition() {
+ return definition;
+ }
+
+ /**
+ * Get the name associated with this element if applicable.
+ *
+ * @return Returns the name associated with this element if applicable.
+ */
+ public String getName() {
+ return null;
+ }
+
+ /**
+ * Get the relation definition associated with this element.
+ *
+ * @return Returns the relation definition associated with this element.
+ */
+ public abstract RelationDefinition<? super C, ? super S> getRelationDefinition();
+
+ /**
+ * Serialize this path element using the provided serialization
+ * strategy.
+ *
+ * @param serializer
+ * The managed object path serialization strategy.
+ */
+ public abstract void serialize(ManagedObjectPathSerializer serializer);
+ }
+
+ /**
+ * A path element representing an instantiable managed object.
+ */
+ private static final class InstantiableElement<C extends ConfigurationClient, S extends Configuration> extends
+ Element<C, S> {
+
+ // Factory method.
+ private static final <C extends ConfigurationClient, S extends Configuration> InstantiableElement<C, S> create(
+ InstantiableRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d,
+ String name) {
+ return new InstantiableElement<C, S>(r, d, name);
+ }
+
+ // The name of the managed object.
+ private final String name;
+
+ // The instantiable relation.
+ private final InstantiableRelationDefinition<? super C, ? super S> r;
+
+ // Private constructor.
+ private InstantiableElement(InstantiableRelationDefinition<? super C, ? super S> r,
+ AbstractManagedObjectDefinition<C, S> d, String name) {
+ super(d);
+ this.r = r;
+ this.name = name;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public InstantiableRelationDefinition<? super C, ? super S> getRelationDefinition() {
+ return r;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void serialize(ManagedObjectPathSerializer serializer) {
+ serializer.appendManagedObjectPathElement(r, getManagedObjectDefinition(), name);
+ }
+ }
+
+ /**
+ * A path element representing an optional managed object.
+ */
+ private static final class OptionalElement<C extends ConfigurationClient, S extends Configuration> extends
+ Element<C, S> {
+
+ // Factory method.
+ private static final <C extends ConfigurationClient, S extends Configuration> OptionalElement<C, S> create(
+ OptionalRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
+ return new OptionalElement<C, S>(r, d);
+ }
+
+ // The optional relation.
+ private final OptionalRelationDefinition<? super C, ? super S> r;
+
+ // Private constructor.
+ private OptionalElement(OptionalRelationDefinition<? super C, ? super S> r,
+ AbstractManagedObjectDefinition<C, S> d) {
+ super(d);
+ this.r = r;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public OptionalRelationDefinition<? super C, ? super S> getRelationDefinition() {
+ return r;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void serialize(ManagedObjectPathSerializer serializer) {
+ serializer.appendManagedObjectPathElement(r, getManagedObjectDefinition());
+ }
+ }
+
+ /**
+ * A path element representing an set managed object.
+ */
+ private static final class SetElement<C extends ConfigurationClient, S extends Configuration> extends
+ Element<C, S> {
+
+ // Factory method.
+ private static final <C extends ConfigurationClient, S extends Configuration> SetElement<C, S> create(
+ SetRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
+ return new SetElement<C, S>(r, d);
+ }
+
+ // The set relation.
+ private final SetRelationDefinition<? super C, ? super S> r;
+
+ // Private constructor.
+ private SetElement(SetRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
+ super(d);
+ this.r = r;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public SetRelationDefinition<? super C, ? super S> getRelationDefinition() {
+ return r;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void serialize(ManagedObjectPathSerializer serializer) {
+ serializer.appendManagedObjectPathElement(r, getManagedObjectDefinition());
+ }
+ }
+
+ /**
+ * A path element representing a singleton managed object.
+ */
+ private static final class SingletonElement<C extends ConfigurationClient, S extends Configuration> extends
+ Element<C, S> {
+
+ // Factory method.
+ private static final <C extends ConfigurationClient, S extends Configuration> SingletonElement<C, S> create(
+ SingletonRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
+ return new SingletonElement<C, S>(r, d);
+ }
+
+ // The singleton relation.
+ private final SingletonRelationDefinition<? super C, ? super S> r;
+
+ // Private constructor.
+ private SingletonElement(SingletonRelationDefinition<? super C, ? super S> r,
+ AbstractManagedObjectDefinition<C, S> d) {
+ super(d);
+ this.r = r;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public SingletonRelationDefinition<? super C, ? super S> getRelationDefinition() {
+ return r;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void serialize(ManagedObjectPathSerializer serializer) {
+ serializer.appendManagedObjectPathElement(r, getManagedObjectDefinition());
+ }
+ }
+
+ /**
+ * A serialize which is used to generate the toString representation.
+ */
+ private static final class StringSerializer implements ManagedObjectPathSerializer {
+
+ // Serialize to this string builder.
+ private final StringBuilder builder;
+
+ // Private constructor.
+ private StringSerializer(StringBuilder builder) {
+ this.builder = builder;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <M extends ConfigurationClient, N extends Configuration> void appendManagedObjectPathElement(
+ InstantiableRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d,
+ String name) {
+ serializeElement(r, d);
+
+ // Be careful to escape any forward slashes in the name.
+ builder.append("+name=");
+ builder.append(name.replace("/", "//"));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <M extends ConfigurationClient, N extends Configuration> void appendManagedObjectPathElement(
+ OptionalRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d) {
+ serializeElement(r, d);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <M extends ConfigurationClient, N extends Configuration> void appendManagedObjectPathElement(
+ SingletonRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d) {
+ serializeElement(r, d);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <M extends ConfigurationClient, N extends Configuration> void appendManagedObjectPathElement(
+ SetRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d) {
+ serializeElement(r, d);
+ }
+
+ // Common element serialization.
+ private <M, N> void serializeElement(RelationDefinition<?, ?> r, AbstractManagedObjectDefinition<?, ?> d) {
+ // Always specify the relation name.
+ builder.append("/relation=");
+ builder.append(r.getName());
+
+ // Only specify the type if it is a sub-type of the relation's
+ // type.
+ if (r.getChildDefinition() != d) {
+ builder.append("+type=");
+ builder.append(d.getName());
+ }
+ }
+ }
+
+ // Single instance of a root path.
+ private static final ManagedObjectPath<RootCfgClient, RootCfg> EMPTY_PATH =
+ new ManagedObjectPath<RootCfgClient, RootCfg>(new LinkedList<Element<?, ?>>(), null,
+ RootCfgDefn.getInstance());
+
+ // A regular expression used to parse path elements.
+ private static final Pattern PE_REGEXP = Pattern.compile("^\\s*relation=\\s*([^+]+)\\s*"
+ + "(\\+\\s*type=\\s*([^+]+)\\s*)?" + "(\\+\\s*name=\\s*([^+]+)\\s*)?$");
+
+ /**
+ * Creates a new managed object path representing the configuration root.
+ *
+ * @return Returns a new managed object path representing the configuration
+ * root.
+ */
+ public static ManagedObjectPath<RootCfgClient, RootCfg> emptyPath() {
+ return EMPTY_PATH;
+ }
+
+ /**
+ * Returns a managed object path holding the value of the specified string.
+ *
+ * @param s
+ * The string to be parsed.
+ * @return Returns a managed object path holding the value of the specified
+ * string.
+ * @throws IllegalArgumentException
+ * If the string could not be parsed.
+ */
+ public static ManagedObjectPath<?, ?> valueOf(String s) {
+ String ns = s.trim();
+
+ // Check for root special case.
+ if (ns.equals("/")) {
+ return EMPTY_PATH;
+ }
+
+ // Parse the elements.
+ LinkedList<Element<?, ?>> elements = new LinkedList<Element<?, ?>>();
+ Element<?, ?> lastElement = null;
+ AbstractManagedObjectDefinition<?, ?> definition = RootCfgDefn.getInstance();
+
+ if (!ns.startsWith("/")) {
+ throw new IllegalArgumentException("Invalid path \"" + ns + "\": must begin with a \"/\"");
+ }
+
+ int start = 1;
+ while (true) {
+ // Get the next path element.
+ int end;
+ for (end = start; end < ns.length(); end++) {
+ char c = ns.charAt(end);
+ if (c == '/') {
+ if (end == (ns.length() - 1)) {
+ throw new IllegalArgumentException("Invalid path \"" + ns
+ + "\": must not end with a trailing \"/\"");
+ }
+
+ if (ns.charAt(end + 1) == '/') {
+ // Found an escaped forward slash.
+ end++;
+ } else {
+ // Found the end of this path element.
+ break;
+ }
+ }
+ }
+
+ // Get the next element.
+ String es = ns.substring(start, end);
+
+ Matcher m = PE_REGEXP.matcher(es);
+ if (!m.matches()) {
+ throw new IllegalArgumentException("Invalid path element \"" + es + "\" in path \"" + ns + "\"");
+ }
+
+ // Mandatory.
+ String relation = m.group(1);
+
+ // Optional.
+ String type = m.group(3);
+
+ // Mandatory if relation is instantiable.
+ String name = m.group(5);
+
+ // Get the relation definition.
+ RelationDefinition<?, ?> r;
+ try {
+ r = definition.getRelationDefinition(relation);
+ } catch (IllegalArgumentException e) {
+ throw new IllegalArgumentException("Invalid path element \"" + es + "\" in path \"" + ns
+ + "\": unknown relation \"" + relation + "\"");
+ }
+
+ // Append the next element.
+ lastElement = createElement(r, ns, es, type, name);
+ elements.add(lastElement);
+ definition = lastElement.getManagedObjectDefinition();
+
+ // Update start to point to the beginning of the next element.
+ if (end < ns.length()) {
+ // Skip to the beginning of the next element
+ start = end + 1;
+ } else {
+ // We reached the end of the string.
+ break;
+ }
+ }
+
+ // Construct the new path.
+ return create(elements, lastElement);
+ }
+
+ // Factory method required in order to allow generic wild-card
+ // construction of new paths.
+ private static <C extends ConfigurationClient, S extends Configuration> ManagedObjectPath<C, S> create(
+ LinkedList<Element<?, ?>> elements, Element<C, S> lastElement) {
+ return new ManagedObjectPath<C, S>(elements, lastElement.getRelationDefinition(),
+ lastElement.getManagedObjectDefinition());
+ }
+
+ // Decode an element.
+ // @Checkstyle:ignore
+ private static <C extends ConfigurationClient, S extends Configuration> Element<? extends C, ? extends S> createElement(
+ RelationDefinition<C, S> r, String path, String element, String type, String name) {
+ // First determine the managed object definition.
+ AbstractManagedObjectDefinition<? extends C, ? extends S> d = null;
+
+ if (type != null) {
+ for (AbstractManagedObjectDefinition<? extends C, ? extends S> child : r.getChildDefinition()
+ .getAllChildren()) {
+ if (child.getName().equals(type)) {
+ d = child;
+ break;
+ }
+ }
+
+ if (d == null) {
+ throw new IllegalArgumentException("Invalid path element \"" + element + "\" in path \"" + path
+ + "\": unknown sub-type \"" + type + "\"");
+ }
+ } else {
+ d = r.getChildDefinition();
+ }
+
+ if (r instanceof InstantiableRelationDefinition) {
+ InstantiableRelationDefinition<C, S> ir = (InstantiableRelationDefinition<C, S>) r;
+
+ if (name == null) {
+ throw new IllegalArgumentException("Invalid path element \"" + element + "\" in path \"" + path
+ + "\": no instance name for instantiable relation");
+ }
+
+ return InstantiableElement.create(ir, d, name);
+ } else if (r instanceof SetRelationDefinition) {
+ SetRelationDefinition<C, S> ir = (SetRelationDefinition<C, S>) r;
+
+ if (name != null) {
+ throw new IllegalArgumentException("Invalid path element \"" + element + "\" in path \"" + path
+ + "\": instance name specified for set relation");
+ }
+
+ return SetElement.create(ir, d);
+ } else if (r instanceof OptionalRelationDefinition) {
+ OptionalRelationDefinition<C, S> or = (OptionalRelationDefinition<C, S>) r;
+
+ if (name != null) {
+ throw new IllegalArgumentException("Invalid path element \"" + element + "\" in path \"" + path
+ + "\": instance name specified for optional relation");
+ }
+
+ return OptionalElement.create(or, d);
+ } else if (r instanceof SingletonRelationDefinition) {
+ SingletonRelationDefinition<C, S> sr = (SingletonRelationDefinition<C, S>) r;
+
+ if (name != null) {
+ throw new IllegalArgumentException("Invalid path element \"" + element + "\" in path \"" + path
+ + "\": instance name specified for singleton relation");
+ }
+
+ return SingletonElement.create(sr, d);
+ } else {
+ throw new IllegalArgumentException("Invalid path element \"" + element + "\" in path \"" + path
+ + "\": unsupported relation type");
+ }
+ }
+
+ // The managed object definition in this path.
+ private final AbstractManagedObjectDefinition<C, S> d;
+
+ // The list of path elements in this path.
+ private final List<Element<?, ?>> elements;
+
+ // The last relation definition in this path.
+ private final RelationDefinition<? super C, ? super S> r;
+
+ // Private constructor.
+ private ManagedObjectPath(LinkedList<Element<?, ?>> elements, RelationDefinition<? super C, ? super S> r,
+ AbstractManagedObjectDefinition<C, S> d) {
+ this.elements = Collections.unmodifiableList(elements);
+ this.r = r;
+ this.d = d;
+ }
+
+ /**
+ * Creates a new managed object path which has the same structure as this
+ * path except that the final path element is associated with the specified
+ * managed object definition.
+ *
+ * @param <C1>
+ * The type of client managed object configuration that this path
+ * will reference.
+ * @param <S1>
+ * The type of server managed object configuration that this path
+ * will reference.
+ * @param nd
+ * The new managed object definition.
+ * @return Returns a new managed object path which has the same structure as
+ * this path except that the final path element is associated with
+ * the specified managed object definition.
+ */
+ // @Checkstyle:ignore
+ public <C1 extends C, S1 extends S> ManagedObjectPath<C1, S1> asSubType(AbstractManagedObjectDefinition<C1, S1> nd) {
+ if (r instanceof InstantiableRelationDefinition) {
+ InstantiableRelationDefinition<? super C, ? super S> ir =
+ (InstantiableRelationDefinition<? super C, ? super S>) r;
+ if (elements.size() == 0) {
+ return parent().child(ir, nd, "null");
+ } else {
+ return parent().child(ir, nd, elements.get(elements.size() - 1).getName());
+ }
+ } else if (r instanceof SetRelationDefinition) {
+ SetRelationDefinition<? super C, ? super S> sr = (SetRelationDefinition<? super C, ? super S>) r;
+ return parent().child(sr, nd);
+ } else if (r instanceof OptionalRelationDefinition) {
+ OptionalRelationDefinition<? super C, ? super S> or =
+ (OptionalRelationDefinition<? super C, ? super S>) r;
+ return parent().child(or, nd);
+ } else {
+ SingletonRelationDefinition<? super C, ? super S> sr =
+ (SingletonRelationDefinition<? super C, ? super S>) r;
+ return parent().child(sr, nd);
+ }
+ }
+
+ /**
+ * Creates a new child managed object path beneath the provided parent path
+ * having the specified managed object definition.
+ *
+ * @param <M>
+ * The type of client managed object configuration that the child
+ * path references.
+ * @param <N>
+ * The type of server managed object configuration that the child
+ * path references.
+ * @param r
+ * The instantiable relation referencing the child.
+ * @param d
+ * The managed object definition associated with the child (must
+ * be a sub-type of the relation).
+ * @param name
+ * The relative name of the child managed object.
+ * @return Returns a new child managed object path beneath the provided
+ * parent path.
+ * @throws IllegalArgumentException
+ * If the provided name is empty or blank.
+ */
+ public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
+ InstantiableRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d, String name) {
+ if (name.trim().length() == 0) {
+ throw new IllegalArgumentException("Empty or blank managed object names are not allowed");
+ }
+ LinkedList<Element<?, ?>> celements = new LinkedList<Element<?, ?>>(elements);
+ celements.add(new InstantiableElement<M, N>(r, d, name));
+ return new ManagedObjectPath<M, N>(celements, r, d);
+ }
+
+ /**
+ * Creates a new child managed object path beneath the provided parent path
+ * using the relation's child managed object definition.
+ *
+ * @param <M>
+ * The type of client managed object configuration that the child
+ * path references.
+ * @param <N>
+ * The type of server managed object configuration that the child
+ * path references.
+ * @param r
+ * The instantiable relation referencing the child.
+ * @param name
+ * The relative name of the child managed object.
+ * @return Returns a new child managed object path beneath the provided
+ * parent path.
+ * @throws IllegalArgumentException
+ * If the provided name is empty or blank.
+ */
+ public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
+ InstantiableRelationDefinition<M, N> r, String name) {
+ return child(r, r.getChildDefinition(), name);
+ }
+
+ /**
+ * Creates a new child managed object path beneath the provided parent path
+ * having the specified managed object definition.
+ *
+ * @param <M>
+ * The type of client managed object configuration that the child
+ * path references.
+ * @param <N>
+ * The type of server managed object configuration that the child
+ * path references.
+ * @param r
+ * The optional relation referencing the child.
+ * @param d
+ * The managed object definition associated with the child (must
+ * be a sub-type of the relation).
+ * @return Returns a new child managed object path beneath the provided
+ * parent path.
+ */
+ public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
+ OptionalRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d) {
+ LinkedList<Element<?, ?>> celements = new LinkedList<Element<?, ?>>(elements);
+ celements.add(new OptionalElement<M, N>(r, d));
+ return new ManagedObjectPath<M, N>(celements, r, d);
+ }
+
+ /**
+ * Creates a new child managed object path beneath the provided parent path
+ * using the relation's child managed object definition.
+ *
+ * @param <M>
+ * The type of client managed object configuration that the child
+ * path references.
+ * @param <N>
+ * The type of server managed object configuration that the child
+ * path references.
+ * @param r
+ * The optional relation referencing the child.
+ * @return Returns a new child managed object path beneath the provided
+ * parent path.
+ */
+ public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
+ OptionalRelationDefinition<M, N> r) {
+ return child(r, r.getChildDefinition());
+ }
+
+ /**
+ * Creates a new child managed object path beneath the provided parent path
+ * having the specified managed object definition.
+ *
+ * @param <M>
+ * The type of client managed object configuration that the child
+ * path references.
+ * @param <N>
+ * The type of server managed object configuration that the child
+ * path references.
+ * @param r
+ * The singleton relation referencing the child.
+ * @param d
+ * The managed object definition associated with the child (must
+ * be a sub-type of the relation).
+ * @return Returns a new child managed object path beneath the provided
+ * parent path.
+ */
+ public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
+ SingletonRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d) {
+ LinkedList<Element<?, ?>> celements = new LinkedList<Element<?, ?>>(elements);
+ celements.add(new SingletonElement<M, N>(r, d));
+ return new ManagedObjectPath<M, N>(celements, r, d);
+ }
+
+ /**
+ * Creates a new child managed object path beneath the provided parent path
+ * using the relation's child managed object definition.
+ *
+ * @param <M>
+ * The type of client managed object configuration that the child
+ * path references.
+ * @param <N>
+ * The type of server managed object configuration that the child
+ * path references.
+ * @param r
+ * The singleton relation referencing the child.
+ * @return Returns a new child managed object path beneath the provided
+ * parent path.
+ */
+ public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
+ SingletonRelationDefinition<M, N> r) {
+ return child(r, r.getChildDefinition());
+ }
+
+ /**
+ * Creates a new child managed object path beneath the provided parent path
+ * having the specified managed object definition.
+ *
+ * @param <M>
+ * The type of client managed object configuration that the child
+ * path references.
+ * @param <N>
+ * The type of server managed object configuration that the child
+ * path references.
+ * @param r
+ * The set relation referencing the child.
+ * @param d
+ * The managed object definition associated with the child (must
+ * be a sub-type of the relation).
+ * @return Returns a new child managed object path beneath the provided
+ * parent path.
+ * @throws IllegalArgumentException
+ * If the provided name is empty or blank.
+ */
+ public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
+ SetRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d) {
+ LinkedList<Element<?, ?>> celements = new LinkedList<Element<?, ?>>(elements);
+ celements.add(new SetElement<M, N>(r, d));
+ return new ManagedObjectPath<M, N>(celements, r, d);
+ }
+
+ /**
+ * Creates a new child managed object path beneath the provided parent path
+ * having the managed object definition indicated by <code>name</code>.
+ *
+ * @param <M>
+ * The type of client managed object configuration that the path
+ * references.
+ * @param <N>
+ * The type of server managed object configuration that the path
+ * references.
+ * @param r
+ * The set relation referencing the child.
+ * @param name
+ * The name of the managed object definition associated with the
+ * child (must be a sub-type of the relation).
+ * @return Returns a new child managed object path beneath the provided
+ * parent path.
+ * @throws IllegalArgumentException
+ * If the provided name is empty or blank or specifies a managed
+ * object definition which is not a sub-type of the relation's
+ * child definition.
+ */
+ public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<? extends M, ? extends N> child(
+ SetRelationDefinition<M, N> r, String name) {
+ AbstractManagedObjectDefinition<M, N> d = r.getChildDefinition();
+ return child(r, d.getChild(name));
+ }
+
+ /**
+ * Creates a new child managed object path beneath the provided parent path
+ * using the relation's child managed object definition.
+ *
+ * @param <M>
+ * The type of client managed object configuration that the child
+ * path references.
+ * @param <N>
+ * The type of server managed object configuration that the child
+ * path references.
+ * @param r
+ * The set relation referencing the child.
+ * @return Returns a new child managed object path beneath the provided
+ * parent path.
+ * @throws IllegalArgumentException
+ * If the provided name is empty or blank.
+ */
+ public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
+ SetRelationDefinition<M, N> r) {
+ return child(r, r.getChildDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ } else if (obj instanceof ManagedObjectPath) {
+ ManagedObjectPath<?, ?> other = (ManagedObjectPath<?, ?>) obj;
+ return toString().equals(other.toString());
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Get the definition of the managed object referred to by this path.
+ * <p>
+ * When the path is empty, the {@link RootCfgDefn} is returned.
+ *
+ * @return Returns the definition of the managed object referred to by this
+ * path, or the {@link RootCfgDefn} if the path is empty.
+ */
+ public AbstractManagedObjectDefinition<C, S> getManagedObjectDefinition() {
+ return d;
+ }
+
+ /**
+ * Get the name of the managed object referred to by this path if
+ * applicable.
+ * <p>
+ * If there path does not refer to an instantiable managed object
+ * <code>null</code> is returned.
+ *
+ * @return Returns the name of the managed object referred to by this path,
+ * or <code>null</code> if the managed object does not have a name.
+ */
+ public String getName() {
+ if (elements.isEmpty()) {
+ return null;
+ } else {
+ return elements.get(elements.size() - 1).getName();
+ }
+ }
+
+ /**
+ * Get the relation definition of the managed object referred to by this
+ * path.
+ * <p>
+ * When the path is empty, the <code>null</code> is returned.
+ *
+ * @return Returns the relation definition of the managed object referred to
+ * by this path, or the <code>null</code> if the path is empty.
+ */
+ public RelationDefinition<? super C, ? super S> getRelationDefinition() {
+ return r;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int hashCode() {
+ return toString().hashCode();
+ }
+
+ /**
+ * Determine whether or not this path contains any path elements.
+ *
+ * @return Returns <code>true</code> if this path does not contain any path
+ * elements.
+ */
+ public boolean isEmpty() {
+ return elements.isEmpty();
+ }
+
+ /**
+ * Determines whether this managed object path references the same location
+ * as the provided managed object path.
+ * <p>
+ * This method differs from <code>equals</code> in that it ignores sub-type
+ * definitions.
+ *
+ * @param other
+ * The managed object path to be compared.
+ * @return Returns <code>true</code> if this managed object path references
+ * the same location as the provided managed object path.
+ */
+ public boolean matches(ManagedObjectPath<?, ?> other) {
+ DN thisDN = toDN();
+ DN otherDN = other.toDN();
+ return thisDN.equals(otherDN);
+ }
+
+ /**
+ * Creates a new parent managed object path representing the immediate
+ * parent of this path. This method is a short-hand for
+ * <code>parent(1)</code>.
+ *
+ * @return Returns a new parent managed object path representing the
+ * immediate parent of this path.
+ * @throws IllegalArgumentException
+ * If this path does not have a parent (i.e. it is the empty
+ * path).
+ */
+ public ManagedObjectPath<?, ?> parent() {
+ return parent(1);
+ }
+
+ /**
+ * Creates a new parent managed object path the specified number of path
+ * elements above this path.
+ *
+ * @param offset
+ * The number of path elements (0 - means no offset, 1 means the
+ * parent, and 2 means the grand-parent).
+ * @return Returns a new parent managed object path the specified number of
+ * path elements above this path.
+ * @throws IllegalArgumentException
+ * If the offset is less than 0, or greater than the number of
+ * path elements in this path.
+ */
+ public ManagedObjectPath<?, ?> parent(int offset) {
+ if (offset < 0) {
+ throw new IllegalArgumentException("Negative offset");
+ }
+
+ if (offset > elements.size()) {
+ throw new IllegalArgumentException("Offset is greater than the number of path elements");
+ }
+
+ // An offset of 0 leaves the path unchanged.
+ if (offset == 0) {
+ return this;
+ }
+
+ // Return the empty path if the parent has zero elements.
+ if (elements.size() == offset) {
+ return emptyPath();
+ }
+
+ LinkedList<Element<?, ?>> celements =
+ new LinkedList<Element<?, ?>>(elements.subList(0, elements.size() - offset));
+ return create(celements, celements.getLast());
+ }
+
+ /**
+ * Creates a new managed object path which has the same structure as this
+ * path except that the final path element is renamed. The final path
+ * element must comprise of an instantiable relation.
+ *
+ * @param newName
+ * The new name of the final path element.
+ * @return Returns a new managed object path which has the same structure as
+ * this path except that the final path element is renamed.
+ * @throws IllegalStateException
+ * If this managed object path is empty or if its final path
+ * element does not comprise of an instantiable relation.
+ */
+ public ManagedObjectPath<C, S> rename(String newName) {
+ if (elements.size() == 0) {
+ throw new IllegalStateException("Cannot rename an empty path");
+ }
+
+ if (r instanceof InstantiableRelationDefinition) {
+ InstantiableRelationDefinition<? super C, ? super S> ir =
+ (InstantiableRelationDefinition<? super C, ? super S>) r;
+ return parent().child(ir, d, newName);
+ } else {
+ throw new IllegalStateException("Not an instantiable relation");
+ }
+ }
+
+ /**
+ * Serialize this managed object path using the provided serialization
+ * strategy.
+ * <p>
+ * The path elements will be passed to the serializer in big-endian order:
+ * starting from the root element and proceeding down to the leaf.
+ *
+ * @param serializer
+ * The managed object path serialization strategy.
+ */
+ public void serialize(ManagedObjectPathSerializer serializer) {
+ for (Element<?, ?> element : elements) {
+ element.serialize(serializer);
+ }
+ }
+
+ /**
+ * Get the number of path elements in this managed object path.
+ *
+ * @return Returns the number of path elements (0 - means no offset, 1 means
+ * the parent, and 2 means the grand-parent).
+ */
+ public int size() {
+ return elements.size();
+ }
+
+ /**
+ * Creates a DN representation of this managed object path.
+ *
+ * @return Returns a DN representation of this managed object path.
+ */
+ public DN toDN() {
+ // Use a simple serializer to create the contents.
+ DNSerializer serializer = new DNSerializer();
+ serialize(serializer);
+ return serializer.toDN();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ toString(builder);
+ return builder.toString();
+ }
+
+ /**
+ * Appends a string representation of this managed object path to the
+ * provided string builder.
+ *
+ * @param builder
+ * Append the string representation to this builder.
+ * @see #toString()
+ */
+ public void toString(final StringBuilder builder) {
+ if (isEmpty()) {
+ // Special treatment of root configuration paths.
+ builder.append('/');
+ } else {
+ // Use a simple serializer to create the contents.
+ ManagedObjectPathSerializer serializer = new StringSerializer(builder);
+ serialize(serializer);
+ }
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectPathSerializer.java b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectPathSerializer.java
new file mode 100644
index 0000000..2c8bc3e
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectPathSerializer.java
@@ -0,0 +1,114 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+/**
+ * A strategy for serializing managed object paths.
+ * <p>
+ * This interface provides a generic means for serializing managed object paths
+ * into application specific forms. For example, a JNDI client would use this
+ * interface to construct <code>LdapName</code> objects from a path. Similarly,
+ * on the server side, a serialization strategy is used to construct
+ * <code>DN</code> instances from a path.
+ * <p>
+ * During serialization the serializer is invoked for each element in the
+ * managed object path in big-endian order, starting from the root and
+ * proceeding down to the leaf element.
+ */
+public interface ManagedObjectPathSerializer {
+
+ /**
+ * Append a managed object path element identified by an instantiable
+ * relation and an instance name.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this path
+ * element references.
+ * @param <S>
+ * The type of server managed object configuration that this path
+ * element references.
+ * @param r
+ * The instantiable relation.
+ * @param d
+ * The managed object definition.
+ * @param name
+ * The instance name.
+ */
+ <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
+ InstantiableRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d, String name);
+
+ /**
+ * Append a managed object path element identified by an optional relation.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this path
+ * element references.
+ * @param <S>
+ * The type of server managed object configuration that this path
+ * element references.
+ * @param r
+ * The optional relation.
+ * @param d
+ * The managed object definition.
+ */
+ <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
+ OptionalRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d);
+
+ /**
+ * Append a managed object path element identified by a singleton relation.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this path
+ * element references.
+ * @param <S>
+ * The type of server managed object configuration that this path
+ * element references.
+ * @param r
+ * The singleton relation.
+ * @param d
+ * The managed object definition.
+ */
+ <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
+ SingletonRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d);
+
+ /**
+ * Append a managed object path element identified by a set relation.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this path
+ * element references.
+ * @param <S>
+ * The type of server managed object configuration that this path
+ * element references.
+ * @param r
+ * The set relation.
+ * @param d
+ * The managed object definition.
+ */
+ <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
+ SetRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d);
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/OperationsException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/OperationsException.java
new file mode 100644
index 0000000..213d6cc
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/OperationsException.java
@@ -0,0 +1,63 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * Exceptions thrown as a result of errors that occurred when reading, listing,
+ * and modifying managed objects.
+ */
+public abstract class OperationsException extends AdminException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = 6329910102360262187L;
+
+ /**
+ * Create an operations exception with a message and cause.
+ *
+ * @param message
+ * The message.
+ * @param cause
+ * The cause.
+ */
+ protected OperationsException(LocalizableMessage message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Create an operations exception with a message.
+ *
+ * @param message
+ * The message.
+ */
+ protected OperationsException(LocalizableMessage message) {
+ super(message);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/OptionalRelationDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/OptionalRelationDefinition.java
new file mode 100644
index 0000000..bbe57c0
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/OptionalRelationDefinition.java
@@ -0,0 +1,155 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+/**
+ * A managed object composite relationship definition which represents a
+ * composition of an optional single managed object (i.e. the referenced managed
+ * object may or may not be present).
+ *
+ * @param <C>
+ * The type of client managed object configuration that this relation
+ * definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this relation
+ * definition refers to.
+ */
+public final class OptionalRelationDefinition<C extends ConfigurationClient, S extends Configuration> extends
+ RelationDefinition<C, S> {
+
+ /**
+ * An interface for incrementally constructing optional relation
+ * definitions.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * relation definition refers to.
+ */
+ public static final class Builder<C extends ConfigurationClient, S extends Configuration> extends
+ AbstractBuilder<C, S, OptionalRelationDefinition<C, S>> {
+
+ // The optional default managed object associated with this
+ // optional relation.
+ private DefaultManagedObject<? extends C, ? extends S> defaultManagedObject = null;
+
+ /**
+ * Creates a new builder which can be used to incrementally build an
+ * optional relation definition.
+ *
+ * @param pd
+ * The parent managed object definition.
+ * @param name
+ * The name of the relation.
+ * @param cd
+ * The child managed object definition.
+ */
+ // @Checkstyle:ignore
+ public Builder(AbstractManagedObjectDefinition<?, ?> pd, String name, AbstractManagedObjectDefinition<C, S> cd) {
+ super(pd, name, cd);
+ }
+
+ /**
+ * Sets the optional default managed object associated with this
+ * optional relation definition.
+ *
+ * @param defaultManagedObject
+ * The default managed object or <code>null</code> if there
+ * is no default managed object defined for this relation
+ * definition.
+ */
+ public void setDefaultManagedObject(DefaultManagedObject<? extends C, ? extends S> defaultManagedObject) {
+ this.defaultManagedObject = defaultManagedObject;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected OptionalRelationDefinition<C, S> buildInstance(Common<C, S> common) {
+ return new OptionalRelationDefinition<C, S>(common, defaultManagedObject);
+ }
+
+ }
+
+ // The optional default managed object associated with this
+ // optional relation.
+ private final DefaultManagedObject<? extends C, ? extends S> defaultManagedObject;
+
+ // Private constructor.
+ private OptionalRelationDefinition(Common<C, S> common,
+ DefaultManagedObject<? extends C, ? extends S> defaultManagedObject) {
+ super(common);
+ this.defaultManagedObject = defaultManagedObject;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(RelationDefinitionVisitor<R, P> v, P p) {
+ return v.visitOptional(this, p);
+ }
+
+ /**
+ * Gets the optional default managed object associated with this optional
+ * relation definition.
+ *
+ * @return Returns the default managed object or <code>null</code> if there
+ * is no default managed object defined for this relation
+ * definition.
+ */
+ public DefaultManagedObject<? extends C, ? extends S> getDefaultManagedObject() {
+ return defaultManagedObject;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void toString(StringBuilder builder) {
+ builder.append("name=");
+ builder.append(getName());
+ builder.append(" type=optional parent=");
+ builder.append(getParentDefinition().getName());
+ builder.append(" child=");
+ builder.append(getChildDefinition().getName());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initialize() throws Exception {
+ if (defaultManagedObject != null) {
+ defaultManagedObject.initialize();
+ }
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinition.java
new file mode 100644
index 0000000..3d7c80f
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinition.java
@@ -0,0 +1,585 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.util.Comparator;
+import java.util.EnumSet;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.Set;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * An interface for querying generic property definition features.
+ * <p>
+ * Property definitions are analogous to ConfigAttributes in the current model
+ * and will play a similar role. Eventually these will replace them.
+ * <p>
+ * Implementations <b>must</b> take care to implement the various comparison
+ * methods.
+ *
+ * @param <T>
+ * The data-type of values of the property.
+ */
+public abstract class PropertyDefinition<T> implements Comparator<T>, Comparable<PropertyDefinition<?>> {
+
+ /**
+ * An interface for incrementally constructing property definitions.
+ *
+ * @param <T>
+ * The data-type of values of the property.
+ * @param <D>
+ * The type of property definition constructed by this builder.
+ */
+ protected abstract static class AbstractBuilder<T, D extends PropertyDefinition<T>> {
+
+ // The administrator action.
+ private AdministratorAction adminAction;
+
+ // The default behavior provider.
+ private DefaultBehaviorProvider<T> defaultBehavior;
+
+ // The abstract managed object
+ private final AbstractManagedObjectDefinition<?, ?> definition;
+
+ // The options applicable to this definition.
+ private final EnumSet<PropertyOption> options;
+
+ // The name of this property definition.
+ private final String propertyName;
+
+ /**
+ * Create a property definition builder.
+ *
+ * @param d
+ * The managed object definition associated with this
+ * property definition.
+ * @param propertyName
+ * The property name.
+ */
+ protected AbstractBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ this.definition = d;
+ this.propertyName = propertyName;
+ this.options = EnumSet.noneOf(PropertyOption.class);
+ this.adminAction = new AdministratorAction(AdministratorAction.Type.NONE, d, propertyName);
+ this.defaultBehavior = new UndefinedDefaultBehaviorProvider<T>();
+ }
+
+ /**
+ * Construct a property definition based on the properties of this
+ * builder.
+ *
+ * @return The new property definition.
+ */
+ public final D getInstance() {
+ return buildInstance(definition, propertyName, options, adminAction, defaultBehavior);
+ }
+
+ /**
+ * Set the administrator action.
+ *
+ * @param adminAction
+ * The administrator action.
+ */
+ public final void setAdministratorAction(AdministratorAction adminAction) {
+ Reject.ifNull(adminAction);
+ this.adminAction = adminAction;
+ }
+
+ /**
+ * Set the default behavior provider.
+ *
+ * @param defaultBehavior
+ * The default behavior provider.
+ */
+ public final void setDefaultBehaviorProvider(DefaultBehaviorProvider<T> defaultBehavior) {
+ Reject.ifNull(defaultBehavior);
+ this.defaultBehavior = defaultBehavior;
+ }
+
+ /**
+ * Add a property definition option.
+ *
+ * @param option
+ * The property option.
+ */
+ public final void setOption(PropertyOption option) {
+ Reject.ifNull(option);
+ options.add(option);
+ }
+
+ /**
+ * Build a property definition based on the properties of this builder.
+ *
+ * @param d
+ * The managed object definition associated with this
+ * property definition.
+ * @param propertyName
+ * The property name.
+ * @param options
+ * Options applicable to this definition.
+ * @param adminAction
+ * The administrator action.
+ * @param defaultBehavior
+ * The default behavior provider.
+ * @return The new property definition.
+ */
+ protected abstract D buildInstance(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<T> defaultBehavior);
+ }
+
+ // The administrator action.
+ private final AdministratorAction adminAction;
+
+ // The default behavior provider.
+ private final DefaultBehaviorProvider<T> defaultBehavior;
+
+ // The abstract managed object
+ private final AbstractManagedObjectDefinition<?, ?> definition;
+
+ // Options applicable to this definition.
+ private final Set<PropertyOption> options;
+
+ // The property name.
+ private final String propertyName;
+
+ // The property value class.
+ private final Class<T> theClass;
+
+ /**
+ * Create a property definition.
+ *
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param theClass
+ * The property value class.
+ * @param propertyName
+ * The property name.
+ * @param options
+ * Options applicable to this definition.
+ * @param adminAction
+ * The administrator action.
+ * @param defaultBehavior
+ * The default behavior provider.
+ */
+ protected PropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, Class<T> theClass, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction, DefaultBehaviorProvider<T> defaultBehavior) {
+ Reject.ifNull(d, theClass, propertyName, options, adminAction, defaultBehavior);
+
+ this.definition = d;
+ this.theClass = theClass;
+ this.propertyName = propertyName;
+ this.options = EnumSet.copyOf(options);
+ this.adminAction = adminAction;
+ this.defaultBehavior = defaultBehavior;
+ }
+
+ /**
+ * Apply a visitor to this property definition.
+ *
+ * @param <R>
+ * The return type of the visitor's methods.
+ * @param <P>
+ * The type of the additional parameters to the visitor's
+ * methods.
+ * @param v
+ * The property definition visitor.
+ * @param p
+ * Optional additional visitor parameter.
+ * @return Returns a result as specified by the visitor.
+ */
+ public abstract <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p);
+
+ /**
+ * Apply a visitor to a property value associated with this property
+ * definition.
+ *
+ * @param <R>
+ * The return type of the visitor's methods.
+ * @param <P>
+ * The type of the additional parameters to the visitor's
+ * methods.
+ * @param v
+ * The property value visitor.
+ * @param value
+ * The property value.
+ * @param p
+ * Optional additional visitor parameter.
+ * @return Returns a result as specified by the visitor.
+ */
+ public abstract <R, P> R accept(PropertyValueVisitor<R, P> v, T value, P p);
+
+ /**
+ * Cast the provided value to the type associated with this property
+ * definition.
+ * <p>
+ * This method only casts the object to the required type; it does not
+ * validate the value once it has been cast. Subsequent validation should be
+ * performed using the method {@link #validateValue(Object, PropertyDefinitionsOptions)}.
+ * <p>
+ * This method guarantees the following expression is always
+ * <code>true</code>:
+ *
+ * <pre>
+ * PropertyDefinition d;
+ * x == d.cast(x);
+ * </pre>
+ *
+ * @param object
+ * The property value to be cast (can be <code>null</code>).
+ * @return Returns the property value cast to the correct type.
+ * @throws ClassCastException
+ * If the provided property value did not have the correct type.
+ */
+ public final T castValue(Object object) {
+ return theClass.cast(object);
+ }
+
+ /**
+ * Compares two property values for order. Returns a negative integer, zero,
+ * or a positive integer as the first argument is less than, equal to, or
+ * greater than the second.
+ * <p>
+ * This default implementation normalizes both values using
+ * {@link #normalizeValue(Object)} and then performs a case-sensitive string
+ * comparison.
+ *
+ * @param o1
+ * the first object to be compared.
+ * @param o2
+ * the second object to be compared.
+ * @return a negative integer, zero, or a positive integer as the first
+ * argument is less than, equal to, or greater than the second.
+ */
+ public int compare(T o1, T o2) {
+ Reject.ifNull(o1);
+ Reject.ifNull(o2);
+
+ String s1 = normalizeValue(o1);
+ String s2 = normalizeValue(o2);
+
+ return s1.compareTo(s2);
+ }
+
+ /**
+ * Compares this property definition with the specified property definition
+ * for order. Returns a negative integer, zero, or a positive integer if
+ * this property definition is less than, equal to, or greater than the
+ * specified property definition.
+ * <p>
+ * The ordering must be determined first from the property name and then
+ * base on the underlying value type.
+ *
+ * @param o
+ * The reference property definition with which to compare.
+ * @return Returns a negative integer, zero, or a positive integer if this
+ * property definition is less than, equal to, or greater than the
+ * specified property definition.
+ */
+ public final int compareTo(PropertyDefinition<?> o) {
+ int rc = propertyName.compareTo(o.propertyName);
+ if (rc == 0) {
+ rc = theClass.getName().compareTo(o.theClass.getName());
+ }
+ return rc;
+ }
+
+ /**
+ * Parse and validate a string representation of a property value.
+ *
+ * @param value
+ * The property string value (must not be <code>null</code>).
+ * @param options
+ * Options to use when decoding value.
+ * @return Returns the decoded property value.
+ * @throws IllegalPropertyValueStringException
+ * If the property value string is invalid.
+ */
+ public abstract T decodeValue(String value, PropertyDefinitionsOptions options);
+
+ /**
+ * Encode the provided property value into its string representation.
+ * <p>
+ * This default implementation simply returns invokes the
+ * {@link Object#toString()} method on the provided value.
+ *
+ * @param value
+ * The property value (must not be <code>null</code>).
+ * @return Returns the encoded property string value.
+ * @throws IllegalPropertyValueException
+ * If the property value is invalid.
+ */
+ public String encodeValue(T value) {
+ Reject.ifNull(value);
+
+ return value.toString();
+ }
+
+ /**
+ * Indicates whether some other object is "equal to" this property
+ * definition. This method must obey the general contract of
+ * <tt>Object.equals(Object)</tt>. Additionally, this method can return
+ * <tt>true</tt> <i>only</i> if the specified Object is also a property
+ * definition and it has the same name, as returned by {@link #getName()},
+ * and also is deemed to be "compatible" with this property
+ * definition. Compatibility means that the two property definitions share
+ * the same underlying value type and provide similar comparator
+ * implementations.
+ *
+ * @param o
+ * The reference object with which to compare.
+ * @return Returns <code>true</code> only if the specified object is also a
+ * property definition and it has the same name and is compatible
+ * with this property definition.
+ * @see java.lang.Object#equals(java.lang.Object)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public final boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ } else if (o instanceof PropertyDefinition) {
+ PropertyDefinition<?> other = (PropertyDefinition<?>) o;
+ if (propertyName.equals(other.propertyName)) {
+ if (theClass.equals(other.theClass)) {
+ return true;
+ }
+ }
+ return false;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Get the administrator action associated with this property definition.
+ * The administrator action describes any action which the administrator
+ * must perform in order for changes to this property to take effect.
+ *
+ * @return Returns the administrator action associated with this property
+ * definition.
+ */
+ public final AdministratorAction getAdministratorAction() {
+ return adminAction;
+ }
+
+ /**
+ * Get the default behavior provider associated with this property
+ * definition.
+ *
+ * @return Returns the default behavior provider associated with this
+ * property definition.
+ */
+ public final DefaultBehaviorProvider<T> getDefaultBehaviorProvider() {
+ return defaultBehavior;
+ }
+
+ /**
+ * Gets the optional description of this property definition in the default
+ * locale.
+ *
+ * @return Returns the description of this property definition in the
+ * default locale, or <code>null</code> if there is no description.
+ */
+ public final LocalizableMessage getDescription() {
+ return getDescription(Locale.getDefault());
+ }
+
+ /**
+ * Gets the optional description of this property definition in the
+ * specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the description of this property definition in the
+ * specified locale, or <code>null</code> if there is no
+ * description.
+ */
+ public final LocalizableMessage getDescription(Locale locale) {
+ ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
+ String property = "property." + propertyName + ".description";
+ try {
+ return resource.getMessage(definition, property, locale);
+ } catch (MissingResourceException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Gets the managed object definition associated with this property
+ * definition.
+ *
+ * @return Returns the managed object definition associated with this
+ * property definition.
+ */
+ public final AbstractManagedObjectDefinition<?, ?> getManagedObjectDefinition() {
+ return definition;
+ }
+
+ /**
+ * Get the name of the property.
+ *
+ * @return Returns the name of the property.
+ */
+ public final String getName() {
+ return propertyName;
+ }
+
+ /**
+ * Gets the synopsis of this property definition in the default locale.
+ *
+ * @return Returns the synopsis of this property definition in the default
+ * locale.
+ */
+ public final LocalizableMessage getSynopsis() {
+ return getSynopsis(Locale.getDefault());
+ }
+
+ /**
+ * Gets the synopsis of this property definition in the specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the synopsis of this property definition in the specified
+ * locale.
+ */
+ public final LocalizableMessage getSynopsis(Locale locale) {
+ ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
+ String property = "property." + propertyName + ".synopsis";
+ return resource.getMessage(definition, property, locale);
+ }
+
+ /**
+ * Returns a hash code value for this property definition. The hash code
+ * should be derived from the property name and the type of values handled
+ * by this property definition.
+ *
+ * @return Returns the hash code value for this property definition.
+ */
+ @Override
+ public final int hashCode() {
+ int rc = 17 + propertyName.hashCode();
+ return 37 * rc + theClass.hashCode();
+ }
+
+ /**
+ * Check if the specified option is set for this property definition.
+ *
+ * @param option
+ * The option to test.
+ * @return Returns <code>true</code> if the option is set, or
+ * <code>false</code> otherwise.
+ */
+ public final boolean hasOption(PropertyOption option) {
+ return options.contains(option);
+ }
+
+ /**
+ * Get a normalized string representation of a property value. This can then
+ * be used for comparisons and for generating hash-codes.
+ * <p>
+ * This method may throw an exception if the provided value is invalid.
+ * However, applications should not assume that implementations of this
+ * method will always validate a value. This task is the responsibility of
+ * {@link #validateValue(Object, PropertyDefinitionsOptions)}.
+ * <p>
+ * This default implementation simply returns the string representation of
+ * the provided value. Sub-classes might want to override this method if
+ * this behavior is insufficient (for example, a string property definition
+ * might strip white-space and convert characters to lower-case).
+ *
+ * @param value
+ * The property value to be normalized.
+ * @return Returns the normalized property value.
+ * @throws IllegalPropertyValueException
+ * If the property value is invalid.
+ */
+ public String normalizeValue(T value) {
+ Reject.ifNull(value);
+
+ return encodeValue(value);
+ }
+
+ /**
+ * Returns a string representation of this property definition.
+ *
+ * @return Returns a string representation of this property definition.
+ * @see Object#toString()
+ */
+ @Override
+ public final String toString() {
+ StringBuilder builder = new StringBuilder();
+ toString(builder);
+ return builder.toString();
+ }
+
+ /**
+ * Append a string representation of the property definition to the provided
+ * string builder.
+ * <p>
+ * This simple implementation just outputs the propertyName of the property
+ * definition. Sub-classes should override this method to provide more
+ * complete string representations.
+ *
+ * @param builder
+ * The string builder where the string representation should be
+ * appended.
+ */
+ public void toString(StringBuilder builder) {
+ builder.append(propertyName);
+ }
+
+ /**
+ * Determine if the provided property value is valid according to this
+ * property definition.
+ *
+ * @param value
+ * The property value (must not be <code>null</code>).
+ * @param options
+ * Options to use when decoding value.
+ * @throws IllegalPropertyValueException
+ * If the property value is invalid.
+ */
+ public abstract void validateValue(T value, PropertyDefinitionsOptions options);
+
+ /**
+ * Performs any run-time initialization required by this property
+ * definition. This may include resolving managed object paths and property
+ * names.
+ *
+ * @throws Exception
+ * If this property definition could not be initialized.
+ */
+ protected void initialize() throws Exception {
+ // No implementation required.
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinitionUsageBuilder.java b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinitionUsageBuilder.java
new file mode 100644
index 0000000..c65d059
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinitionUsageBuilder.java
@@ -0,0 +1,341 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.text.NumberFormat;
+import java.util.EnumSet;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+
+/**
+ * A property definition visitor which can be used to generate syntax usage
+ * information.
+ */
+public final class PropertyDefinitionUsageBuilder {
+
+ /**
+ * Underlying implementation.
+ */
+ private final class MyPropertyDefinitionVisitor extends PropertyDefinitionVisitor<LocalizableMessage, Void> {
+
+ // Flag indicating whether detailed syntax information will be
+ // generated.
+ private final boolean isDetailed;
+
+ // The formatter to use for numeric values.
+ private final NumberFormat numberFormat;
+
+ // Private constructor.
+ private MyPropertyDefinitionVisitor(boolean isDetailed) {
+ this.isDetailed = isDetailed;
+
+ this.numberFormat = NumberFormat.getNumberInstance();
+ this.numberFormat.setGroupingUsed(true);
+ this.numberFormat.setMaximumFractionDigits(2);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <C extends ConfigurationClient, S extends Configuration> LocalizableMessage visitAggregation(
+ AggregationPropertyDefinition<C, S> d, Void p) {
+ return LocalizableMessage.raw("NAME");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public LocalizableMessage visitAttributeType(AttributeTypePropertyDefinition d, Void p) {
+ return LocalizableMessage.raw("OID");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public LocalizableMessage visitACI(ACIPropertyDefinition d, Void p) {
+ return LocalizableMessage.raw("ACI");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public LocalizableMessage visitBoolean(BooleanPropertyDefinition d, Void p) {
+ if (isDetailed) {
+ return LocalizableMessage.raw("false | true");
+ } else {
+ return LocalizableMessage.raw("BOOLEAN");
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public LocalizableMessage visitClass(ClassPropertyDefinition d, Void p) {
+ if (isDetailed && !d.getInstanceOfInterface().isEmpty()) {
+ return LocalizableMessage.raw("CLASS <= " + d.getInstanceOfInterface().get(0));
+ } else {
+ return LocalizableMessage.raw("CLASS");
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public LocalizableMessage visitDN(DNPropertyDefinition d, Void p) {
+ if (isDetailed && d.getBaseDN() != null) {
+ return LocalizableMessage.raw("DN <= " + d.getBaseDN());
+ } else {
+ return LocalizableMessage.raw("DN");
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public LocalizableMessage visitDuration(DurationPropertyDefinition d, Void p) {
+ LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
+ DurationUnit unit = d.getBaseUnit();
+
+ if (isDetailed && d.getLowerLimit() > 0) {
+ builder.append(DurationUnit.toString(d.getLowerLimit()));
+ builder.append(" <= ");
+ }
+
+ builder.append("DURATION (");
+ builder.append(unit.getShortName());
+ builder.append(")");
+
+ if (isDetailed) {
+ if (d.getUpperLimit() != null) {
+ builder.append(" <= ");
+ builder.append(DurationUnit.toString(d.getUpperLimit()));
+ }
+
+ if (d.isAllowUnlimited()) {
+ builder.append(" | unlimited");
+ }
+ }
+
+ return builder.toMessage();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <E extends Enum<E>> LocalizableMessage visitEnum(EnumPropertyDefinition<E> d, Void p) {
+ if (!isDetailed) {
+ // Use the last word in the property name.
+ String name = d.getName();
+ int i = name.lastIndexOf('-');
+ if (i == -1 || i == (name.length() - 1)) {
+ return LocalizableMessage.raw(name.toUpperCase());
+ } else {
+ return LocalizableMessage.raw(name.substring(i + 1).toUpperCase());
+ }
+ } else {
+ Set<String> values = new TreeSet<String>();
+
+ for (Object value : EnumSet.allOf(d.getEnumClass())) {
+ values.add(value.toString().trim().toLowerCase());
+ }
+
+ boolean isFirst = true;
+ LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
+ for (String s : values) {
+ if (!isFirst) {
+ builder.append(" | ");
+ }
+ builder.append(s);
+ isFirst = false;
+ }
+
+ return builder.toMessage();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public LocalizableMessage visitInteger(IntegerPropertyDefinition d, Void p) {
+ LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
+
+ if (isDetailed) {
+ builder.append(String.valueOf(d.getLowerLimit()));
+ builder.append(" <= ");
+ }
+
+ builder.append("INTEGER");
+
+ if (isDetailed) {
+ if (d.getUpperLimit() != null) {
+ builder.append(" <= ");
+ builder.append(String.valueOf(d.getUpperLimit()));
+ } else if (d.isAllowUnlimited()) {
+ builder.append(" | unlimited");
+ }
+ }
+
+ return builder.toMessage();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public LocalizableMessage visitIPAddress(IPAddressPropertyDefinition d, Void p) {
+ return LocalizableMessage.raw("HOST_NAME");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public LocalizableMessage visitIPAddressMask(IPAddressMaskPropertyDefinition d, Void p) {
+ return LocalizableMessage.raw("IP_ADDRESS_MASK");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public LocalizableMessage visitSize(SizePropertyDefinition d, Void p) {
+ LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
+
+ if (isDetailed && d.getLowerLimit() > 0) {
+ SizeUnit unit = SizeUnit.getBestFitUnitExact(d.getLowerLimit());
+ builder.append(numberFormat.format(unit.fromBytes(d.getLowerLimit())));
+ builder.append(' ');
+ builder.append(unit.getShortName());
+ builder.append(" <= ");
+ }
+
+ builder.append("SIZE");
+
+ if (isDetailed) {
+ if (d.getUpperLimit() != null) {
+ long upperLimit = d.getUpperLimit();
+ SizeUnit unit = SizeUnit.getBestFitUnitExact(upperLimit);
+
+ // Quite often an upper limit is some power of 2 minus 1. In
+ // those
+ // cases lets use a "less than" relation rather than a "less
+ // than
+ // or equal to" relation. This will result in a much more
+ // readable
+ // quantity.
+ if (unit == SizeUnit.BYTES && upperLimit < Long.MAX_VALUE) {
+ unit = SizeUnit.getBestFitUnitExact(upperLimit + 1);
+ if (unit != SizeUnit.BYTES) {
+ upperLimit += 1;
+ builder.append(" < ");
+ } else {
+ builder.append(" <= ");
+ }
+ } else {
+ builder.append(" <= ");
+ }
+
+ builder.append(numberFormat.format(unit.fromBytes(upperLimit)));
+ builder.append(' ');
+ builder.append(unit.getShortName());
+ }
+
+ if (d.isAllowUnlimited()) {
+ builder.append(" | unlimited");
+ }
+ }
+
+ return builder.toMessage();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public LocalizableMessage visitString(StringPropertyDefinition d, Void p) {
+ if (d.getPattern() != null) {
+ if (isDetailed) {
+ LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
+ builder.append(d.getPatternUsage());
+ builder.append(" - ");
+ builder.append(d.getPatternSynopsis());
+ return builder.toMessage();
+ } else {
+ return LocalizableMessage.raw(d.getPatternUsage());
+ }
+ } else {
+ return LocalizableMessage.raw("STRING");
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <T> LocalizableMessage visitUnknown(PropertyDefinition<T> d, Void p) {
+ return LocalizableMessage.raw("?");
+ }
+ }
+
+ // Underlying implementation.
+ private final MyPropertyDefinitionVisitor pimpl;
+
+ /**
+ * Creates a new property usage builder.
+ *
+ * @param isDetailed
+ * Indicates whether or not the generated usage should contain
+ * detailed information such as constraints.
+ */
+ public PropertyDefinitionUsageBuilder(boolean isDetailed) {
+ this.pimpl = new MyPropertyDefinitionVisitor(isDetailed);
+ }
+
+ /**
+ * Generates the usage information for the provided property definition.
+ *
+ * @param pd
+ * The property definitions.
+ * @return Returns the usage information for the provided property
+ * definition.
+ */
+ public LocalizableMessage getUsage(PropertyDefinition<?> pd) {
+ return pd.accept(pimpl, null);
+ };
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinitionVisitor.java b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinitionVisitor.java
new file mode 100644
index 0000000..39f64dc
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinitionVisitor.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+/**
+ * A visitor of property definitions, in the style of the visitor design
+ * pattern. Classes implementing this interface can query property definitions
+ * in a type-safe manner when the kind of property definition is unknown at
+ * compile time. When a visitor is passed to a property definition's accept
+ * method, the corresponding visit method most applicable to that property
+ * definition is invoked.
+ * <p>
+ * Each <code>visitXXX</code> method is provided with a default implementation
+ * which calls {@link #visitUnknown(PropertyDefinition, Object)}. Sub-classes
+ * can override any or all of the methods to provide their own type-specific
+ * behavior.
+ *
+ * @param <R>
+ * The return type of this visitor's methods. Use
+ * {@link java.lang.Void} for visitors that do not need to return
+ * results.
+ * @param <P>
+ * The type of the additional parameter to this visitor's methods.
+ * Use {@link java.lang.Void} for visitors that do not need an
+ * additional parameter.
+ */
+public abstract class PropertyDefinitionVisitor<R, P> {
+
+ /**
+ * Default constructor.
+ */
+ protected PropertyDefinitionVisitor() {
+ // No implementation required.
+ }
+
+ /**
+ * Visit a dseecompat Global ACI property definition.
+ *
+ * @param pd
+ * The Global ACI property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitACI(ACIPropertyDefinition pd, P p) {
+ return visitUnknown(pd, p);
+ }
+
+ /**
+ * Visit an aggregation property definition.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * aggregation property definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * aggregation property definition refers to.
+ * @param pd
+ * The aggregation property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public <C extends ConfigurationClient, S extends Configuration> R visitAggregation(
+ AggregationPropertyDefinition<C, S> pd, P p) {
+ return visitUnknown(pd, p);
+ }
+
+ /**
+ * Visit an attribute type property definition.
+ *
+ * @param pd
+ * The attribute type property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitAttributeType(AttributeTypePropertyDefinition pd, P p) {
+ return visitUnknown(pd, p);
+ }
+
+ /**
+ * Visit a boolean property definition.
+ *
+ * @param pd
+ * The boolean property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitBoolean(BooleanPropertyDefinition pd, P p) {
+ return visitUnknown(pd, p);
+ }
+
+ /**
+ * Visit a class property definition.
+ *
+ * @param pd
+ * The class property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitClass(ClassPropertyDefinition pd, P p) {
+ return visitUnknown(pd, p);
+ }
+
+ /**
+ * Visit a DN property definition.
+ *
+ * @param pd
+ * The DN property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitDN(DNPropertyDefinition pd, P p) {
+ return visitUnknown(pd, p);
+ }
+
+ /**
+ * Visit a duration property definition.
+ *
+ * @param pd
+ * The duration property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitDuration(DurationPropertyDefinition pd, P p) {
+ return visitUnknown(pd, p);
+ }
+
+ /**
+ * Visit an enumeration property definition.
+ *
+ * @param <E>
+ * The enumeration that should be used for values of the property
+ * definition.
+ * @param pd
+ * The enumeration property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public <E extends Enum<E>> R visitEnum(EnumPropertyDefinition<E> pd, P p) {
+ return visitUnknown(pd, p);
+ }
+
+ /**
+ * Visit an integer property definition.
+ *
+ * @param pd
+ * The integer property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitInteger(IntegerPropertyDefinition pd, P p) {
+ return visitUnknown(pd, p);
+ }
+
+ /**
+ * Visit a IP address property definition.
+ *
+ * @param pd
+ * The IP address property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitIPAddress(IPAddressPropertyDefinition pd, P p) {
+ return visitUnknown(pd, p);
+ }
+
+ /**
+ * Visit a IP address mask property definition.
+ *
+ * @param pd
+ * The IP address mask property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitIPAddressMask(IPAddressMaskPropertyDefinition pd, P p) {
+ return visitUnknown(pd, p);
+ }
+
+ /**
+ * Visit a size property definition.
+ *
+ * @param pd
+ * The size property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitSize(SizePropertyDefinition pd, P p) {
+ return visitUnknown(pd, p);
+ }
+
+ /**
+ * Visit a string property definition.
+ *
+ * @param pd
+ * The string property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitString(StringPropertyDefinition pd, P p) {
+ return visitUnknown(pd, p);
+ }
+
+ /**
+ * Visit an unknown type of property definition. Implementations of this
+ * method can provide default behavior for unknown property definition
+ * types.
+ * <p>
+ * The default implementation of this method throws an
+ * {@link UnknownPropertyDefinitionException}. Sub-classes can override this
+ * method with their own default behavior.
+ *
+ * @param <T>
+ * The type of the underlying property.
+ * @param pd
+ * The property definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ * @throws UnknownPropertyDefinitionException
+ * Visitor implementations may optionally throw this exception.
+ */
+ public <T> R visitUnknown(PropertyDefinition<T> pd, P p) {
+ throw new UnknownPropertyDefinitionException(pd, p);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinitionsOptions.java b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinitionsOptions.java
new file mode 100644
index 0000000..a6fed87
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyDefinitionsOptions.java
@@ -0,0 +1,137 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2013 ForgeRock AS.
+ */
+package org.forgerock.opendj.config;
+
+/**
+ * Provides options for {@code PropertyDefinition property definitions}.
+ * <p>
+ * These options are used by some {@code PropertyDefinition} methods to define
+ * strategy used when processing value(s) of a property definition.
+ */
+public final class PropertyDefinitionsOptions {
+
+ /** Immutable options with no validation of java classes or LDAP attributes. */
+ public static final PropertyDefinitionsOptions NO_VALIDATION_OPTIONS = new PropertyDefinitionsOptions().
+ setAllowClassValidation(false).
+ setCheckSchemaForAttributes(false).
+ freeze();
+
+ /** By default, class validation is enabled. */
+ private boolean allowClassValidation = true;
+
+ /** By default, attributes validation against the schema is enabled. */
+ private boolean checkSchemaForAttributes = true;
+
+ /**
+ * If true, then the instance is frozen so state can't be changed (object is
+ * immutable).
+ */
+ private boolean isFrozen = false;
+
+ /**
+ * Creates a new set of properties options with default settings. By
+ * default, class validation and attributes checking are enabled.
+ */
+ public PropertyDefinitionsOptions() {
+ // empty implementation
+ }
+
+ /**
+ * Determine whether or not class property definitions should validate class
+ * name property values. Validation involves checking that the class exists
+ * and that it implements the required interfaces.
+ *
+ * @return Returns <code>true</code> if class property definitions should
+ * validate class name property values.
+ */
+ public boolean allowClassValidation() {
+ return allowClassValidation;
+ }
+
+ /**
+ * Specify whether or not class property definitions should validate class
+ * name property values. Validation involves checking that the class exists
+ * and that it implements the required interfaces.
+ * <p>
+ * By default validation is switched on.
+ *
+ * @param value
+ * <code>true</code> if class property definitions should
+ * validate class name property values.
+ * @return A reference to this definitions options.
+ */
+ public PropertyDefinitionsOptions setAllowClassValidation(boolean value) {
+ if (isFrozen) {
+ throw new IllegalStateException("This object is frozen, it can't be changed");
+ }
+ allowClassValidation = value;
+ return this;
+ }
+
+ /**
+ * Determines whether or not attribute type names should be validated
+ * against the schema.
+ *
+ * @return Returns <code>true</code> if attribute type names should be
+ * validated against the schema.
+ */
+ public boolean checkSchemaForAttributes() {
+ return checkSchemaForAttributes;
+ }
+
+ /**
+ * Specify whether or not attribute type names should be validated against
+ * the schema.
+ * <p>
+ * By default validation is switched on.
+ *
+ * @param value
+ * <code>true</code> if attribute type names should be validated
+ * against the schema.
+ * @return A reference to this definitions options.
+ */
+ public PropertyDefinitionsOptions setCheckSchemaForAttributes(boolean value) {
+ if (isFrozen) {
+ throw new IllegalStateException("This object is frozen, it can't be changed");
+ }
+ checkSchemaForAttributes = value;
+ return this;
+ }
+
+ /**
+ * Freeze this object, making it effectively immutable.
+ * <p>
+ * Once this method is called, all {@code set} methods will throw
+ * an IllegalStateException if called.
+ *
+ * @return A reference to this definitions options.
+ */
+ public PropertyDefinitionsOptions freeze() {
+ isFrozen = true;
+ return this;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyException.java
new file mode 100644
index 0000000..a193030
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyException.java
@@ -0,0 +1,87 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * Exceptions thrown as a result of errors that occurred when decoding and
+ * modifying property values.
+ */
+public abstract class PropertyException extends AdminRuntimeException {
+
+ /**
+ * Version ID required by serializable classes.
+ */
+ private static final long serialVersionUID = -8465109598081914482L;
+
+ // The property definition associated with the property that caused
+ // the exception.
+ private final PropertyDefinition<?> pd;
+
+ /**
+ * Creates property exception without a cause.
+ *
+ * @param pd
+ * The property definition associated with the property that
+ * caused the exception.
+ * @param message
+ * The message.
+ */
+ protected PropertyException(PropertyDefinition<?> pd, LocalizableMessage message) {
+ super(message);
+ this.pd = pd;
+ }
+
+ /**
+ * Creates property exception with a cause.
+ *
+ * @param pd
+ * The property definition associated with the property that
+ * caused the exception.
+ * @param message
+ * The message.
+ * @param cause
+ * The cause.
+ */
+ protected PropertyException(PropertyDefinition<?> pd, LocalizableMessage message, Throwable cause) {
+ super(message, cause);
+ this.pd = pd;
+ }
+
+ /**
+ * Get the property definition associated with the property that caused the
+ * exception.
+ *
+ * @return Returns the property definition associated with the property that
+ * caused the exception.
+ */
+ public final PropertyDefinition<?> getPropertyDefinition() {
+ return pd;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyIsMandatoryException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyIsMandatoryException.java
new file mode 100644
index 0000000..067d988
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyIsMandatoryException.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+/**
+ * Thrown when an attempt is made to remove a mandatory property.
+ */
+public class PropertyIsMandatoryException extends PropertyException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = 5328211711156565625L;
+
+ /**
+ * Create a new property is mandatory exception.
+ *
+ * @param pd
+ * The property definition.
+ */
+ public PropertyIsMandatoryException(PropertyDefinition<?> pd) {
+ super(pd, ERR_PROPERTY_IS_MANDATORY_EXCEPTION.get(pd.getName()));
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyIsReadOnlyException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyIsReadOnlyException.java
new file mode 100644
index 0000000..1522004
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyIsReadOnlyException.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+/**
+ * Thrown when an attempt is made to modify a read-only property.
+ */
+public class PropertyIsReadOnlyException extends PropertyException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = 5315348044141024459L;
+
+ /**
+ * Create a new property is read-only exception.
+ *
+ * @param pd
+ * The property definition.
+ */
+ public PropertyIsReadOnlyException(PropertyDefinition<?> pd) {
+ super(pd, ERR_PROPERTY_IS_READ_ONLY_EXCEPTION.get(pd.getName()));
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyIsSingleValuedException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyIsSingleValuedException.java
new file mode 100644
index 0000000..f79706d
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyIsSingleValuedException.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+/**
+ * Thrown when an attempt is made to add more than value to a single-valued
+ * property.
+ */
+public class PropertyIsSingleValuedException extends PropertyException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = -8056602690887917027L;
+
+ /**
+ * Create a new property is single valued exception.
+ *
+ * @param pd
+ * The property definition.
+ */
+ public PropertyIsSingleValuedException(PropertyDefinition<?> pd) {
+ super(pd, ERR_PROPERTY_IS_SINGLE_VALUED_EXCEPTION.get(pd.getName()));
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyNotFoundException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyNotFoundException.java
new file mode 100644
index 0000000..db07150
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyNotFoundException.java
@@ -0,0 +1,68 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+/**
+ * Thrown when an attempt is made to retrieve a property using its name but the
+ * name was not recognized.
+ * <p>
+ * This exception can occur when attempt is made to retrieve inherited default
+ * values from a managed object.
+ */
+public class PropertyNotFoundException extends OperationsException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = -895548482881819610L;
+
+ // The name of the property that could not be found.
+ private final String propertyName;
+
+ /**
+ * Create a new property not found exception.
+ *
+ * @param propertyName
+ * The name of the property that could not be found.
+ */
+ public PropertyNotFoundException(String propertyName) {
+ super(ERR_PROPERTY_NOT_FOUND_EXCEPTION.get(propertyName));
+
+ this.propertyName = propertyName;
+ }
+
+ /**
+ * Get the name of the property that could not be found.
+ *
+ * @return Returns the name of the property that could not be found.
+ */
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyOption.java b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyOption.java
new file mode 100644
index 0000000..aedfe18
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyOption.java
@@ -0,0 +1,67 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+/**
+ * This enumeration contains various options that can be associated with
+ * property definitions.
+ */
+public enum PropertyOption {
+ /**
+ * Use this option to identify properties which should be considered as
+ * advanced and should not be exposed by default in client applications.
+ */
+ ADVANCED,
+
+ /**
+ * Use this option to identify properties which must not be directly exposed
+ * in client applications.
+ */
+ HIDDEN,
+
+ /**
+ * Use this option to identify properties which must have a value.
+ */
+ MANDATORY,
+
+ /**
+ * Use this option to identify properties which are multi-valued.
+ */
+ MULTI_VALUED,
+
+ /**
+ * Use this option to identify properties which can be initialized once only
+ * and are read-only thereafter.
+ */
+ READ_ONLY,
+
+ /**
+ * Use this option to identify properties which are for monitoring purposes
+ * only and are generated automatically by the server..
+ */
+ MONITORING;
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyProvider.java b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyProvider.java
new file mode 100644
index 0000000..62bc0f7
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyProvider.java
@@ -0,0 +1,80 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * An interface which can be used to initialize the contents of a managed
+ * object.
+ */
+public interface PropertyProvider {
+
+ /**
+ * A property provider which always returns empty property values,
+ * indicating default behavior.
+ */
+ public static final PropertyProvider DEFAULT_PROVIDER = new PropertyProvider() {
+
+ /**
+ * {@inheritDoc}
+ */
+ public <T> Collection<T> getPropertyValues(PropertyDefinition<T> d) {
+ return Collections.<T> emptySet();
+ }
+
+ };
+
+ /**
+ * Get the property values associated with the specified property
+ * definition.
+ * <p>
+ * Implementations are not required to validate the values that they
+ * provide. Specifically:
+ * <ul>
+ * <li>they do not need to guarantee that the provided values are valid
+ * according to the property's syntax
+ * <li>they do not need to provide values for mandatory properties
+ * <li>they do not need to ensure that single-valued properties do contain
+ * at most one value.
+ * </ul>
+ * The returned set of values is allowed to contain duplicates.
+ *
+ * @param <T>
+ * The underlying type of the property.
+ * @param d
+ * The Property definition.
+ * @return Returns a newly allocated set containing a copy of the property's
+ * values. An empty set indicates that the property has no values
+ * defined and any default behavior is applicable.
+ * @throws IllegalArgumentException
+ * If this property provider does not recognise the requested
+ * property definition.
+ */
+ <T> Collection<T> getPropertyValues(PropertyDefinition<T> d);
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyValueVisitor.java b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyValueVisitor.java
new file mode 100644
index 0000000..fb94f94
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/PropertyValueVisitor.java
@@ -0,0 +1,296 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import java.net.InetAddress;
+
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.schema.AttributeType;
+import org.opends.server.authorization.dseecompat.Aci;
+import org.opends.server.types.AddressMask;
+
+/**
+ * A visitor of property values, in the style of the visitor design pattern.
+ * Classes implementing this interface can query a property a value and its
+ * associated property definition in a type-safe manner when the kind of
+ * property value is unknown at compile time. When a visitor is passed to a
+ * property definition's accept method, the corresponding visit method most
+ * applicable to that property definition is invoked.
+ * <p>
+ * Each <code>visitXXX</code> method is provided with a default implementation
+ * which calls {@link #visitUnknown(PropertyDefinition, Object, Object)}.
+ * Sub-classes can override any or all of the methods to provide their own
+ * type-specific behavior.
+ *
+ * @param <R>
+ * The return type of this visitor's methods. Use
+ * {@link java.lang.Void} for visitors that do not need to return
+ * results.
+ * @param <P>
+ * The type of the additional parameter to this visitor's methods.
+ * Use {@link java.lang.Void} for visitors that do not need an
+ * additional parameter.
+ */
+public abstract class PropertyValueVisitor<R, P> {
+
+ /**
+ * Default constructor.
+ */
+ protected PropertyValueVisitor() {
+ // No implementation required.
+ }
+
+ /**
+ * Visit a dseecompat ACI.
+ *
+ * @param pd
+ * The dseecompat ACI property definition.
+ * @param v
+ * The property value to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitACI(ACIPropertyDefinition pd, Aci v, P p) {
+ return visitUnknown(pd, v, p);
+ }
+
+ /**
+ * Visit an aggregation property value.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * aggregation property definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * aggregation property definition refers to.
+ * @param pd
+ * The aggregation property definition to visit.
+ * @param v
+ * The property value to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public <C extends ConfigurationClient, S extends Configuration> R visitAggregation(
+ AggregationPropertyDefinition<C, S> pd, String v, P p) {
+ return visitUnknown(pd, v, p);
+ }
+
+ /**
+ * Visit an attribute type.
+ *
+ * @param pd
+ * The attribute type property definition.
+ * @param v
+ * The property value to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitAttributeType(AttributeTypePropertyDefinition pd, AttributeType v, P p) {
+ return visitUnknown(pd, v, p);
+ }
+
+ /**
+ * Visit a boolean.
+ *
+ * @param pd
+ * The boolean property definition.
+ * @param v
+ * The property value to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitBoolean(BooleanPropertyDefinition pd, Boolean v, P p) {
+ return visitUnknown(pd, v, p);
+ }
+
+ /**
+ * Visit a class.
+ *
+ * @param pd
+ * The class property definition.
+ * @param v
+ * The property value to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitClass(ClassPropertyDefinition pd, String v, P p) {
+ return visitUnknown(pd, v, p);
+ }
+
+ /**
+ * Visit a DN.
+ *
+ * @param pd
+ * The DN property definition.
+ * @param v
+ * The property value to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitDN(DNPropertyDefinition pd, DN v, P p) {
+ return visitUnknown(pd, v, p);
+ }
+
+ /**
+ * Visit a duration.
+ *
+ * @param pd
+ * The duration property definition.
+ * @param v
+ * The property value to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitDuration(DurationPropertyDefinition pd, Long v, P p) {
+ return visitUnknown(pd, v, p);
+ }
+
+ /**
+ * Visit an enumeration.
+ *
+ * @param <E>
+ * The enumeration that should be used for values of the property
+ * definition.
+ * @param pd
+ * The enumeration property definition.
+ * @param v
+ * The property value to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public <E extends Enum<E>> R visitEnum(EnumPropertyDefinition<E> pd, E v, P p) {
+ return visitUnknown(pd, v, p);
+ }
+
+ /**
+ * Visit an integer.
+ *
+ * @param pd
+ * The integer property definition.
+ * @param v
+ * The property value to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitInteger(IntegerPropertyDefinition pd, Integer v, P p) {
+ return visitUnknown(pd, v, p);
+ }
+
+ /**
+ * Visit a IP address.
+ *
+ * @param pd
+ * The IP address property definition.
+ * @param v
+ * The property value to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitIPAddress(IPAddressPropertyDefinition pd, InetAddress v, P p) {
+ return visitUnknown(pd, v, p);
+ }
+
+ /**
+ * Visit a IP address mask.
+ *
+ * @param pd
+ * The IP address mask property definition.
+ * @param v
+ * The property value to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitIPAddressMask(IPAddressMaskPropertyDefinition pd, AddressMask v, P p) {
+ return visitUnknown(pd, v, p);
+ }
+
+ /**
+ * Visit a size.
+ *
+ * @param pd
+ * The size property definition.
+ * @param v
+ * The property value to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitSize(SizePropertyDefinition pd, Long v, P p) {
+ return visitUnknown(pd, v, p);
+ }
+
+ /**
+ * Visit a string.
+ *
+ * @param pd
+ * The string property definition.
+ * @param v
+ * The property value to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ public R visitString(StringPropertyDefinition pd, String v, P p) {
+ return visitUnknown(pd, v, p);
+ }
+
+ /**
+ * Visit an unknown type of property value. Implementations of this method
+ * can provide default behavior for unknown types of property.
+ * <p>
+ * The default implementation of this method throws an
+ * {@link UnknownPropertyDefinitionException}. Sub-classes can override this
+ * method with their own default behavior.
+ *
+ * @param <T>
+ * The type of property value to visit.
+ * @param pd
+ * The property definition.
+ * @param v
+ * The property value.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ * @throws UnknownPropertyDefinitionException
+ * Visitor implementations may optionally throw this exception.
+ */
+ public <T> R visitUnknown(PropertyDefinition<T> pd, T v, P p) {
+ throw new UnknownPropertyDefinitionException(pd, p);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/Reference.java b/opendj-config/src/main/java/org/forgerock/opendj/config/Reference.java
new file mode 100644
index 0000000..fa8705e
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/Reference.java
@@ -0,0 +1,204 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static com.forgerock.opendj.util.StaticUtils.*;
+
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.RDN;
+
+/**
+ * A reference to another managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * reference refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * reference refers to.
+ */
+public final class Reference<C extends ConfigurationClient, S extends Configuration> {
+
+ /**
+ * Parses a DN string value as a reference using the provided managed object
+ * path and relation definition.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * reference refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * reference refers to.
+ * @param path
+ * The path of the referenced managed object's parent.
+ * @param relationDef
+ * The instantiable relation in the parent which contains the
+ * referenced managed object.
+ * @param dnAsString
+ * The DN string value.
+ * @return Returns the new reference based on the provided DN string value.
+ * @throws IllegalArgumentException
+ * If the DN string value could not be decoded as a DN or if the
+ * provided DN did not correspond to the provided path and
+ * relation.
+ */
+ public static <C extends ConfigurationClient, S extends Configuration> Reference<C, S> parseDN(
+ ManagedObjectPath<?, ?> path, InstantiableRelationDefinition<C, S> relationDef, String dnAsString) {
+ AbstractManagedObjectDefinition<?, ?> definition = path.getManagedObjectDefinition();
+ RelationDefinition<?, ?> tmp = definition.getRelationDefinition(relationDef.getName());
+ if (tmp != relationDef) {
+ // TODO : i18n ?
+ throw new IllegalArgumentException("The relation \"" + relationDef.getName()
+ + "\" is not associated with the definition \"" + definition.getName() + "\"");
+ }
+
+ DN dn = DN.valueOf(dnAsString);
+ RDN rdn = dn.rdn();
+ if (rdn == null) {
+ // TODO : i18n ?
+ throw new IllegalArgumentException("Unabled to decode the DN string: \"" + dnAsString + "\"");
+ }
+
+ // Check that the DN was valid.
+ String name = rdn.getFirstAVA().getAttributeValue().toString();
+ DN expected = path.child(relationDef, name).toDN();
+ if (!dn.equals(expected)) {
+ // TODO : i18n ?
+ throw new IllegalArgumentException("Unabled to decode the DN string: \"" + dnAsString + "\"");
+ }
+
+ return new Reference<C, S>(path, relationDef, name);
+ }
+
+ /**
+ * Parses a name as a reference using the provided managed object path and
+ * relation definition.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * reference refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * reference refers to.
+ * @param p
+ * The path of the referenced managed object's parent.
+ * @param rd
+ * The instantiable relation in the parent which contains the
+ * referenced managed object.
+ * @param s
+ * The name of the referenced managed object.
+ * @return Returns the new reference based on the provided name.
+ * @throws IllegalArgumentException
+ * If the relation is not associated with the provided parent's
+ * definition, or if the provided name is empty.
+ */
+ public static <C extends ConfigurationClient, S extends Configuration> Reference<C, S> parseName(
+ ManagedObjectPath<?, ?> p, InstantiableRelationDefinition<C, S> rd, String s) {
+ // Sanity checks.
+ AbstractManagedObjectDefinition<?, ?> d = p.getManagedObjectDefinition();
+ RelationDefinition<?, ?> tmp = d.getRelationDefinition(rd.getName());
+ if (tmp != rd) {
+ throw new IllegalArgumentException("The relation \"" + rd.getName()
+ + "\" is not associated with the definition \"" + d.getName() + "\"");
+ }
+
+ if (s.trim().length() == 0) {
+ throw new IllegalArgumentException("Empty names are not allowed");
+ }
+
+ return new Reference<C, S>(p, rd, s);
+ }
+
+ // The name of the referenced managed object.
+ private final String name;
+
+ // The path of the referenced managed object.
+ private final ManagedObjectPath<C, S> path;
+
+ // The instantiable relation in the parent which contains the
+ // referenced managed object.
+ private final InstantiableRelationDefinition<C, S> relation;
+
+ // Private constructor.
+ private Reference(ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> relation, String name) {
+ this.relation = relation;
+ this.name = name;
+ this.path = parent.child(relation, name);
+ }
+
+ /**
+ * Gets the name of the referenced managed object.
+ *
+ * @return Returns the name of the referenced managed object.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Gets the normalized name of the referenced managed object.
+ *
+ * @return Returns the normalized name of the referenced managed object.
+ */
+ public String getNormalizedName() {
+ PropertyDefinition<?> pd = relation.getNamingPropertyDefinition();
+ return normalizeName(pd);
+ }
+
+ /**
+ * Gets the DN of the referenced managed object.
+ *
+ * @return Returns the DN of the referenced managed object.
+ */
+ public DN toDN() {
+ return path.toDN();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString() {
+ return name;
+ }
+
+ // Normalize a value using the specified naming property definition
+ // if defined.
+ private <T> String normalizeName(PropertyDefinition<T> pd) {
+ if (pd != null) {
+ try {
+ // TODO : is it correct to have no validation ?
+ T tvalue = pd.decodeValue(name, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ return pd.normalizeValue(tvalue);
+ } catch (IllegalPropertyValueStringException e) {
+ // Fall through to default normalization.
+ }
+ }
+
+ // FIXME: should really use directory string normalizer.
+ String s = name.trim().replaceAll(" +", " ");
+ return toLowerCase(s);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/RelationDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/RelationDefinition.java
new file mode 100644
index 0000000..bc1a2bf
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/RelationDefinition.java
@@ -0,0 +1,361 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.util.EnumSet;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.Set;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * Relation definitions define relationships between types of managed objects.
+ * In addition they define the ownership model:
+ * <ul>
+ * <li>composition - referenced managed objects are owned by the parent managed
+ * object and are deleted when the parent is deleted
+ * <li>aggregation - referenced managed objects are not owned by the parent
+ * managed object. Instead they are shared by other managed objects.
+ * </ul>
+ * Relations define how clients interact with the configuration. For example,
+ * clients manage aggregated managed objects in a shared location and attach
+ * them to parent managed objects. Composed managed objects, on the other hand,
+ * would be created directly beneath the parent managed object and destroyed
+ * with it too.
+ * <p>
+ * Within the server, listeners can choose to request notification of managed
+ * objects being added or removed from relations.
+ * <p>
+ * In LDAP, compositions are represented as follows:
+ * <ul>
+ * <li>singleton relations (one to one): a referenced managed object is
+ * represented using a child entry directly beneath the parent
+ * <li>optional relations (one to zero or one): a referenced managed object is
+ * represented using a child entry directly beneath the parent
+ * <li>instantiable relations (one to many): the relation is represented using a
+ * child entry directly beneath the parent. Referenced managed objects are
+ * represented using child entries of this "relation entry" and are named by the
+ * user
+ * <li>set relations (one to many): the relation is represented using a child
+ * entry directly beneath the parent. Referenced managed objects are represented
+ * using child entries of this "relation entry" whose name is the type of the
+ * managed object.
+ * </ul>
+ * Whereas, aggregations are represented by storing the DNs of the referenced
+ * managed objects in an attribute of the aggregating managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this relation
+ * definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this relation
+ * definition refers to.
+ */
+public abstract class RelationDefinition<C extends ConfigurationClient, S extends Configuration> {
+
+ /**
+ * An interface for incrementally constructing relation definitions.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * relation definition refers to.
+ * @param <D>
+ * The type of relation definition constructed by this builder.
+ */
+ protected abstract static class AbstractBuilder<C extends ConfigurationClient, S extends Configuration,
+ D extends RelationDefinition<C, S>> {
+
+ // Common fields.
+ private final Common<C, S> common;
+
+ /**
+ * Create a property definition builder.
+ *
+ * @param pd
+ * The parent managed object definition.
+ * @param name
+ * The name of the relation.
+ * @param cd
+ * The child managed object definition.
+ */
+ protected AbstractBuilder(AbstractManagedObjectDefinition<?, ?> pd, String name,
+ AbstractManagedObjectDefinition<C, S> cd) {
+ this.common = new Common<C, S>(pd, name, cd);
+ }
+
+ /**
+ * Construct a relation definition based on the properties of this
+ * builder.
+ *
+ * @return The new relation definition.
+ */
+ public final D getInstance() {
+ return buildInstance(common);
+ }
+
+ /**
+ * Add a relation definition option.
+ *
+ * @param option
+ * The relation option.
+ */
+ public final void setOption(RelationOption option) {
+ Reject.ifNull(option);
+ common.options.add(option);
+ }
+
+ /**
+ * Build a relation definition based on the properties of this builder.
+ *
+ * @param common
+ * The common fields of the new relation definition.
+ * @return The new relation definition.
+ */
+ protected abstract D buildInstance(Common<C, S> common);
+ }
+
+ /**
+ * Opaque structure containing fields common to all relation definition
+ * types.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * relation definition refers to.
+ */
+ protected static final class Common<C extends ConfigurationClient, S extends Configuration> {
+
+ // The definition of the child managed object.
+ private final AbstractManagedObjectDefinition<C, S> cd;
+
+ // The name of the relation.
+ private final String name;
+
+ // Options applicable to this definition.
+ private final Set<RelationOption> options;
+
+ // The definition of the parent managed object.
+ private final AbstractManagedObjectDefinition<?, ?> pd;
+
+ // Private constructor.
+ private Common(AbstractManagedObjectDefinition<?, ?> pd, String name,
+ AbstractManagedObjectDefinition<C, S> cd) {
+ this.name = name;
+ this.pd = pd;
+ this.cd = cd;
+ this.options = EnumSet.noneOf(RelationOption.class);
+ }
+ }
+
+ // Common fields.
+ private final Common<C, S> common;
+
+ /**
+ * Create a new managed object relation definition with the specified common
+ * fields.
+ *
+ * @param common
+ * The common fields of the new relation definition.
+ */
+ protected RelationDefinition(Common<C, S> common) {
+ this.common = common;
+ }
+
+ /**
+ * Apply a visitor to this relation definition.
+ *
+ * @param <R>
+ * The return type of the visitor's methods.
+ * @param <P>
+ * The type of the additional parameters to the visitor's
+ * methods.
+ * @param v
+ * The relation definition visitor.
+ * @param p
+ * Optional additional visitor parameter.
+ * @return Returns a result as specified by the visitor.
+ */
+ public abstract <R, P> R accept(RelationDefinitionVisitor<R, P> v, P p);
+
+ /**
+ * Get the definition of the child managed object.
+ *
+ * @return Returns the definition of the child managed object.
+ */
+ public final AbstractManagedObjectDefinition<C, S> getChildDefinition() {
+ return common.cd;
+ }
+
+ /**
+ * Gets the optional description of this relation definition in the default
+ * locale.
+ *
+ * @return Returns the description of this relation definition in the
+ * default locale, or <code>null</code> if there is no description.
+ */
+ public final LocalizableMessage getDescription() {
+ return getDescription(Locale.getDefault());
+ }
+
+ /**
+ * Gets the optional description of this relation definition in the
+ * specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the description of this relation definition in the
+ * specified locale, or <code>null</code> if there is no
+ * description.
+ */
+ public final LocalizableMessage getDescription(Locale locale) {
+ try {
+ String property = "relation." + common.name + ".description";
+ return ManagedObjectDefinitionI18NResource.getInstance().getMessage(getParentDefinition(), property,
+ locale);
+ } catch (MissingResourceException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Get the name of the relation.
+ *
+ * @return Returns the name of the relation.
+ */
+ public final String getName() {
+ return common.name;
+ }
+
+ /**
+ * Get the definition of the parent managed object.
+ *
+ * @return Returns the definition of the parent managed object.
+ */
+ public final AbstractManagedObjectDefinition<?, ?> getParentDefinition() {
+ return common.pd;
+ }
+
+ /**
+ * Gets the synopsis of this relation definition in the default locale.
+ *
+ * @return Returns the synopsis of this relation definition in the default
+ * locale.
+ */
+ public final LocalizableMessage getSynopsis() {
+ return getSynopsis(Locale.getDefault());
+ }
+
+ /**
+ * Gets the synopsis of this relation definition in the specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the synopsis of this relation definition in the specified
+ * locale.
+ */
+ public final LocalizableMessage getSynopsis(Locale locale) {
+ String property = "relation." + common.name + ".synopsis";
+ return ManagedObjectDefinitionI18NResource.getInstance().getMessage(getParentDefinition(), property, locale);
+ }
+
+ /**
+ * Gets the user friendly name of this relation definition in the default
+ * locale.
+ *
+ * @return Returns the user friendly name of this relation definition in the
+ * default locale.
+ */
+ public final LocalizableMessage getUserFriendlyName() {
+ return getUserFriendlyName(Locale.getDefault());
+ }
+
+ /**
+ * Gets the user friendly name of this relation definition in the specified
+ * locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the user friendly name of this relation definition in the
+ * specified locale.
+ */
+ public final LocalizableMessage getUserFriendlyName(Locale locale) {
+ String property = "relation." + common.name + ".user-friendly-name";
+ return ManagedObjectDefinitionI18NResource.getInstance().getMessage(getParentDefinition(), property, locale);
+ }
+
+ /**
+ * Check if the specified option is set for this relation definition.
+ *
+ * @param option
+ * The option to test.
+ * @return Returns <code>true</code> if the option is set, or
+ * <code>false</code> otherwise.
+ */
+ public final boolean hasOption(RelationOption option) {
+ return common.options.contains(option);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final String toString() {
+ StringBuilder builder = new StringBuilder();
+ toString(builder);
+ return builder.toString();
+ }
+
+ /**
+ * Append a string representation of the managed object relation to the
+ * provided string builder.
+ *
+ * @param builder
+ * The string builder where the string representation should be
+ * appended.
+ */
+ public abstract void toString(StringBuilder builder);
+
+ /**
+ * Performs any run-time initialization required by this relation
+ * definition. This may include resolving managed object paths and property
+ * names.
+ *
+ * @throws Exception
+ * If this relation definition could not be initialized.
+ */
+ protected void initialize() throws Exception {
+ // No implementation required.
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/RelationDefinitionVisitor.java b/opendj-config/src/main/java/org/forgerock/opendj/config/RelationDefinitionVisitor.java
new file mode 100644
index 0000000..5e9dff9
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/RelationDefinitionVisitor.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+/**
+ * A visitor of relation definitions, in the style of the visitor design
+ * pattern. Classes implementing this interface can query relation definitions
+ * in a type-safe manner when the kind of relation definition is unknown at
+ * compile time. When a visitor is passed to a relation definition's accept
+ * method, the corresponding visit method most applicable to that relation
+ * definition is invoked.
+ *
+ * @param <R>
+ * The return type of this visitor's methods. Use
+ * {@link java.lang.Void} for visitors that do not need to return
+ * results.
+ * @param <P>
+ * The type of the additional parameter to this visitor's methods.
+ * Use {@link java.lang.Void} for visitors that do not need an
+ * additional parameter.
+ */
+public interface RelationDefinitionVisitor<R, P> {
+
+ /**
+ * Visit an instantiable relation definition.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param rd
+ * The instantiable relation definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ <C extends ConfigurationClient, S extends Configuration> R visitInstantiable(
+ InstantiableRelationDefinition<C, S> rd, P p);
+
+ /**
+ * Visit a set relation definition.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param rd
+ * The set relation definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ <C extends ConfigurationClient, S extends Configuration> R visitSet(SetRelationDefinition<C, S> rd, P p);
+
+ /**
+ * Visit an optional relation definition.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param rd
+ * The optional relation definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ <C extends ConfigurationClient, S extends Configuration> R visitOptional(OptionalRelationDefinition<C, S> rd, P p);
+
+ /**
+ * Visit a singleton relation definition.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param rd
+ * The singleton relation definition to visit.
+ * @param p
+ * A visitor specified parameter.
+ * @return Returns a visitor specified result.
+ */
+ <C extends ConfigurationClient, S extends Configuration> R visitSingleton(SingletonRelationDefinition<C, S> rd,
+ P p);
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/RelationOption.java b/opendj-config/src/main/java/org/forgerock/opendj/config/RelationOption.java
new file mode 100644
index 0000000..1cd01df
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/RelationOption.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+/**
+ * This enumeration contains various options that can be associated with
+ * relation definitions.
+ */
+public enum RelationOption {
+ /**
+ * Use this option to identify relations which should be considered as
+ * advanced and should not be exposed by default in client applications.
+ */
+ ADVANCED,
+
+ /**
+ * Use this option to identify relations which must not be directly exposed
+ * in client applications.
+ */
+ HIDDEN;
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/RelativeInheritedDefaultBehaviorProvider.java b/opendj-config/src/main/java/org/forgerock/opendj/config/RelativeInheritedDefaultBehaviorProvider.java
new file mode 100644
index 0000000..972cd9c
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/RelativeInheritedDefaultBehaviorProvider.java
@@ -0,0 +1,130 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+/**
+ * A default behavior provider which retrieves default values from a parent
+ * managed object. It should be used by properties which inherit their default
+ * value(s) from properties held in an other managed object.
+ *
+ * @param <T>
+ * The type of values represented by this provider.
+ */
+public final class RelativeInheritedDefaultBehaviorProvider<T> extends DefaultBehaviorProvider<T> {
+
+ // The type of managed object expected at the relative offset.
+ private final AbstractManagedObjectDefinition<?, ?> d;
+
+ // The relative offset (where 1 = parent, 2 = grandparent) of the
+ // managed object containing the property.
+ private final int offset;
+
+ // The name of the property containing the inherited default values.
+ private final String propertyName;
+
+ /**
+ * Create a relative inherited default behavior provider associated with a
+ * parent managed object.
+ *
+ * @param d
+ * The type of parent managed object expected at the relative
+ * location.
+ * @param propertyName
+ * The name of the property containing the inherited default
+ * values.
+ * @param offset
+ * The relative location of the parent managed object (where 0 is
+ * the managed object itself, 1 is the parent, and 2 is the
+ * grand-parent).
+ * @throws IllegalArgumentException
+ * If the offset is less than 0.
+ */
+ public RelativeInheritedDefaultBehaviorProvider(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ int offset) {
+ // We do not decode the property name now because the property
+ // might not have been constructed at this point (e.g. when the
+ // offset is 0).
+ if (offset < 0) {
+ throw new IllegalArgumentException("Negative offset");
+ }
+ this.d = d;
+ this.propertyName = propertyName;
+ this.offset = offset;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p) {
+ return v.visitRelativeInherited(this, p);
+ }
+
+ /**
+ * Get the definition of the parent managed object containing the inherited
+ * default values.
+ *
+ * @return Returns the definition of the parent managed object containing
+ * the inherited default values.
+ */
+ public AbstractManagedObjectDefinition<?, ?> getManagedObjectDefinition() {
+ return d;
+ }
+
+ /**
+ * Get the absolute path of the managed object containing the property which
+ * has the default values.
+ *
+ * @param path
+ * The path of the current managed object from which the relative
+ * path should be determined.
+ * @return Returns the absolute path of the managed object containing the
+ * property which has the default values.
+ */
+ public ManagedObjectPath<?, ?> getManagedObjectPath(ManagedObjectPath<?, ?> path) {
+ return path.parent(offset);
+ }
+
+ /**
+ * Gets the name of the property containing the inherited default values.
+ *
+ * @return Returns the name of the property containing the inherited default
+ * values.
+ */
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ /**
+ * Get the relative location of the parent managed object.
+ *
+ * @return Returns the relative location of the parent managed object (where
+ * 0 is the managed object itself, 1 is the parent, and 2 is the
+ * grand-parent).
+ */
+ public int getRelativeOffset() {
+ return offset;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/SetRelationDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/SetRelationDefinition.java
new file mode 100644
index 0000000..834a2ba
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/SetRelationDefinition.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * A managed object composite relationship definition which represents a
+ * composition of zero or more managed objects each of which must have a
+ * different type. The manage objects are named using their type name.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this relation
+ * definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this relation
+ * definition refers to.
+ */
+public final class SetRelationDefinition<C extends ConfigurationClient, S extends Configuration> extends
+ RelationDefinition<C, S> {
+
+ /**
+ * An interface for incrementally constructing set relation definitions.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * relation definition refers to.
+ */
+ public static final class Builder<C extends ConfigurationClient, S extends Configuration> extends
+ AbstractBuilder<C, S, SetRelationDefinition<C, S>> {
+
+ // The plural name of the relation.
+ private final String pluralName;
+
+ // The optional default managed objects associated with this
+ // set relation definition.
+ private final Map<String, DefaultManagedObject<? extends C, ? extends S>> defaultManagedObjects =
+ new HashMap<String, DefaultManagedObject<? extends C, ? extends S>>();
+
+ /**
+ * Creates a new builder which can be used to incrementally build a set
+ * relation definition.
+ *
+ * @param pd
+ * The parent managed object definition.
+ * @param name
+ * The name of the relation.
+ * @param pluralName
+ * The plural name of the relation.
+ * @param cd
+ * The child managed object definition.
+ */
+ public Builder(AbstractManagedObjectDefinition<?, ?> pd, String name, String pluralName,
+ AbstractManagedObjectDefinition<C, S> cd) {
+ super(pd, name, cd);
+ this.pluralName = pluralName;
+ }
+
+ /**
+ * Adds the default managed object to this set relation definition.
+ *
+ * @param defaultManagedObject
+ * The default managed object.
+ */
+ public void setDefaultManagedObject(DefaultManagedObject<? extends C, ? extends S> defaultManagedObject) {
+ this.defaultManagedObjects.put(defaultManagedObject.getManagedObjectDefinition().getName(),
+ defaultManagedObject);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected SetRelationDefinition<C, S> buildInstance(Common<C, S> common) {
+ return new SetRelationDefinition<C, S>(common, pluralName, defaultManagedObjects);
+ }
+
+ }
+
+ // The plural name of the relation.
+ private final String pluralName;
+
+ // The optional default managed objects associated with this
+ // set relation definition.
+ private final Map<String, DefaultManagedObject<? extends C, ? extends S>> defaultManagedObjects;
+
+ // Private constructor.
+ private SetRelationDefinition(Common<C, S> common, String pluralName,
+ Map<String, DefaultManagedObject<? extends C, ? extends S>> defaultManagedObjects) {
+ super(common);
+ this.pluralName = pluralName;
+ this.defaultManagedObjects = defaultManagedObjects;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(RelationDefinitionVisitor<R, P> v, P p) {
+ return v.visitSet(this, p);
+ }
+
+ /**
+ * Gets the named default managed object associated with this set relation
+ * definition.
+ *
+ * @param name
+ * The name of the default managed object (for set relations this
+ * is the type of the default managed object).
+ * @return The named default managed object.
+ * @throws IllegalArgumentException
+ * If there is no default managed object associated with the
+ * provided name.
+ */
+ public DefaultManagedObject<? extends C, ? extends S> getDefaultManagedObject(String name) {
+ if (!defaultManagedObjects.containsKey(name)) {
+ throw new IllegalArgumentException("unrecognized default managed object \"" + name + "\"");
+ }
+ return defaultManagedObjects.get(name);
+ }
+
+ /**
+ * Gets the names of the default managed objects associated with this set
+ * relation definition.
+ *
+ * @return An unmodifiable set containing the names of the default managed
+ * object.
+ */
+ public Set<String> getDefaultManagedObjectNames() {
+ return Collections.unmodifiableSet(defaultManagedObjects.keySet());
+ }
+
+ /**
+ * Gets the plural name of the relation.
+ *
+ * @return The plural name of the relation.
+ */
+ public String getPluralName() {
+ return pluralName;
+ }
+
+ /**
+ * Gets the user friendly plural name of this relation definition in the
+ * default locale.
+ *
+ * @return Returns the user friendly plural name of this relation definition
+ * in the default locale.
+ */
+ public LocalizableMessage getUserFriendlyPluralName() {
+ return getUserFriendlyPluralName(Locale.getDefault());
+ }
+
+ /**
+ * Gets the user friendly plural name of this relation definition in the
+ * specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the user friendly plural name of this relation definition
+ * in the specified locale.
+ */
+ public LocalizableMessage getUserFriendlyPluralName(Locale locale) {
+ String property = "relation." + getName() + ".user-friendly-plural-name";
+ return ManagedObjectDefinitionI18NResource.getInstance().getMessage(getParentDefinition(), property, locale);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void toString(StringBuilder builder) {
+ builder.append("name=");
+ builder.append(getName());
+ builder.append(" type=set parent=");
+ builder.append(getParentDefinition().getName());
+ builder.append(" child=");
+ builder.append(getChildDefinition().getName());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initialize() throws Exception {
+ for (DefaultManagedObject<?, ?> dmo : defaultManagedObjects.values()) {
+ dmo.initialize();
+ }
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/SingletonRelationDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/SingletonRelationDefinition.java
new file mode 100644
index 0000000..d898b9e
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/SingletonRelationDefinition.java
@@ -0,0 +1,155 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+/**
+ * A managed object composite relationship definition which represents a
+ * composition of a single managed object (i.e. the managed object must be
+ * present).
+ *
+ * @param <C>
+ * The type of client managed object configuration that this relation
+ * definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this relation
+ * definition refers to.
+ */
+public final class SingletonRelationDefinition<C extends ConfigurationClient, S extends Configuration> extends
+ RelationDefinition<C, S> {
+
+ /**
+ * An interface for incrementally constructing singleton relation
+ * definitions.
+ *
+ * @param <C>
+ * The type of client managed object configuration that this
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that this
+ * relation definition refers to.
+ */
+ public static final class Builder<C extends ConfigurationClient, S extends Configuration> extends
+ AbstractBuilder<C, S, SingletonRelationDefinition<C, S>> {
+
+ // The optional default managed object associated with this
+ // singleton relation.
+ private DefaultManagedObject<? extends C, ? extends S> defaultManagedObject = null;
+
+ /**
+ * Creates a new builder which can be used to incrementally build an
+ * singleton relation definition.
+ *
+ * @param pd
+ * The parent managed object definition.
+ * @param name
+ * The name of the relation.
+ * @param cd
+ * The child managed object definition.
+ */
+ // @Checkstyle:ignore
+ public Builder(AbstractManagedObjectDefinition<?, ?> pd, String name, AbstractManagedObjectDefinition<C, S> cd) {
+ super(pd, name, cd);
+ }
+
+ /**
+ * Sets the optional default managed object associated with this
+ * singleton relation definition.
+ *
+ * @param defaultManagedObject
+ * The default managed object or <code>null</code> if there
+ * is no default managed object defined for this relation
+ * definition.
+ */
+ public void setDefaultManagedObject(DefaultManagedObject<? extends C, ? extends S> defaultManagedObject) {
+ this.defaultManagedObject = defaultManagedObject;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected SingletonRelationDefinition<C, S> buildInstance(Common<C, S> common) {
+ return new SingletonRelationDefinition<C, S>(common, defaultManagedObject);
+ }
+
+ }
+
+ // The optional default managed object associated with this
+ // singleton relation.
+ private final DefaultManagedObject<? extends C, ? extends S> defaultManagedObject;
+
+ // Private constructor.
+ private SingletonRelationDefinition(Common<C, S> common,
+ DefaultManagedObject<? extends C, ? extends S> defaultManagedObject) {
+ super(common);
+ this.defaultManagedObject = defaultManagedObject;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(RelationDefinitionVisitor<R, P> v, P p) {
+ return v.visitSingleton(this, p);
+ }
+
+ /**
+ * Gets the optional default managed object associated with this singleton
+ * relation definition.
+ *
+ * @return Returns the default managed object or <code>null</code> if there
+ * is no default managed object defined for this relation
+ * definition.
+ */
+ public DefaultManagedObject<? extends C, ? extends S> getDefaultManagedObject() {
+ return defaultManagedObject;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void toString(StringBuilder builder) {
+ builder.append("name=");
+ builder.append(getName());
+ builder.append(" type=singleton parent=");
+ builder.append(getParentDefinition().getName());
+ builder.append(" child=");
+ builder.append(getChildDefinition().getName());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initialize() throws Exception {
+ if (defaultManagedObject != null) {
+ defaultManagedObject.initialize();
+ }
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/SizePropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/SizePropertyDefinition.java
new file mode 100644
index 0000000..0ac68cb
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/SizePropertyDefinition.java
@@ -0,0 +1,349 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.util.EnumSet;
+
+/**
+ * Memory size property definition.
+ * <p>
+ * All memory size property values are represented in bytes using longs.
+ * <p>
+ * All values must be zero or positive and within the lower/upper limit
+ * constraints. Support is provided for "unlimited" memory sizes. These are
+ * represented using a negative memory size value or using the string
+ * "unlimited".
+ */
+public final class SizePropertyDefinition extends PropertyDefinition<Long> {
+
+ // String used to represent unlimited memory sizes.
+ private static final String UNLIMITED = "unlimited";
+
+ // The lower limit of the property value in bytes.
+ private final long lowerLimit;
+
+ // The optional upper limit of the property value in bytes.
+ private final Long upperLimit;
+
+ // Indicates whether this property allows the use of the "unlimited" memory
+ // size value (represented using a -1L or the string "unlimited").
+ private final boolean allowUnlimited;
+
+ /**
+ * An interface for incrementally constructing memory size property
+ * definitions.
+ */
+ public static final class Builder extends AbstractBuilder<Long, SizePropertyDefinition> {
+
+ // The lower limit of the property value in bytes.
+ private long lowerLimit = 0L;
+
+ // The optional upper limit of the property value in bytes.
+ private Long upperLimit = null;
+
+ // Indicates whether this property allows the use of the "unlimited"
+ // memory
+ // size value (represented using a -1L or the string "unlimited").
+ private boolean allowUnlimited = false;
+
+ // Private constructor
+ private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ super(d, propertyName);
+ }
+
+ /**
+ * Set the lower limit in bytes.
+ *
+ * @param lowerLimit
+ * The new lower limit (must be >= 0) in bytes.
+ * @throws IllegalArgumentException
+ * If a negative lower limit was specified, or if the lower
+ * limit is greater than the upper limit.
+ */
+ public final void setLowerLimit(long lowerLimit) {
+ if (lowerLimit < 0) {
+ throw new IllegalArgumentException("Negative lower limit");
+ }
+ if (upperLimit != null && lowerLimit > upperLimit) {
+ throw new IllegalArgumentException("Lower limit greater than upper limit");
+ }
+ this.lowerLimit = lowerLimit;
+ }
+
+ /**
+ * Set the lower limit using a string representation of the limit.
+ *
+ * @param lowerLimit
+ * The string representation of the new lower limit.
+ * @throws IllegalArgumentException
+ * If the lower limit could not be parsed, or if a negative
+ * lower limit was specified, or the lower limit is greater
+ * than the upper limit.
+ */
+ public final void setLowerLimit(String lowerLimit) {
+ setLowerLimit(SizeUnit.parseValue(lowerLimit, SizeUnit.BYTES));
+ }
+
+ /**
+ * Set the upper limit in bytes.
+ *
+ * @param upperLimit
+ * The new upper limit in bytes or <code>null</code> if there
+ * is no upper limit.
+ * @throws IllegalArgumentException
+ * If the lower limit is greater than the upper limit.
+ */
+ public final void setUpperLimit(Long upperLimit) {
+ if (upperLimit != null) {
+ if (upperLimit < 0) {
+ throw new IllegalArgumentException("Negative upper limit");
+ }
+ if (lowerLimit > upperLimit) {
+ throw new IllegalArgumentException("Lower limit greater than upper limit");
+ }
+ }
+ this.upperLimit = upperLimit;
+ }
+
+ /**
+ * Set the upper limit using a string representation of the limit.
+ *
+ * @param upperLimit
+ * The string representation of the new upper limit, or
+ * <code>null</code> if there is no upper limit.
+ * @throws IllegalArgumentException
+ * If the upper limit could not be parsed, or if the lower
+ * limit is greater than the upper limit.
+ */
+ public final void setUpperLimit(String upperLimit) {
+ if (upperLimit == null) {
+ setUpperLimit((Long) null);
+ } else {
+ setUpperLimit(SizeUnit.parseValue(upperLimit, SizeUnit.BYTES));
+ }
+ }
+
+ /**
+ * Specify whether or not this property definition will allow unlimited
+ * values (default is false).
+ *
+ * @param allowUnlimited
+ * <code>true</code> if the property will allow unlimited
+ * values, or <code>false</code> otherwise.
+ */
+ public final void setAllowUnlimited(boolean allowUnlimited) {
+ this.allowUnlimited = allowUnlimited;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected SizePropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<Long> defaultBehavior) {
+ return new SizePropertyDefinition(d, propertyName, options, adminAction, defaultBehavior, lowerLimit,
+ upperLimit, allowUnlimited);
+ }
+
+ }
+
+ /**
+ * Create an memory size property definition builder.
+ *
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param propertyName
+ * The property name.
+ * @return Returns the new integer property definition builder.
+ */
+ public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ return new Builder(d, propertyName);
+ }
+
+ // Private constructor.
+ private SizePropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<Long> defaultBehavior, Long lowerLimit, Long upperLimit, boolean allowUnlimited) {
+ super(d, Long.class, propertyName, options, adminAction, defaultBehavior);
+ this.lowerLimit = lowerLimit;
+ this.upperLimit = upperLimit;
+ this.allowUnlimited = allowUnlimited;
+ }
+
+ /**
+ * Get the lower limit in bytes.
+ *
+ * @return Returns the lower limit in bytes.
+ */
+ public long getLowerLimit() {
+ return lowerLimit;
+ }
+
+ /**
+ * Get the upper limit in bytes.
+ *
+ * @return Returns the upper limit in bytes or <code>null</code> if there is
+ * no upper limit.
+ */
+ public Long getUpperLimit() {
+ return upperLimit;
+ }
+
+ /**
+ * Determine whether this property allows unlimited memory sizes.
+ *
+ * @return Returns <code>true</code> if this this property allows unlimited
+ * memory sizes.
+ */
+ public boolean isAllowUnlimited() {
+ return allowUnlimited;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void validateValue(Long value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ if (!allowUnlimited && value < lowerLimit) {
+ throw new IllegalPropertyValueException(this, value);
+
+ // unlimited allowed
+ } else if (value >= 0 && value < lowerLimit) {
+ throw new IllegalPropertyValueException(this, value);
+ }
+
+ if ((upperLimit != null) && (value > upperLimit)) {
+ throw new IllegalPropertyValueException(this, value);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String encodeValue(Long value) {
+ Reject.ifNull(value);
+
+ // Make sure that we correctly encode negative values as "unlimited".
+ if (allowUnlimited) {
+ if (value < 0) {
+ return UNLIMITED;
+ }
+ }
+
+ // Encode the size value using the best-fit unit.
+ StringBuilder builder = new StringBuilder();
+ SizeUnit unit = SizeUnit.getBestFitUnitExact(value);
+
+ // Cast to a long to remove fractional part (which should not be there
+ // anyway as the best-fit unit should result in an exact conversion).
+ builder.append((long) unit.fromBytes(value));
+ builder.append(' ');
+ builder.append(unit.toString());
+ return builder.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Long decodeValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ // First check for the special "unlimited" value when necessary.
+ if (allowUnlimited) {
+ if (value.trim().equalsIgnoreCase(UNLIMITED)) {
+ return -1L;
+ }
+ }
+
+ // Decode the value.
+ Long i;
+ try {
+ i = SizeUnit.parseValue(value, SizeUnit.BYTES);
+ } catch (NumberFormatException e) {
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+
+ try {
+ validateValue(i, options);
+ } catch (IllegalPropertyValueException e) {
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+ return i;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
+ return v.visitSize(this, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyValueVisitor<R, P> v, Long value, P p) {
+ return v.visitSize(this, value, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void toString(StringBuilder builder) {
+ super.toString(builder);
+
+ builder.append(" lowerLimit=");
+ builder.append(lowerLimit);
+
+ if (upperLimit != null) {
+ builder.append(" upperLimit=");
+ builder.append(upperLimit);
+ }
+
+ builder.append(" allowUnlimited=");
+ builder.append(allowUnlimited);
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int compare(Long o1, Long o2) {
+ return o1.compareTo(o2);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/SizeUnit.java b/opendj-config/src/main/java/org/forgerock/opendj/config/SizeUnit.java
new file mode 100644
index 0000000..66253d2
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/SizeUnit.java
@@ -0,0 +1,352 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * This enumeration defines various memory size units.
+ */
+public enum SizeUnit {
+
+ /**
+ * A byte unit.
+ */
+ BYTES(1L, "b", "bytes"),
+
+ /**
+ * A gibi-byte unit.
+ */
+ GIBI_BYTES((long) 1024 * 1024 * 1024, "gib", "gibibytes"),
+
+ /**
+ * A giga-byte unit.
+ */
+ GIGA_BYTES((long) 1000 * 1000 * 1000, "gb", "gigabytes"),
+
+ /**
+ * A kibi-byte unit.
+ */
+ KIBI_BYTES(1024L, "kib", "kibibytes"),
+
+ /**
+ * A kilo-byte unit.
+ */
+ KILO_BYTES(1000L, "kb", "kilobytes"),
+
+ /**
+ * A mebi-byte unit.
+ */
+ MEBI_BYTES((long) 1024 * 1024, "mib", "mebibytes"),
+
+ /**
+ * A mega-byte unit.
+ */
+ MEGA_BYTES((long) 1000 * 1000, "mb", "megabytes"),
+
+ /**
+ * A tebi-byte unit.
+ */
+ TEBI_BYTES((long) 1024 * 1024 * 1024 * 1024, "tib", "tebibytes"),
+
+ /**
+ * A tera-byte unit.
+ */
+ TERA_BYTES((long) 1000 * 1000 * 1000 * 1000, "tb", "terabytes");
+
+ // A lookup table for resolving a unit from its name.
+ private static final Map<String, SizeUnit> NAME_TO_UNIT;
+ static {
+ NAME_TO_UNIT = new HashMap<String, SizeUnit>();
+
+ for (SizeUnit unit : SizeUnit.values()) {
+ NAME_TO_UNIT.put(unit.shortName, unit);
+ NAME_TO_UNIT.put(unit.longName, unit);
+ }
+ }
+
+ /**
+ * Gets the best-fit unit for the specified number of bytes. The returned
+ * unit will be able to represent the number of bytes using a decimal number
+ * comprising of an integer part which is greater than zero. Bigger units
+ * are chosen in preference to smaller units and binary units are only
+ * returned if they are an exact fit. If the number of bytes is zero then
+ * the {@link #BYTES} unit is always returned. For example:
+ *
+ * <pre>
+ * getBestFitUnit(0) // BYTES
+ * getBestFitUnit(999) // BYTES
+ * getBestFitUnit(1000) // KILO_BYTES
+ * getBestFitUnit(1024) // KIBI_BYTES
+ * getBestFitUnit(1025) // KILO_BYTES
+ * getBestFitUnit(999999) // KILO_BYTES
+ * getBestFitUnit(1000000) // MEGA_BYTES
+ * </pre>
+ *
+ * @param bytes
+ * The number of bytes.
+ * @return Returns the best fit unit.
+ * @throws IllegalArgumentException
+ * If <code>bytes</code> is negative.
+ * @see #getBestFitUnitExact(long)
+ */
+ public static SizeUnit getBestFitUnit(long bytes) {
+ if (bytes < 0) {
+ throw new IllegalArgumentException("negative number of bytes: " + bytes);
+ } else if (bytes == 0) {
+ // Always use bytes for zero values.
+ return BYTES;
+ } else {
+ // Determine best fit: prefer non-binary units unless binary
+ // fits exactly.
+ SizeUnit[] nonBinary = new SizeUnit[] { TERA_BYTES, GIGA_BYTES, MEGA_BYTES, KILO_BYTES };
+ SizeUnit[] binary = new SizeUnit[] { TEBI_BYTES, GIBI_BYTES, MEBI_BYTES, KIBI_BYTES };
+
+ for (int i = 0; i < nonBinary.length; i++) {
+ if ((bytes % binary[i].getSize()) == 0) {
+ return binary[i];
+ } else if ((bytes / nonBinary[i].getSize()) > 0) {
+ return nonBinary[i];
+ }
+ }
+
+ return BYTES;
+ }
+ }
+
+ /**
+ * Gets the best-fit unit for the specified number of bytes which can
+ * represent the provided value using an integral value. Bigger units are
+ * chosen in preference to smaller units. If the number of bytes is zero
+ * then the {@link #BYTES} unit is always returned. For example:
+ *
+ * <pre>
+ * getBestFitUnitExact(0) // BYTES
+ * getBestFitUnitExact(999) // BYTES
+ * getBestFitUnitExact(1000) // KILO_BYTES
+ * getBestFitUnitExact(1024) // KIBI_BYTES
+ * getBestFitUnitExact(1025) // BYTES
+ * getBestFitUnitExact(999999) // BYTES
+ * getBestFitUnitExact(1000000) // MEGA_BYTES
+ * </pre>
+ *
+ * @param bytes
+ * The number of bytes.
+ * @return Returns the best fit unit can represent the provided value using
+ * an integral value.
+ * @throws IllegalArgumentException
+ * If <code>bytes</code> is negative.
+ * @see #getBestFitUnit(long)
+ */
+ public static SizeUnit getBestFitUnitExact(long bytes) {
+ if (bytes < 0) {
+ throw new IllegalArgumentException("negative number of bytes: " + bytes);
+ } else if (bytes == 0) {
+ // Always use bytes for zero values.
+ return BYTES;
+ } else {
+ // Determine best fit.
+ SizeUnit[] units =
+ new SizeUnit[] { TEBI_BYTES, TERA_BYTES, GIBI_BYTES, GIGA_BYTES, MEBI_BYTES, MEGA_BYTES, KIBI_BYTES,
+ KILO_BYTES };
+
+ for (SizeUnit unit : units) {
+ if ((bytes % unit.getSize()) == 0) {
+ return unit;
+ }
+ }
+
+ return BYTES;
+ }
+ }
+
+ /**
+ * Get the unit corresponding to the provided unit name.
+ *
+ * @param s
+ * The name of the unit. Can be the abbreviated or long name and
+ * can contain white space and mixed case characters.
+ * @return Returns the unit corresponding to the provided unit name.
+ * @throws IllegalArgumentException
+ * If the provided name did not correspond to a known memory
+ * size unit.
+ */
+ public static SizeUnit getUnit(String s) {
+ SizeUnit unit = NAME_TO_UNIT.get(s.trim().toLowerCase());
+ if (unit == null) {
+ throw new IllegalArgumentException("Illegal memory size unit \"" + s + "\"");
+ }
+ return unit;
+ }
+
+ /**
+ * Parse the provided size string and return its equivalent size in bytes.
+ * The size string must specify the unit e.g. "10kb".
+ *
+ * @param s
+ * The size string to be parsed.
+ * @return Returns the parsed duration in bytes.
+ * @throws NumberFormatException
+ * If the provided size string could not be parsed.
+ */
+ public static long parseValue(String s) {
+ return parseValue(s, null);
+ }
+
+ /**
+ * Parse the provided size string and return its equivalent size in bytes.
+ *
+ * @param s
+ * The size string to be parsed.
+ * @param defaultUnit
+ * The default unit to use if there is no unit specified in the
+ * size string, or <code>null</code> if the string must always
+ * contain a unit.
+ * @return Returns the parsed size in bytes.
+ * @throws NumberFormatException
+ * If the provided size string could not be parsed.
+ */
+ public static long parseValue(String s, SizeUnit defaultUnit) {
+ // Value must be a floating point number followed by a unit.
+ Pattern p = Pattern.compile("^\\s*(\\d+(\\.\\d+)?)\\s*(\\w+)?\\s*$");
+ Matcher m = p.matcher(s);
+
+ if (!m.matches()) {
+ throw new NumberFormatException("Invalid size value \"" + s + "\"");
+ }
+
+ // Group 1 is the float.
+ double d;
+ try {
+ d = Double.valueOf(m.group(1));
+ } catch (NumberFormatException e) {
+ throw new NumberFormatException("Invalid size value \"" + s + "\"");
+ }
+
+ // Group 3 is the unit.
+ String unitString = m.group(3);
+ SizeUnit unit;
+ if (unitString == null) {
+ if (defaultUnit == null) {
+ throw new NumberFormatException("Invalid size value \"" + s + "\"");
+ } else {
+ unit = defaultUnit;
+ }
+ } else {
+ try {
+ unit = getUnit(unitString);
+ } catch (IllegalArgumentException e) {
+ throw new NumberFormatException("Invalid size value \"" + s + "\"");
+ }
+ }
+
+ return unit.toBytes(d);
+ }
+
+ // The long name of the unit.
+ private final String longName;
+
+ // The abbreviation of the unit.
+ private final String shortName;
+
+ // The size of the unit in bytes.
+ private final long sz;
+
+ // Private constructor.
+ private SizeUnit(long sz, String shortName, String longName) {
+ this.sz = sz;
+ this.shortName = shortName;
+ this.longName = longName;
+ }
+
+ /**
+ * Converts the specified size in bytes to this unit.
+ *
+ * @param amount
+ * The size in bytes.
+ * @return Returns size in this unit.
+ */
+ public double fromBytes(long amount) {
+ return ((double) amount / sz);
+ }
+
+ /**
+ * Get the long name of this unit.
+ *
+ * @return Returns the long name of this unit.
+ */
+ public String getLongName() {
+ return longName;
+ }
+
+ /**
+ * Get the abbreviated name of this unit.
+ *
+ * @return Returns the abbreviated name of this unit.
+ */
+ public String getShortName() {
+ return shortName;
+ }
+
+ /**
+ * Get the number of bytes that this unit represents.
+ *
+ * @return Returns the number of bytes that this unit represents.
+ */
+ public long getSize() {
+ return sz;
+ }
+
+ /**
+ * Converts the specified size in this unit to bytes.
+ *
+ * @param amount
+ * The size as a quantity of this unit.
+ * @return Returns the number of bytes that the size represents.
+ * @throws NumberFormatException
+ * If the provided size exceeded long.MAX_VALUE.
+ */
+ public long toBytes(double amount) {
+ double value = sz * amount;
+ if (value > Long.MAX_VALUE) {
+ throw new NumberFormatException("number too big (exceeded long.MAX_VALUE");
+ }
+ return (long) (value);
+ }
+
+ /**
+ * {@inheritDoc}
+ * <p>
+ * This implementation returns the abbreviated name of this size unit.
+ */
+ @Override
+ public String toString() {
+ return shortName;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/StringPropertyDefinition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/StringPropertyDefinition.java
new file mode 100644
index 0000000..1282d74
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/StringPropertyDefinition.java
@@ -0,0 +1,282 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.util.EnumSet;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * String property definition.
+ */
+public final class StringPropertyDefinition extends PropertyDefinition<String> {
+
+ /**
+ * An interface for incrementally constructing string property definitions.
+ */
+ public static final class Builder extends AbstractBuilder<String, StringPropertyDefinition> {
+
+ // Flag indicating whether values of this property are
+ // case-insensitive.
+ private boolean isCaseInsensitive = true;
+
+ // Optional pattern which values of this property must match.
+ private Pattern pattern = null;
+
+ // Pattern usage which provides a user-friendly summary of the
+ // pattern if present.
+ private String patternUsage = null;
+
+ // Private constructor
+ private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ super(d, propertyName);
+ }
+
+ /**
+ * Set a flag indicating whether values of this property are
+ * case-insensitive.
+ *
+ * @param value
+ * <code>true</code> if values are case-insensitive, or
+ * <code>false</code> otherwise.
+ */
+ public final void setCaseInsensitive(boolean value) {
+ isCaseInsensitive = value;
+ }
+
+ /**
+ * Set the regular expression pattern which values of this property must
+ * match. By default there is no pattern defined.
+ *
+ * @param pattern
+ * The regular expression pattern string, or
+ * <code>null</code> if there is no pattern.
+ * @param patternUsage
+ * A user-friendly usage string representing the pattern
+ * which can be used in error messages and help (e.g. for
+ * patterns which match a host/port combination, the usage
+ * string "HOST:PORT" would be appropriate).
+ * @throws PatternSyntaxException
+ * If the provided regular expression pattern has an invalid
+ * syntax.
+ */
+ public final void setPattern(String pattern, String patternUsage) {
+ if (pattern == null) {
+ this.pattern = null;
+ this.patternUsage = null;
+ } else {
+ this.pattern = Pattern.compile(pattern);
+ this.patternUsage = patternUsage;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected StringPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
+ String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<String> defaultBehavior) {
+ return new StringPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior,
+ isCaseInsensitive, pattern, patternUsage);
+ }
+
+ }
+
+ /**
+ * Create a string property definition builder.
+ *
+ * @param d
+ * The managed object definition associated with this property
+ * definition.
+ * @param propertyName
+ * The property name.
+ * @return Returns the new string property definition builder.
+ */
+ public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ return new Builder(d, propertyName);
+ }
+
+ // Flag indicating whether values of this property are
+ // case-insensitive.
+ private final boolean isCaseInsensitive;
+
+ // Optional pattern which values of this property must match.
+ private final Pattern pattern;
+
+ // Pattern usage which provides a user-friendly summary of the
+ // pattern if present.
+ private final String patternUsage;
+
+ // Private constructor.
+ private StringPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
+ EnumSet<PropertyOption> options, AdministratorAction adminAction,
+ DefaultBehaviorProvider<String> defaultBehavior, boolean isCaseInsensitive, Pattern pattern,
+ String patternUsage) {
+ super(d, String.class, propertyName, options, adminAction, defaultBehavior);
+ this.isCaseInsensitive = isCaseInsensitive;
+ this.pattern = pattern;
+ this.patternUsage = patternUsage;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
+ return v.visitString(this, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <R, P> R accept(PropertyValueVisitor<R, P> v, String value, P p) {
+ return v.visitString(this, value, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String decodeValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ try {
+ validateValue(value, options);
+ } catch (IllegalPropertyValueException e) {
+ throw new IllegalPropertyValueStringException(this, value);
+ }
+
+ return value;
+ }
+
+ /**
+ * Gets the optional regular expression pattern which values of this
+ * property must match.
+ *
+ * @return Returns the optional regular expression pattern which values of
+ * this property must match, or <code>null</code> if there is no
+ * pattern.
+ */
+ public Pattern getPattern() {
+ return pattern;
+ }
+
+ /**
+ * Gets the pattern synopsis of this string property definition in the
+ * default locale.
+ *
+ * @return Returns the pattern synopsis of this string property definition
+ * in the default locale, or <code>null</code> if there is no
+ * pattern synopsis (which is the case when there is no pattern
+ * matching defined for this string property definition).
+ */
+ public LocalizableMessage getPatternSynopsis() {
+ return getPatternSynopsis(Locale.getDefault());
+ }
+
+ /**
+ * Gets the optional pattern synopsis of this string property definition in
+ * the specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the pattern synopsis of this string property definition
+ * in the specified locale, or <code>null</code> if there is no
+ * pattern synopsis (which is the case when there is no pattern
+ * matching defined for this string property definition).
+ */
+ public LocalizableMessage getPatternSynopsis(Locale locale) {
+ ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
+ String property = "property." + getName() + ".syntax.string.pattern.synopsis";
+ try {
+ return resource.getMessage(getManagedObjectDefinition(), property, locale);
+ } catch (MissingResourceException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Gets a user-friendly usage string representing the pattern which can be
+ * used in error messages and help (e.g. for patterns which match a
+ * host/port combination, the usage string "HOST:PORT" would be
+ * appropriate).
+ *
+ * @return Returns the user-friendly pattern usage string, or
+ * <code>null</code> if there is no pattern.
+ */
+ public String getPatternUsage() {
+ return patternUsage;
+ }
+
+ /**
+ * Query whether values of this property are case-insensitive.
+ *
+ * @return Returns <code>true</code> if values are case-insensitive, or
+ * <code>false</code> otherwise.
+ */
+ public boolean isCaseInsensitive() {
+ return isCaseInsensitive;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String normalizeValue(String value) {
+ Reject.ifNull(value);
+
+ if (isCaseInsensitive()) {
+ return value.trim().toLowerCase();
+ } else {
+ return value.trim();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void validateValue(String value, PropertyDefinitionsOptions options) {
+ Reject.ifNull(value);
+
+ if (pattern != null) {
+ Matcher matcher = pattern.matcher(value);
+ if (!matcher.matches()) {
+ throw new IllegalPropertyValueException(this, value);
+ }
+ }
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/Tag.java b/opendj-config/src/main/java/org/forgerock/opendj/config/Tag.java
new file mode 100644
index 0000000..271c408
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/Tag.java
@@ -0,0 +1,175 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import org.forgerock.util.Reject;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.MissingResourceException;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+
+/**
+ * An interface for querying the properties of a tag.
+ * <p>
+ * Tags are used to group related managed objects together into categories.
+ */
+public final class Tag implements Comparable<Tag> {
+
+ /** All the tags. */
+ private static final Map<String, Tag> TAGS = new HashMap<String, Tag>();
+
+ /**
+ * Defines a new tag with the specified name.
+ *
+ * @param name
+ * The name of the new tag.
+ */
+ public static void define(String name) {
+ Tag tag = new Tag(name);
+
+ // Register the tag.
+ TAGS.put(name, tag);
+ }
+
+ /**
+ * Returns the tag associated with the specified name.
+ *
+ * @param name
+ * The name of the tag.
+ * @return Returns the tag associated with the specified name.
+ * @throws IllegalArgumentException
+ * If the tag name was not recognized.
+ */
+ public static Tag valueOf(String name) {
+ Reject.ifNull(name);
+
+ // Hack to force initialization of the tag definitions.
+ RootCfgDefn.getInstance();
+
+ Tag tag = TAGS.get(name.toLowerCase());
+
+ if (tag == null) {
+ throw new IllegalArgumentException("Unknown tag \"" + name + "\"");
+ }
+
+ return tag;
+ }
+
+ /**
+ * Returns an unmodifiable collection view of the set of registered tags.
+ *
+ * @return Returns an unmodifiable collection view of the set of registered
+ * tags.
+ */
+ public static Collection<Tag> values() {
+ // Hack to force initialization of the tag definitions.
+ RootCfgDefn.getInstance();
+
+ return Collections.unmodifiableCollection(TAGS.values());
+ }
+
+ /** The name of the tag. */
+ private final String name;
+
+ /** Private constructor. */
+ private Tag(String name) {
+ this.name = name;
+ }
+
+ /** {@inheritDoc} */
+ public final int compareTo(Tag o) {
+ return name.compareTo(o.name);
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public final boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+
+ if (obj instanceof Tag) {
+ Tag other = (Tag) obj;
+ return other.name.equals(this.name);
+ }
+
+ return false;
+ }
+
+ /**
+ * Gets the name of this tag.
+ *
+ * @return Returns the name of this tag.
+ */
+ public final String getName() {
+ return name;
+ }
+
+ /**
+ * Gets the synopsis of this tag in the default locale.
+ *
+ * @return Returns the synopsis of this tag in the default locale.
+ */
+ public final LocalizableMessage getSynopsis() {
+ return getSynopsis(Locale.getDefault());
+ }
+
+ /**
+ * Gets the synopsis of this tag in the specified locale.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the synopsis of this tag in the specified locale.
+ */
+ public final LocalizableMessage getSynopsis(Locale locale) {
+ ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
+ String property = "tag." + name + ".synopsis";
+ try {
+ return resource.getMessage(RootCfgDefn.getInstance(), property, locale);
+ } catch (MissingResourceException e) {
+ return null;
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public final int hashCode() {
+ return name.hashCode();
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public final String toString() {
+ return name;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/TopCfgDefn.java b/opendj-config/src/main/java/org/forgerock/opendj/config/TopCfgDefn.java
new file mode 100644
index 0000000..a9d65cf
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/TopCfgDefn.java
@@ -0,0 +1,64 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+/**
+ * Configuration definition <code>TopCfgDefn</code> is the root of the
+ * configuration definition hierarchy. Every configuration has
+ * <code>TopCfgDefn</code> as a superclass.
+ * <p>
+ * The <code>TopCfgDefn</code> has no properties or relations. However, it can
+ * be used to determine all the configuration definitions currently available to
+ * the administration framework using the {@link #getAllChildren()}.
+ * <p>
+ * <b>NOTE:</b> it is not possible to retrieve I18N related information or
+ * profile information for this managed object definition. In particular, calls
+ * to the methods {@link #getSynopsis()}, {@link #getDescription()},
+ * {@link #getUserFriendlyName()}, and {@link #getUserFriendlyPluralName()} will
+ * not work.
+ */
+public final class TopCfgDefn extends AbstractManagedObjectDefinition<ConfigurationClient, Configuration> {
+
+ // The singleton configuration definition instance.
+ private static final TopCfgDefn INSTANCE = new TopCfgDefn();
+
+ /**
+ * Get the Top configuration definition singleton.
+ *
+ * @return Returns the Top configuration definition singleton.
+ */
+ public static TopCfgDefn getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Private constructor.
+ */
+ private TopCfgDefn() {
+ super("top", null);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/UndefinedDefaultBehaviorProvider.java b/opendj-config/src/main/java/org/forgerock/opendj/config/UndefinedDefaultBehaviorProvider.java
new file mode 100644
index 0000000..31bdfb9
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/UndefinedDefaultBehaviorProvider.java
@@ -0,0 +1,53 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+/**
+ * A default behavior provider which indicates undefined behavior. It should be
+ * used by properties which have no default values or behavior as such. For
+ * example, a description property, when left unset, has no default value and no
+ * side-effects.
+ *
+ * @param <T>
+ * The type of values represented by this provider.
+ */
+public final class UndefinedDefaultBehaviorProvider<T> extends DefaultBehaviorProvider<T> {
+
+ /**
+ * Create an undefined default behavior provider.
+ */
+ public UndefinedDefaultBehaviorProvider() {
+ // No implementation required.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p) {
+ return v.visitUndefined(this, p);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/UnknownPropertyDefinitionException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/UnknownPropertyDefinitionException.java
new file mode 100644
index 0000000..47914de
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/UnknownPropertyDefinitionException.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+/**
+ * Indicates that an unknown type of property definition was encountered. This
+ * can occur as the management prototype develops and new kinds of property
+ * definitions are added.
+ */
+public final class UnknownPropertyDefinitionException extends PropertyException {
+
+ // Generated serialization ID.
+ private static final long serialVersionUID = 7042646409131322385L;
+
+ // The visitor parameter if there was one.
+ private Object parameter;
+
+ /**
+ * Creates a new unknown property definition exception.
+ *
+ * @param pd
+ * The unknown property definition.
+ * @param p
+ * The visitor parameter if there was one.
+ */
+ public UnknownPropertyDefinitionException(PropertyDefinition<?> pd, Object p) {
+ super(pd, ERR_UNKNOWN_PROPERTY_DEFINITION_EXCEPTION.get(pd.getName(), pd.getClass().getName()));
+ this.parameter = p;
+ }
+
+ /**
+ * Get the visitor parameter if there was one.
+ *
+ * @return Returns the visitor parameter if there was one.
+ */
+ public Object getParameter() {
+ return parameter;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/AdminClientException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/AdminClientException.java
new file mode 100644
index 0000000..1f6e0bb
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/AdminClientException.java
@@ -0,0 +1,68 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.AdminException;
+
+/**
+ * Administration client exceptions represent non-operational problems which
+ * occur whilst interacting with the administration framework. They provide
+ * clients with a transport independent interface for handling transport related
+ * exceptions.
+ * <p>
+ * Client exceptions represent communications problems, security problems, and
+ * service related problems.
+ */
+public abstract class AdminClientException extends AdminException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = 4044747533980824456L;
+
+ /**
+ * Create an administration client exception with a message and cause.
+ *
+ * @param message
+ * The message.
+ * @param cause
+ * The cause.
+ */
+ protected AdminClientException(LocalizableMessage message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Create an administration client exception with a message.
+ *
+ * @param message
+ * The message.
+ */
+ protected AdminClientException(LocalizableMessage message) {
+ super(message);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/AdminSecurityException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/AdminSecurityException.java
new file mode 100644
index 0000000..5e4479c
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/AdminSecurityException.java
@@ -0,0 +1,64 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config.client;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * This exception is thrown when a security related problem occurs whilst
+ * interacting with the Directory Server. These fall broadly into two
+ * categories: authentication problems and authorization problems.
+ */
+public abstract class AdminSecurityException extends AdminClientException {
+
+ /**
+ * Fake serialization ID.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create a security exception with a message and cause.
+ *
+ * @param message
+ * The message.
+ * @param cause
+ * The cause.
+ */
+ protected AdminSecurityException(LocalizableMessage message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Create a security exception with a message.
+ *
+ * @param message
+ * The message.
+ */
+ protected AdminSecurityException(LocalizableMessage message) {
+ super(message);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/AuthenticationException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/AuthenticationException.java
new file mode 100644
index 0000000..b3cb37f
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/AuthenticationException.java
@@ -0,0 +1,82 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+/**
+ * This exception is thrown when an authentication error occurs while connecting
+ * to the Directory Server. An authentication error can happen, for example,
+ * when the client credentials are invalid.
+ */
+public class AuthenticationException extends AdminSecurityException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = 3544797197747686958L;
+
+ /**
+ * Creates an authentication exception with a default message.
+ */
+ public AuthenticationException() {
+ super(ERR_AUTHENTICATION_EXCEPTION_DEFAULT.get());
+ }
+
+ /**
+ * Create an authentication exception with a cause and a default message.
+ *
+ * @param cause
+ * The cause.
+ */
+ public AuthenticationException(Throwable cause) {
+ super(ERR_AUTHENTICATION_EXCEPTION_DEFAULT.get(), cause);
+ }
+
+ /**
+ * Create an authentication exception with a message and cause.
+ *
+ * @param message
+ * The message.
+ * @param cause
+ * The cause.
+ */
+ public AuthenticationException(LocalizableMessage message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Create an authentication exception with a message.
+ *
+ * @param message
+ * The message.
+ */
+ public AuthenticationException(LocalizableMessage message) {
+ super(message);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/AuthenticationNotSupportedException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/AuthenticationNotSupportedException.java
new file mode 100644
index 0000000..6d77585
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/AuthenticationNotSupportedException.java
@@ -0,0 +1,83 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+/**
+ * This exception is thrown when the particular flavor of authentication
+ * requested is not supported by the Directory Server.
+ */
+public class AuthenticationNotSupportedException extends AdminSecurityException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = 7387834052676291793L;
+
+ /**
+ * Creates an authentication not supported exception with a default message.
+ */
+ public AuthenticationNotSupportedException() {
+ super(ERR_AUTHENTICATION_NOT_SUPPORTED_EXCEPTION_DEFAULT.get());
+ }
+
+ /**
+ * Creates an authentication not supported exception with a cause and a
+ * default message.
+ *
+ * @param cause
+ * The cause.
+ */
+ public AuthenticationNotSupportedException(Throwable cause) {
+ super(ERR_AUTHENTICATION_NOT_SUPPORTED_EXCEPTION_DEFAULT.get(), cause);
+ }
+
+ /**
+ * Create an authentication not supported exception with a message and
+ * cause.
+ *
+ * @param message
+ * The message.
+ * @param cause
+ * The cause.
+ */
+ public AuthenticationNotSupportedException(LocalizableMessage message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Create an authentication not supported exception with a message.
+ *
+ * @param message
+ * The message.
+ */
+ public AuthenticationNotSupportedException(LocalizableMessage message) {
+ super(message);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/ClientConstraintHandler.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ClientConstraintHandler.java
new file mode 100644
index 0000000..3dc2e11
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ClientConstraintHandler.java
@@ -0,0 +1,133 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client;
+
+import java.util.Collection;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.ldap.ErrorResultException;
+
+/**
+ * An interface for performing client-side constraint validation.
+ * <p>
+ * Constraints are evaluated immediately before the client performs a write
+ * operation. If one or more constraints fails, the write operation is refused
+ * and fails with an {@link OperationRejectedException}.
+ * <p>
+ * A client constraint handler must override at least one of the provided
+ * methods.
+ *
+ * @see org.forgerock.opendj.config.Constraint
+ */
+public abstract class ClientConstraintHandler {
+
+ /**
+ * Creates a new client constraint handler.
+ */
+ protected ClientConstraintHandler() {
+ // No implementation required.
+ }
+
+ /**
+ * Determines whether or not the newly created managed object which is about
+ * to be added to the server configuration satisfies this constraint.
+ * <p>
+ * If the constraint is not satisfied, the implementation must return
+ * <code>false</code> and add a message describing why the constraint was
+ * not satisfied.
+ * <p>
+ * The default implementation is to return <code>true</code>.
+ *
+ * @param context
+ * The management context.
+ * @param managedObject
+ * The new managed object.
+ * @param unacceptableReasons
+ * A list of messages to which error messages should be added.
+ * @return Returns <code>true</code> if this constraint is satisfied, or
+ * <code>false</code> if it is not.
+ * @throws ErrorResultException
+ * If an error occurs.
+ */
+ public boolean isAddAcceptable(ManagementContext context, ManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
+ return true;
+ }
+
+ /**
+ * Determines whether or not the changes to an existing managed object which
+ * are about to be committed to the server configuration satisfies this
+ * constraint.
+ * <p>
+ * If the constraint is not satisfied, the implementation must return
+ * <code>false</code> and add a message describing why the constraint was
+ * not satisfied.
+ * <p>
+ * The default implementation is to return <code>true</code>.
+ *
+ * @param context
+ * The management context.
+ * @param managedObject
+ * The modified managed object.
+ * @param unacceptableReasons
+ * A list of messages to which error messages should be added.
+ * @return Returns <code>true</code> if this modify is satisfied, or
+ * <code>false</code> if it is not.
+ * @throws ErrorResultException
+ * If an error occurs.
+ */
+ public boolean isModifyAcceptable(ManagementContext context, ManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
+ return true;
+ }
+
+ /**
+ * Determines whether or not the existing managed object which is about to
+ * be deleted from the server configuration satisfies this constraint.
+ * <p>
+ * If the constraint is not satisfied, the implementation must return
+ * <code>false</code> and add a message describing why the constraint was
+ * not satisfied.
+ * <p>
+ * The default implementation is to return <code>true</code>.
+ *
+ * @param context
+ * The management context.
+ * @param path
+ * The path of the managed object which is about to be deleted.
+ * @param unacceptableReasons
+ * A list of messages to which error messages should be added.
+ * @return Returns <code>true</code> if this constraint is satisfied, or
+ * <code>false</code> if it is not.
+ * @throws ErrorResultException
+ * If an error occurs.
+ */
+ public boolean isDeleteAcceptable(ManagementContext context, ManagedObjectPath<?, ?> path,
+ Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
+ return true;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/ConcurrentModificationException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ConcurrentModificationException.java
new file mode 100644
index 0000000..98a0b28
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ConcurrentModificationException.java
@@ -0,0 +1,84 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.OperationsException;
+
+/**
+ * This exception is thrown when a critical concurrent modification is detected
+ * by the client. This may be caused by another client application removing a
+ * managed object whilst it is being managed.
+ */
+public class ConcurrentModificationException extends OperationsException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = -1467024486347612820L;
+
+ /**
+ * Create a concurrent modification exception with a default message.
+ */
+ public ConcurrentModificationException() {
+ super(ERR_CONCURRENT_MODIFICATION_EXCEPTION_DEFAULT.get());
+ }
+
+ /**
+ * Create a concurrent modification exception with a cause and a default
+ * message.
+ *
+ * @param cause
+ * The cause.
+ */
+ public ConcurrentModificationException(Throwable cause) {
+ super(ERR_CONCURRENT_MODIFICATION_EXCEPTION_DEFAULT.get(), cause);
+ }
+
+ /**
+ * Create a concurrent modification exception with a message and cause.
+ *
+ * @param message
+ * The message.
+ * @param cause
+ * The cause.
+ */
+ public ConcurrentModificationException(LocalizableMessage message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Create a concurrent modification exception with a message.
+ *
+ * @param message
+ * The message.
+ */
+ public ConcurrentModificationException(LocalizableMessage message) {
+ super(message);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/IllegalManagedObjectNameException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/IllegalManagedObjectNameException.java
new file mode 100644
index 0000000..6027109
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/IllegalManagedObjectNameException.java
@@ -0,0 +1,126 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.OperationsException;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyDefinitionUsageBuilder;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+
+/**
+ * Thrown when an attempt is made to create a new managed object with an illegal
+ * name.
+ * <p>
+ * This exception can occur when a new managed object is given a name which is
+ * either an empty string, a string containing just white-spaces, or a string
+ * which is invalid according to the managed object's naming property (if it has
+ * one).
+ */
+public class IllegalManagedObjectNameException extends OperationsException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = 7491748228684293291L;
+
+ /** Create the message. */
+ private static LocalizableMessage createMessage(String illegalName, PropertyDefinition<?> namingPropertyDefinition,
+ PropertyDefinitionsOptions options) {
+ if (illegalName.length() == 0) {
+ return ERR_ILLEGAL_MANAGED_OBJECT_NAME_EXCEPTION_EMPTY.get();
+ } else if (illegalName.trim().length() == 0) {
+ return ERR_ILLEGAL_MANAGED_OBJECT_NAME_EXCEPTION_BLANK.get();
+ } else if (namingPropertyDefinition != null) {
+ try {
+ namingPropertyDefinition.decodeValue(illegalName, options);
+ } catch (IllegalPropertyValueStringException e) {
+ PropertyDefinitionUsageBuilder builder = new PropertyDefinitionUsageBuilder(true);
+ return ERR_ILLEGAL_MANAGED_OBJECT_NAME_EXCEPTION_SYNTAX.get(illegalName,
+ namingPropertyDefinition.getName(), builder.getUsage(namingPropertyDefinition));
+ }
+ }
+
+ return ERR_ILLEGAL_MANAGED_OBJECT_NAME_EXCEPTION_OTHER.get(illegalName);
+ }
+
+ /** The illegal name. */
+ private final String illegalName;
+
+ /** The naming property definition if applicable. */
+ private final PropertyDefinition<?> namingPropertyDefinition;
+
+ /**
+ * Create a new illegal name exception and no naming property definition.
+ *
+ * @param illegalName
+ * The illegal managed object name.
+ */
+ public IllegalManagedObjectNameException(String illegalName) {
+ this(illegalName, null, null);
+ }
+
+ /**
+ * Create a new illegal name exception and a naming property definition.
+ *
+ * @param illegalName
+ * The illegal managed object name.
+ * @param namingPropertyDefinition
+ * The naming property definition.
+ * @param options
+ * Options to decode property definition values.
+ */
+ public IllegalManagedObjectNameException(String illegalName, PropertyDefinition<?> namingPropertyDefinition,
+ PropertyDefinitionsOptions options) {
+ super(createMessage(illegalName, namingPropertyDefinition, options));
+
+ this.illegalName = illegalName;
+ this.namingPropertyDefinition = namingPropertyDefinition;
+ }
+
+ /**
+ * Get the illegal managed object name.
+ *
+ * @return Returns the illegal managed object name.
+ */
+ public String getIllegalName() {
+ return illegalName;
+ }
+
+ /**
+ * Get the naming property definition if applicable.
+ *
+ * @return Returns naming property definition, or <code>null</code> if none
+ * was specified.
+ */
+ public PropertyDefinition<?> getNamingPropertyDefinition() {
+ return namingPropertyDefinition;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/ManagedObject.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ManagedObject.java
new file mode 100644
index 0000000..3762a79
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ManagedObject.java
@@ -0,0 +1,738 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config.client;
+
+import java.util.Collection;
+import java.util.SortedSet;
+
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.ConfigurationClient;
+import org.forgerock.opendj.config.DefaultBehaviorException;
+import org.forgerock.opendj.config.DefinitionDecodingException;
+import org.forgerock.opendj.config.InstantiableRelationDefinition;
+import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.ManagedObjectNotFoundException;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.OptionalRelationDefinition;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyIsMandatoryException;
+import org.forgerock.opendj.config.PropertyIsReadOnlyException;
+import org.forgerock.opendj.config.PropertyIsSingleValuedException;
+import org.forgerock.opendj.config.PropertyProvider;
+import org.forgerock.opendj.config.SetRelationDefinition;
+import org.forgerock.opendj.config.SingletonRelationDefinition;
+import org.forgerock.opendj.ldap.ErrorResultException;
+
+/**
+ * A generic interface for accessing client-side managed objects.
+ * <p>
+ * A managed object comprises of zero or more properties. A property has
+ * associated with it three sets of property value(s). These are:
+ * <ul>
+ * <li><i>default value(s)</i> - these value(s) represent the default behavior
+ * for the property when it has no active values. When a property inherits its
+ * default value(s) from elsewhere (i.e. a property in another managed object),
+ * the default value(s) represent the active value(s) of the inherited property
+ * at the time the managed object was retrieved
+ * <li><i>active value(s)</i> - these value(s) represent the state of the
+ * property at the time the managed object was retrieved
+ * <li><i>pending value(s)</i> - these value(s) represent any modifications made
+ * to the property's value(s) since the managed object object was retrieved and
+ * before the changes have been committed using the {@link #commit()} method,
+ * the pending values can be empty indicating that the property should be
+ * modified back to its default values.
+ * </ul>
+ * In addition, a property has an <i>effective state</i> defined by its
+ * <i>effective values</i> which are derived by evaluating the following rules
+ * in the order presented:
+ * <ul>
+ * <li>the <i>pending values</i> if defined and non-empty
+ * <li>or, the <i>default values</i> if the pending values are defined but are
+ * empty
+ * <li>or, the <i>active values</i> if defined and non-empty
+ * <li>or, the <i>default values</i> if there are no active values
+ * <li>or, an empty set of values, if there are no default values.
+ * </ul>
+ *
+ * @param <T>
+ * The type of client configuration represented by the client managed
+ * object.
+ */
+public interface ManagedObject<T extends ConfigurationClient> extends PropertyProvider {
+
+ /**
+ * Adds this managed object to the server or commits any changes made to it
+ * depending on whether or not the managed object already exists on the
+ * server. Pending property values will be committed to the managed object.
+ * If successful, the pending values will become active values.
+ * <p>
+ * See the class description for more information regarding pending and
+ * active values.
+ *
+ * @throws ManagedObjectAlreadyExistsException
+ * If the managed object cannot be added to the server because
+ * it already exists.
+ * @throws MissingMandatoryPropertiesException
+ * If the managed object contains some mandatory properties
+ * which have been left undefined.
+ * @throws ConcurrentModificationException
+ * If the managed object is being added to the server but its
+ * parent has been removed by another client, or if this managed
+ * object is being modified but it has been removed from the
+ * server by another client.
+ * @throws OperationRejectedException
+ * If this managed object cannot be added or modified due to
+ * some client-side or server-side constraint which cannot be
+ * satisfied.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ void commit() throws ManagedObjectAlreadyExistsException, MissingMandatoryPropertiesException,
+ ConcurrentModificationException, OperationRejectedException, ErrorResultException;
+
+ /**
+ * Determines whether or not this managed object has been modified since it
+ * was constructed. In other words, whether or not the set of pending values
+ * differs from the set of active values.
+ *
+ * @return Returns <code>true</code> if this managed object has been
+ * modified since it was constructed.
+ */
+ boolean isModified();
+
+ /**
+ * Creates a new child managed object bound to the specified instantiable
+ * relation. The new managed object will initially not contain any property
+ * values (including mandatory properties). Once the managed object has been
+ * configured it can be added to the server using the {@link #commit()}
+ * method.
+ *
+ * @param <C>
+ * The expected type of the child managed object configuration
+ * client.
+ * @param <S>
+ * The expected type of the child managed object server
+ * configuration.
+ * @param <C1>
+ * The actual type of the added managed object configuration
+ * client.
+ * @param r
+ * The instantiable relation definition.
+ * @param d
+ * The definition of the managed object to be created.
+ * @param name
+ * The name of the child managed object.
+ * @param exceptions
+ * A collection in which to place any
+ * {@link DefaultBehaviorException}s that occurred whilst
+ * attempting to determine the managed object's default values.
+ * @return Returns a new child managed object bound to the specified
+ * instantiable relation.
+ * @throws IllegalManagedObjectNameException
+ * If the name of the child managed object is invalid.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ */
+ <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
+ InstantiableRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d, String name,
+ Collection<DefaultBehaviorException> exceptions) throws IllegalManagedObjectNameException;
+
+ /**
+ * Creates a new child managed object bound to the specified optional
+ * relation. The new managed object will initially not contain any property
+ * values (including mandatory properties). Once the managed object has been
+ * configured it can be added to the server using the {@link #commit()}
+ * method.
+ *
+ * @param <C>
+ * The expected type of the child managed object configuration
+ * client.
+ * @param <S>
+ * The expected type of the child managed object server
+ * configuration.
+ * @param <C1>
+ * The actual type of the added managed object configuration
+ * client.
+ * @param r
+ * The optional relation definition.
+ * @param d
+ * The definition of the managed object to be created.
+ * @param exceptions
+ * A collection in which to place any
+ * {@link DefaultBehaviorException}s that occurred whilst
+ * attempting to determine the managed object's default values.
+ * @return Returns a new child managed object bound to the specified
+ * optional relation.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ */
+ <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
+ OptionalRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d,
+ Collection<DefaultBehaviorException> exceptions);
+
+ /**
+ * Creates a new child managed object bound to the specified set relation.
+ * The new managed object will initially not contain any property values
+ * (including mandatory properties). Once the managed object has been
+ * configured it can be added to the server using the {@link #commit()}
+ * method.
+ *
+ * @param <C>
+ * The expected type of the child managed object configuration
+ * client.
+ * @param <S>
+ * The expected type of the child managed object server
+ * configuration.
+ * @param <C1>
+ * The actual type of the added managed object configuration
+ * client.
+ * @param r
+ * The set relation definition.
+ * @param d
+ * The definition of the managed object to be created.
+ * @param exceptions
+ * A collection in which to place any
+ * {@link DefaultBehaviorException}s that occurred whilst
+ * attempting to determine the managed object's default values.
+ * @return Returns a new child managed object bound to the specified set
+ * relation.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ */
+ <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
+ SetRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d,
+ Collection<DefaultBehaviorException> exceptions);
+
+ /**
+ * Retrieves an instantiable child managed object.
+ *
+ * @param <C>
+ * The requested type of the child managed object configuration
+ * client.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The instantiable relation definition.
+ * @param name
+ * The name of the child managed object.
+ * @return Returns the instantiable child managed object.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ * @throws DefinitionDecodingException
+ * If the managed object was found but its type could not be
+ * determined.
+ * @throws ManagedObjectDecodingException
+ * If the managed object was found but one or more of its
+ * properties could not be decoded.
+ * @throws ManagedObjectNotFoundException
+ * If the requested managed object could not be found on the
+ * server.
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
+ InstantiableRelationDefinition<C, S> r, String name) throws
+ DefinitionDecodingException, ManagedObjectDecodingException, ManagedObjectNotFoundException,
+ ConcurrentModificationException, ErrorResultException;
+
+ /**
+ * Retrieves an optional child managed object.
+ *
+ * @param <C>
+ * The requested type of the child managed object configuration
+ * client.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The optional relation definition.
+ * @return Returns the optional child managed object.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ * @throws DefinitionDecodingException
+ * If the managed object was found but its type could not be
+ * determined.
+ * @throws ManagedObjectDecodingException
+ * If the managed object was found but one or more of its
+ * properties could not be decoded.
+ * @throws ManagedObjectNotFoundException
+ * If the requested managed object could not be found on the
+ * server.
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
+ OptionalRelationDefinition<C, S> r) throws DefinitionDecodingException,
+ ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
+ ErrorResultException;
+
+ /**
+ * Retrieves a singleton child managed object.
+ *
+ * @param <C>
+ * The requested type of the child managed object configuration
+ * client.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The singleton relation definition.
+ * @return Returns the singleton child managed object.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ * @throws DefinitionDecodingException
+ * If the managed object was found but its type could not be
+ * determined.
+ * @throws ManagedObjectDecodingException
+ * If the managed object was found but one or more of its
+ * properties could not be decoded.
+ * @throws ManagedObjectNotFoundException
+ * If the requested managed object could not be found on the
+ * server.
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
+ SingletonRelationDefinition<C, S> r) throws DefinitionDecodingException,
+ ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
+ ErrorResultException;
+
+ /**
+ * Retrieves a set child managed object.
+ *
+ * @param <C>
+ * The requested type of the child managed object configuration
+ * client.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The set relation definition.
+ * @param name
+ * The name of the child managed object.
+ * @return Returns the set child managed object.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ * @throws DefinitionDecodingException
+ * If the managed object was found but its type could not be
+ * determined.
+ * @throws ManagedObjectDecodingException
+ * If the managed object was found but one or more of its
+ * properties could not be decoded.
+ * @throws ManagedObjectNotFoundException
+ * If the requested managed object could not be found on the
+ * server.
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
+ SetRelationDefinition<C, S> r, String name) throws DefinitionDecodingException,
+ ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
+ ErrorResultException;
+
+ /**
+ * Creates a client configuration view of this managed object. Modifications
+ * made to this managed object will be reflected in the client configuration
+ * view and vice versa.
+ *
+ * @return Returns a client configuration view of this managed object.
+ */
+ T getConfiguration();
+
+ /**
+ * Gets the definition associated with this managed object.
+ *
+ * @return Returns the definition associated with this managed object.
+ */
+ ManagedObjectDefinition<T, ? extends Configuration> getManagedObjectDefinition();
+
+ /**
+ * Gets the path of this managed object.
+ *
+ * @return Returns the path of this managed object.
+ */
+ ManagedObjectPath<T, ? extends Configuration> getManagedObjectPath();
+
+ /**
+ * Gets a mutable copy of the set of default values for the specified
+ * property.
+ *
+ * @param <P>
+ * The type of the property to be retrieved.
+ * @param pd
+ * The property to be retrieved.
+ * @return Returns the property's default values, or an empty set if there
+ * are no default values defined.
+ * @throws IllegalArgumentException
+ * If the property definition is not associated with this
+ * managed object's definition.
+ */
+ <P> SortedSet<P> getPropertyDefaultValues(PropertyDefinition<P> pd);
+
+ /**
+ * Gets the effective value of the specified property.
+ * <p>
+ * See the class description for more information about how the effective
+ * property value is derived.
+ *
+ * @param <P>
+ * The type of the property to be retrieved.
+ * @param pd
+ * The property to be retrieved.
+ * @return Returns the property's effective value, or <code>null</code> if
+ * there is no effective value defined.
+ * @throws IllegalArgumentException
+ * If the property definition is not associated with this
+ * managed object's definition.
+ */
+ <P> P getPropertyValue(PropertyDefinition<P> pd);
+
+ /**
+ * Gets a mutable copy of the set of effective values for the specified
+ * property.
+ * <p>
+ * See the class description for more information about how the effective
+ * property values are derived.
+ *
+ * @param <P>
+ * The type of the property to be retrieved.
+ * @param pd
+ * The property to be retrieved.
+ * @return Returns the property's effective values, or an empty set if there
+ * are no effective values defined.
+ * @throws IllegalArgumentException
+ * If the property definition is not associated with this
+ * managed object's definition.
+ */
+ @Override
+ <P> SortedSet<P> getPropertyValues(PropertyDefinition<P> pd);
+
+ /**
+ * Determines whether or not the specified property is set. If the property
+ * is unset, then any default behavior associated with the property applies.
+ *
+ * @param pd
+ * The property definition.
+ * @return Returns <code>true</code> if the property has been set, or
+ * <code>false</code> if it is unset and any default behavior
+ * associated with the property applies.
+ * @throws IllegalArgumentException
+ * If the property definition is not associated with this
+ * managed object's definition.
+ */
+ boolean isPropertyPresent(PropertyDefinition<?> pd);
+
+ /**
+ * Determines whether or not the optional managed object associated with the
+ * specified optional relations exists.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The optional relation definition.
+ * @return Returns <code>true</code> if the optional managed object exists,
+ * <code>false</code> otherwise.
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If there is any other error.
+ */
+ <C extends ConfigurationClient, S extends Configuration> boolean hasChild(OptionalRelationDefinition<C, S> r)
+ throws ConcurrentModificationException, ErrorResultException;
+
+ /**
+ * Lists the child managed objects associated with the specified
+ * instantiable relation.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The instantiable relation definition.
+ * @return Returns the names of the child managed objects.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
+ InstantiableRelationDefinition<C, S> r) throws ConcurrentModificationException,
+ ErrorResultException;
+
+ /**
+ * Lists the child managed objects associated with the specified
+ * instantiable relation which are a sub-type of the specified managed
+ * object definition.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The instantiable relation definition.
+ * @param d
+ * The managed object definition.
+ * @return Returns the names of the child managed objects which are a
+ * sub-type of the specified managed object definition.
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
+ InstantiableRelationDefinition<C, S> r, AbstractManagedObjectDefinition<? extends C, ? extends S> d)
+ throws ConcurrentModificationException, ErrorResultException;
+
+ /**
+ * Lists the child managed objects associated with the specified set
+ * relation.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The set relation definition.
+ * @return Returns the names of the child managed objects which for set
+ * relations are the definition names of each managed object.
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ <C extends ConfigurationClient, S extends Configuration> String[] listChildren(SetRelationDefinition<C, S> r)
+ throws ConcurrentModificationException, ErrorResultException;
+
+ /**
+ * Lists the child managed objects associated with the specified set
+ * relation which are a sub-type of the specified managed object definition.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The set relation definition.
+ * @param d
+ * The managed object definition.
+ * @return Returns the names of the child managed objects which for set
+ * relations are the definition names of each managed object.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ <C extends ConfigurationClient, S extends Configuration> String[] listChildren(SetRelationDefinition<C, S> r,
+ AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws
+ ConcurrentModificationException, ErrorResultException;
+
+ /**
+ * Removes the named instantiable child managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The instantiable relation definition.
+ * @param name
+ * The name of the child managed object to be removed.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ * @throws ManagedObjectNotFoundException
+ * If the managed object could not be removed because it could
+ * not found on the server.
+ * @throws OperationRejectedException
+ * If the managed object cannot be removed due to some
+ * client-side or server-side constraint which cannot be
+ * satisfied (for example, if it is referenced by another
+ * managed object).
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ <C extends ConfigurationClient, S extends Configuration> void removeChild(InstantiableRelationDefinition<C, S> r,
+ String name) throws ManagedObjectNotFoundException, OperationRejectedException,
+ ConcurrentModificationException, ErrorResultException;
+
+ /**
+ * Removes an optional child managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The optional relation definition.
+ * @throws ManagedObjectNotFoundException
+ * If the managed object could not be removed because it could
+ * not found on the server.
+ * @throws OperationRejectedException
+ * If the managed object cannot be removed due to some
+ * client-side or server-side constraint which cannot be
+ * satisfied (for example, if it is referenced by another
+ * managed object).
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ <C extends ConfigurationClient, S extends Configuration> void removeChild(OptionalRelationDefinition<C, S> r)
+ throws ManagedObjectNotFoundException, OperationRejectedException,
+ ConcurrentModificationException, ErrorResultException;
+
+ /**
+ * Removes s set child managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The set relation definition.
+ * @param name
+ * The name of the child managed object to be removed.
+ * @throws ManagedObjectNotFoundException
+ * If the managed object could not be removed because it could
+ * not found on the server.
+ * @throws OperationRejectedException
+ * If the managed object cannot be removed due to some
+ * client-side or server-side constraint which cannot be
+ * satisfied (for example, if it is referenced by another
+ * managed object).
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ <C extends ConfigurationClient, S extends Configuration> void removeChild(SetRelationDefinition<C, S> r,
+ String name) throws ManagedObjectNotFoundException, OperationRejectedException,
+ ConcurrentModificationException, ErrorResultException;
+
+ /**
+ * Sets a new pending value for the specified property.
+ * <p>
+ * See the class description for more information regarding pending values.
+ *
+ * @param <P>
+ * The type of the property to be modified.
+ * @param pd
+ * The property to be modified.
+ * @param value
+ * The new pending value for the property, or <code>null</code>
+ * if the property should be reset to its default behavior.
+ * @throws PropertyIsReadOnlyException
+ * If this is not a new managed object and the property is
+ * read-only or for monitoring purposes.
+ * @throws PropertyIsMandatoryException
+ * If an attempt was made to remove a mandatory property.
+ */
+ <P> void setPropertyValue(PropertyDefinition<P> pd, P value);
+
+ /**
+ * Sets a new pending values for the specified property.
+ * <p>
+ * See the class description for more information regarding pending values.
+ *
+ * @param <P>
+ * The type of the property to be modified.
+ * @param pd
+ * The property to be modified.
+ * @param values
+ * A non-<code>null</code> set of new pending values for the
+ * property (an empty set indicates that the property should be
+ * reset to its default behavior). The set will not be referenced
+ * by this managed object.
+ * @throws PropertyIsSingleValuedException
+ * If an attempt was made to add multiple pending values to a
+ * single-valued property.
+ * @throws PropertyIsReadOnlyException
+ * If this is not a new managed object and the property is
+ * read-only or for monitoring purposes.
+ * @throws PropertyIsMandatoryException
+ * If an attempt was made to remove a mandatory property.
+ */
+ <P> void setPropertyValues(PropertyDefinition<P> pd, Collection<P> values);
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/ManagedObjectDecodingException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ManagedObjectDecodingException.java
new file mode 100644
index 0000000..b0483b0
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ManagedObjectDecodingException.java
@@ -0,0 +1,125 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedList;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.opendj.config.DecodingException;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.PropertyException;
+import org.forgerock.util.Reject;
+
+/**
+ * The requested managed object was found but one or more of its properties
+ * could not be decoded successfully.
+ */
+public class ManagedObjectDecodingException extends DecodingException {
+
+ /**
+ * Version ID required by serializable classes.
+ */
+ private static final long serialVersionUID = -4268510652395945357L;
+
+ // Create the message.
+ private static LocalizableMessage createMessage(ManagedObject<?> partialManagedObject,
+ Collection<PropertyException> causes) {
+ Reject.ifNull(causes);
+ Reject.ifFalse(!causes.isEmpty(), "causes should not be empty");
+
+ ManagedObjectDefinition<?, ?> d = partialManagedObject.getManagedObjectDefinition();
+ if (causes.size() == 1) {
+ return ERR_MANAGED_OBJECT_DECODING_EXCEPTION_SINGLE.get(d.getUserFriendlyName(), causes.iterator().next()
+ .getLocalizableMessageObject());
+ } else {
+ LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
+
+ boolean isFirst = true;
+ for (PropertyException cause : causes) {
+ if (!isFirst) {
+ builder.append("; ");
+ }
+ builder.append(cause.getLocalizableMessageObject());
+ isFirst = false;
+ }
+
+ return ERR_MANAGED_OBJECT_DECODING_EXCEPTION_PLURAL.get(d.getUserFriendlyName(), builder.toMessage());
+ }
+ }
+
+ // The exception(s) that caused this decoding exception.
+ private final Collection<PropertyException> causes;
+
+ // The partially created managed object.
+ private final ManagedObject<?> partialManagedObject;
+
+ /**
+ * Create a new property decoding exception.
+ *
+ * @param partialManagedObject
+ * The partially created managed object containing properties
+ * which were successfully decoded and empty properties for those
+ * which were not (this may include empty mandatory properties).
+ * @param causes
+ * The exception(s) that caused this decoding exception.
+ */
+ public ManagedObjectDecodingException(ManagedObject<?> partialManagedObject, Collection<PropertyException> causes) {
+ super(createMessage(partialManagedObject, causes));
+
+ this.partialManagedObject = partialManagedObject;
+ this.causes = Collections.unmodifiableList(new LinkedList<PropertyException>(causes));
+ }
+
+ /**
+ * Get an unmodifiable collection view of the causes of this exception.
+ *
+ * @return Returns an unmodifiable collection view of the causes of this
+ * exception.
+ */
+ public Collection<PropertyException> getCauses() {
+ return causes;
+ }
+
+ /**
+ * Get the partially created managed object containing properties which were
+ * successfully decoded and empty properties for those which were not (this
+ * may include empty mandatory properties).
+ *
+ * @return Returns the partially created managed object containing
+ * properties which were successfully decoded and empty properties
+ * for those which were not (this may include empty mandatory
+ * properties).
+ */
+ public ManagedObject<?> getPartialManagedObject() {
+ return partialManagedObject;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/ManagementContext.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ManagementContext.java
new file mode 100644
index 0000000..5844d09
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ManagementContext.java
@@ -0,0 +1,414 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config.client;
+
+import java.util.Set;
+import java.util.SortedSet;
+
+import org.forgerock.opendj.server.config.client.RootCfgClient;
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.ConfigurationClient;
+import org.forgerock.opendj.config.DefinitionDecodingException;
+import org.forgerock.opendj.config.InstantiableRelationDefinition;
+import org.forgerock.opendj.config.ManagedObjectNotFoundException;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.OptionalRelationDefinition;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyException;
+import org.forgerock.opendj.config.SetRelationDefinition;
+import org.forgerock.opendj.config.client.spi.Driver;
+import org.forgerock.opendj.ldap.ErrorResultException;
+
+/**
+ * Client management connection context.
+ */
+public abstract class ManagementContext {
+
+ /**
+ * Creates a new management context.
+ */
+ protected ManagementContext() {
+ // No implementation required.
+ }
+
+ /**
+ * Deletes the named instantiable child managed object from the named parent
+ * managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param parent
+ * The path of the parent managed object.
+ * @param rd
+ * The instantiable relation definition.
+ * @param name
+ * The name of the child managed object to be removed.
+ * @return Returns <code>true</code> if the named instantiable child managed
+ * object was found, or <code>false</code> if it was not found.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with the parent
+ * managed object's definition.
+ * @throws ManagedObjectNotFoundException
+ * If the parent managed object could not be found.
+ * @throws OperationRejectedException
+ * If the managed object cannot be removed due to some
+ * client-side or server-side constraint which cannot be
+ * satisfied (for example, if it is referenced by another
+ * managed object).
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject(
+ ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd, String name)
+ throws ManagedObjectNotFoundException, OperationRejectedException,
+ ErrorResultException {
+ return getDriver().deleteManagedObject(parent, rd, name);
+ }
+
+ /**
+ * Deletes the optional child managed object from the named parent managed
+ * object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param parent
+ * The path of the parent managed object.
+ * @param rd
+ * The optional relation definition.
+ * @return Returns <code>true</code> if the optional child managed object
+ * was found, or <code>false</code> if it was not found.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with the parent
+ * managed object's definition.
+ * @throws ManagedObjectNotFoundException
+ * If the parent managed object could not be found.
+ * @throws OperationRejectedException
+ * If the managed object cannot be removed due to some
+ * client-side or server-side constraint which cannot be
+ * satisfied (for example, if it is referenced by another
+ * managed object).
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject(
+ ManagedObjectPath<?, ?> parent, OptionalRelationDefinition<C, S> rd) throws
+ ManagedObjectNotFoundException, OperationRejectedException, ErrorResultException {
+ return getDriver().deleteManagedObject(parent, rd);
+ }
+
+ /**
+ * Deletes s set child managed object from the named parent managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param parent
+ * The path of the parent managed object.
+ * @param rd
+ * The set relation definition.
+ * @param name
+ * The name of the child managed object to be removed.
+ * @return Returns <code>true</code> if the set child managed object was
+ * found, or <code>false</code> if it was not found.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with the parent
+ * managed object's definition.
+ * @throws ManagedObjectNotFoundException
+ * If the parent managed object could not be found.
+ * @throws OperationRejectedException
+ * If the managed object cannot be removed due to some
+ * client-side or server-side constraint which cannot be
+ * satisfied (for example, if it is referenced by another
+ * managed object).
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject(
+ ManagedObjectPath<?, ?> parent, SetRelationDefinition<C, S> rd, String name)
+ throws ManagedObjectNotFoundException, OperationRejectedException,
+ ErrorResultException {
+ return getDriver().deleteManagedObject(parent, rd, name);
+ }
+
+ /**
+ * Gets the named managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the path
+ * definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the path
+ * definition refers to.
+ * @param path
+ * The path of the managed object.
+ * @return Returns the named managed object.
+ * @throws DefinitionDecodingException
+ * If the managed object was found but its type could not be
+ * determined.
+ * @throws ManagedObjectDecodingException
+ * If the managed object was found but one or more of its
+ * properties could not be decoded.
+ * @throws ManagedObjectNotFoundException
+ * If the requested managed object could not be found on the
+ * server.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ @SuppressWarnings("unchecked")
+ public final <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getManagedObject(
+ ManagedObjectPath<C, S> path) throws DefinitionDecodingException, ManagedObjectDecodingException,
+ ManagedObjectNotFoundException, ErrorResultException {
+ // Be careful to handle the root configuration.
+ if (path.isEmpty()) {
+ return (ManagedObject<C>) getRootConfigurationManagedObject();
+ }
+
+ return getDriver().getManagedObject(path);
+ }
+
+ /**
+ * Gets the effective value of a property in the named managed object.
+ *
+ * @param <P>
+ * The type of the property to be retrieved.
+ * @param path
+ * The path of the managed object containing the property.
+ * @param pd
+ * The property to be retrieved.
+ * @return Returns the property's effective value, or <code>null</code> if
+ * there are no values defined.
+ * @throws IllegalArgumentException
+ * If the property definition is not associated with the
+ * referenced managed object's definition.
+ * @throws DefinitionDecodingException
+ * If the managed object was found but its type could not be
+ * determined.
+ * @throws PropertyException
+ * If the managed object was found but the requested property
+ * could not be decoded.
+ * @throws ManagedObjectNotFoundException
+ * If the requested managed object could not be found on the
+ * server.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public final <P> P getPropertyValue(ManagedObjectPath<?, ?> path, PropertyDefinition<P> pd)
+ throws DefinitionDecodingException, ErrorResultException, ManagedObjectNotFoundException {
+ Set<P> values = getPropertyValues(path, pd);
+ if (values.isEmpty()) {
+ return null;
+ } else {
+ return values.iterator().next();
+ }
+ }
+
+ /**
+ * Gets the effective values of a property in the named managed object.
+ *
+ * @param <P>
+ * The type of the property to be retrieved.
+ * @param path
+ * The path of the managed object containing the property.
+ * @param pd
+ * The property to be retrieved.
+ * @return Returns the property's effective values, or an empty set if there
+ * are no values defined.
+ * @throws IllegalArgumentException
+ * If the property definition is not associated with the
+ * referenced managed object's definition.
+ * @throws DefinitionDecodingException
+ * If the managed object was found but its type could not be
+ * determined.
+ * @throws PropertyException
+ * If the managed object was found but the requested property
+ * could not be decoded.
+ * @throws ManagedObjectNotFoundException
+ * If the requested managed object could not be found on the
+ * server.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public final <P> SortedSet<P> getPropertyValues(ManagedObjectPath<?, ?> path, PropertyDefinition<P> pd)
+ throws DefinitionDecodingException, ErrorResultException, ManagedObjectNotFoundException {
+ return getDriver().getPropertyValues(path, pd);
+ }
+
+ /**
+ * Gets the root configuration client associated with this management
+ * context.
+ *
+ * @return Returns the root configuration client associated with this
+ * management context.
+ */
+ public final RootCfgClient getRootConfiguration() {
+ return getRootConfigurationManagedObject().getConfiguration();
+ }
+
+ /**
+ * Gets the root configuration managed object associated with this
+ * management context.
+ *
+ * @return Returns the root configuration managed object associated with
+ * this management context.
+ */
+ public final ManagedObject<RootCfgClient> getRootConfigurationManagedObject() {
+ return getDriver().getRootConfigurationManagedObject();
+ }
+
+ /**
+ * Lists the child managed objects of the named parent managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param parent
+ * The path of the parent managed object.
+ * @param rd
+ * The instantiable relation definition.
+ * @return Returns the names of the child managed objects.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with the parent
+ * managed object's definition.
+ * @throws ManagedObjectNotFoundException
+ * If the parent managed object could not be found.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public final <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
+ ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd) throws
+ ManagedObjectNotFoundException, ErrorResultException {
+ return listManagedObjects(parent, rd, rd.getChildDefinition());
+ }
+
+ /**
+ * Lists the child managed objects of the named parent managed object which
+ * are a sub-type of the specified managed object definition.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param parent
+ * The path of the parent managed object.
+ * @param rd
+ * The instantiable relation definition.
+ * @param d
+ * The managed object definition.
+ * @return Returns the names of the child managed objects which are a
+ * sub-type of the specified managed object definition.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with the parent
+ * managed object's definition.
+ * @throws ManagedObjectNotFoundException
+ * If the parent managed object could not be found.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public final <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
+ ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd,
+ AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws
+ ManagedObjectNotFoundException, ErrorResultException {
+ return getDriver().listManagedObjects(parent, rd, d);
+ }
+
+ /**
+ * Lists the child managed objects of the named parent managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param parent
+ * The path of the parent managed object.
+ * @param rd
+ * The set relation definition.
+ * @return Returns the names of the child managed objects.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with the parent
+ * managed object's definition.
+ * @throws ManagedObjectNotFoundException
+ * If the parent managed object could not be found.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public final <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
+ ManagedObjectPath<?, ?> parent, SetRelationDefinition<C, S> rd) throws
+ ManagedObjectNotFoundException, ErrorResultException {
+ return getDriver().listManagedObjects(parent, rd, rd.getChildDefinition());
+ }
+
+ /**
+ * Determines whether or not the named managed object exists.
+ *
+ * @param path
+ * The path of the named managed object.
+ * @return Returns <code>true</code> if the named managed object exists,
+ * <code>false</code> otherwise.
+ * @throws ManagedObjectNotFoundException
+ * If the parent managed object could not be found.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public final boolean managedObjectExists(ManagedObjectPath<?, ?> path) throws ManagedObjectNotFoundException,
+ ErrorResultException {
+ return getDriver().managedObjectExists(path);
+ }
+
+ /**
+ * Gets the driver associated with this management context.
+ *
+ * @return Returns the driver associated with this management context.
+ */
+ protected abstract Driver getDriver();
+
+ /**
+ * Closes this management context.
+ */
+ public final void close() {
+ this.getDriver().close();
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/MissingMandatoryPropertiesException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/MissingMandatoryPropertiesException.java
new file mode 100644
index 0000000..b0c8570
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/MissingMandatoryPropertiesException.java
@@ -0,0 +1,150 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.opendj.config.OperationsException;
+import org.forgerock.opendj.config.PropertyIsMandatoryException;
+import org.forgerock.util.Reject;
+
+/**
+ * This exception is thrown when an attempt is made to add or modify a managed
+ * object when one or more of its mandatory properties are undefined.
+ */
+public class MissingMandatoryPropertiesException extends OperationsException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = 6342522125252055588L;
+
+ // Create the message.
+ private static LocalizableMessage createMessage(Collection<PropertyIsMandatoryException> causes) {
+ Reject.ifNull(causes);
+ Reject.ifFalse(!causes.isEmpty(), "causes should not be empty");
+
+ if (causes.size() == 1) {
+ return ERR_MISSING_MANDATORY_PROPERTIES_EXCEPTION_SINGLE.get(causes.iterator().next()
+ .getPropertyDefinition().getName());
+ } else {
+ LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
+
+ boolean isFirst = true;
+ for (PropertyIsMandatoryException cause : causes) {
+ if (!isFirst) {
+ builder.append(", ");
+ }
+ builder.append(cause.getPropertyDefinition().getName());
+ isFirst = false;
+ }
+
+ return ERR_MISSING_MANDATORY_PROPERTIES_EXCEPTION_PLURAL.get(builder.toMessage());
+ }
+ }
+
+ // The causes of this exception.
+ private final Collection<PropertyIsMandatoryException> causes;
+
+ // Indicates whether the exception occurred during managed object
+ // creation.
+ private final boolean isCreate;
+
+ // The user friendly name of the component that caused this
+ // exception.
+ private final LocalizableMessage ufn;
+
+ /**
+ * Creates a new missing mandatory properties exception with the provided
+ * causes.
+ *
+ * @param ufn
+ * The user friendly name of the component that caused this
+ * exception.
+ * @param causes
+ * The causes of this exception (must be non-<code>null</code>
+ * and non-empty).
+ * @param isCreate
+ * Indicates whether the exception occurred during managed object
+ * creation.
+ */
+ public MissingMandatoryPropertiesException(LocalizableMessage ufn,
+ Collection<PropertyIsMandatoryException> causes, boolean isCreate) {
+ super(createMessage(causes));
+
+ this.causes = new ArrayList<PropertyIsMandatoryException>(causes);
+ this.ufn = ufn;
+ this.isCreate = isCreate;
+ }
+
+ /**
+ * Gets the first exception that caused this exception.
+ *
+ * @return Returns the first exception that caused this exception.
+ */
+ @Override
+ public PropertyIsMandatoryException getCause() {
+ return causes.iterator().next();
+ }
+
+ /**
+ * Gets an unmodifiable collection view of the causes of this exception.
+ *
+ * @return Returns an unmodifiable collection view of the causes of this
+ * exception.
+ */
+ public Collection<PropertyIsMandatoryException> getCauses() {
+ return Collections.unmodifiableCollection(causes);
+ }
+
+ /**
+ * Gets the user friendly name of the component that caused this exception.
+ *
+ * @return Returns the user friendly name of the component that caused this
+ * exception.
+ */
+ public LocalizableMessage getUserFriendlyName() {
+ return ufn;
+ }
+
+ /**
+ * Indicates whether or not this exception was thrown during managed object
+ * creation or during modification.
+ *
+ * @return Returns <code>true</code> if this exception was thrown during
+ * managed object creation.
+ */
+ public boolean isCreate() {
+ return isCreate;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/OperationRejectedException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/OperationRejectedException.java
new file mode 100644
index 0000000..5ff7868
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/OperationRejectedException.java
@@ -0,0 +1,208 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.util.Reject;
+
+/**
+ * This exception is thrown when the client or server refuses to create, delete,
+ * or modify a managed object due to one or more constraints that cannot be
+ * satisfied.
+ * <p>
+ * Operations can be rejected either by a client-side constraint violation
+ * triggered by {@link ClientConstraintHandler}, or by a server-side error.
+ * <p>
+ * For example, the Directory Server might not be able perform an operation due
+ * to some OS related problem, such as lack of disk space, or missing files.
+ */
+public class OperationRejectedException extends AdminClientException {
+
+ /**
+ * The type of operation that caused this exception.
+ */
+ public enum OperationType {
+ /**
+ * A managed object could not be created.
+ */
+ CREATE,
+
+ /**
+ * A managed object could not be deleted.
+ */
+ DELETE,
+
+ /**
+ * A managed object could not be modified.
+ */
+ MODIFY;
+ }
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = 8547688890613079044L;
+
+ // Gets the default message.
+ private static LocalizableMessage getDefaultMessage(Collection<LocalizableMessage> messages) {
+ Reject.ifNull(messages);
+ Reject.ifFalse(!messages.isEmpty(), "Messages should not be empty");
+
+ if (messages.size() == 1) {
+ return ERR_OPERATION_REJECTED_EXCEPTION_SINGLE.get(messages.iterator().next());
+ } else {
+ return ERR_OPERATION_REJECTED_EXCEPTION_PLURAL.get(getSingleMessage(messages));
+ }
+ }
+
+ // Merge the messages into a single message.
+ private static LocalizableMessage getSingleMessage(Collection<LocalizableMessage> messages) {
+ if (messages.size() == 1) {
+ return messages.iterator().next();
+ } else {
+ LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
+
+ boolean isFirst = true;
+ for (LocalizableMessage m : messages) {
+ if (!isFirst) {
+ builder.append("; ");
+ }
+ builder.append(m);
+ isFirst = false;
+ }
+
+ return builder.toMessage();
+ }
+ }
+
+ // The messages describing the constraint violations that occurred.
+ private final Collection<LocalizableMessage> messages;
+
+ // The type of operation that caused this exception.
+ private final OperationType type;
+
+ // The user friendly name of the component that caused this
+ // exception.
+ private final LocalizableMessage ufn;
+
+ /**
+ * Creates a new operation rejected exception with a default message.
+ *
+ * @param type
+ * The type of operation that caused this exception.
+ * @param ufn
+ * The user friendly name of the component that caused this
+ * exception.
+ */
+ public OperationRejectedException(OperationType type, LocalizableMessage ufn) {
+ this(type, ufn, ERR_OPERATION_REJECTED_DEFAULT.get());
+ }
+
+ /**
+ * Creates a new operation rejected exception with the provided messages.
+ *
+ * @param type
+ * The type of operation that caused this exception.
+ * @param ufn
+ * The user friendly name of the component that caused this
+ * exception.
+ * @param messages
+ * The messages describing the constraint violations that
+ * occurred (must be non-<code>null</code> and non-empty).
+ */
+ public OperationRejectedException(OperationType type, LocalizableMessage ufn,
+ Collection<LocalizableMessage> messages) {
+ super(getDefaultMessage(messages));
+
+ this.messages = new ArrayList<LocalizableMessage>(messages);
+ this.type = type;
+ this.ufn = ufn;
+ }
+
+ /**
+ * Creates a new operation rejected exception with the provided message.
+ *
+ * @param type
+ * The type of operation that caused this exception.
+ * @param ufn
+ * The user friendly name of the component that caused this
+ * exception.
+ * @param message
+ * The message describing the constraint violation that occurred.
+ */
+ public OperationRejectedException(OperationType type, LocalizableMessage ufn, LocalizableMessage message) {
+ this(type, ufn, Collections.singleton(message));
+ }
+
+ /**
+ * Gets an unmodifiable collection view of the messages describing the
+ * constraint violations that occurred.
+ *
+ * @return Returns an unmodifiable collection view of the messages
+ * describing the constraint violations that occurred.
+ */
+ public Collection<LocalizableMessage> getMessages() {
+ return Collections.unmodifiableCollection(messages);
+ }
+
+ /**
+ * Creates a single message listing all the messages combined into a single
+ * list separated by semi-colons.
+ *
+ * @return Returns a single message listing all the messages combined into a
+ * single list separated by semi-colons.
+ */
+ public LocalizableMessage getMessagesAsSingleMessage() {
+ return getSingleMessage(messages);
+ }
+
+ /**
+ * Gets the type of operation that caused this exception.
+ *
+ * @return Returns the type of operation that caused this exception.
+ */
+ public OperationType getOperationType() {
+ return type;
+ }
+
+ /**
+ * Gets the user friendly name of the component that caused this exception.
+ *
+ * @return Returns the user friendly name of the component that caused this
+ * exception.
+ */
+ public LocalizableMessage getUserFriendlyName() {
+ return ufn;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPConnection.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPConnection.java
new file mode 100644
index 0000000..1f29090
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPConnection.java
@@ -0,0 +1,125 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client.ldap;
+
+import java.util.Collection;
+
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.Entry;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.opendj.ldap.requests.ModifyRequest;
+import org.forgerock.opendj.ldap.responses.SearchResultEntry;
+
+/**
+ * An LDAP connection adaptor interface which is used to perform LDAP client
+ * operations.
+ * <p>
+ * This interface is provided in order to make it easier to keep track of which
+ * JNDI DirContext methods we require and also to facilitate implementation of
+ * mock JNDI contexts for unit-testing.
+ */
+public abstract class LDAPConnection {
+
+ /**
+ * Create a new LDAP connection.
+ */
+ protected LDAPConnection() {
+ // No implementation required.
+ }
+
+ /**
+ * Creates a new entry.
+ *
+ * @param entry
+ * The entry to create.
+ * @throws ErrorResultException
+ * If an error occurred whilst creating the entry.
+ */
+ public abstract void createEntry(Entry entry) throws ErrorResultException;
+
+ /**
+ * Deletes the named subtree.
+ *
+ * @param dn
+ * The name of the subtree to be deleted.
+ * @throws ErrorResultException
+ * If an error occurred whilst deleting the subtree.
+ */
+ public abstract void deleteSubtree(DN dn) throws ErrorResultException;
+
+ /**
+ * Determines whether or not the named entry exists.
+ *
+ * @param dn
+ * The name of the entry.
+ * @return Returns <code>true</code> if the entry exists.
+ * @throws ErrorResultException
+ * If an error occurred whilst making the determination.
+ */
+ public abstract boolean entryExists(DN dn) throws ErrorResultException;
+
+ /**
+ * Lists the children of the named entry.
+ *
+ * @param dn
+ * The name of the entry to list.
+ * @param filter
+ * An LDAP filter string, or <code>null</code> indicating the
+ * default filter of <code>(objectclass=*)</code>.
+ * @return Returns the names of the children.
+ * @throws ErrorResultException
+ * If an error occurred whilst listing the children.
+ */
+ public abstract Collection<DN> listEntries(DN dn, String filter) throws ErrorResultException;
+
+ /**
+ * Modifies an entry according to the provided modify request.
+ *
+ * @param request
+ * The modification request to perform.
+ * @throws ErrorResultException
+ * If an error occurred whilst applying the modifications.
+ */
+ public abstract void modifyEntry(ModifyRequest request) throws ErrorResultException;
+
+ /**
+ * Reads the attributes of the named entry.
+ *
+ * @param dn
+ * The name of the entry to be read.
+ * @param attrIds
+ * The list of attributes to be retrievd.
+ * @return Returns the attributes of the requested entry.
+ * @throws ErrorResultException
+ * If an error occurred whilst reading the entry.
+ */
+ public abstract SearchResultEntry readEntry(DN dn, Collection<String> attrIds) throws ErrorResultException;
+
+ /**
+ * Closes the LDAP connection.
+ */
+ public abstract void unbind();
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPDriver.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPDriver.java
new file mode 100644
index 0000000..35e5c19
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPDriver.java
@@ -0,0 +1,572 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ * Portions Copyright 2013 ForgeRock, AS.
+ */
+package org.forgerock.opendj.config.client.ldap;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.server.config.client.RootCfgClient;
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.AggregationPropertyDefinition;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.ConfigurationClient;
+import org.forgerock.opendj.config.DefaultBehaviorException;
+import org.forgerock.opendj.config.DefinitionDecodingException;
+import org.forgerock.opendj.config.DefinitionResolver;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.InstantiableRelationDefinition;
+import org.forgerock.opendj.config.LDAPProfile;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.ManagedObjectNotFoundException;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyDefinitionVisitor;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.PropertyException;
+import org.forgerock.opendj.config.PropertyIsMandatoryException;
+import org.forgerock.opendj.config.PropertyIsSingleValuedException;
+import org.forgerock.opendj.config.PropertyOption;
+import org.forgerock.opendj.config.Reference;
+import org.forgerock.opendj.config.RelationDefinition;
+import org.forgerock.opendj.config.SetRelationDefinition;
+import org.forgerock.opendj.config.DefinitionDecodingException.Reason;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagedObjectDecodingException;
+import org.forgerock.opendj.config.client.OperationRejectedException;
+import org.forgerock.opendj.config.client.OperationRejectedException.OperationType;
+import org.forgerock.opendj.config.client.spi.Driver;
+import org.forgerock.opendj.config.client.spi.PropertySet;
+import org.forgerock.opendj.ldap.Attribute;
+import org.forgerock.opendj.ldap.ByteString;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.opendj.ldap.ResultCode;
+import org.forgerock.opendj.ldap.responses.SearchResultEntry;
+
+/**
+ * The LDAP management context driver implementation.
+ */
+final class LDAPDriver extends Driver {
+
+ /**
+ * A visitor which is used to decode property LDAP values.
+ */
+ private static final class ValueDecoder extends PropertyDefinitionVisitor<Object, String> {
+
+ private final PropertyDefinitionsOptions options;
+
+ /**
+ * Decodes the provided property LDAP value.
+ *
+ * @param <P>
+ * The type of the property.
+ * @param pd
+ * The property definition.
+ * @param value
+ * The LDAP string representation.
+ * @param options
+ * Decoding options for property definitions.
+ * @return Returns the decoded LDAP value.
+ * @throws IllegalPropertyValueStringException
+ * If the property value could not be decoded because it was
+ * invalid.
+ */
+ public static <P> P decode(PropertyDefinition<P> pd, Object value, PropertyDefinitionsOptions options) {
+ String s = String.valueOf(value);
+ return pd.castValue(pd.accept(new ValueDecoder(options), s));
+ }
+
+ // Prevent instantiation.
+ private ValueDecoder(PropertyDefinitionsOptions options) {
+ this.options = options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <C extends ConfigurationClient, S extends Configuration> Object visitAggregation(
+ AggregationPropertyDefinition<C, S> d, String p) {
+ // Aggregations values are stored as full DNs in LDAP, but
+ // just their common name is exposed in the admin framework.
+ try {
+ Reference<C, S> reference = Reference.parseDN(d.getParentPath(), d.getRelationDefinition(), p);
+ return reference.getName();
+ } catch (IllegalArgumentException e) {
+ throw new IllegalPropertyValueStringException(d, p);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <T> Object visitUnknown(PropertyDefinition<T> d, String p) {
+ // By default the property definition's decoder will do.
+ return d.decodeValue(p, options);
+ }
+ }
+
+ private LDAPManagementContext context;
+
+ private final LDAPConnection connection;
+
+ // The LDAP profile which should be used to construct LDAP
+ // requests and decode LDAP responses.
+ private final LDAPProfile profile;
+
+ /**
+ * Creates a new LDAP driver using the specified LDAP connection and
+ * profile.
+ *
+ * @param connection
+ * The LDAP connection.
+ * @param profile
+ * The LDAP profile.
+ * @param propertyDefOptions
+ * Options used to validate property definitions values
+ */
+ public LDAPDriver(LDAPConnection connection, LDAPProfile profile, PropertyDefinitionsOptions propertyDefOptions) {
+ super(propertyDefOptions);
+ this.connection = connection;
+ this.profile = profile;
+ }
+
+ void setManagementContext(LDAPManagementContext context) {
+ this.context = context;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void close() {
+ connection.unbind();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getManagedObject(
+ ManagedObjectPath<C, S> path) throws DefinitionDecodingException, ManagedObjectDecodingException,
+ ManagedObjectNotFoundException, ErrorResultException {
+ if (!managedObjectExists(path)) {
+ throw new ManagedObjectNotFoundException();
+ }
+
+ try {
+ // Read the entry associated with the managed object.
+ DN dn = LDAPNameBuilder.create(path, profile);
+ AbstractManagedObjectDefinition<C, S> d = path.getManagedObjectDefinition();
+ ManagedObjectDefinition<? extends C, ? extends S> mod = getEntryDefinition(d, dn);
+
+ ArrayList<String> attrIds = new ArrayList<String>();
+ for (PropertyDefinition<?> pd : mod.getAllPropertyDefinitions()) {
+ String attrId = profile.getAttributeName(mod, pd);
+ attrIds.add(attrId);
+ }
+
+ SearchResultEntry searchResultEntry = connection.readEntry(dn, attrIds);
+
+ // Build the managed object's properties.
+ List<PropertyException> exceptions = new LinkedList<PropertyException>();
+ PropertySet newProperties = new PropertySet();
+ for (PropertyDefinition<?> pd : mod.getAllPropertyDefinitions()) {
+ String attrID = profile.getAttributeName(mod, pd);
+ Attribute attribute = searchResultEntry.getAttribute(attrID);
+ try {
+ decodeProperty(newProperties, path, pd, attribute);
+ } catch (PropertyException e) {
+ exceptions.add(e);
+ }
+ }
+
+ // If there were no decoding problems then return the object,
+ // otherwise throw an operations exception.
+ ManagedObject<? extends C> mo = createExistingManagedObject(mod, path, newProperties);
+ if (exceptions.isEmpty()) {
+ return mo;
+ } else {
+ throw new ManagedObjectDecodingException(mo, exceptions);
+ }
+ } catch (ErrorResultException e) {
+ if (e.getResult().getResultCode() == ResultCode.NO_SUCH_OBJECT) {
+ throw new ManagedObjectNotFoundException();
+ }
+ throw e;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public <C extends ConfigurationClient, S extends Configuration, P> SortedSet<P> getPropertyValues(
+ ManagedObjectPath<C, S> path, PropertyDefinition<P> propertyDef) throws DefinitionDecodingException,
+ ManagedObjectNotFoundException, ErrorResultException {
+ // Check that the requested property is from the definition
+ // associated with the path.
+ AbstractManagedObjectDefinition<C, S> d = path.getManagedObjectDefinition();
+ PropertyDefinition<?> tmp = d.getPropertyDefinition(propertyDef.getName());
+ if (tmp != propertyDef) {
+ throw new IllegalArgumentException("The property " + propertyDef.getName() + " is not associated with a "
+ + d.getName());
+ }
+
+ if (!managedObjectExists(path)) {
+ throw new ManagedObjectNotFoundException();
+ }
+
+ try {
+ // Read the entry associated with the managed object.
+ DN dn = LDAPNameBuilder.create(path, profile);
+ ManagedObjectDefinition<? extends C, ? extends S> objectDef = getEntryDefinition(d, dn);
+
+ // Make sure we use the correct property definition, the
+ // provided one might have been overridden in the resolved
+ // definition.
+ propertyDef = (PropertyDefinition<P>) objectDef.getPropertyDefinition(propertyDef.getName());
+
+ String attrID = profile.getAttributeName(objectDef, propertyDef);
+ SearchResultEntry resultEntry = connection.readEntry(dn, Collections.singleton(attrID));
+ Attribute attribute = resultEntry.getAttribute(attrID);
+
+ // Decode the values.
+ SortedSet<P> values = new TreeSet<P>(propertyDef);
+ PropertyDefinitionsOptions options = context.getPropertyDefOptions();
+ if (attribute != null) {
+ for (ByteString byteValue : attribute) {
+ P value = ValueDecoder.decode(propertyDef, byteValue, options);
+ values.add(value);
+ }
+ }
+
+ // Sanity check the returned values.
+ if (values.size() > 1 && !propertyDef.hasOption(PropertyOption.MULTI_VALUED)) {
+ throw new PropertyIsSingleValuedException(propertyDef);
+ }
+
+ if (values.isEmpty() && propertyDef.hasOption(PropertyOption.MANDATORY)) {
+ throw new PropertyIsMandatoryException(propertyDef);
+ }
+
+ if (values.isEmpty()) {
+ // Use the property's default values.
+ values.addAll(findDefaultValues(path.asSubType(objectDef), propertyDef, false));
+ }
+
+ return values;
+ } catch (ErrorResultException e) {
+ if (e.getResult().getResultCode() == ResultCode.NO_SUCH_OBJECT) {
+ throw new ManagedObjectNotFoundException();
+ }
+ throw e;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ManagedObject<RootCfgClient> getRootConfigurationManagedObject() {
+ return new LDAPManagedObject<RootCfgClient>(this, RootCfgDefn.getInstance(), ManagedObjectPath.emptyPath(),
+ new PropertySet(), true, null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
+ ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd,
+ AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws ManagedObjectNotFoundException,
+ ErrorResultException {
+ validateRelationDefinition(parent, rd);
+
+ if (!managedObjectExists(parent)) {
+ throw new ManagedObjectNotFoundException();
+ }
+
+ // Get the search base DN.
+ DN dn = LDAPNameBuilder.create(parent, rd, profile);
+
+ // Retrieve only those entries which are sub-types of the
+ // specified definition.
+ StringBuilder builder = new StringBuilder();
+ builder.append("(objectclass=");
+ builder.append(profile.getObjectClass(d));
+ builder.append(')');
+ String filter = builder.toString();
+
+ List<String> children = new ArrayList<String>();
+ try {
+ for (DN child : connection.listEntries(dn, filter)) {
+ children.add(child.rdn().getFirstAVA().getAttributeValue().toString());
+ }
+ } catch (ErrorResultException e) {
+ if (e.getResult().getResultCode() == ResultCode.NO_SUCH_OBJECT) {
+ // Ignore this
+ // It means that the base entry does not exist
+ // It might not if this managed object has just been created.
+ } else {
+ throw e;
+ }
+ }
+ return children.toArray(new String[children.size()]);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
+ ManagedObjectPath<?, ?> parent, SetRelationDefinition<C, S> rd,
+ AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws ManagedObjectNotFoundException,
+ ErrorResultException {
+ validateRelationDefinition(parent, rd);
+
+ if (!managedObjectExists(parent)) {
+ throw new ManagedObjectNotFoundException();
+ }
+
+ // Get the search base DN.
+ DN dn = LDAPNameBuilder.create(parent, rd, profile);
+
+ // Retrieve only those entries which are sub-types of the
+ // specified definition.
+ StringBuilder builder = new StringBuilder();
+ builder.append("(objectclass=");
+ builder.append(profile.getObjectClass(d));
+ builder.append(')');
+ String filter = builder.toString();
+
+ List<String> children = new ArrayList<String>();
+ try {
+ for (DN child : connection.listEntries(dn, filter)) {
+ children.add(child.rdn().getFirstAVA().getAttributeValue().toString());
+ }
+ } catch (ErrorResultException e) {
+ if (e.getResult().getResultCode() == ResultCode.NO_SUCH_OBJECT) {
+ // Ignore this
+ // It means that the base entry does not exist
+ // It might not if this managed object has just been created.
+ } else {
+ throw e;
+ }
+ }
+
+ return children.toArray(new String[children.size()]);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean managedObjectExists(ManagedObjectPath<?, ?> path) throws ManagedObjectNotFoundException,
+ ErrorResultException {
+ if (path.isEmpty()) {
+ return true;
+ }
+
+ ManagedObjectPath<?, ?> parent = path.parent();
+ DN dn = LDAPNameBuilder.create(parent, profile);
+ if (!entryExists(dn)) {
+ throw new ManagedObjectNotFoundException();
+ }
+
+ dn = LDAPNameBuilder.create(path, profile);
+ return entryExists(dn);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected <C extends ConfigurationClient, S extends Configuration> void deleteManagedObject(
+ ManagedObjectPath<C, S> path) throws OperationRejectedException, ErrorResultException {
+ // Delete the entry and any subordinate entries.
+ DN dn = LDAPNameBuilder.create(path, profile);
+ try {
+ connection.deleteSubtree(dn);
+ } catch (ErrorResultException e) {
+ if (e.getResult().getResultCode() == ResultCode.UNWILLING_TO_PERFORM) {
+ AbstractManagedObjectDefinition<?, ?> d = path.getManagedObjectDefinition();
+ LocalizableMessage m = LocalizableMessage.raw("%s", e.getMessage());
+ throw new OperationRejectedException(OperationType.DELETE, d.getUserFriendlyName(), m);
+ }
+ throw e;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected LDAPManagementContext getManagementContext() {
+ return context;
+ }
+
+ /**
+ * Determines whether the named LDAP entry exists.
+ *
+ * @param dn
+ * The LDAP entry name.
+ * @return Returns <code>true</code> if the named LDAP entry exists.
+ * @throws ErrorResultException
+ * if a problem occurs.
+ */
+ boolean entryExists(DN dn) throws ErrorResultException {
+ return connection.entryExists(dn);
+ }
+
+ /**
+ * Gets the LDAP connection used for interacting with the server.
+ *
+ * @return Returns the LDAP connection used for interacting with the server.
+ */
+ LDAPConnection getLDAPConnection() {
+ return connection;
+ }
+
+ /**
+ * Gets the LDAP profile which should be used to construct LDAP requests and
+ * decode LDAP responses.
+ *
+ * @return Returns the LDAP profile which should be used to construct LDAP
+ * requests and decode LDAP responses.
+ */
+ LDAPProfile getLDAPProfile() {
+ return profile;
+ }
+
+ // Create a managed object which already exists on the server.
+ private <M extends ConfigurationClient, N extends Configuration> ManagedObject<M> createExistingManagedObject(
+ ManagedObjectDefinition<M, N> d, ManagedObjectPath<? super M, ? super N> p, PropertySet properties) {
+ RelationDefinition<?, ?> rd = p.getRelationDefinition();
+ PropertyDefinition<?> pd = null;
+ if (rd instanceof InstantiableRelationDefinition) {
+ InstantiableRelationDefinition<?, ?> ird = (InstantiableRelationDefinition<?, ?>) rd;
+ pd = ird.getNamingPropertyDefinition();
+ }
+ return new LDAPManagedObject<M>(this, d, p.asSubType(d), properties, true, pd);
+ }
+
+ // Create a property using the provided string values.
+ private <P> void decodeProperty(PropertySet newProperties, ManagedObjectPath<?, ?> path,
+ PropertyDefinition<P> propertyDef, Attribute attribute) {
+ PropertyException exception = null;
+
+ // Get the property's active values.
+ SortedSet<P> activeValues = new TreeSet<P>(propertyDef);
+ PropertyDefinitionsOptions options = context.getPropertyDefOptions();
+ if (attribute != null) {
+ for (ByteString byteValue : attribute) {
+ P value = ValueDecoder.decode(propertyDef, byteValue, options);
+ activeValues.add(value);
+ }
+ }
+
+ if (activeValues.size() > 1 && !propertyDef.hasOption(PropertyOption.MULTI_VALUED)) {
+ // This exception takes precedence over previous exceptions.
+ exception = new PropertyIsSingleValuedException(propertyDef);
+ P value = activeValues.first();
+ activeValues.clear();
+ activeValues.add(value);
+ }
+
+ // Get the property's default values.
+ Collection<P> defaultValues;
+ try {
+ defaultValues = findDefaultValues(path, propertyDef, false);
+ } catch (DefaultBehaviorException e) {
+ defaultValues = Collections.emptySet();
+ exception = e;
+ }
+
+ newProperties.addProperty(propertyDef, defaultValues, activeValues);
+
+ if (activeValues.isEmpty() && defaultValues.isEmpty() && propertyDef.hasOption(PropertyOption.MANDATORY)) {
+ // The active values maybe empty because of a previous
+ // exception.
+ if (exception == null) {
+ exception = new PropertyIsMandatoryException(propertyDef);
+ }
+ }
+
+ if (exception != null) {
+ throw exception;
+ }
+ }
+
+ // Determine the type of managed object associated with the named
+ // entry.
+ // @Checkstyle:off
+ private <C extends ConfigurationClient, S extends Configuration> ManagedObjectDefinition<? extends C, ? extends S>
+ getEntryDefinition(AbstractManagedObjectDefinition<C, S> d, DN dn) throws ErrorResultException,
+ DefinitionDecodingException {
+ // @Checkstyle:on
+ SearchResultEntry searchResultEntry = connection.readEntry(dn, Collections.singleton("objectclass"));
+ Attribute objectClassAttr = searchResultEntry.getAttribute("objectclass");
+
+ if (objectClassAttr == null) {
+ // No object classes.
+ throw new DefinitionDecodingException(d, Reason.NO_TYPE_INFORMATION);
+ }
+
+ final Set<String> objectClasses = new HashSet<String>();
+ for (ByteString byteValue : objectClassAttr) {
+ objectClasses.add(byteValue.toString().toLowerCase().trim());
+ }
+
+ if (objectClasses.isEmpty()) {
+ // No object classes.
+ throw new DefinitionDecodingException(d, Reason.NO_TYPE_INFORMATION);
+ }
+
+ // Resolve the appropriate sub-type based on the object classes.
+ DefinitionResolver resolver = new DefinitionResolver() {
+ @Override
+ public boolean matches(AbstractManagedObjectDefinition<?, ?> d) {
+ String objectClass = profile.getObjectClass(d);
+ return objectClasses.contains(objectClass);
+ }
+ };
+
+ return d.resolveManagedObjectDefinition(resolver);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPManagedObject.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPManagedObject.java
new file mode 100644
index 0000000..24054a8
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPManagedObject.java
@@ -0,0 +1,330 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config.client.ldap;
+
+import java.util.List;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.AggregationPropertyDefinition;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.ConfigurationClient;
+import org.forgerock.opendj.config.InstantiableRelationDefinition;
+import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.ManagedObjectNotFoundException;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyOption;
+import org.forgerock.opendj.config.PropertyValueVisitor;
+import org.forgerock.opendj.config.Reference;
+import org.forgerock.opendj.config.RelationDefinition;
+import org.forgerock.opendj.config.SetRelationDefinition;
+import org.forgerock.opendj.config.client.ConcurrentModificationException;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.OperationRejectedException;
+import org.forgerock.opendj.config.client.OperationRejectedException.OperationType;
+import org.forgerock.opendj.config.client.spi.AbstractManagedObject;
+import org.forgerock.opendj.config.client.spi.Driver;
+import org.forgerock.opendj.config.client.spi.Property;
+import org.forgerock.opendj.config.client.spi.PropertySet;
+import org.forgerock.opendj.ldap.Attribute;
+import org.forgerock.opendj.ldap.ByteString;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.Entry;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.opendj.ldap.LinkedAttribute;
+import org.forgerock.opendj.ldap.LinkedHashMapEntry;
+import org.forgerock.opendj.ldap.ModificationType;
+import org.forgerock.opendj.ldap.ResultCode;
+import org.forgerock.opendj.ldap.requests.ModifyRequest;
+import org.forgerock.opendj.ldap.requests.Requests;
+
+/**
+ * A managed object bound to an LDAP connection.
+ *
+ * @param <T>
+ * The type of client configuration represented by the client managed
+ * object.
+ */
+final class LDAPManagedObject<T extends ConfigurationClient> extends AbstractManagedObject<T> {
+
+ /**
+ * A visitor which is used to encode property LDAP values.
+ */
+ private static final class ValueEncoder extends PropertyValueVisitor<Object, Void> {
+
+ // Prevent instantiation.
+ private ValueEncoder() {
+ // No implementation required.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <C extends ConfigurationClient, S extends Configuration> Object visitAggregation(
+ AggregationPropertyDefinition<C, S> pd, String v, Void p) {
+ // Aggregations values are stored as full DNs in LDAP, but
+ // just their common name is exposed in the admin framework.
+ Reference<C, S> reference = Reference.parseName(pd.getParentPath(), pd.getRelationDefinition(), v);
+ return reference.toDN().toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <P> Object visitUnknown(PropertyDefinition<P> propertyDef, P value, Void p) {
+ return propertyDef.encodeValue(value);
+ }
+ }
+
+ // The LDAP management driver associated with this managed object.
+ private final LDAPDriver driver;
+
+ /**
+ * Creates a new LDAP managed object instance.
+ *
+ * @param driver
+ * The underlying LDAP management driver.
+ * @param d
+ * The managed object's definition.
+ * @param path
+ * The managed object's path.
+ * @param properties
+ * The managed object's properties.
+ * @param existsOnServer
+ * Indicates whether or not the managed object already exists.
+ * @param namingPropertyDefinition
+ * The managed object's naming property definition if there is
+ * one.
+ */
+ LDAPManagedObject(LDAPDriver driver, ManagedObjectDefinition<T, ? extends Configuration> d,
+ ManagedObjectPath<T, ? extends Configuration> path, PropertySet properties, boolean existsOnServer,
+ PropertyDefinition<?> namingPropertyDefinition) {
+ super(d, path, properties, existsOnServer, namingPropertyDefinition,
+ driver.getManagementContext().getPropertyDefOptions());
+ this.driver = driver;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void addNewManagedObject() throws ErrorResultException, OperationRejectedException,
+ ConcurrentModificationException, ManagedObjectAlreadyExistsException {
+ // First make sure that the parent managed object still exists.
+ ManagedObjectDefinition<?, ?> d = getManagedObjectDefinition();
+ ManagedObjectPath<?, ?> path = getManagedObjectPath();
+ ManagedObjectPath<?, ?> parent = path.parent();
+
+ try {
+ if (!driver.managedObjectExists(parent)) {
+ throw new ConcurrentModificationException();
+ }
+ } catch (ManagedObjectNotFoundException e) {
+ throw new ConcurrentModificationException();
+ }
+
+ // We may need to create the parent "relation" entry if this is a
+ // child of an instantiable or set relation.
+ RelationDefinition<?, ?> r = path.getRelationDefinition();
+ if (r instanceof InstantiableRelationDefinition || r instanceof SetRelationDefinition) {
+
+ // TODO: this implementation does not handle relations which
+ // comprise of more than one RDN arc (this will probably never
+ // be required anyway).
+ DN dn;
+ if (r instanceof InstantiableRelationDefinition) {
+ dn = LDAPNameBuilder.create(parent, (InstantiableRelationDefinition<?, ?>) r,
+ driver.getLDAPProfile());
+ } else {
+ dn = LDAPNameBuilder.create(parent, (SetRelationDefinition<?, ?>) r,
+ driver.getLDAPProfile());
+ }
+
+ if (!driver.entryExists(dn)) {
+ Entry entry = new LinkedHashMapEntry(dn);
+
+ // Create the branch's object class attribute.
+ List<String> objectClasses = driver.getLDAPProfile().getRelationObjectClasses(r);
+ addObjectClassesToEntry(objectClasses, entry);
+
+ // Create the branch's naming attribute.
+ entry.addAttribute(dn.rdn().getFirstAVA().toAttribute());
+
+ // Create the entry.
+ try {
+ driver.getLDAPConnection().createEntry(entry);
+ } catch (ErrorResultException e) {
+ if (e.getResult().getResultCode() == ResultCode.UNWILLING_TO_PERFORM) {
+ LocalizableMessage m = LocalizableMessage.raw("%s", e.getLocalizedMessage());
+ throw new OperationRejectedException(OperationType.CREATE, d.getUserFriendlyName(), m);
+ } else {
+ throw e;
+ }
+ }
+ }
+ }
+
+ // Now add the entry representing this new managed object.
+ DN dn = LDAPNameBuilder.create(path, driver.getLDAPProfile());
+ Entry entry = new LinkedHashMapEntry(dn);
+
+ // Create the object class attribute.
+ ManagedObjectDefinition<?, ?> definition = getManagedObjectDefinition();
+ List<String> objectClasses = driver.getLDAPProfile().getObjectClasses(definition);
+ addObjectClassesToEntry(objectClasses, entry);
+
+ // Create the naming attribute if there is not naming property.
+ PropertyDefinition<?> namingPropertyDef = getNamingPropertyDefinition();
+ if (namingPropertyDef == null) {
+ entry.addAttribute(dn.rdn().getFirstAVA().toAttribute());
+ }
+
+ // Create the remaining attributes.
+ for (PropertyDefinition<?> propertyDef : definition.getAllPropertyDefinitions()) {
+ String attrID = driver.getLDAPProfile().getAttributeName(definition, propertyDef);
+ Attribute attribute = new LinkedAttribute(attrID);
+ encodeProperty(attribute, propertyDef);
+ if (attribute.size() != 0) {
+ entry.addAttribute(attribute);
+ }
+ }
+
+ try {
+ // Create the entry.
+ driver.getLDAPConnection().createEntry(entry);
+ } catch (ErrorResultException e) {
+ if (e.getResult().getResultCode() == ResultCode.ENTRY_ALREADY_EXISTS) {
+ throw new ManagedObjectAlreadyExistsException();
+ } else if (e.getResult().getResultCode() == ResultCode.UNWILLING_TO_PERFORM) {
+ LocalizableMessage m = LocalizableMessage.raw("%s", e.getLocalizedMessage());
+ throw new OperationRejectedException(OperationType.CREATE, d.getUserFriendlyName(), m);
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ private void addObjectClassesToEntry(List<String> objectClasses, Entry entry) {
+ for (String objectClass : objectClasses) {
+ Attribute attr = new LinkedAttribute("objectClass");
+ attr.add(ByteString.valueOf(objectClass));
+ entry.addAttribute(attr);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Driver getDriver() {
+ return driver;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void modifyExistingManagedObject() throws ConcurrentModificationException, OperationRejectedException,
+ ErrorResultException {
+ // Build the modify request
+ ManagedObjectPath<?, ?> path = getManagedObjectPath();
+ DN dn = LDAPNameBuilder.create(path, driver.getLDAPProfile());
+ ModifyRequest request = Requests.newModifyRequest(dn);
+ ManagedObjectDefinition<?, ?> d = getManagedObjectDefinition();
+ for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) {
+ Property<?> p = getProperty(pd);
+ if (p.isModified()) {
+ String attrID = driver.getLDAPProfile().getAttributeName(d, pd);
+ Attribute attribute = new LinkedAttribute(attrID);
+ encodeProperty(attribute, pd);
+ request.addModification(ModificationType.REPLACE, attrID,
+ attribute.toArray(new Object[attribute.size()]));
+ }
+ }
+
+ // Perform the LDAP modification if something has changed.
+ if (!request.getModifications().isEmpty()) {
+ try {
+ driver.getLDAPConnection().modifyEntry(request);
+ } catch (ErrorResultException e) {
+ if (e.getResult().getResultCode() == ResultCode.UNWILLING_TO_PERFORM) {
+ LocalizableMessage m = LocalizableMessage.raw("%s", e.getLocalizedMessage());
+ throw new OperationRejectedException(OperationType.CREATE, d.getUserFriendlyName(), m);
+ } else {
+ throw e;
+ }
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected <M extends ConfigurationClient> ManagedObject<M> newInstance(ManagedObjectDefinition<M, ?> d,
+ ManagedObjectPath<M, ?> path, PropertySet properties, boolean existsOnServer,
+ PropertyDefinition<?> namingPropertyDefinition) {
+ return new LDAPManagedObject<M>(driver, d, path, properties, existsOnServer, namingPropertyDefinition);
+ }
+
+ // Encode a property into LDAP string values.
+ private <P> void encodeProperty(Attribute attribute, PropertyDefinition<P> propertyDef) {
+ PropertyValueVisitor<Object, Void> visitor = new ValueEncoder();
+ Property<P> property = getProperty(propertyDef);
+ if (propertyDef.hasOption(PropertyOption.MANDATORY)) {
+ // For mandatory properties we fall-back to the default values
+ // if defined which can sometimes be the case e.g when a
+ // mandatory property is overridden.
+ for (P value : property.getEffectiveValues()) {
+ attribute.add(propertyDef.accept(visitor, value, null));
+ }
+ } else {
+ for (P value : property.getPendingValues()) {
+ attribute.add(propertyDef.accept(visitor, value, null));
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isModified() {
+ ManagedObjectDefinition<?, ?> d = getManagedObjectDefinition();
+ for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) {
+ Property<?> p = getProperty(pd);
+ if (p.isModified()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPManagementContext.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPManagementContext.java
new file mode 100644
index 0000000..76ca873
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPManagementContext.java
@@ -0,0 +1,87 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config.client.ldap;
+
+import org.forgerock.opendj.config.LDAPProfile;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.client.spi.Driver;
+import org.forgerock.util.Reject;
+
+/**
+ * An LDAP management connection context.
+ */
+public final class LDAPManagementContext extends ManagementContext {
+
+ /**
+ * Create a new LDAP management context using the provided LDAP connection.
+ *
+ * @param connection
+ * The LDAP connection.
+ * @param profile
+ * The LDAP profile.
+ * @param options
+ * Options to decode values of property definitions.
+ * @return Returns the new management context.
+ */
+ public static ManagementContext createFromContext(LDAPConnection connection, LDAPProfile profile,
+ PropertyDefinitionsOptions options) {
+ Reject.ifNull(connection, profile, options);
+ LDAPDriver driver = new LDAPDriver(connection, profile, options);
+ LDAPManagementContext context = new LDAPManagementContext(driver, options);
+ driver.setManagementContext(context);
+ return context;
+ }
+
+ /** The LDAP management context driver. */
+ private final LDAPDriver driver;
+
+ /** Options to validate and decode values of property definitions. */
+ private final PropertyDefinitionsOptions options;
+
+ /** Private constructor. */
+ private LDAPManagementContext(LDAPDriver driver, PropertyDefinitionsOptions options) {
+ this.driver = driver;
+ this.options = options;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ protected Driver getDriver() {
+ return driver;
+ }
+
+ /**
+ * Returns the property definitions options.
+ *
+ * @return the options to validate and decode values of property
+ * definitions.
+ */
+ protected PropertyDefinitionsOptions getPropertyDefOptions() {
+ return options;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPNameBuilder.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPNameBuilder.java
new file mode 100644
index 0000000..6699487
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPNameBuilder.java
@@ -0,0 +1,214 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config.client.ldap;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.ConfigurationClient;
+import org.forgerock.opendj.config.InstantiableRelationDefinition;
+import org.forgerock.opendj.config.LDAPProfile;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.ManagedObjectPathSerializer;
+import org.forgerock.opendj.config.OptionalRelationDefinition;
+import org.forgerock.opendj.config.RelationDefinition;
+import org.forgerock.opendj.config.SetRelationDefinition;
+import org.forgerock.opendj.config.SingletonRelationDefinition;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.RDN;
+
+/**
+ * A strategy for creating <code>DN</code>s from managed object paths.
+ */
+final class LDAPNameBuilder implements ManagedObjectPathSerializer {
+
+ /**
+ * Creates a new DN representing the specified managed object path.
+ *
+ * @param path
+ * The managed object path.
+ * @param profile
+ * The LDAP profile which should be used to construct LDAP names.
+ * @return Returns a new DN representing the specified managed object path.
+ */
+ public static DN create(ManagedObjectPath<?, ?> path, LDAPProfile profile) {
+ LDAPNameBuilder builder = new LDAPNameBuilder(profile);
+ path.serialize(builder);
+ return builder.getInstance();
+ }
+
+ /**
+ * Creates a new DN representing the specified managed object path and
+ * instantiable relation.
+ *
+ * @param path
+ * The managed object path.
+ * @param relation
+ * The child instantiable relation.
+ * @param profile
+ * The LDAP profile which should be used to construct LDAP names.
+ * @return Returns a new DN representing the specified managed object path
+ * and instantiable relation.
+ */
+ public static DN create(ManagedObjectPath<?, ?> path, InstantiableRelationDefinition<?, ?> relation,
+ LDAPProfile profile) {
+ LDAPNameBuilder builder = new LDAPNameBuilder(profile);
+ path.serialize(builder);
+ builder.appendManagedObjectPathElement(relation);
+ return builder.getInstance();
+ }
+
+ /**
+ * Creates a new DN representing the specified managed object path and set
+ * relation.
+ *
+ * @param path
+ * The managed object path.
+ * @param relation
+ * The child set relation.
+ * @param profile
+ * The LDAP profile which should be used to construct LDAP names.
+ * @return Returns a new DN representing the specified managed object path
+ * and set relation.
+ */
+ public static DN create(ManagedObjectPath<?, ?> path, SetRelationDefinition<?, ?> relation, LDAPProfile profile) {
+ LDAPNameBuilder builder = new LDAPNameBuilder(profile);
+ path.serialize(builder);
+ builder.appendManagedObjectPathElement(relation);
+ return builder.getInstance();
+ }
+
+ /** The list of RDNs in big-endian order. */
+ private final LinkedList<RDN> rdns;
+
+ private final LDAPProfile profile;
+
+ /**
+ * Create a new DN builder.
+ *
+ * @param profile
+ * The LDAP profile which should be used to construct DNs.
+ */
+ public LDAPNameBuilder(LDAPProfile profile) {
+ this.rdns = new LinkedList<RDN>();
+ this.profile = profile;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
+ InstantiableRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d,
+ String name) {
+ // Add the RDN sequence representing the relation.
+ appendManagedObjectPathElement(r);
+
+ // Now add the single RDN representing the named instance.
+ String type = profile.getRelationChildRDNType(r);
+ RDN rdn = new RDN(type, name.trim());
+ rdns.add(rdn);
+
+ }
+
+ /**
+ * Appends the RDN sequence representing the provided relation.
+ *
+ * @param r
+ * The relation definition.
+ */
+ public void appendManagedObjectPathElement(RelationDefinition<?, ?> r) {
+ // Add the RDN sequence representing the relation.
+ DN dn = DN.valueOf(profile.getRelationRDNSequence(r));
+ List<RDN> rdnsOfDn = getRdnsInBigEndianOrder(dn);
+ rdns.addAll(rdnsOfDn);
+ }
+
+ /**
+ * Returns list of RDNs of provided DN in big-endian order.
+ *
+ * @param dn
+ * The DN to decompose in RDNs.
+ * @return rdns in big endian order
+ */
+ private List<RDN> getRdnsInBigEndianOrder(DN dn) {
+ List<RDN> rdnsOfDn = new ArrayList<RDN>();
+ for (RDN rdn : dn) {
+ rdnsOfDn.add(rdn);
+ }
+ Collections.reverse(rdnsOfDn);
+ return rdnsOfDn;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
+ OptionalRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
+ // Add the RDN sequence representing the relation.
+ appendManagedObjectPathElement(r);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
+ SingletonRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
+ // Add the RDN sequence representing the relation.
+ appendManagedObjectPathElement(r);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
+ SetRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
+ // Add the RDN sequence representing the relation.
+ appendManagedObjectPathElement(r);
+
+ // Now add the single RDN representing the named instance.
+ String type = profile.getRelationChildRDNType(r);
+ RDN rdn = new RDN(type, d.getName());
+ rdns.add(rdn);
+ }
+
+ /**
+ * Create a new DN using the current state of this builder.
+ *
+ * @return Returns the new DN instance.
+ */
+ public DN getInstance() {
+ DN dn = DN.rootDN();
+ for (RDN rdn : rdns) {
+ dn = dn.child(rdn);
+ }
+ return dn;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/package-info.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/package-info.java
new file mode 100644
index 0000000..a3b00b5
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/package-info.java
@@ -0,0 +1,37 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+
+
+/**
+ * LDAP configuration transport implementation.
+ * <p>
+ * This implementation uses JNDI for all communication. It is expected
+ * that, at some point in the future, we will replace this implementation
+ * with our own LDAP client SDK based implementation.
+ */
+package org.forgerock.opendj.config.client.ldap;
+
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/package-info.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/package-info.java
new file mode 100644
index 0000000..324e788
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/package-info.java
@@ -0,0 +1,34 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+/**
+ * Common client-side administration classes.
+ * <p>
+ * This package contains classes which client applications are
+ * expected to use.
+ */
+package org.forgerock.opendj.config.client;
+
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/AbstractManagedObject.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/AbstractManagedObject.java
new file mode 100644
index 0000000..6718a02
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/AbstractManagedObject.java
@@ -0,0 +1,865 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client.spi;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.ConfigurationClient;
+import org.forgerock.opendj.config.Constraint;
+import org.forgerock.opendj.config.DefaultBehaviorException;
+import org.forgerock.opendj.config.DefaultManagedObject;
+import org.forgerock.opendj.config.DefinitionDecodingException;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.InstantiableRelationDefinition;
+import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.ManagedObjectNotFoundException;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.OptionalRelationDefinition;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.PropertyIsMandatoryException;
+import org.forgerock.opendj.config.PropertyIsReadOnlyException;
+import org.forgerock.opendj.config.PropertyOption;
+import org.forgerock.opendj.config.RelationDefinition;
+import org.forgerock.opendj.config.RelationDefinitionVisitor;
+import org.forgerock.opendj.config.SetRelationDefinition;
+import org.forgerock.opendj.config.SingletonRelationDefinition;
+import org.forgerock.opendj.config.DefinitionDecodingException.Reason;
+import org.forgerock.opendj.config.client.ClientConstraintHandler;
+import org.forgerock.opendj.config.client.ConcurrentModificationException;
+import org.forgerock.opendj.config.client.IllegalManagedObjectNameException;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagedObjectDecodingException;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException;
+import org.forgerock.opendj.config.client.OperationRejectedException;
+import org.forgerock.opendj.config.client.OperationRejectedException.OperationType;
+import org.forgerock.opendj.ldap.ErrorResultException;
+
+/**
+ * An abstract managed object implementation.
+ *
+ * @param <T>
+ * The type of client configuration represented by the client managed
+ * object.
+ */
+public abstract class AbstractManagedObject<T extends ConfigurationClient> implements ManagedObject<T> {
+
+ /**
+ * Creates any default managed objects associated with a relation
+ * definition.
+ */
+ private final class DefaultManagedObjectFactory implements RelationDefinitionVisitor<Void, Void> {
+
+ // Possible exceptions.
+ private ManagedObjectAlreadyExistsException moaee = null;
+
+ private MissingMandatoryPropertiesException mmpe = null;
+
+ private ConcurrentModificationException cme = null;
+
+ private OperationRejectedException ore = null;
+
+ private ErrorResultException ere = null;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <C extends ConfigurationClient, S extends Configuration> Void visitInstantiable(
+ InstantiableRelationDefinition<C, S> rd, Void p) {
+ for (String name : rd.getDefaultManagedObjectNames()) {
+ DefaultManagedObject<? extends C, ? extends S> dmo = rd.getDefaultManagedObject(name);
+ ManagedObjectDefinition<? extends C, ? extends S> d = dmo.getManagedObjectDefinition();
+ ManagedObject<? extends C> child;
+ try {
+ child = createChild(rd, d, name, null);
+ } catch (IllegalManagedObjectNameException e) {
+ // This should not happen.
+ throw new RuntimeException(e);
+ }
+ createDefaultManagedObject(d, child, dmo);
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <C extends ConfigurationClient, S extends Configuration> Void visitOptional(
+ OptionalRelationDefinition<C, S> rd, Void p) {
+ if (rd.getDefaultManagedObject() != null) {
+ DefaultManagedObject<? extends C, ? extends S> dmo = rd.getDefaultManagedObject();
+ ManagedObjectDefinition<? extends C, ? extends S> d = dmo.getManagedObjectDefinition();
+ ManagedObject<? extends C> child = createChild(rd, d, null);
+ createDefaultManagedObject(d, child, dmo);
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <C extends ConfigurationClient, S extends Configuration> Void visitSingleton(
+ SingletonRelationDefinition<C, S> rd, Void p) {
+ // Do nothing - not possible to create singletons
+ // dynamically.
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <C extends ConfigurationClient, S extends Configuration> Void visitSet(SetRelationDefinition<C, S> rd,
+ Void p) {
+ for (String name : rd.getDefaultManagedObjectNames()) {
+ DefaultManagedObject<? extends C, ? extends S> dmo = rd.getDefaultManagedObject(name);
+ ManagedObjectDefinition<? extends C, ? extends S> d = dmo.getManagedObjectDefinition();
+ ManagedObject<? extends C> child = createChild(rd, d, null);
+ createDefaultManagedObject(d, child, dmo);
+ }
+ return null;
+ }
+
+ // Create the child managed object.
+ private void createDefaultManagedObject(ManagedObjectDefinition<?, ?> d, ManagedObject<?> child,
+ DefaultManagedObject<?, ?> dmo) {
+ for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) {
+ setPropertyValues(child, pd, dmo);
+ }
+
+ try {
+ child.commit();
+ } catch (ManagedObjectAlreadyExistsException e) {
+ moaee = e;
+ } catch (MissingMandatoryPropertiesException e) {
+ mmpe = e;
+ } catch (ConcurrentModificationException e) {
+ cme = e;
+ } catch (OperationRejectedException e) {
+ ore = e;
+ } catch (ErrorResultException e) {
+ ere = e;
+ }
+ }
+
+ /**
+ * Creates the default managed objects associated with the provided
+ * relation definition.
+ *
+ * @param rd
+ * The relation definition.
+ */
+ private void createDefaultManagedObjects(RelationDefinition<?, ?> rd) throws ErrorResultException,
+ ConcurrentModificationException, MissingMandatoryPropertiesException,
+ ManagedObjectAlreadyExistsException, OperationRejectedException {
+ rd.accept(this, null);
+
+ if (ere != null) {
+ throw ere;
+ } else if (cme != null) {
+ throw cme;
+ } else if (mmpe != null) {
+ throw mmpe;
+ } else if (moaee != null) {
+ throw moaee;
+ } else if (ore != null) {
+ throw ore;
+ }
+ }
+
+ // Set property values.
+ private <P> void setPropertyValues(ManagedObject<?> mo, PropertyDefinition<P> pd,
+ DefaultManagedObject<?, ?> dmo) {
+ mo.setPropertyValues(pd, dmo.getPropertyValues(pd));
+ }
+ }
+
+ // The managed object definition associated with this managed
+ // object.
+ private final ManagedObjectDefinition<T, ? extends Configuration> definition;
+
+ // Indicates whether or not this managed object exists on the server
+ // (false means the managed object is new and has not been
+ // committed).
+ private boolean existsOnServer;
+
+ // Optional naming property definition.
+ private final PropertyDefinition<?> namingPropertyDefinition;
+
+ // The path associated with this managed object.
+ private ManagedObjectPath<T, ? extends Configuration> path;
+
+ // The managed object's properties.
+ private final PropertySet properties;
+
+ /** Decoding options for property definitions values. */
+ private final PropertyDefinitionsOptions propertyDefOptions;
+
+ /**
+ * Creates a new abstract managed object.
+ *
+ * @param d
+ * The managed object's definition.
+ * @param path
+ * The managed object's path.
+ * @param properties
+ * The managed object's properties.
+ * @param existsOnServer
+ * Indicates whether or not the managed object exists on the
+ * server (false means the managed object is new and has not been
+ * committed).
+ * @param namingPropertyDefinition
+ * Optional naming property definition.
+ * @param propertyDefOptions TODO
+ */
+ protected AbstractManagedObject(ManagedObjectDefinition<T, ? extends Configuration> d,
+ ManagedObjectPath<T, ? extends Configuration> path, PropertySet properties, boolean existsOnServer,
+ PropertyDefinition<?> namingPropertyDefinition, PropertyDefinitionsOptions propertyDefOptions) {
+ this.definition = d;
+ this.path = path;
+ this.properties = properties;
+ this.existsOnServer = existsOnServer;
+ this.namingPropertyDefinition = namingPropertyDefinition;
+ this.propertyDefOptions = propertyDefOptions;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final void commit() throws ManagedObjectAlreadyExistsException, MissingMandatoryPropertiesException,
+ ConcurrentModificationException, OperationRejectedException, ErrorResultException {
+ // First make sure all mandatory properties are defined.
+ List<PropertyIsMandatoryException> exceptions = new LinkedList<PropertyIsMandatoryException>();
+
+ for (PropertyDefinition<?> pd : definition.getAllPropertyDefinitions()) {
+ Property<?> p = getProperty(pd);
+ if (pd.hasOption(PropertyOption.MANDATORY) && p.getEffectiveValues().isEmpty()) {
+ exceptions.add(new PropertyIsMandatoryException(pd));
+ }
+ }
+
+ if (!exceptions.isEmpty()) {
+ throw new MissingMandatoryPropertiesException(definition.getUserFriendlyName(), exceptions,
+ !existsOnServer);
+ }
+
+ // Now enforce any constraints.
+ List<LocalizableMessage> messages = new LinkedList<LocalizableMessage>();
+ boolean isAcceptable = true;
+ ManagementContext context = getDriver().getManagementContext();
+
+ for (Constraint constraint : definition.getAllConstraints()) {
+ for (ClientConstraintHandler handler : constraint.getClientConstraintHandlers()) {
+ if (existsOnServer) {
+ if (!handler.isModifyAcceptable(context, this, messages)) {
+ isAcceptable = false;
+ }
+ } else {
+ if (!handler.isAddAcceptable(context, this, messages)) {
+ isAcceptable = false;
+ }
+ }
+ }
+ if (!isAcceptable) {
+ break;
+ }
+ }
+
+ if (!isAcceptable) {
+ if (existsOnServer) {
+ throw new OperationRejectedException(OperationType.MODIFY, definition.getUserFriendlyName(), messages);
+ } else {
+ throw new OperationRejectedException(OperationType.CREATE, definition.getUserFriendlyName(), messages);
+ }
+ }
+
+ // Commit the managed object.
+ if (existsOnServer) {
+ modifyExistingManagedObject();
+ } else {
+ addNewManagedObject();
+ }
+
+ // Make all pending property values active.
+ properties.commit();
+
+ // If the managed object was created make sure that any default
+ // subordinate managed objects are also created.
+ if (!existsOnServer) {
+ DefaultManagedObjectFactory factory = new DefaultManagedObjectFactory();
+ for (RelationDefinition<?, ?> rd : definition.getAllRelationDefinitions()) {
+ factory.createDefaultManagedObjects(rd);
+ }
+
+ existsOnServer = true;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
+ InstantiableRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d, String name,
+ Collection<DefaultBehaviorException> exceptions) throws IllegalManagedObjectNameException {
+ validateRelationDefinition(r);
+
+ // Empty names are not allowed.
+ if (name.trim().length() == 0) {
+ throw new IllegalManagedObjectNameException(name);
+ }
+
+ // If the relation uses a naming property definition then it must
+ // be a valid value.
+ PropertyDefinition<?> pd = r.getNamingPropertyDefinition();
+ if (pd != null) {
+ try {
+ pd.decodeValue(name, propertyDefOptions);
+ } catch (IllegalPropertyValueStringException e) {
+ throw new IllegalManagedObjectNameException(name, pd, propertyDefOptions);
+ }
+ }
+
+ ManagedObjectPath<C1, ? extends S> childPath = path.child(r, d, name);
+ return createNewManagedObject(d, childPath, pd, name, exceptions);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
+ OptionalRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d,
+ Collection<DefaultBehaviorException> exceptions) {
+ validateRelationDefinition(r);
+ ManagedObjectPath<C1, ? extends S> childPath = path.child(r, d);
+ return createNewManagedObject(d, childPath, null, null, exceptions);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
+ SetRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d,
+ Collection<DefaultBehaviorException> exceptions) {
+ validateRelationDefinition(r);
+
+ ManagedObjectPath<C1, ? extends S> childPath = path.child(r, d);
+ return createNewManagedObject(d, childPath, null, null, exceptions);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
+ InstantiableRelationDefinition<C, S> r, String name) throws DefinitionDecodingException,
+ ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
+ ErrorResultException {
+ validateRelationDefinition(r);
+ ensureThisManagedObjectExists();
+ Driver ctx = getDriver();
+ return ctx.getManagedObject(path.child(r, name));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
+ OptionalRelationDefinition<C, S> r) throws DefinitionDecodingException, ManagedObjectDecodingException,
+ ManagedObjectNotFoundException, ConcurrentModificationException, ErrorResultException {
+ validateRelationDefinition(r);
+ ensureThisManagedObjectExists();
+ Driver ctx = getDriver();
+ return ctx.getManagedObject(path.child(r));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
+ SingletonRelationDefinition<C, S> r) throws DefinitionDecodingException, ManagedObjectDecodingException,
+ ManagedObjectNotFoundException, ConcurrentModificationException, ErrorResultException {
+ validateRelationDefinition(r);
+ ensureThisManagedObjectExists();
+ Driver ctx = getDriver();
+ return ctx.getManagedObject(path.child(r));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
+ SetRelationDefinition<C, S> r, String name) throws DefinitionDecodingException,
+ ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
+ ErrorResultException {
+ validateRelationDefinition(r);
+ ensureThisManagedObjectExists();
+ Driver ctx = getDriver();
+
+ AbstractManagedObjectDefinition<C, S> d = r.getChildDefinition();
+ AbstractManagedObjectDefinition<? extends C, ? extends S> cd;
+
+ try {
+ cd = d.getChild(name);
+ } catch (IllegalArgumentException e) {
+ // Unrecognized definition name - report this as a decoding
+ // exception.
+ throw new DefinitionDecodingException(d, Reason.WRONG_TYPE_INFORMATION);
+ }
+
+ return ctx.getManagedObject(path.child(r, cd));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final T getConfiguration() {
+ return definition.createClientConfiguration(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final ManagedObjectDefinition<T, ? extends Configuration> getManagedObjectDefinition() {
+ return definition;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final ManagedObjectPath<T, ? extends Configuration> getManagedObjectPath() {
+ return path;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <P> SortedSet<P> getPropertyDefaultValues(PropertyDefinition<P> pd) {
+ return new TreeSet<P>(getProperty(pd).getDefaultValues());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <P> P getPropertyValue(PropertyDefinition<P> pd) {
+ Set<P> values = getProperty(pd).getEffectiveValues();
+ if (values.isEmpty()) {
+ return null;
+ } else {
+ return values.iterator().next();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <P> SortedSet<P> getPropertyValues(PropertyDefinition<P> pd) {
+ return new TreeSet<P>(getProperty(pd).getEffectiveValues());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration> boolean hasChild(
+ OptionalRelationDefinition<C, S> r) throws ConcurrentModificationException, ErrorResultException {
+ validateRelationDefinition(r);
+ Driver ctx = getDriver();
+ try {
+ return ctx.managedObjectExists(path.child(r));
+ } catch (ManagedObjectNotFoundException e) {
+ throw new ConcurrentModificationException();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final boolean isPropertyPresent(PropertyDefinition<?> pd) {
+ return !getProperty(pd).isEmpty();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
+ InstantiableRelationDefinition<C, S> r) throws ConcurrentModificationException, ErrorResultException {
+ return listChildren(r, r.getChildDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
+ InstantiableRelationDefinition<C, S> r, AbstractManagedObjectDefinition<? extends C, ? extends S> d)
+ throws ConcurrentModificationException, ErrorResultException {
+ validateRelationDefinition(r);
+ Driver ctx = getDriver();
+ try {
+ return ctx.listManagedObjects(path, r, d);
+ } catch (ManagedObjectNotFoundException e) {
+ throw new ConcurrentModificationException();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
+ SetRelationDefinition<C, S> r) throws ConcurrentModificationException, ErrorResultException {
+ return listChildren(r, r.getChildDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
+ SetRelationDefinition<C, S> r, AbstractManagedObjectDefinition<? extends C, ? extends S> d)
+ throws ConcurrentModificationException, ErrorResultException {
+ validateRelationDefinition(r);
+ Driver ctx = getDriver();
+ try {
+ return ctx.listManagedObjects(path, r, d);
+ } catch (ManagedObjectNotFoundException e) {
+ throw new ConcurrentModificationException();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration> void removeChild(
+ InstantiableRelationDefinition<C, S> r, String name) throws ManagedObjectNotFoundException,
+ OperationRejectedException, ConcurrentModificationException, ErrorResultException {
+ validateRelationDefinition(r);
+ Driver ctx = getDriver();
+ boolean found;
+
+ try {
+ found = ctx.deleteManagedObject(path, r, name);
+ } catch (ManagedObjectNotFoundException e) {
+ throw new ConcurrentModificationException();
+ }
+
+ if (!found) {
+ throw new ManagedObjectNotFoundException();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration> void removeChild(
+ OptionalRelationDefinition<C, S> r) throws ManagedObjectNotFoundException, OperationRejectedException,
+ ConcurrentModificationException, ErrorResultException {
+ validateRelationDefinition(r);
+ Driver ctx = getDriver();
+ boolean found;
+
+ try {
+ found = ctx.deleteManagedObject(path, r);
+ } catch (ManagedObjectNotFoundException e) {
+ throw new ConcurrentModificationException();
+ }
+
+ if (!found) {
+ throw new ManagedObjectNotFoundException();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <C extends ConfigurationClient, S extends Configuration> void removeChild(
+ SetRelationDefinition<C, S> r, String name) throws ManagedObjectNotFoundException,
+ OperationRejectedException, ConcurrentModificationException, ErrorResultException {
+ validateRelationDefinition(r);
+ Driver ctx = getDriver();
+ boolean found;
+
+ try {
+ found = ctx.deleteManagedObject(path, r, name);
+ } catch (ManagedObjectNotFoundException e) {
+ throw new ConcurrentModificationException();
+ }
+
+ if (!found) {
+ throw new ManagedObjectNotFoundException();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <P> void setPropertyValue(PropertyDefinition<P> pd, P value) {
+ if (value == null) {
+ setPropertyValues(pd, Collections.<P> emptySet());
+ } else {
+ setPropertyValues(pd, Collections.singleton(value));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public final <P> void setPropertyValues(PropertyDefinition<P> pd, Collection<P> values) {
+ if (pd.hasOption(PropertyOption.MONITORING)) {
+ throw new PropertyIsReadOnlyException(pd);
+ }
+
+ if (existsOnServer && pd.hasOption(PropertyOption.READ_ONLY)) {
+ throw new PropertyIsReadOnlyException(pd);
+ }
+
+ properties.setPropertyValues(pd, values, propertyDefOptions);
+
+ // If this is a naming property then update the name.
+ if (pd.equals(namingPropertyDefinition)) {
+ // The property must be single-valued and mandatory.
+ String newName = pd.encodeValue(values.iterator().next());
+ path = path.rename(newName);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+
+ builder.append("{ TYPE=");
+ builder.append(definition.getName());
+ builder.append(", PATH=\"");
+ builder.append(path);
+ builder.append('\"');
+ for (PropertyDefinition<?> pd : definition.getAllPropertyDefinitions()) {
+ builder.append(", ");
+ builder.append(pd.getName());
+ builder.append('=');
+ builder.append(getPropertyValues(pd));
+ }
+ builder.append(" }");
+
+ return builder.toString();
+ }
+
+ /**
+ * Adds this new managed object.
+ *
+ * @throws ManagedObjectAlreadyExistsException
+ * If the managed object cannot be added to the server because
+ * it already exists.
+ * @throws ConcurrentModificationException
+ * If the managed object's parent has been removed by another
+ * client.
+ * @throws OperationRejectedException
+ * If the managed object cannot be added due to some client-side
+ * or server-side constraint which cannot be satisfied.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ protected abstract void addNewManagedObject() throws ErrorResultException, OperationRejectedException,
+ ConcurrentModificationException, ManagedObjectAlreadyExistsException;
+
+ /**
+ * Gets the management context driver associated with this managed object.
+ *
+ * @return Returns the management context driver associated with this
+ * managed object.
+ */
+ protected abstract Driver getDriver();
+
+ /**
+ * Gets the naming property definition associated with this managed object.
+ *
+ * @return Returns the naming property definition associated with this
+ * managed object, or <code>null</code> if this managed object does
+ * not have a naming property.
+ */
+ protected final PropertyDefinition<?> getNamingPropertyDefinition() {
+ return namingPropertyDefinition;
+ }
+
+ /**
+ * Gets the property associated with the specified property definition.
+ *
+ * @param <P>
+ * The underlying type of the property.
+ * @param pd
+ * The Property definition.
+ * @return Returns the property associated with the specified property
+ * definition.
+ * @throws IllegalArgumentException
+ * If this property provider does not recognize the requested
+ * property definition.
+ */
+ protected final <P> Property<P> getProperty(PropertyDefinition<P> pd) {
+ return properties.getProperty(pd);
+ }
+
+ /**
+ * Applies changes made to this managed object.
+ *
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server by
+ * another client.
+ * @throws OperationRejectedException
+ * If the managed object cannot be added due to some client-side
+ * or server-side constraint which cannot be satisfied.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ protected abstract void modifyExistingManagedObject() throws ConcurrentModificationException,
+ OperationRejectedException, ErrorResultException;
+
+ /**
+ * Creates a new managed object.
+ *
+ * @param <M>
+ * The type of client configuration represented by the client
+ * managed object.
+ * @param d
+ * The managed object's definition.
+ * @param path
+ * The managed object's path.
+ * @param properties
+ * The managed object's properties.
+ * @param existsOnServer
+ * Indicates whether or not the managed object exists on the
+ * server (false means the managed object is new and has not been
+ * committed).
+ * @param namingPropertyDefinition
+ * Optional naming property definition.
+ * @return Returns the new managed object.
+ */
+ protected abstract <M extends ConfigurationClient> ManagedObject<M> newInstance(ManagedObjectDefinition<M, ?> d,
+ ManagedObjectPath<M, ?> path, PropertySet properties, boolean existsOnServer,
+ PropertyDefinition<?> namingPropertyDefinition);
+
+ // Creates a new managed object with no active values, just default
+ // values.
+ private <M extends ConfigurationClient, P> ManagedObject<M> createNewManagedObject(
+ ManagedObjectDefinition<M, ?> d, ManagedObjectPath<M, ?> p, PropertyDefinition<P> namingPropertyDefinition,
+ String name, Collection<DefaultBehaviorException> exceptions) {
+ PropertySet childProperties = new PropertySet();
+ for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) {
+ try {
+ createProperty(childProperties, p, pd);
+ } catch (DefaultBehaviorException e) {
+ // Add the exception if requested.
+ if (exceptions != null) {
+ exceptions.add(e);
+ }
+ }
+ }
+
+ // Set the naming property if there is one.
+ if (namingPropertyDefinition != null) {
+ P value = namingPropertyDefinition.decodeValue(name, propertyDefOptions);
+ childProperties.setPropertyValues(namingPropertyDefinition, Collections.singleton(value),
+ propertyDefOptions);
+ }
+
+ return newInstance(d, p, childProperties, false, namingPropertyDefinition);
+ }
+
+ // Create an empty property.
+ private <P> void createProperty(PropertySet properties, ManagedObjectPath<?, ?> p, PropertyDefinition<P> pd) {
+ try {
+ Driver context = getDriver();
+ Collection<P> defaultValues = context.findDefaultValues(p, pd, true);
+ properties.addProperty(pd, defaultValues, Collections.<P> emptySet());
+ } catch (DefaultBehaviorException e) {
+ // Make sure that we have still created the property.
+ properties.addProperty(pd, Collections.<P> emptySet(), Collections.<P> emptySet());
+ throw e;
+ }
+ }
+
+ // Makes sure that this managed object exists.
+ private void ensureThisManagedObjectExists() throws ConcurrentModificationException, ErrorResultException {
+ if (!path.isEmpty()) {
+ Driver ctx = getDriver();
+
+ try {
+ if (!ctx.managedObjectExists(path)) {
+ throw new ConcurrentModificationException();
+ }
+ } catch (ManagedObjectNotFoundException e) {
+ throw new ConcurrentModificationException();
+ }
+ }
+ }
+
+ // Validate that a relation definition belongs to this managed
+ // object.
+ private void validateRelationDefinition(RelationDefinition<?, ?> rd) {
+ ManagedObjectDefinition<T, ?> d = getManagedObjectDefinition();
+ RelationDefinition<?, ?> tmp = d.getRelationDefinition(rd.getName());
+ if (tmp != rd) {
+ throw new IllegalArgumentException("The relation " + rd.getName() + " is not associated with a "
+ + d.getName());
+ }
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/Driver.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/Driver.java
new file mode 100644
index 0000000..e33ffb8
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/Driver.java
@@ -0,0 +1,671 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2009 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client.spi;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.SortedSet;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.server.config.client.RootCfgClient;
+import org.forgerock.opendj.config.AbsoluteInheritedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.AliasDefaultBehaviorProvider;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.ConfigurationClient;
+import org.forgerock.opendj.config.Constraint;
+import org.forgerock.opendj.config.DefaultBehaviorException;
+import org.forgerock.opendj.config.DefaultBehaviorProviderVisitor;
+import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefinitionDecodingException;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.InstantiableRelationDefinition;
+import org.forgerock.opendj.config.ManagedObjectNotFoundException;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.OptionalRelationDefinition;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.PropertyException;
+import org.forgerock.opendj.config.PropertyIsSingleValuedException;
+import org.forgerock.opendj.config.PropertyNotFoundException;
+import org.forgerock.opendj.config.PropertyOption;
+import org.forgerock.opendj.config.RelationDefinition;
+import org.forgerock.opendj.config.RelativeInheritedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.SetRelationDefinition;
+import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefinitionDecodingException.Reason;
+import org.forgerock.opendj.config.client.ClientConstraintHandler;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagedObjectDecodingException;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.client.OperationRejectedException;
+import org.forgerock.opendj.config.client.OperationRejectedException.OperationType;
+import org.forgerock.opendj.ldap.ErrorResultException;
+
+/**
+ * An abstract management connection context driver which should form the basis
+ * of driver implementations.
+ */
+public abstract class Driver {
+
+ /**
+ * A default behavior visitor used for retrieving the default values of a
+ * property.
+ *
+ * @param <T>
+ * The type of the property.
+ */
+ private final class DefaultValueFinder<T> implements DefaultBehaviorProviderVisitor<T, Collection<T>, Void> {
+
+ // Any exception that occurred whilst retrieving inherited default
+ // values.
+ private DefaultBehaviorException exception = null;
+
+ // The path of the managed object containing the first property.
+ private final ManagedObjectPath<?, ?> firstPath;
+
+ // Indicates whether the managed object has been created yet.
+ private final boolean isCreate;
+
+ // The path of the managed object containing the next property.
+ private ManagedObjectPath<?, ?> nextPath = null;
+
+ // The next property whose default values were required.
+ private PropertyDefinition<T> nextProperty = null;
+
+ // Private constructor.
+ private DefaultValueFinder(ManagedObjectPath<?, ?> p, boolean isCreate) {
+ this.firstPath = p;
+ this.isCreate = isCreate;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<T> visitAbsoluteInherited(AbsoluteInheritedDefaultBehaviorProvider<T> d, Void p) {
+ try {
+ return getInheritedProperty(d.getManagedObjectPath(), d.getManagedObjectDefinition(),
+ d.getPropertyName());
+ } catch (DefaultBehaviorException e) {
+ exception = e;
+ return Collections.emptySet();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<T> visitAlias(AliasDefaultBehaviorProvider<T> d, Void p) {
+ return Collections.emptySet();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<T> visitDefined(DefinedDefaultBehaviorProvider<T> d, Void p) {
+ Collection<String> stringValues = d.getDefaultValues();
+ List<T> values = new ArrayList<T>(stringValues.size());
+
+ for (String stringValue : stringValues) {
+ try {
+ values.add(nextProperty.decodeValue(stringValue, propertyDefOptions));
+ } catch (IllegalPropertyValueStringException e) {
+ exception = new DefaultBehaviorException(nextProperty, e);
+ break;
+ }
+ }
+
+ return values;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<T> visitRelativeInherited(RelativeInheritedDefaultBehaviorProvider<T> d, Void p) {
+ try {
+ return getInheritedProperty(d.getManagedObjectPath(nextPath), d.getManagedObjectDefinition(),
+ d.getPropertyName());
+ } catch (DefaultBehaviorException e) {
+ exception = e;
+ return Collections.emptySet();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<T> visitUndefined(UndefinedDefaultBehaviorProvider<T> d, Void p) {
+ return Collections.emptySet();
+ }
+
+ // Find the default values for the next path/property.
+ private Collection<T> find(ManagedObjectPath<?, ?> p, PropertyDefinition<T> pd) {
+ this.nextPath = p;
+ this.nextProperty = pd;
+
+ Collection<T> values = nextProperty.getDefaultBehaviorProvider().accept(this, null);
+
+ if (exception != null) {
+ throw exception;
+ }
+
+ if (values.size() > 1 && !pd.hasOption(PropertyOption.MULTI_VALUED)) {
+ throw new DefaultBehaviorException(pd, new PropertyIsSingleValuedException(pd));
+ }
+
+ return values;
+ }
+
+ // Get an inherited property value.
+ @SuppressWarnings("unchecked")
+ private Collection<T> getInheritedProperty(ManagedObjectPath<?, ?> target,
+ AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+ // First check that the requested type of managed object
+ // corresponds to the path.
+ AbstractManagedObjectDefinition<?, ?> supr = target.getManagedObjectDefinition();
+ if (!supr.isParentOf(d)) {
+ throw new DefaultBehaviorException(nextProperty, new DefinitionDecodingException(supr,
+ Reason.WRONG_TYPE_INFORMATION));
+ }
+
+ // Save the current property in case of recursion.
+ PropertyDefinition<T> pd1 = nextProperty;
+
+ try {
+ // Determine the requested property definition.
+ PropertyDefinition<T> pd2;
+ try {
+ // FIXME: we use the definition taken from the default
+ // behavior here when we should really use the exact
+ // definition of the component being created.
+ PropertyDefinition<?> pdTmp = d.getPropertyDefinition(propertyName);
+ pd2 = pd1.getClass().cast(pdTmp);
+ } catch (IllegalArgumentException e) {
+ throw new PropertyNotFoundException(propertyName);
+ } catch (ClassCastException e) {
+ // FIXME: would be nice to throw a better exception here.
+ throw new PropertyNotFoundException(propertyName);
+ }
+
+ // If the path relates to the current managed object and the
+ // managed object is in the process of being created it won't
+ // exist, so we should just use the default values of the
+ // referenced property.
+ if (isCreate && firstPath.equals(target)) {
+ // Recursively retrieve this property's default values.
+ Collection<T> tmp = find(target, pd2);
+ Collection<T> values = new ArrayList<T>(tmp.size());
+ for (T value : tmp) {
+ pd1.validateValue(value, propertyDefOptions);
+ values.add(value);
+ }
+ return values;
+ } else {
+ // FIXME: issue 2481 - this is broken if the referenced
+ // property
+ // inherits its defaults from the newly created managed
+ // object.
+ return getPropertyValues(target, pd2);
+ }
+ } catch (DefaultBehaviorException e) {
+ // Wrap any errors due to recursion.
+ throw new DefaultBehaviorException(pd1, e);
+ } catch (DefinitionDecodingException e) {
+ throw new DefaultBehaviorException(pd1, e);
+ } catch (PropertyNotFoundException e) {
+ throw new DefaultBehaviorException(pd1, e);
+ } catch (ErrorResultException e) {
+ throw new DefaultBehaviorException(pd1, e);
+ } catch (ManagedObjectNotFoundException e) {
+ throw new DefaultBehaviorException(pd1, e);
+ } catch (PropertyException e) {
+ throw new DefaultBehaviorException(pd1, e);
+ }
+ }
+ };
+
+ private final PropertyDefinitionsOptions propertyDefOptions;
+
+ /**
+ * Creates a new abstract driver.
+ *
+ * @param propertyDefOptions
+ * Decoding options for property definitions values.
+ */
+ protected Driver(PropertyDefinitionsOptions propertyDefOptions) {
+ this.propertyDefOptions = propertyDefOptions;
+ }
+
+ /**
+ * Closes any context associated with this management context driver.
+ */
+ public void close() {
+ // do nothing by default
+ }
+
+ /**
+ * Deletes the named instantiable child managed object from the named parent
+ * managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param parent
+ * The path of the parent managed object.
+ * @param rd
+ * The instantiable relation definition.
+ * @param name
+ * The name of the child managed object to be removed.
+ * @return Returns <code>true</code> if the named instantiable child managed
+ * object was found, or <code>false</code> if it was not found.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with the parent
+ * managed object's definition.
+ * @throws ManagedObjectNotFoundException
+ * If the parent managed object could not be found.
+ * @throws OperationRejectedException
+ * If the managed object cannot be removed due to some
+ * client-side or server-side constraint which cannot be
+ * satisfied (for example, if it is referenced by another
+ * managed object).
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject(
+ ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd, String name)
+ throws ManagedObjectNotFoundException, OperationRejectedException, ErrorResultException {
+ validateRelationDefinition(parent, rd);
+ ManagedObjectPath<?, ?> child = parent.child(rd, name);
+ return doDeleteManagedObject(child);
+ }
+
+ /**
+ * Deletes the optional child managed object from the named parent managed
+ * object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param parent
+ * The path of the parent managed object.
+ * @param rd
+ * The optional relation definition.
+ * @return Returns <code>true</code> if the optional child managed object
+ * was found, or <code>false</code> if it was not found.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with the parent
+ * managed object's definition.
+ * @throws ManagedObjectNotFoundException
+ * If the parent managed object could not be found.
+ * @throws OperationRejectedException
+ * If the managed object cannot be removed due to some
+ * client-side or server-side constraint which cannot be
+ * satisfied (for example, if it is referenced by another
+ * managed object).
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject(
+ ManagedObjectPath<?, ?> parent, OptionalRelationDefinition<C, S> rd) throws ManagedObjectNotFoundException,
+ OperationRejectedException, ErrorResultException {
+ validateRelationDefinition(parent, rd);
+ ManagedObjectPath<?, ?> child = parent.child(rd);
+ return doDeleteManagedObject(child);
+ }
+
+ /**
+ * Deletes the named instantiable child managed object from the named parent
+ * managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param parent
+ * The path of the parent managed object.
+ * @param rd
+ * The instantiable relation definition.
+ * @param name
+ * The name of the child managed object to be removed.
+ * @return Returns <code>true</code> if the named instantiable child managed
+ * object was found, or <code>false</code> if it was not found.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with the parent
+ * managed object's definition.
+ * @throws ManagedObjectNotFoundException
+ * If the parent managed object could not be found.
+ * @throws OperationRejectedException
+ * If the managed object cannot be removed due to some
+ * client-side or server-side constraint which cannot be
+ * satisfied (for example, if it is referenced by another
+ * managed object).
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject(
+ ManagedObjectPath<?, ?> parent, SetRelationDefinition<C, S> rd, String name)
+ throws ManagedObjectNotFoundException, OperationRejectedException, ErrorResultException {
+ validateRelationDefinition(parent, rd);
+ ManagedObjectPath<?, ?> child = parent.child(rd, name);
+ return doDeleteManagedObject(child);
+ }
+
+ /**
+ * Gets the named managed object. The path is guaranteed to be non-empty, so
+ * implementations do not need to worry about handling this special case.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the path
+ * definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the path
+ * definition refers to.
+ * @param path
+ * The non-empty path of the managed object.
+ * @return Returns the named managed object.
+ * @throws DefinitionDecodingException
+ * If the managed object was found but its type could not be
+ * determined.
+ * @throws ManagedObjectDecodingException
+ * If the managed object was found but one or more of its
+ * properties could not be decoded.
+ * @throws ManagedObjectNotFoundException
+ * If the requested managed object could not be found on the
+ * server.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ // @Checkstyle:ignore
+ public abstract <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getManagedObject(
+ ManagedObjectPath<C, S> path) throws DefinitionDecodingException, ManagedObjectDecodingException,
+ ManagedObjectNotFoundException, ErrorResultException;
+
+ /**
+ * Gets the effective values of a property in the named managed object.
+ * <p>
+ * Implementations MUST NOT not use
+ * {@link #getManagedObject(ManagedObjectPath)} to read the referenced
+ * managed object in its entirety. Specifically, implementations MUST only
+ * attempt to resolve the default values for the requested property and its
+ * dependencies (if it uses inherited defaults). This is to avoid infinite
+ * recursion where a managed object contains a property which inherits
+ * default values from another property in the same managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the path
+ * definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the path
+ * definition refers to.
+ * @param <P>
+ * The type of the property to be retrieved.
+ * @param path
+ * The path of the managed object containing the property.
+ * @param pd
+ * The property to be retrieved.
+ * @return Returns the property's effective values, or an empty set if there
+ * are no values defined.
+ * @throws IllegalArgumentException
+ * If the property definition is not associated with the
+ * referenced managed object's definition.
+ * @throws DefinitionDecodingException
+ * If the managed object was found but its type could not be
+ * determined.
+ * @throws PropertyException
+ * If the managed object was found but the requested property
+ * could not be decoded.
+ * @throws ManagedObjectNotFoundException
+ * If the requested managed object could not be found on the
+ * server.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public abstract <C extends ConfigurationClient, S extends Configuration, P> SortedSet<P> getPropertyValues(
+ ManagedObjectPath<C, S> path, PropertyDefinition<P> pd) throws DefinitionDecodingException,
+ ManagedObjectNotFoundException, ErrorResultException;
+
+ /**
+ * Gets the root configuration managed object associated with this
+ * management context driver.
+ *
+ * @return Returns the root configuration managed object associated with
+ * this management context driver.
+ */
+ public abstract ManagedObject<RootCfgClient> getRootConfigurationManagedObject();
+
+ /**
+ * Lists the child managed objects of the named parent managed object which
+ * are a sub-type of the specified managed object definition.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param parent
+ * The path of the parent managed object.
+ * @param rd
+ * The instantiable relation definition.
+ * @param d
+ * The managed object definition.
+ * @return Returns the names of the child managed objects which are a
+ * sub-type of the specified managed object definition.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with the parent
+ * managed object's definition.
+ * @throws ManagedObjectNotFoundException
+ * If the parent managed object could not be found.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public abstract <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
+ ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd,
+ AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws ManagedObjectNotFoundException,
+ ErrorResultException;
+
+ /**
+ * Lists the child managed objects of the named parent managed object which
+ * are a sub-type of the specified managed object definition.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param parent
+ * The path of the parent managed object.
+ * @param rd
+ * The set relation definition.
+ * @param d
+ * The managed object definition.
+ * @return Returns the names of the child managed objects which are a
+ * sub-type of the specified managed object definition.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with the parent
+ * managed object's definition.
+ * @throws ManagedObjectNotFoundException
+ * If the parent managed object could not be found.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public abstract <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
+ ManagedObjectPath<?, ?> parent, SetRelationDefinition<C, S> rd,
+ AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws ManagedObjectNotFoundException,
+ ErrorResultException;
+
+ /**
+ * Determines whether or not the named managed object exists.
+ * <p>
+ * Implementations should always return <code>true</code> when the provided
+ * path is empty.
+ *
+ * @param path
+ * The path of the named managed object.
+ * @return Returns <code>true</code> if the named managed object exists,
+ * <code>false</code> otherwise.
+ * @throws ManagedObjectNotFoundException
+ * If the parent managed object could not be found.
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ public abstract boolean managedObjectExists(ManagedObjectPath<?, ?> path) throws ManagedObjectNotFoundException,
+ ErrorResultException;
+
+ /**
+ * Deletes the named managed object.
+ * <p>
+ * Implementations do not need check whether the named managed object
+ * exists, nor do they need to enforce client constraints.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param path
+ * The path of the managed object to be deleted.
+ * @throws OperationRejectedException
+ * If the managed object cannot be removed due to some
+ * server-side constraint which cannot be satisfied (for
+ * example, if it is referenced by another managed object).
+ * @throws ErrorResultException
+ * If any other error occurs.
+ */
+ protected abstract <C extends ConfigurationClient, S extends Configuration> void deleteManagedObject(
+ ManagedObjectPath<C, S> path) throws OperationRejectedException, ErrorResultException;
+
+ /**
+ * Gets the default values for the specified property.
+ *
+ * @param <P>
+ * The type of the property.
+ * @param p
+ * The managed object path of the current managed object.
+ * @param pd
+ * The property definition.
+ * @param isCreate
+ * Indicates whether the managed object has been created yet.
+ * @return Returns the default values for the specified property.
+ * @throws DefaultBehaviorException
+ * If the default values could not be retrieved or decoded
+ * properly.
+ */
+ protected final <P> Collection<P> findDefaultValues(ManagedObjectPath<?, ?> p, PropertyDefinition<P> pd,
+ boolean isCreate) {
+ DefaultValueFinder<P> v = new DefaultValueFinder<P>(p, isCreate);
+ return v.find(p, pd);
+ }
+
+ /**
+ * Gets the management context associated with this driver.
+ *
+ * @return Returns the management context associated with this driver.
+ */
+ protected abstract ManagementContext getManagementContext();
+
+ /**
+ * Validate that a relation definition belongs to the managed object
+ * referenced by the provided path.
+ *
+ * @param path
+ * The parent managed object path.
+ * @param rd
+ * The relation definition.
+ * @throws IllegalArgumentException
+ * If the relation definition does not belong to the managed
+ * object definition.
+ */
+ protected final void validateRelationDefinition(ManagedObjectPath<?, ?> path, RelationDefinition<?, ?> rd) {
+ AbstractManagedObjectDefinition<?, ?> d = path.getManagedObjectDefinition();
+ RelationDefinition<?, ?> tmp = d.getRelationDefinition(rd.getName());
+ if (tmp != rd) {
+ throw new IllegalArgumentException("The relation " + rd.getName() + " is not associated with a "
+ + d.getName());
+ }
+ }
+
+ // Remove a managed object, first ensuring that the parent exists,
+ // then ensuring that the child exists, before ensuring that any
+ // constraints are satisfied.
+ private <C extends ConfigurationClient, S extends Configuration> boolean doDeleteManagedObject(
+ ManagedObjectPath<C, S> path) throws ManagedObjectNotFoundException, OperationRejectedException,
+ ErrorResultException {
+ // First make sure that the parent exists.
+ if (!managedObjectExists(path.parent())) {
+ throw new ManagedObjectNotFoundException();
+ }
+
+ // Make sure that the targeted managed object exists.
+ if (!managedObjectExists(path)) {
+ return false;
+ }
+
+ // The targeted managed object is guaranteed to exist, so enforce
+ // any constraints.
+ AbstractManagedObjectDefinition<?, ?> d = path.getManagedObjectDefinition();
+ List<LocalizableMessage> messages = new LinkedList<LocalizableMessage>();
+ boolean isAcceptable = true;
+
+ for (Constraint constraint : d.getAllConstraints()) {
+ for (ClientConstraintHandler handler : constraint.getClientConstraintHandlers()) {
+ ManagementContext context = getManagementContext();
+ if (!handler.isDeleteAcceptable(context, path, messages)) {
+ isAcceptable = false;
+ }
+ }
+ if (!isAcceptable) {
+ break;
+ }
+ }
+
+ if (!isAcceptable) {
+ throw new OperationRejectedException(OperationType.DELETE, d.getUserFriendlyName(), messages);
+ }
+
+ deleteManagedObject(path);
+ return true;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/Property.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/Property.java
new file mode 100644
index 0000000..6051667
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/Property.java
@@ -0,0 +1,117 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config.client.spi;
+
+import java.util.SortedSet;
+
+import org.forgerock.opendj.config.PropertyDefinition;
+
+/**
+ * A managed object property comprising of the property's definition and its set
+ * of values.
+ * <p>
+ * The property stores the values in a sorted set in which values are compared
+ * using the comparator defined by the property definition.
+ * <p>
+ * The property keeps track of whether or not its pending set of values differs
+ * from its active values.
+ *
+ * @param <T>
+ * The type of the property.
+ */
+public interface Property<T> {
+
+ /**
+ * Get an immutable set view of this property's active values.
+ *
+ * @return Returns an immutable set view of this property's active values.
+ * An empty set indicates that there are no active values, and any
+ * default values are applicable.
+ */
+ SortedSet<T> getActiveValues();
+
+ /**
+ * Get an immutable set view of this property's default values.
+ *
+ * @return Returns an immutable set view of this property's default values.
+ * An empty set indicates that there are no default values.
+ */
+ SortedSet<T> getDefaultValues();
+
+ /**
+ * Get an immutable set view of this property's effective values.
+ *
+ * @return Returns an immutable set view of this property's effective
+ * values.
+ */
+ SortedSet<T> getEffectiveValues();
+
+ /**
+ * Get an immutable set view of this property's pending values.
+ * <p>
+ * Immediately after construction, the pending values matches the active
+ * values.
+ *
+ * @return Returns an immutable set view of this property's pending values.
+ * An empty set indicates that there are no pending values, and any
+ * default values are applicable.
+ */
+ SortedSet<T> getPendingValues();
+
+ /**
+ * Get the property definition associated with this property.
+ *
+ * @return Returns the property definition associated with this property.
+ */
+ PropertyDefinition<T> getPropertyDefinition();
+
+ /**
+ * Determines whether or not this property contains any pending values.
+ *
+ * @return Returns <code>true</code> if this property does not contain any
+ * pending values.
+ */
+ boolean isEmpty();
+
+ /**
+ * Determines whether or not this property has been modified since it was
+ * constructed. In other words, whether or not the set of pending values
+ * differs from the set of active values.
+ *
+ * @return Returns <code>true</code> if this property has been modified
+ * since it was constructed.
+ */
+ boolean isModified();
+
+ /**
+ * Determines whether or not this property contains any active values.
+ *
+ * @return Returns <code>true</code> if this property does not contain any
+ * active values.
+ */
+ boolean wasEmpty();
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/PropertySet.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/PropertySet.java
new file mode 100644
index 0000000..c03de85
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/PropertySet.java
@@ -0,0 +1,327 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config.client.spi;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.forgerock.opendj.config.IllegalPropertyValueException;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.PropertyIsMandatoryException;
+import org.forgerock.opendj.config.PropertyIsSingleValuedException;
+import org.forgerock.opendj.config.PropertyOption;
+
+/**
+ * A set of properties. Instances of this class can be used as the core of a
+ * managed object implementation.
+ */
+public final class PropertySet {
+
+ /**
+ * Internal property implementation.
+ *
+ * @param <T>
+ * The type of the property.
+ */
+ private static final class MyProperty<T> implements Property<T> {
+
+ // The active set of values.
+ private final SortedSet<T> activeValues;
+
+ // The definition associated with this property.
+ private final PropertyDefinition<T> d;
+
+ // The default set of values (read-only).
+ private final SortedSet<T> defaultValues;
+
+ // The pending set of values.
+ private final SortedSet<T> pendingValues;
+
+ /**
+ * Create a property with the provided sets of pre-validated default and
+ * active values.
+ *
+ * @param pd
+ * The property definition.
+ * @param defaultValues
+ * The set of default values for the property.
+ * @param activeValues
+ * The set of active values for the property.
+ */
+ public MyProperty(PropertyDefinition<T> pd, Collection<T> defaultValues, Collection<T> activeValues) {
+ this.d = pd;
+
+ SortedSet<T> sortedDefaultValues = new TreeSet<T>(pd);
+ sortedDefaultValues.addAll(defaultValues);
+ this.defaultValues = Collections.unmodifiableSortedSet(sortedDefaultValues);
+
+ this.activeValues = new TreeSet<T>(pd);
+ this.activeValues.addAll(activeValues);
+
+ // Initially the pending values is the same as the active
+ // values.
+ this.pendingValues = new TreeSet<T>(this.activeValues);
+ }
+
+ /**
+ * Makes the pending values active.
+ */
+ public void commit() {
+ activeValues.clear();
+ activeValues.addAll(pendingValues);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public SortedSet<T> getActiveValues() {
+ return Collections.unmodifiableSortedSet(activeValues);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public SortedSet<T> getDefaultValues() {
+ return defaultValues;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public SortedSet<T> getEffectiveValues() {
+ SortedSet<T> values = getPendingValues();
+
+ if (values.isEmpty()) {
+ values = getDefaultValues();
+ }
+
+ return values;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public SortedSet<T> getPendingValues() {
+ return Collections.unmodifiableSortedSet(pendingValues);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public PropertyDefinition<T> getPropertyDefinition() {
+ return d;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isEmpty() {
+ return pendingValues.isEmpty();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isModified() {
+ if (activeValues.size() == pendingValues.size() && activeValues.containsAll(pendingValues)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Replace all pending values of this property with the provided values.
+ *
+ * @param c
+ * The new set of pending property values.
+ */
+ public void setPendingValues(Collection<T> c) {
+ pendingValues.clear();
+ pendingValues.addAll(c);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ return getEffectiveValues().toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean wasEmpty() {
+ return activeValues.isEmpty();
+ }
+ }
+
+ // The properties.
+ private final Map<PropertyDefinition<?>, MyProperty<?>> properties;
+
+ /**
+ * Creates a new empty property set.
+ */
+ public PropertySet() {
+ this.properties = new HashMap<PropertyDefinition<?>, MyProperty<?>>();
+ }
+
+ /**
+ * Creates a property with the provided sets of pre-validated default and
+ * active values.
+ *
+ * @param <T>
+ * The type of the property.
+ * @param pd
+ * The property definition.
+ * @param defaultValues
+ * The set of default values for the property.
+ * @param activeValues
+ * The set of active values for the property.
+ */
+ public <T> void addProperty(PropertyDefinition<T> pd, Collection<T> defaultValues, Collection<T> activeValues) {
+ MyProperty<T> p = new MyProperty<T>(pd, defaultValues, activeValues);
+ properties.put(pd, p);
+ }
+
+ /**
+ * Get the property associated with the specified property definition.
+ *
+ * @param <T>
+ * The underlying type of the property.
+ * @param d
+ * The Property definition.
+ * @return Returns the property associated with the specified property
+ * definition.
+ * @throws IllegalArgumentException
+ * If this property provider does not recognise the requested
+ * property definition.
+ */
+ @SuppressWarnings("unchecked")
+ public <T> Property<T> getProperty(PropertyDefinition<T> d) {
+ if (!properties.containsKey(d)) {
+ throw new IllegalArgumentException("Unknown property " + d.getName());
+ }
+
+ return (Property<T>) properties.get(d);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append('{');
+ for (Map.Entry<PropertyDefinition<?>, MyProperty<?>> entry : properties.entrySet()) {
+ builder.append(entry.getKey().getName());
+ builder.append('=');
+ builder.append(entry.getValue().toString());
+ builder.append(' ');
+ }
+ builder.append('}');
+ return builder.toString();
+ }
+
+ /**
+ * Makes all pending values active.
+ */
+ void commit() {
+ for (MyProperty<?> p : properties.values()) {
+ p.commit();
+ }
+ }
+
+ /**
+ * Set a new pending values for the specified property.
+ * <p>
+ * See the class description for more information regarding pending values.
+ *
+ * @param <T>
+ * The type of the property to be modified.
+ * @param d
+ * The property to be modified.
+ * @param values
+ * A non-<code>null</code> set of new pending values for the
+ * property (an empty set indicates that the property should be
+ * reset to its default behavior). The set will not be referenced
+ * by this managed object.
+ * @param options
+ * Options to validate property definitions values.
+ * @throws IllegalPropertyValueException
+ * If a new pending value is deemed to be invalid according to
+ * the property definition.
+ * @throws PropertyIsSingleValuedException
+ * If an attempt was made to add multiple pending values to a
+ * single-valued property.
+ * @throws PropertyIsMandatoryException
+ * If an attempt was made to remove a mandatory property.
+ * @throws IllegalArgumentException
+ * If the specified property definition is not associated with
+ * this managed object.
+ */
+ <T> void setPropertyValues(PropertyDefinition<T> d, Collection<T> values,
+ PropertyDefinitionsOptions options) {
+ MyProperty<T> property = (MyProperty<T>) getProperty(d);
+
+ if (values.size() > 1 && !d.hasOption(PropertyOption.MULTI_VALUED)) {
+ throw new PropertyIsSingleValuedException(d);
+ }
+
+ if (values.isEmpty() && d.hasOption(PropertyOption.MANDATORY)) {
+ // But only if there are no default values.
+ if (property.getDefaultValues().isEmpty()) {
+ throw new PropertyIsMandatoryException(d);
+ }
+ }
+
+ // Validate each value.
+ for (T e : values) {
+ if (e == null) {
+ throw new NullPointerException();
+ }
+
+ d.validateValue(e, options);
+ }
+
+ // Update the property.
+ property.setPendingValues(values);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/package-info.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/package-info.java
new file mode 100644
index 0000000..57c290d
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/package-info.java
@@ -0,0 +1,34 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+/**
+ * Client side driver implementation interfaces.
+ * <p>
+ * This package contains classes which client-side driver
+ * implementations are expected to use.
+ */
+package org.forgerock.opendj.config.client.spi;
+
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/ANDCondition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/ANDCondition.java
new file mode 100644
index 0000000..5cdbf16
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/ANDCondition.java
@@ -0,0 +1,92 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.conditions;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.server.ConfigException;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.util.Reject;
+
+/**
+ * A condition which evaluates to <code>true</code> if and only if all of its
+ * sub-conditions are <code>true</code>.
+ */
+public final class ANDCondition implements Condition {
+
+ // The list of sub-conditions.
+ private final List<Condition> conditions;
+
+ /**
+ * Creates a new logical AND condition with the provided sub-conditions.
+ *
+ * @param conditions
+ * The sub-conditions which will be combined using a logical AND.
+ */
+ public ANDCondition(Condition... conditions) {
+ Reject.ifNull(conditions);
+ this.conditions = Arrays.asList(conditions);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
+ for (Condition condition : conditions) {
+ if (!condition.evaluate(context, managedObject)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
+ for (Condition condition : conditions) {
+ if (!condition.evaluate(managedObject)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
+ for (Condition condition : conditions) {
+ condition.initialize(d);
+ }
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/Condition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/Condition.java
new file mode 100644
index 0000000..6eab2de
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/Condition.java
@@ -0,0 +1,75 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.conditions;
+
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.server.ConfigException;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.ldap.ErrorResultException;
+
+/**
+ * An interface for evaluating conditions.
+ */
+public interface Condition {
+
+ /**
+ * Initializes this condition.
+ *
+ * @param d
+ * The abstract managed object definition associated with this
+ * condition.
+ * @throws Exception
+ * If this condition could not be initialized.
+ */
+ void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception;
+
+ /**
+ * Evaluates this condition against the provided client managed object.
+ *
+ * @param context
+ * The client management context.
+ * @param managedObject
+ * The client managed object.
+ * @return Returns <code>true</code> if this condition is satisfied.
+ * @throws ErrorResultException
+ * If the condition could not be evaluated.
+ */
+ boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException;
+
+ /**
+ * Evaluates this condition against the provided server managed object.
+ *
+ * @param managedObject
+ * The server managed object.
+ * @return Returns <code>true</code> if this condition is satisfied.
+ * @throws ConfigException
+ * If the condition could not be evaluated due to an unexpected
+ * configuration exception.
+ */
+ boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException;
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/Conditions.java b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/Conditions.java
new file mode 100644
index 0000000..3340b4c
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/Conditions.java
@@ -0,0 +1,191 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.conditions;
+
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.server.ConfigException;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.ldap.ErrorResultException;
+
+/**
+ * This class consists exclusively of static methods that operate on or return
+ * conditions.
+ */
+public final class Conditions {
+
+ /**
+ * A condition which always evaluates to <code>false</code>.
+ */
+ public static final Condition FALSE = new Condition() {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
+ // No implementation required.
+ }
+
+ };
+
+ /**
+ * A condition which always evaluates to <code>true</code>.
+ */
+ public static final Condition TRUE = new Condition() {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
+ // No implementation required.
+ }
+
+ };
+
+ /**
+ * Creates a condition which evaluates to <code>true</code> if and only if
+ * all of its sub-conditions are <code>true</code>.
+ *
+ * @param conditions
+ * The sub-conditions which be combined using a logical AND.
+ * @return Returns a condition which evaluates to <code>true</code> if and
+ * only if all of its sub-conditions are <code>true</code>.
+ */
+ public static Condition and(Condition... conditions) {
+ return new ANDCondition(conditions);
+ }
+
+ /**
+ * Creates a condition which evaluates to <code>true</code> if and only if a
+ * property contains a particular value.
+ *
+ * @param propertyName
+ * The property name.
+ * @param propertyStringValue
+ * The string representation of the required property value.
+ * @return Returns a condition which evaluates to <code>true</code> if and
+ * only if a property contains a particular value.
+ */
+ public static Condition contains(String propertyName, String propertyStringValue) {
+ return new ContainsCondition(propertyName, propertyStringValue);
+ }
+
+ /**
+ * Creates a condition which evaluates to <code>false</code> if and only if
+ * the first sub-condition evaluates to <code>true</code> and the second
+ * sub-condition evaluates to <code>false</code>. This can be used to
+ * represent if-then relationships.
+ *
+ * @param premise
+ * The sub-condition which, when <code>true</code> implies that
+ * the implication sub-condition must also be <code>true</code>.
+ * @param implication
+ * The sub-condition which, must be <code>true</code> when the
+ * premise is <code>true</code>.
+ * @return Returns a condition which evaluates to <code>false</code> if and
+ * only if the first sub-condition evaluates to <code>true</code>
+ * and the second sub-condition evaluates to <code>false</code>.
+ */
+ public static Condition implies(Condition premise, Condition implication) {
+ return or(not(premise), implication);
+ }
+
+ /**
+ * Creates a condition which evaluates to <code>true</code> if and only if a
+ * particular property has any values specified.
+ *
+ * @param propertyName
+ * The property name.
+ * @return Returns a condition which evaluates to <code>true</code> if and
+ * only if a particular property has any values specified.
+ */
+ public static Condition isPresent(String propertyName) {
+ return new IsPresentCondition(propertyName);
+ }
+
+ /**
+ * Creates a condition which evaluates to <code>true</code> if the
+ * sub-condition is <code>false</code>, or <code>false</code> if the
+ * sub-condition is <code>true</code>.
+ *
+ * @param condition
+ * The sub-condition which will be inverted.
+ * @return Returns a condition which evaluates to <code>true</code> if the
+ * sub-condition is <code>false</code>, or <code>false</code> if the
+ * sub-condition is <code>true</code>.
+ */
+ public static Condition not(Condition condition) {
+ return new NOTCondition(condition);
+ }
+
+ /**
+ * Creates a condition which evaluates to <code>false</code> if and only if
+ * all of its sub-conditions are <code>false</code>.
+ *
+ * @param conditions
+ * The sub-conditions which be combined using a logical OR.
+ * @return Returns a condition which evaluates to <code>false</code> if and
+ * only if all of its sub-conditions are <code>false</code>.
+ */
+ public static Condition or(Condition... conditions) {
+ return new ORCondition(conditions);
+ }
+
+ // Prevent instantiation.
+ private Conditions() {
+ // No implementation required.
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/ContainsCondition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/ContainsCondition.java
new file mode 100644
index 0000000..fbe60aa
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/ContainsCondition.java
@@ -0,0 +1,175 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.conditions;
+
+import java.util.SortedSet;
+
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.server.ConfigException;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.util.Reject;
+
+/**
+ * A condition which evaluates to <code>true</code> if and only if a property
+ * contains a particular value.
+ */
+public final class ContainsCondition implements Condition {
+
+ /**
+ * The strongly typed underlying implementation.
+ *
+ * @param <T>
+ * The type of the property value being tested.
+ */
+ private static final class Impl<T> implements Condition {
+
+ // The property.
+ final PropertyDefinition<T> pd;
+
+ // The required property value.
+ final T value;
+
+ // Private constructor.
+ private Impl(PropertyDefinition<T> pd, T value) {
+ this.pd = pd;
+ this.value = value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
+ SortedSet<T> values = managedObject.getPropertyValues(pd);
+ return values.contains(value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
+ SortedSet<T> values = managedObject.getPropertyValues(pd);
+ return values.contains(value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
+ // Not used.
+ }
+
+ // Private implementation of fix() method.
+ private void setPropertyValue(ManagedObject<?> managedObject) {
+ managedObject.setPropertyValue(pd, value);
+ }
+
+ }
+
+ // The strongly typed private implementation.
+ private Impl<?> impl = null;
+
+ // The property name.
+ private final String propertyName;
+
+ // The string representation of the required property value.
+ private final String propertyStringValue;
+
+ /**
+ * Creates a new contains value condition.
+ *
+ * @param propertyName
+ * The property name.
+ * @param stringValue
+ * The string representation of the required property value.
+ */
+ public ContainsCondition(String propertyName, String stringValue) {
+ Reject.ifNull(propertyName, stringValue);
+ this.propertyName = propertyName;
+ this.propertyStringValue = stringValue;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
+ return impl.evaluate(context, managedObject);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
+ return impl.evaluate(managedObject);
+ }
+
+ /**
+ * Modifies the provided managed object so that it has the property value
+ * associated with this condition.
+ *
+ * @param managedObject
+ * The managed object.
+ */
+ public void setPropertyValue(ManagedObject<?> managedObject) {
+ impl.setPropertyValue(managedObject);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
+ // Decode the property.
+ buildImpl(d.getPropertyDefinition(propertyName));
+ }
+
+ // Creates the new private implementation.
+ private <T> void buildImpl(PropertyDefinition<T> pd) {
+ T value = pd.decodeValue(propertyStringValue, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ this.impl = new Impl<T>(pd, value);
+ }
+
+ /**
+ * Returns the property definition associated with this condition.
+ *
+ * @return the property definition associated with this condition.
+ */
+ public PropertyDefinition<?> getPropertyDefinition() {
+ return impl.pd;
+ }
+
+ /**
+ * Returns the value that must be set for this condition to be fulfilled.
+ *
+ * @return the value that must be set for this condition to be fulfilled.
+ */
+ public Object getValue() {
+ return impl.value;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/IsPresentCondition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/IsPresentCondition.java
new file mode 100644
index 0000000..9cd45b1
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/IsPresentCondition.java
@@ -0,0 +1,86 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.conditions;
+
+import java.util.SortedSet;
+
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.server.ConfigException;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.util.Reject;
+
+/**
+ * A condition which evaluates to <code>true</code> if and only if a particular
+ * property has any values specified.
+ */
+public final class IsPresentCondition implements Condition {
+
+ // The property name.
+ private final String propertyName;
+
+ // The property definition.
+ private PropertyDefinition<?> pd;
+
+ /**
+ * Creates a new is present condition.
+ *
+ * @param propertyName
+ * The property name.
+ */
+ public IsPresentCondition(String propertyName) {
+ Reject.ifNull(propertyName);
+ this.propertyName = propertyName;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
+ SortedSet<?> values = managedObject.getPropertyValues(pd);
+ return !values.isEmpty();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
+ SortedSet<?> values = managedObject.getPropertyValues(pd);
+ return !values.isEmpty();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
+ // Decode the property.
+ this.pd = d.getPropertyDefinition(propertyName);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/NOTCondition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/NOTCondition.java
new file mode 100644
index 0000000..9e2c5a8
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/NOTCondition.java
@@ -0,0 +1,78 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.conditions;
+
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.server.ConfigException;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.util.Reject;
+
+/**
+ * A condition which evaluates to <code>true</code> if the sub-condition is
+ * <code>false</code>, or <code>false</code> if the sub-condition is
+ * <code>true</code>.
+ */
+public final class NOTCondition implements Condition {
+
+ // The single sub-condition.
+ private final Condition condition;
+
+ /**
+ * Creates a new logical NOT condition with the provided sub-condition.
+ *
+ * @param condition
+ * The sub-condition which will be inverted.
+ */
+ public NOTCondition(Condition condition) {
+ Reject.ifNull(condition);
+ this.condition = condition;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
+ return !condition.evaluate(context, managedObject);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
+ return !condition.evaluate(managedObject);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
+ condition.initialize(d);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/ORCondition.java b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/ORCondition.java
new file mode 100644
index 0000000..2d07f13
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/ORCondition.java
@@ -0,0 +1,92 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.conditions;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.server.ConfigException;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.util.Reject;
+
+/**
+ * A condition which evaluates to <code>false</code> if and only if all of its
+ * sub-conditions are <code>false</code>.
+ */
+public final class ORCondition implements Condition {
+
+ // The list of sub-conditions.
+ private final List<Condition> conditions;
+
+ /**
+ * Creates a new logical OR condition with the provided sub-conditions.
+ *
+ * @param conditions
+ * The sub-conditions which will be combined using a logical OR.
+ */
+ public ORCondition(Condition... conditions) {
+ Reject.ifNull(conditions);
+ this.conditions = Arrays.asList(conditions);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
+ for (Condition condition : conditions) {
+ if (condition.evaluate(context, managedObject)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
+ for (Condition condition : conditions) {
+ if (condition.evaluate(managedObject)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
+ for (Condition condition : conditions) {
+ condition.initialize(d);
+ }
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/package-info.java b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/package-info.java
new file mode 100644
index 0000000..e1f512f
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/conditions/package-info.java
@@ -0,0 +1,33 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+/**
+ * Logical conditions for defining constraints.
+ * <p>
+ * This package contains interfaces for building and evaluating
+ * arbitrary logical conditions which can be used with constraints.
+ */
+package org.forgerock.opendj.config.conditions;
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/package-info.java b/opendj-config/src/main/java/org/forgerock/opendj/config/package-info.java
new file mode 100644
index 0000000..08c356a
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/package-info.java
@@ -0,0 +1,34 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+/**
+ * Common administration classes.
+ * <p>
+ * This package contains administration related classes and interfaces
+ * common to both the client and server.
+ */
+package org.forgerock.opendj.config;
+
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/AbstractConfigListenerAdaptor.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/AbstractConfigListenerAdaptor.java
new file mode 100644
index 0000000..b3a1ad2
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/AbstractConfigListenerAdaptor.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import java.util.Collection;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+
+/**
+ * Common features of config listener adaptors.
+ */
+abstract class AbstractConfigListenerAdaptor {
+
+ /**
+ * Create a new config listener adaptor.
+ */
+ protected AbstractConfigListenerAdaptor() {
+ // No implementation required.
+ }
+
+ /**
+ * Concatenate a list of messages into a single message.
+ *
+ * @param reasons
+ * The list of messages to concatenate.
+ * @param unacceptableReason
+ * The single message to which messages should be appended.
+ */
+ protected final void generateUnacceptableReason(Collection<LocalizableMessage> reasons,
+ LocalizableMessageBuilder unacceptableReason) {
+ boolean isFirst = true;
+ for (LocalizableMessage reason : reasons) {
+ if (isFirst) {
+ isFirst = false;
+ } else {
+ unacceptableReason.append(" ");
+ }
+ unacceptableReason.append(reason);
+ }
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigAddListenerAdaptor.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigAddListenerAdaptor.java
new file mode 100644
index 0000000..393ae92
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigAddListenerAdaptor.java
@@ -0,0 +1,252 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2009 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.Constraint;
+import org.forgerock.opendj.config.DecodingException;
+import org.forgerock.opendj.config.DefinitionDecodingException;
+import org.forgerock.opendj.config.InstantiableRelationDefinition;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.OptionalRelationDefinition;
+import org.forgerock.opendj.config.SetRelationDefinition;
+import org.forgerock.opendj.config.DefinitionDecodingException.Reason;
+import org.forgerock.opendj.config.server.spi.ConfigAddListener;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.Entry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.forgerock.opendj.ldap.ResultCode;
+
+/**
+ * An adaptor class which converts {@link ConfigAddListener} callbacks to
+ * {@link ServerManagedObjectAddListener} callbacks.
+ *
+ * @param <S>
+ * The type of server configuration handled by the add listener.
+ */
+final class ConfigAddListenerAdaptor<S extends Configuration> extends AbstractConfigListenerAdaptor implements
+ ConfigAddListener {
+
+ private static final Logger debugLogger = LoggerFactory.getLogger(ConfigAddListenerAdaptor.class);
+
+ // Cached managed object between accept/apply callbacks.
+ private ServerManagedObject<? extends S> cachedManagedObject;
+
+ // The instantiable relation.
+ private final InstantiableRelationDefinition<?, S> instantiableRelation;
+
+ // The set relation.
+ private final SetRelationDefinition<?, S> setRelation;
+
+ // The underlying add listener.
+ private final ServerManagedObjectAddListener<S> listener;
+
+ // The optional relation.
+ private final OptionalRelationDefinition<?, S> optionalRelation;
+
+ // The managed object path of the parent.
+ private final ManagedObjectPath<?, ?> path;
+
+ private final ServerManagementContext serverContext;
+
+ /**
+ * Create a new configuration add listener adaptor for an instantiable
+ * relation.
+ *
+ * @param context
+ * The server context.
+ * @param path
+ * The managed object path of the parent.
+ * @param relation
+ * The instantiable relation.
+ * @param listener
+ * The underlying add listener.
+ */
+ public ConfigAddListenerAdaptor(ServerManagementContext context, ManagedObjectPath<?, ?> path,
+ InstantiableRelationDefinition<?, S> relation, ServerManagedObjectAddListener<S> listener) {
+ this.serverContext = context;
+ this.path = path;
+ this.instantiableRelation = relation;
+ this.optionalRelation = null;
+ this.setRelation = null;
+ this.listener = listener;
+ this.cachedManagedObject = null;
+ }
+
+ /**
+ * Create a new configuration add listener adaptor for an optional relation.
+ *
+ * @param context
+ * The server context.
+ * @param path
+ * The managed object path of the parent.
+ * @param relation
+ * The optional relation.
+ * @param listener
+ * The underlying add listener.
+ */
+ public ConfigAddListenerAdaptor(ServerManagementContext context, ManagedObjectPath<?, ?> path,
+ OptionalRelationDefinition<?, S> relation, ServerManagedObjectAddListener<S> listener) {
+ this.serverContext = context;
+ this.path = path;
+ this.optionalRelation = relation;
+ this.instantiableRelation = null;
+ this.setRelation = null;
+ this.listener = listener;
+ this.cachedManagedObject = null;
+ }
+
+ /**
+ * Create a new configuration add listener adaptor for a set relation.
+ *
+ * @param context
+ * The server context.
+ * @param path
+ * The managed object path of the parent.
+ * @param relation
+ * The set relation.
+ * @param listener
+ * The underlying add listener.
+ */
+ public ConfigAddListenerAdaptor(ServerManagementContext context, ManagedObjectPath<?, ?> path,
+ SetRelationDefinition<?, S> relation, ServerManagedObjectAddListener<S> listener) {
+ this.serverContext = context;
+ this.path = path;
+ this.instantiableRelation = null;
+ this.optionalRelation = null;
+ this.setRelation = relation;
+ this.listener = listener;
+ this.cachedManagedObject = null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ConfigChangeResult applyConfigurationAdd(Entry configEntry) {
+ if (optionalRelation != null) {
+ // Optional managed objects are located directly beneath the
+ // parent and have a well-defined name. We need to make sure
+ // that we are handling the correct entry.
+ ManagedObjectPath<?, ?> childPath = path.child(optionalRelation);
+ DN expectedDN = DNBuilder.create(childPath);
+ if (!configEntry.getName().equals(expectedDN)) {
+ // Doesn't apply to us.
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+ }
+
+ // Cached objects are guaranteed to be from previous acceptable
+ // callback.
+ ConfigChangeResult result = listener.applyConfigurationAdd(cachedManagedObject);
+
+ // Now apply post constraint call-backs.
+ if (result.getResultCode() == ResultCode.SUCCESS) {
+ ManagedObjectDefinition<?, ?> d = cachedManagedObject.getManagedObjectDefinition();
+ for (Constraint constraint : d.getAllConstraints()) {
+ for (ServerConstraintHandler handler : constraint.getServerConstraintHandlers()) {
+ try {
+ handler.performPostAdd(cachedManagedObject);
+ } catch (ConfigException e) {
+ debugLogger.trace("Unable to perform post add", e);
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean configAddIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason) {
+ DN dn = configEntry.getName();
+ String name = dn.rdn().getFirstAVA().getAttributeValue().toString().trim();
+
+ try {
+ ManagedObjectPath<?, ? extends S> childPath;
+ if (instantiableRelation != null) {
+ childPath = path.child(instantiableRelation, name);
+ } else if (setRelation != null) {
+ try {
+ childPath = path.child(setRelation, name);
+ } catch (IllegalArgumentException e) {
+ throw new DefinitionDecodingException(setRelation.getChildDefinition(),
+ Reason.WRONG_TYPE_INFORMATION);
+ }
+ } else {
+ // Optional managed objects are located directly beneath the
+ // parent and have a well-defined name. We need to make sure
+ // that we are handling the correct entry.
+ childPath = path.child(optionalRelation);
+ DN expectedDN = DNBuilder.create(childPath);
+ if (!dn.equals(expectedDN)) {
+ // Doesn't apply to us.
+ return true;
+ }
+ }
+
+ cachedManagedObject = serverContext.decode(childPath, configEntry, configEntry);
+ } catch (DecodingException e) {
+ unacceptableReason.append(e.getMessageObject());
+ return false;
+ }
+
+ // Give up immediately if a constraint violation occurs.
+ try {
+ cachedManagedObject.ensureIsUsable();
+ } catch (ConstraintViolationException e) {
+ generateUnacceptableReason(e.getMessages(), unacceptableReason);
+ return false;
+ }
+
+ // Let the add listener decide.
+ List<LocalizableMessage> reasons = new LinkedList<LocalizableMessage>();
+ if (listener.isConfigurationAddAcceptable(cachedManagedObject, reasons)) {
+ return true;
+ } else {
+ generateUnacceptableReason(reasons, unacceptableReason);
+ return false;
+ }
+ }
+
+ /**
+ * Get the server managed object add listener associated with this adaptor.
+ *
+ * @return Returns the server managed object add listener associated with
+ * this adaptor.
+ */
+ ServerManagedObjectAddListener<S> getServerManagedObjectAddListener() {
+ return listener;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigChangeListenerAdaptor.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigChangeListenerAdaptor.java
new file mode 100644
index 0000000..bfd1bcf
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigChangeListenerAdaptor.java
@@ -0,0 +1,428 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import com.forgerock.opendj.util.StaticUtils;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.i18n.slf4j.LocalizedLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.forgerock.opendj.config.AbsoluteInheritedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.AliasDefaultBehaviorProvider;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.Constraint;
+import org.forgerock.opendj.config.DecodingException;
+import org.forgerock.opendj.config.DefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefaultBehaviorProviderVisitor;
+import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.RelativeInheritedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.server.spi.ConfigChangeListener;
+import org.forgerock.opendj.config.server.spi.ConfigDeleteListener;
+import org.forgerock.opendj.config.server.spi.ConfigurationRepository;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.Entry;
+import org.forgerock.opendj.ldap.ResultCode;
+
+/**
+ * An adaptor class which converts {@link ConfigChangeListener} call-backs to
+ * {@link ServerManagedObjectChangeListener} call-backs.
+ *
+ * @param <S>
+ * The type of server configuration handled by the change listener.
+ */
+final class ConfigChangeListenerAdaptor<S extends Configuration> extends AbstractConfigListenerAdaptor implements
+ ConfigChangeListener {
+
+ private static final Logger debugLogger = LoggerFactory.getLogger(ConfigChangeListenerAdaptor.class);
+ private static final LocalizedLogger adminLogger = LocalizedLogger
+ .getLocalizedLogger(ERR_ADMIN_MANAGED_OBJECT_DOES_NOT_EXIST.get("").resourceName());
+
+ /**
+ * A default behavior visitor used for determining the set of dependencies.
+ *
+ * @param <T>
+ * The type of property.
+ */
+ private static final class Visitor<T> implements DefaultBehaviorProviderVisitor<T, Void, ManagedObjectPath<?, ?>> {
+
+ /**
+ * Finds the dependencies associated with the provided property
+ * definition.
+ *
+ * @param <T> The type of property definition.
+ * @param path
+ * The current base path used for relative name resolution.
+ * @param pd
+ * The property definition.
+ * @param dependencies
+ * Add dependencies names to this collection.
+ */
+ public static <T> void find(ManagedObjectPath<?, ?> path, PropertyDefinition<T> pd,
+ Collection<DN> dependencies) {
+ Visitor<T> v = new Visitor<T>(dependencies);
+ DefaultBehaviorProvider<T> db = pd.getDefaultBehaviorProvider();
+ db.accept(v, path);
+ }
+
+ // The names of entries that this change listener depends on.
+ private final Collection<DN> dependencies;
+
+ // Prevent instantiation.
+ private Visitor(Collection<DN> dependencies) {
+ this.dependencies = dependencies;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Void visitAbsoluteInherited(AbsoluteInheritedDefaultBehaviorProvider<T> d, ManagedObjectPath<?, ?> p) {
+ ManagedObjectPath<?, ?> next = d.getManagedObjectPath();
+ dependencies.add(DNBuilder.create(next));
+
+ // If the dependent property uses inherited defaults then
+ // recursively get those as well.
+ String propertyName = d.getPropertyName();
+ AbstractManagedObjectDefinition<?, ?> mod = d.getManagedObjectDefinition();
+ PropertyDefinition<?> pd = mod.getPropertyDefinition(propertyName);
+ find(next, pd, dependencies);
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Void visitAlias(AliasDefaultBehaviorProvider<T> d, ManagedObjectPath<?, ?> p) {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Void visitDefined(DefinedDefaultBehaviorProvider<T> d, ManagedObjectPath<?, ?> p) {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Void visitRelativeInherited(RelativeInheritedDefaultBehaviorProvider<T> d, ManagedObjectPath<?, ?> p) {
+ ManagedObjectPath<?, ?> next = d.getManagedObjectPath(p);
+ dependencies.add(DNBuilder.create(next));
+
+ // If the dependent property uses inherited defaults then
+ // recursively get those as well.
+ String propertyName = d.getPropertyName();
+ AbstractManagedObjectDefinition<?, ?> mod = d.getManagedObjectDefinition();
+ PropertyDefinition<?> pd = mod.getPropertyDefinition(propertyName);
+ find(next, pd, dependencies);
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Void visitUndefined(UndefinedDefaultBehaviorProvider<T> d, ManagedObjectPath<?, ?> p) {
+ return null;
+ }
+ }
+
+ /** Cached managed object between accept/apply call-backs. */
+ private ServerManagedObject<? extends S> cachedManagedObject;
+
+ /**
+ * The delete listener which is used to remove this listener and any
+ * dependencies.
+ */
+ private final ConfigDeleteListener cleanerListener;
+
+ /** The names of entries that this change listener depends on. */
+ private final Set<DN> dependencies;
+
+ /**
+ * The listener used to notify this listener when dependency entries are
+ * modified.
+ */
+ private final ConfigChangeListener dependencyListener;
+
+ /** The DN associated with this listener. */
+ private final DN dn;
+
+ /** The underlying change listener. */
+ private final ServerManagedObjectChangeListener<? super S> listener;
+
+ /** The managed object path. */
+ private final ManagedObjectPath<?, S> path;
+
+ /** Repository of configuration entries. */
+ private final ConfigurationRepository configRepository;
+
+ private final ServerManagementContext serverContext;
+
+ /**
+ * Create a new configuration change listener adaptor.
+ *
+ * @param serverContext
+ * The server context.
+ * @param path
+ * The managed object path.
+ * @param listener
+ * The underlying change listener.
+ */
+ public ConfigChangeListenerAdaptor(final ServerManagementContext serverContext,
+ final ManagedObjectPath<?, S> path, final ServerManagedObjectChangeListener<? super S> listener) {
+ this.serverContext = serverContext;
+ configRepository = serverContext.getConfigRepository();
+ this.path = path;
+ this.dn = DNBuilder.create(path);
+ this.listener = listener;
+ this.cachedManagedObject = null;
+
+ // This change listener should be notified when dependent entries
+ // are modified. Determine the dependencies and register change
+ // listeners against them.
+ this.dependencies = new HashSet<DN>();
+ this.dependencyListener = new ConfigChangeListener() {
+
+ public ConfigChangeResult applyConfigurationChange(Entry configEntry) {
+ Entry dependentConfigEntry = getConfigEntry(dn);
+ if (dependentConfigEntry != null) {
+ return ConfigChangeListenerAdaptor.this.applyConfigurationChange(dependentConfigEntry);
+ } else {
+ // The dependent entry was not found.
+ configRepository.deregisterChangeListener(configEntry.getName(), this);
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+ }
+
+ public boolean configChangeIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason) {
+ Entry dependentConfigEntry = getConfigEntry(dn);
+ if (dependentConfigEntry != null) {
+ return ConfigChangeListenerAdaptor.this.configChangeIsAcceptable(dependentConfigEntry,
+ unacceptableReason, configEntry);
+ } else {
+ // The dependent entry was not found.
+ configRepository.deregisterChangeListener(configEntry.getName(), this);
+ return true;
+ }
+ }
+
+ };
+
+ AbstractManagedObjectDefinition<?, ?> d = path.getManagedObjectDefinition();
+ for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) {
+ Visitor.find(path, pd, dependencies);
+ }
+
+ for (DN entryDN : dependencies) {
+ // Be careful not to register listeners against the dependent
+ // entry itself.
+ if (!entryDN.equals(dn)) {
+ Entry configEntry = getConfigEntry(entryDN);
+ if (configEntry != null) {
+ configRepository.registerChangeListener(configEntry.getName(), dependencyListener);
+ }
+ }
+ }
+
+ // Register a delete listener against the parent which will
+ // finalize this change listener when the monitored configuration
+ // entry is removed.
+ this.cleanerListener = new ConfigDeleteListener() {
+
+ public ConfigChangeResult applyConfigurationDelete(Entry configEntry) {
+ // Perform finalization if the deleted entry is the monitored
+ // entry.
+ if (configEntry.getName().equals(dn)) {
+ finalizeChangeListener();
+ }
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+
+ public boolean configDeleteIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason) {
+ // Always acceptable.
+ return true;
+ }
+
+ };
+
+ DN parent = dn.parent();
+ if (parent != null) {
+ Entry configEntry = getConfigEntry(dn.parent());
+ if (configEntry != null) {
+ configRepository.registerDeleteListener(configEntry.getName(), cleanerListener);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ConfigChangeResult applyConfigurationChange(Entry configEntry) {
+ // Looking at the ConfigFileHandler implementation reveals
+ // that this ConfigEntry will actually be a different object to
+ // the one passed in the previous call-back (it will have the same
+ // content though). This configuration entry has the correct
+ // listener lists.
+ cachedManagedObject.setConfigDN(configEntry.getName());
+
+ ConfigChangeResult result = listener.applyConfigurationChange(cachedManagedObject);
+
+ // Now apply post constraint call-backs.
+ if (result.getResultCode() == ResultCode.SUCCESS) {
+ ManagedObjectDefinition<?, ?> d = cachedManagedObject.getManagedObjectDefinition();
+ for (Constraint constraint : d.getAllConstraints()) {
+ for (ServerConstraintHandler handler : constraint.getServerConstraintHandlers()) {
+ try {
+ handler.performPostModify(cachedManagedObject);
+ } catch (ConfigException e) {
+ debugLogger.trace("Unable to perform post modify", e);
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean configChangeIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason) {
+ return configChangeIsAcceptable(configEntry, unacceptableReason, configEntry);
+ }
+
+ /**
+ * 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 unacceptableReason
+ * A buffer to which this method can append a human-readable
+ * message explaining why the proposed change is not acceptable.
+ * @param newConfigEntry
+ * The configuration entry that caused the notification (will be
+ * different from <code>configEntry</code> if a dependency was
+ * modified).
+ * @return <CODE>true</CODE> if the proposed entry contains an acceptable
+ * configuration, or <CODE>false</CODE> if it does not.
+ */
+ public boolean configChangeIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason,
+ Entry newConfigEntry) {
+ try {
+ cachedManagedObject = serverContext.decode(path, configEntry, newConfigEntry);
+ } catch (DecodingException e) {
+ unacceptableReason.append(e.getMessageObject());
+ return false;
+ }
+
+ // Give up immediately if a constraint violation occurs.
+ try {
+ cachedManagedObject.ensureIsUsable();
+ } catch (ConstraintViolationException e) {
+ generateUnacceptableReason(e.getMessages(), unacceptableReason);
+ return false;
+ }
+
+ // Let the change listener decide.
+ List<LocalizableMessage> reasons = new LinkedList<LocalizableMessage>();
+ if (listener.isConfigurationChangeAcceptable(cachedManagedObject, reasons)) {
+ return true;
+ } else {
+ generateUnacceptableReason(reasons, unacceptableReason);
+ return false;
+ }
+ }
+
+ /**
+ * Finalizes this configuration change listener adaptor. This method must be
+ * called before this change listener is removed.
+ */
+ public void finalizeChangeListener() {
+ // Remove the dependency listeners.
+ for (DN dependency : dependencies) {
+ Entry listenerConfigEntry = getConfigEntry(dependency);
+ if (listenerConfigEntry != null) {
+ configRepository.deregisterChangeListener(listenerConfigEntry.getName(), dependencyListener);
+ }
+ }
+
+ // Now remove the cleaner listener as it will no longer be
+ // needed.
+ Entry parentConfigEntry = getConfigEntry(dn.parent());
+ if (parentConfigEntry != null) {
+ configRepository.deregisterDeleteListener(parentConfigEntry.getName(), cleanerListener);
+ }
+
+ }
+
+ /**
+ * Get the server managed object change listener associated with this
+ * adaptor.
+ *
+ * @return Returns the server managed object change listener associated with
+ * this adaptor.
+ */
+ ServerManagedObjectChangeListener<? super S> getServerManagedObjectChangeListener() {
+ return listener;
+ }
+
+ // Returns the named configuration entry or null if it could not be
+ // retrieved.
+ private Entry getConfigEntry(DN dn) {
+ try {
+ if (configRepository.hasEntry(dn)) {
+ return configRepository.getEntry(dn);
+ } else {
+ adminLogger.error(ERR_ADMIN_MANAGED_OBJECT_DOES_NOT_EXIST, String.valueOf(dn));
+ }
+ } catch (ConfigException e) {
+ debugLogger.trace("The dependent entry could not be retrieved", e);
+ adminLogger.error(ERR_ADMIN_CANNOT_GET_MANAGED_OBJECT, String.valueOf(dn),
+ StaticUtils.getExceptionMessage(e));
+ }
+ return null;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigChangeResult.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigChangeResult.java
new file mode 100644
index 0000000..965f5ae
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigChangeResult.java
@@ -0,0 +1,191 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2006-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.ldap.ResultCode;
+
+/**
+ * This class defines a data structure that can be used to hold information
+ * about the result of processing a configuration change.
+ */
+public final class ConfigChangeResult {
+ // A set of messages describing the changes that were made, any
+ // action that may be required, or any problems that were
+ // encountered.
+ private List<LocalizableMessage> messages;
+
+ // Indicates whether one or more of the changes requires
+ // administrative action in order to take effect.
+ private boolean adminActionRequired;
+
+ // The result code to return to the client from this configuration
+ // change.
+ private ResultCode resultCode;
+
+ /**
+ * Creates a new config change result object with the provided information.
+ *
+ * @param resultCode
+ * The result code for this config change result.
+ * @param adminActionRequired
+ * Indicates whether administrative action is required for one or
+ * more of the changes to take effect.
+ */
+ public ConfigChangeResult(ResultCode resultCode, boolean adminActionRequired) {
+ this.resultCode = resultCode;
+ this.adminActionRequired = adminActionRequired;
+ this.messages = new ArrayList<LocalizableMessage>();
+ }
+
+ /**
+ * Creates a new config change result object with the provided information.
+ *
+ * @param resultCode
+ * The result code for this config change result.
+ * @param adminActionRequired
+ * Indicates whether administrative action is required for one or
+ * more of the changes to take effect.
+ * @param messages
+ * A set of messages that provide additional information about
+ * the change processing.
+ */
+ public ConfigChangeResult(ResultCode resultCode, boolean adminActionRequired, List<LocalizableMessage> messages) {
+ this.resultCode = resultCode;
+ this.adminActionRequired = adminActionRequired;
+ this.messages = messages;
+ }
+
+ /**
+ * Retrieves the result code for this config change result.
+ *
+ * @return The result code for this config change result.
+ */
+ public ResultCode getResultCode() {
+ return resultCode;
+ }
+
+ /**
+ * Specifies the result code for this config change result.
+ *
+ * @param resultCode
+ * The result code for this config change result.
+ */
+ public void setResultCode(ResultCode resultCode) {
+ this.resultCode = resultCode;
+ }
+
+ /**
+ * Indicates whether administrative action is required before one or more of
+ * the changes will take effect.
+ *
+ * @return <CODE>true</CODE> if one or more of the configuration changes
+ * require administrative action to take effect, or
+ * <CODE>false</CODE> if not.
+ */
+ public boolean adminActionRequired() {
+ return adminActionRequired;
+ }
+
+ /**
+ * Specifies whether administrative action is required before one or more of
+ * the changes will take effect.
+ *
+ * @param adminActionRequired
+ * Specifies whether administrative action is required before one
+ * or more of the changes will take effect.
+ */
+ public void setAdminActionRequired(boolean adminActionRequired) {
+ this.adminActionRequired = adminActionRequired;
+ }
+
+ /**
+ * Retrieves the set of messages that provide explanation for the processing
+ * of the configuration changes. This list may be modified by the caller.
+ *
+ * @return The set of messages that provide explanation for the processing
+ * of the configuration changes.
+ */
+ public List<LocalizableMessage> getMessages() {
+ return messages;
+ }
+
+ /**
+ * Adds the provided message to the set of messages for this config change
+ * result.
+ *
+ * @param message
+ * The message to add to the set of messages for this config
+ * change result.
+ */
+ public void addMessage(LocalizableMessage message) {
+ messages.add(message);
+ }
+
+ /**
+ * Retrieves a string representation of this config change result.
+ *
+ * @return A string representation of this config change result.
+ */
+ public String toString() {
+ StringBuilder buffer = new StringBuilder();
+ toString(buffer);
+ return buffer.toString();
+ }
+
+ /**
+ * Appends a string representation of this config change result to the
+ * provided buffer.
+ *
+ * @param buffer
+ * The buffer to which the information should be appended.
+ */
+ public void toString(StringBuilder buffer) {
+ buffer.append("ConfigChangeResult(result=");
+ buffer.append(resultCode.toString());
+ buffer.append(", adminActionRequired=");
+ buffer.append(adminActionRequired);
+ buffer.append(", messages={");
+
+ if (!messages.isEmpty()) {
+ Iterator<LocalizableMessage> iterator = messages.iterator();
+
+ LocalizableMessage firstMessage = iterator.next();
+ buffer.append(firstMessage);
+
+ while (iterator.hasNext()) {
+ buffer.append(",");
+ buffer.append(iterator.next());
+ }
+ }
+
+ buffer.append("})");
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigDeleteListenerAdaptor.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigDeleteListenerAdaptor.java
new file mode 100644
index 0000000..becbdff
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigDeleteListenerAdaptor.java
@@ -0,0 +1,269 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2009 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.Constraint;
+import org.forgerock.opendj.config.DecodingException;
+import org.forgerock.opendj.config.DefinitionDecodingException;
+import org.forgerock.opendj.config.InstantiableRelationDefinition;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.OptionalRelationDefinition;
+import org.forgerock.opendj.config.SetRelationDefinition;
+import org.forgerock.opendj.config.DefinitionDecodingException.Reason;
+import org.forgerock.opendj.config.server.spi.ConfigDeleteListener;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.Entry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.forgerock.opendj.ldap.ResultCode;
+
+/**
+ * An adaptor class which converts {@link ConfigDeleteListener} callbacks to
+ * {@link ServerManagedObjectDeleteListener} callbacks.
+ *
+ * @param <S>
+ * The type of server configuration handled by the delete listener.
+ */
+final class ConfigDeleteListenerAdaptor<S extends Configuration> extends AbstractConfigListenerAdaptor implements
+ ConfigDeleteListener {
+
+ private static final Logger debugLogger = LoggerFactory.getLogger(ConfigDeleteListenerAdaptor.class);
+
+ // Cached managed object between accept/apply callbacks.
+ private ServerManagedObject<? extends S> cachedManagedObject;
+
+ // The instantiable relation.
+ private final InstantiableRelationDefinition<?, S> instantiableRelation;
+
+ // The set relation.
+ private final SetRelationDefinition<?, S> setRelation;
+
+ // The underlying delete listener.
+ private final ServerManagedObjectDeleteListener<S> listener;
+
+ // The optional relation.
+ private final OptionalRelationDefinition<?, S> optionalRelation;
+
+ // The managed object path of the parent.
+ private final ManagedObjectPath<?, ?> path;
+
+ private final ServerManagementContext serverContext;
+
+ /**
+ * Create a new configuration delete listener adaptor for an instantiable
+ * relation.
+ *
+ * @param serverContext
+ * The server context.
+ * @param path
+ * The managed object path of the parent.
+ * @param relation
+ * The instantiable relation.
+ * @param listener
+ * The underlying delete listener.
+ */
+ public ConfigDeleteListenerAdaptor(ServerManagementContext serverContext, ManagedObjectPath<?, ?> path,
+ InstantiableRelationDefinition<?, S> relation, ServerManagedObjectDeleteListener<S> listener) {
+ this.serverContext = serverContext;
+ this.path = path;
+ this.optionalRelation = null;
+ this.instantiableRelation = relation;
+ this.setRelation = null;
+ this.listener = listener;
+ this.cachedManagedObject = null;
+ }
+
+ /**
+ * Create a new configuration delete listener adaptor for an optional
+ * relation.
+ * @param serverContext TODO
+ * @param path
+ * The managed object path of the parent.
+ * @param relation
+ * The optional relation.
+ * @param listener
+ * The underlying delete listener.
+ */
+ public ConfigDeleteListenerAdaptor(ServerManagementContext serverContext, ManagedObjectPath<?, ?> path,
+ OptionalRelationDefinition<?, S> relation, ServerManagedObjectDeleteListener<S> listener) {
+ this.serverContext = serverContext;
+ this.path = path;
+ this.optionalRelation = relation;
+ this.instantiableRelation = null;
+ this.setRelation = null;
+ this.listener = listener;
+ this.cachedManagedObject = null;
+ }
+
+ /**
+ * Create a new configuration delete listener adaptor for an set relation.
+ * @param serverContext TODO
+ * @param path
+ * The managed object path of the parent.
+ * @param relation
+ * The set relation.
+ * @param listener
+ * The underlying delete listener.
+ */
+ public ConfigDeleteListenerAdaptor(ServerManagementContext serverContext, ManagedObjectPath<?, ?> path,
+ SetRelationDefinition<?, S> relation, ServerManagedObjectDeleteListener<S> listener) {
+ this.serverContext = serverContext;
+ this.path = path;
+ this.optionalRelation = null;
+ this.instantiableRelation = null;
+ this.setRelation = relation;
+ this.listener = listener;
+ this.cachedManagedObject = null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ConfigChangeResult applyConfigurationDelete(Entry configEntry) {
+ if (optionalRelation != null) {
+ // Optional managed objects are located directly beneath the
+ // parent and have a well-defined name. We need to make sure
+ // that we are handling the correct entry.
+ ManagedObjectPath<?, ?> childPath = path.child(optionalRelation);
+ DN expectedDN = DNBuilder.create(childPath);
+ if (!configEntry.getName().equals(expectedDN)) {
+ // Doesn't apply to us.
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+ }
+
+ // Cached objects are guaranteed to be from previous acceptable
+ // callback.
+ ConfigChangeResult result = listener.applyConfigurationDelete(cachedManagedObject);
+
+ // Now apply post constraint call-backs.
+ if (result.getResultCode() == ResultCode.SUCCESS) {
+ ManagedObjectDefinition<?, ?> d = cachedManagedObject.getManagedObjectDefinition();
+ for (Constraint constraint : d.getAllConstraints()) {
+ for (ServerConstraintHandler handler : constraint.getServerConstraintHandlers()) {
+ try {
+ handler.performPostDelete(cachedManagedObject);
+ } catch (ConfigException e) {
+ debugLogger.trace("Unable to perform post delete", e);
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean configDeleteIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason) {
+ DN dn = configEntry.getName();
+ String name = dn.rdn().getFirstAVA().getAttributeValue().toString().trim();
+
+ try {
+ ManagedObjectPath<?, ? extends S> childPath;
+ if (instantiableRelation != null) {
+ childPath = path.child(instantiableRelation, name);
+ } else if (setRelation != null) {
+ try {
+ childPath = path.child(setRelation, name);
+ } catch (IllegalArgumentException e) {
+ throw new DefinitionDecodingException(setRelation.getChildDefinition(),
+ Reason.WRONG_TYPE_INFORMATION);
+ }
+ } else {
+ // Optional managed objects are located directly beneath the
+ // parent and have a well-defined name. We need to make sure
+ // that we are handling the correct entry.
+ childPath = path.child(optionalRelation);
+ DN expectedDN = DNBuilder.create(childPath);
+ if (!dn.equals(expectedDN)) {
+ // Doesn't apply to us.
+ return true;
+ }
+ }
+
+ cachedManagedObject = serverContext.decode(childPath, configEntry);
+ } catch (DecodingException e) {
+ unacceptableReason.append(e.getMessageObject());
+ return false;
+ }
+
+ List<LocalizableMessage> reasons = new LinkedList<LocalizableMessage>();
+
+ // Enforce any constraints.
+ boolean isDeleteAllowed = true;
+ ManagedObjectDefinition<?, ?> d = cachedManagedObject.getManagedObjectDefinition();
+ for (Constraint constraint : d.getAllConstraints()) {
+ for (ServerConstraintHandler handler : constraint.getServerConstraintHandlers()) {
+ try {
+ if (!handler.isDeleteAllowed(cachedManagedObject, reasons)) {
+ isDeleteAllowed = false;
+ }
+ } catch (ConfigException e) {
+ LocalizableMessage message = ERR_SERVER_CONSTRAINT_EXCEPTION.get(e.getMessageObject());
+ reasons.add(message);
+ isDeleteAllowed = false;
+ }
+ }
+ }
+
+ // Give up immediately if a constraint violation occurs.
+ if (!isDeleteAllowed) {
+ generateUnacceptableReason(reasons, unacceptableReason);
+ return false;
+ }
+
+ // Let the delete listener decide.
+ if (listener.isConfigurationDeleteAcceptable(cachedManagedObject, reasons)) {
+ return true;
+ } else {
+ generateUnacceptableReason(reasons, unacceptableReason);
+ return false;
+ }
+ }
+
+ /**
+ * Get the server managed object delete listener associated with this
+ * adaptor.
+ *
+ * @return Returns the server managed object delete listener associated with
+ * this adaptor.
+ */
+ ServerManagedObjectDeleteListener<S> getServerManagedObjectDeleteListener() {
+ return listener;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigException.java
new file mode 100644
index 0000000..55470df
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigException.java
@@ -0,0 +1,76 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2006-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import org.forgerock.i18n.LocalizableException;
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * Thrown during the course of interactions with the Directory Server
+ * configuration.
+ */
+public final class ConfigException extends Exception implements LocalizableException {
+
+ private static final long serialVersionUID = -540463620272921157L;
+
+ private final LocalizableMessage message;
+
+ /**
+ * Returns the message that explains the problem that occurred.
+ *
+ * @return LocalizableMessage of the problem
+ */
+ public LocalizableMessage getMessageObject() {
+ return message;
+ }
+
+ /**
+ * Creates a new configuration exception with the provided message.
+ *
+ * @param message
+ * The message to use for this configuration exception.
+ */
+ public ConfigException(LocalizableMessage message) {
+ super(message.toString());
+ this.message = message;
+ }
+
+ /**
+ * Creates a new configuration exception with the provided message and
+ * underlying cause.
+ *
+ * @param message
+ * The message to use for this configuration exception.
+ * @param cause
+ * The underlying cause that triggered this configuration
+ * exception.
+ */
+ public ConfigException(LocalizableMessage message, Throwable cause) {
+ super(message.toString(), cause);
+ this.message = message;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigExceptionFactory.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigExceptionFactory.java
new file mode 100644
index 0000000..ab93f0f
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigExceptionFactory.java
@@ -0,0 +1,124 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import static com.forgerock.opendj.util.StaticUtils.stackTraceToSingleLineString;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.DefinitionDecodingException;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.server.util.DynamicConstants;
+
+import com.forgerock.opendj.ldap.AdminMessages;
+
+/**
+ * A utility class for converting admin exceptions to config exceptions.
+ */
+final class ConfigExceptionFactory {
+
+ // The singleton instance.
+ private static final ConfigExceptionFactory INSTANCE = new ConfigExceptionFactory();
+
+ // Prevent instantiation.
+ private ConfigExceptionFactory() {
+ // Do nothing.
+ }
+
+ /**
+ * Get the configuration exception factory instance.
+ *
+ * @return Returns the configuration exception factory instance.
+ */
+ public static ConfigExceptionFactory getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Create a configuration exception from a definition decoding exception.
+ *
+ * @param dn
+ * The dn of the configuration entry that could not be decoded.
+ * @param e
+ * The definition decoding exception
+ * @return Returns the configuration exception.
+ */
+ public ConfigException createDecodingExceptionAdaptor(DN dn, DefinitionDecodingException e) {
+ LocalizableMessage message = AdminMessages.ERR_ADMIN_MANAGED_OBJECT_DECODING_PROBLEM.get(String.valueOf(dn),
+ stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
+ return new ConfigException(message, e);
+ }
+
+ /**
+ * Create a configuration exception from a server managed object decoding
+ * exception.
+ *
+ * @param e
+ * The server managed object decoding exception.
+ * @return Returns the configuration exception.
+ */
+
+ public ConfigException createDecodingExceptionAdaptor(ServerManagedObjectDecodingException e) {
+ DN dn = e.getPartialManagedObject().getDN();
+ LocalizableMessage message = AdminMessages.ERR_ADMIN_MANAGED_OBJECT_DECODING_PROBLEM.get(String.valueOf(dn),
+ stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
+ return new ConfigException(message, e);
+ }
+
+ /**
+ * Create a configuration exception from a constraints violation decoding
+ * exception.
+ *
+ * @param e
+ * The constraints violation decoding exception.
+ * @return Returns the configuration exception.
+ */
+ public ConfigException createDecodingExceptionAdaptor(ConstraintViolationException e) {
+ DN dn = e.getManagedObject().getDN();
+ LocalizableMessage message = AdminMessages.ERR_ADMIN_MANAGED_OBJECT_DECODING_PROBLEM.get(String.valueOf(dn),
+ stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
+ return new ConfigException(message, e);
+ }
+
+ /**
+ * Create an exception that describes a problem that occurred when
+ * attempting to load and instantiate a class.
+ *
+ * @param dn
+ * The dn of the configuration entry was being processed.
+ * @param className
+ * The name of the class that could not be loaded or
+ * instantiated.
+ * @param e
+ * The exception that occurred.
+ * @return Returns the configuration exception.
+ */
+
+ public ConfigException createClassLoadingExceptionAdaptor(DN dn, String className, Exception e) {
+ LocalizableMessage message = AdminMessages.ERR_ADMIN_CANNOT_INSTANTIATE_CLASS.get(String.valueOf(className),
+ String.valueOf(dn), stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
+ return new ConfigException(message, e);
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigurationAddListener.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigurationAddListener.java
new file mode 100644
index 0000000..4f6f46d
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigurationAddListener.java
@@ -0,0 +1,66 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.Configuration;
+
+import java.util.List;
+
+/**
+ * This interface defines the methods that a Directory Server configurable
+ * component should implement if it wishes to be able to receive notifications
+ * when a new configuration is added.
+ *
+ * @param <T>
+ * The type of configuration that this listener should be notified
+ * about.
+ */
+public interface ConfigurationAddListener<T extends Configuration> {
+
+ /**
+ * Indicates whether the proposed addition of a new configuration is
+ * acceptable to this add listener.
+ *
+ * @param configuration
+ * The configuration that will be added.
+ * @param unacceptableReasons
+ * A list that can be used to hold messages about why the
+ * provided configuration is not acceptable.
+ * @return Returns <code>true</code> if the proposed addition is acceptable,
+ * or <code>false</code> if it is not.
+ */
+ public boolean isConfigurationAddAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons);
+
+ /**
+ * Adds a new configuration to this add listener.
+ *
+ * @param configuration
+ * The configuration that will be added.
+ * @return Returns information about the result of adding the configuration.
+ */
+ public ConfigChangeResult applyConfigurationAdd(T configuration);
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigurationChangeListener.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigurationChangeListener.java
new file mode 100644
index 0000000..bb708f5
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigurationChangeListener.java
@@ -0,0 +1,67 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.Configuration;
+
+import java.util.List;
+
+/**
+ * This interface defines the methods that a Directory Server configurable
+ * component should implement if it wishes to be able to receive notifications
+ * when a its associated configuration is changed.
+ *
+ * @param <T>
+ * The type of configuration that this listener should be notified
+ * about.
+ */
+public interface ConfigurationChangeListener<T extends Configuration> {
+
+ /**
+ * Indicates whether the proposed change to the configuration is acceptable
+ * to this change listener.
+ *
+ * @param configuration
+ * The new configuration containing the changes.
+ * @param unacceptableReasons
+ * A list that can be used to hold messages about why the
+ * provided configuration is not acceptable.
+ * @return Returns <code>true</code> if the proposed change is acceptable,
+ * or <code>false</code> if it is not.
+ */
+ public boolean isConfigurationChangeAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons);
+
+ /**
+ * Applies the configuration changes to this change listener.
+ *
+ * @param configuration
+ * The new configuration containing the changes.
+ * @return Returns information about the result of changing the
+ * configuration.
+ */
+ public ConfigChangeResult applyConfigurationChange(T configuration);
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigurationDeleteListener.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigurationDeleteListener.java
new file mode 100644
index 0000000..ffa4c11
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConfigurationDeleteListener.java
@@ -0,0 +1,67 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.Configuration;
+
+import java.util.List;
+
+/**
+ * This interface defines the methods that a Directory Server configurable
+ * component should implement if it wishes to be able to receive notifications
+ * when an existing configuration is deleted.
+ *
+ * @param <T>
+ * The type of configuration that this listener should be notified
+ * about.
+ */
+public interface ConfigurationDeleteListener<T extends Configuration> {
+
+ /**
+ * Indicates whether the proposed deletion of an existing configuration is
+ * acceptable to this delete listener.
+ *
+ * @param configuration
+ * The configuration that will be deleted.
+ * @param unacceptableReasons
+ * A list that can be used to hold messages about why the
+ * provided configuration is not acceptable.
+ * @return Returns <code>true</code> if the proposed deletion is acceptable,
+ * or <code>false</code> if it is not.
+ */
+ public boolean isConfigurationDeleteAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons);
+
+ /**
+ * Deletes an existing configuration from this delete listener.
+ *
+ * @param configuration
+ * The existing configuration that will be deleted.
+ * @return Returns information about the result of deleting the
+ * configuration.
+ */
+ public ConfigChangeResult applyConfigurationDelete(T configuration);
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConstraintViolationException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConstraintViolationException.java
new file mode 100644
index 0000000..92b8071
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ConstraintViolationException.java
@@ -0,0 +1,150 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+import org.forgerock.opendj.config.DecodingException;
+import org.forgerock.util.Reject;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+
+/**
+ * This exception is thrown when the server refuses to use or delete a managed
+ * object due to one or more constraints that cannot be satisfied.
+ */
+public class ConstraintViolationException extends DecodingException {
+
+ /**
+ * Serialization ID.
+ */
+ private static final long serialVersionUID = -4902443848460011875L;
+
+ // The server managed object.
+ private final ServerManagedObject<?> managedObject;
+
+ // Gets the default message.
+ private static LocalizableMessage getDefaultMessage(Collection<LocalizableMessage> messages) {
+ Reject.ifNull(messages);
+ Reject.ifFalse(!messages.isEmpty(), "messages should not be empty");
+
+ if (messages.size() == 1) {
+ return ERR_CONSTRAINT_VIOLATION_EXCEPTION_SINGLE.get(messages.iterator().next());
+ } else {
+ return ERR_CONSTRAINT_VIOLATION_EXCEPTION_PLURAL.get(getSingleMessage(messages));
+ }
+ }
+
+ // Merge the messages into a single message.
+ private static LocalizableMessage getSingleMessage(Collection<LocalizableMessage> messages) {
+ if (messages.size() == 1) {
+ return messages.iterator().next();
+ } else {
+ LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
+
+ boolean isFirst = true;
+ for (LocalizableMessage m : messages) {
+ if (!isFirst) {
+ builder.append("; ");
+ }
+ builder.append(m);
+ isFirst = false;
+ }
+
+ return builder.toMessage();
+ }
+ }
+
+ // The messages describing the constraint violations that occurred.
+ private final Collection<LocalizableMessage> messages;
+
+ /**
+ * Creates a new constraint violation exception with the provided messages.
+ *
+ * @param managedObject
+ * The server managed object which caused the constraint
+ * violations.
+ * @param messages
+ * The messages describing the constraint violations that
+ * occurred (must be non-<code>null</code> and non-empty).
+ */
+ public ConstraintViolationException(ServerManagedObject<?> managedObject, Collection<LocalizableMessage> messages) {
+ super(getDefaultMessage(messages));
+
+ this.managedObject = managedObject;
+ this.messages = new ArrayList<LocalizableMessage>(messages);
+ }
+
+ /**
+ * Creates a new constraint violation exception with the provided message.
+ *
+ * @param managedObject
+ * The server managed object which caused the constraint
+ * violations.
+ * @param message
+ * The message describing the constraint violation that occurred.
+ */
+ public ConstraintViolationException(ServerManagedObject<?> managedObject, LocalizableMessage message) {
+ this(managedObject, Collections.singleton(message));
+ }
+
+ /**
+ * Gets an unmodifiable collection view of the messages describing the
+ * constraint violations that occurred.
+ *
+ * @return Returns an unmodifiable collection view of the messages
+ * describing the constraint violations that occurred.
+ */
+ public Collection<LocalizableMessage> getMessages() {
+ return Collections.unmodifiableCollection(messages);
+ }
+
+ /**
+ * Creates a single message listing all the messages combined into a single
+ * list separated by semi-colons.
+ *
+ * @return Returns a single message listing all the messages combined into a
+ * single list separated by semi-colons.
+ */
+ public LocalizableMessage getMessagesAsSingleMessage() {
+ return getSingleMessage(messages);
+ }
+
+ /**
+ * Gets the server managed object which caused the constraint violations.
+ *
+ * @return Returns the server managed object which caused the constraint
+ * violations.
+ */
+ public ServerManagedObject<?> getManagedObject() {
+ return managedObject;
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/DNBuilder.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/DNBuilder.java
new file mode 100644
index 0000000..2dbecbb
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/DNBuilder.java
@@ -0,0 +1,72 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config.server;
+
+import org.forgerock.opendj.config.LDAPProfile;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.RelationDefinition;
+import org.forgerock.opendj.ldap.DN;
+
+/**
+ * A factory class for creating <code>DN</code>s from managed object paths.
+ */
+final class DNBuilder {
+
+ /**
+ * Creates a new DN representing the specified managed object path.
+ *
+ * @param path
+ * The managed object path.
+ * @return Returns a new DN representing the specified managed object path.
+ */
+ public static DN create(ManagedObjectPath<?, ?> path) {
+ return path.toDN();
+ }
+
+ /**
+ * Creates a new DN representing the specified managed object path and
+ * relation.
+ *
+ * @param path
+ * The managed object path.
+ * @param relation
+ * The child relation.
+ * @return Returns a new DN representing the specified managed object path
+ * and relation.
+ */
+ public static DN create(ManagedObjectPath<?, ?> path, RelationDefinition<?, ?> relation) {
+ DN dn = path.toDN();
+ LDAPProfile profile = LDAPProfile.getInstance();
+ DN localName = DN.valueOf(profile.getRelationRDNSequence(relation));
+ return dn.child(localName);
+ }
+
+ // Prevent instantiation.
+ private DNBuilder() {
+ // No implementation required.
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/DelayedConfigAddListener.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/DelayedConfigAddListener.java
new file mode 100644
index 0000000..880dc59
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/DelayedConfigAddListener.java
@@ -0,0 +1,172 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.forgerock.opendj.config.server.spi.ConfigAddListener;
+import org.forgerock.opendj.config.server.spi.ConfigDeleteListener;
+import org.forgerock.opendj.config.server.spi.ConfigurationRepository;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.Entry;
+import org.forgerock.opendj.ldap.ResultCode;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+
+/**
+ * A configuration add listener which will monitor a parent entry to see when a
+ * specified child entry has been added. When the child entry is added the add
+ * listener will automatically register its "delayed" add or delete listener.
+ */
+final class DelayedConfigAddListener implements ConfigAddListener {
+
+ private static final Logger debugLogger = LoggerFactory.getLogger(DelayedConfigAddListener.class);
+
+ // The name of the parent entry.
+ private final DN parent;
+
+ // The name of the subordinate entry which should have an add or
+ // delete listener registered with it when it is created.
+ private final DN child;
+
+ // The add listener to be registered with the subordinate entry when
+ // it is added (or null if a delete listener should be registered).
+ private final ConfigAddListener delayedAddListener;
+
+ // The delete listener to be registered with the subordinate entry
+ // when it is added (or null if an add listener should be
+ // registered).
+ private final ConfigDeleteListener delayedDeleteListener;
+
+ private final ConfigurationRepository configRepository;
+
+ /**
+ * Create a new delayed add listener which will register an add listener
+ * with the specified entry when it is added.
+ *
+ * @param child
+ * The name of the subordinate entry which should have an add
+ * listener registered with it when it is created.
+ * @param addListener
+ * The add listener to be added to the subordinate entry when it
+ * is added.
+ * @param configRepository
+ * Repository of config entries.
+ */
+ public DelayedConfigAddListener(DN child, ConfigAddListener addListener, ConfigurationRepository configRepository) {
+ this.parent = child.parent();
+ this.child = child;
+ this.delayedAddListener = addListener;
+ this.delayedDeleteListener = null;
+ this.configRepository = configRepository;
+ }
+
+ /**
+ * Create a new delayed add listener which will register a delete listener
+ * with the specified entry when it is added.
+ *
+ * @param child
+ * The name of the subordinate entry which should have a delete
+ * listener registered with it when it is created.
+ * @param deleteListener
+ * The delete listener to be added to the subordinate entry when
+ * it is added.
+ * @param configRepository
+ * Repository of config entries.
+ */
+ public DelayedConfigAddListener(DN child, ConfigDeleteListener deleteListener,
+ ConfigurationRepository configRepository) {
+ this.parent = child.parent();
+ this.child = child;
+ this.delayedAddListener = null;
+ this.configRepository = configRepository;
+ this.delayedDeleteListener = deleteListener;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ConfigChangeResult applyConfigurationAdd(Entry configEntry) {
+ if (configEntry.getName().equals(child)) {
+ // The subordinate entry matched our criteria so register the
+ // listener(s).
+ if (delayedAddListener != null) {
+ configRepository.registerAddListener(configEntry.getName(), delayedAddListener);
+ }
+
+ if (delayedDeleteListener != null) {
+ configRepository.registerDeleteListener(configEntry.getName(), delayedDeleteListener);
+ }
+
+ try {
+ // We are no longer needed.
+ if (configRepository.hasEntry(parent)) {
+ configRepository.deregisterAddListener(parent, this);
+ }
+ } catch (ConfigException e) {
+ debugLogger.trace("Unable to deregister add listener", e);
+ // Ignore this error as it implies that this listener has
+ // already been deregistered.
+ }
+ }
+
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean configAddIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason) {
+ // Always acceptable.
+ return true;
+ }
+
+ /**
+ * Gets the delayed add listener.
+ * <p>
+ * This method is provided for unit-testing.
+ *
+ * @return Returns the delayed add listener, or <code>null</code> if this
+ * listener is delaying a delete listener.
+ */
+ ConfigAddListener getDelayedAddListener() {
+ return delayedAddListener;
+ }
+
+ /**
+ * Gets the delayed delete listener.
+ * <p>
+ * This method is provided for unit-testing.
+ *
+ * @return Returns the delayed delete listener, or <code>null</code> if this
+ * listener is delaying a add listener.
+ */
+ ConfigDeleteListener getDelayedDeleteListener() {
+ return delayedDeleteListener;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerConstraintHandler.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerConstraintHandler.java
new file mode 100644
index 0000000..fb06221
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerConstraintHandler.java
@@ -0,0 +1,169 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import java.util.Collection;
+
+import org.forgerock.i18n.LocalizableMessage;
+
+/**
+ * An interface for performing server-side constraint validation.
+ * <p>
+ * Constraints are evaluated immediately before and after write operations are
+ * performed. Server-side constraints are evaluated in two phases: the first
+ * phase determines if the proposed add, delete, or modification is acceptable
+ * according to the constraint. If one or more constraints fails, the write
+ * write operation is refused, and the client will receive an
+ * <code>OperationRejectedException</code> exception. The second phase is
+ * invoked once the add, delete, or modification request has been allowed and
+ * any changes applied. The second phase gives the constraint handler a chance
+ * to register listener call-backs if required.
+ * <p>
+ * A server constraint handler must override at least one of the provided
+ * methods.
+ *
+ * @see org.forgerock.opendj.config.Constraint
+ */
+public abstract class ServerConstraintHandler {
+
+ /**
+ * Creates a new server constraint handler.
+ */
+ protected ServerConstraintHandler() {
+ // No implementation required.
+ }
+
+ /**
+ * Determines whether or not the existing managed object can be deleted from
+ * the server's configuration. For example, an implementation might enforce
+ * referential integrity by preventing referenced managed objects from being
+ * deleted.
+ * <p>
+ * If the constraint is not satisfied, the implementation must return
+ * <code>false</code> and add a message describing why the managed object
+ * cannot be deleted.
+ * <p>
+ * The default implementation is to return <code>true</code>.
+ *
+ * @param managedObject
+ * The managed object which is about to be deleted.
+ * @param unacceptableReasons
+ * A list of messages to which error messages should be added.
+ * @return Returns <code>true</code> if this constraint is satisfied, or
+ * <code>false</code> if it is not and the managed object cannot be
+ * deleted.
+ * @throws ConfigException
+ * If an configuration exception prevented this constraint from
+ * being evaluated.
+ */
+ public boolean isDeleteAllowed(ServerManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ConfigException {
+ return true;
+ }
+
+ /**
+ * Determines whether or not the provided managed object can be used by the
+ * server. This method is invoked each time a managed object is decoded by
+ * the administration framework: when an attempt is made to add a new
+ * configuration, modify an existing configuration, or during server
+ * initialization. If the constraint is not satisfied the managed object
+ * will be rejected.
+ * <p>
+ * If the constraint is not satisfied, the implementation must return
+ * <code>false</code> and add a message describing why the managed object is
+ * not usable.
+ * <p>
+ * The default implementation is to return <code>true</code>.
+ *
+ * @param managedObject
+ * The new managed object.
+ * @param unacceptableReasons
+ * A list of messages to which error messages should be added.
+ * @return Returns <code>true</code> if this constraint is satisfied, or
+ * <code>false</code> if it is not and the managed object cannot be
+ * used.
+ * @throws ConfigException
+ * If an configuration exception prevented this constraint from
+ * being evaluated.
+ */
+ public boolean isUsable(ServerManagedObject<?> managedObject, Collection<LocalizableMessage> unacceptableReasons)
+ throws ConfigException {
+ return true;
+ }
+
+ /**
+ * Performs any post-add processing required by this constraint. This method
+ * is invoked after a new managed object has been accepted for use by the
+ * administration framework. This might occur during initialization or when
+ * a managed object is added at run-time.
+ * <p>
+ * The default implementation is to do nothing.
+ *
+ * @param managedObject
+ * The managed object which has just been added to the server's
+ * configuration.
+ * @throws ConfigException
+ * If the post-add processing fails due to a configuration
+ * exception.
+ */
+ public void performPostAdd(ServerManagedObject<?> managedObject) throws ConfigException {
+ // Do nothing.
+ }
+
+ /**
+ * Performs any post-delete processing required by this constraint. This
+ * method is invoked after a managed object has been accepted for deletion
+ * from the server's configuration.
+ * <p>
+ * The default implementation is to do nothing.
+ *
+ * @param managedObject
+ * The managed object which was deleted.
+ * @throws ConfigException
+ * If the post-delete processing fails due to a configuration
+ * exception.
+ */
+ public void performPostDelete(ServerManagedObject<?> managedObject) throws ConfigException {
+ // Do nothing.
+ }
+
+ /**
+ * Performs any post-modify processing required by this constraint. This
+ * method is invoked after changes to an existing managed object have been
+ * accepted.
+ * <p>
+ * The default implementation is to do nothing.
+ *
+ * @param managedObject
+ * The managed object which was modified.
+ * @throws ConfigException
+ * If the post-modify processing fails due to a configuration
+ * exception.
+ */
+ public void performPostModify(ServerManagedObject<?> managedObject) throws ConfigException {
+ // Do nothing.
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObject.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObject.java
new file mode 100644
index 0000000..3714cdc
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObject.java
@@ -0,0 +1,1440 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2006-2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config.server;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.Constraint;
+import org.forgerock.opendj.config.InstantiableRelationDefinition;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.OptionalRelationDefinition;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyProvider;
+import org.forgerock.opendj.config.RelationDefinition;
+import org.forgerock.opendj.config.SetRelationDefinition;
+import org.forgerock.opendj.config.SingletonRelationDefinition;
+import org.forgerock.opendj.config.server.spi.ConfigAddListener;
+import org.forgerock.opendj.config.server.spi.ConfigChangeListener;
+import org.forgerock.opendj.config.server.spi.ConfigDeleteListener;
+import org.forgerock.opendj.config.server.spi.ConfigurationRepository;
+import org.forgerock.opendj.ldap.DN;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.forgerock.opendj.util.Pair;
+
+
+/**
+ * A server-side managed object.
+ *
+ * @param <S>
+ * The type of server configuration represented by the server managed
+ * object.
+ */
+public final class ServerManagedObject<S extends Configuration> implements PropertyProvider {
+
+ private static final Logger logger = LoggerFactory.getLogger(ServerManagedObject.class);
+
+ /**
+ * The DN of configuration entry associated with this server managed object,
+ * which is {@code null} for root.
+ */
+ private DN configDN;
+
+ private final ServerManagementContext serverContext;
+
+ private final ConfigurationRepository configRepository;
+
+ private final ManagedObjectDefinition<?, S> definition;
+
+ /** The managed object path identifying this managed object's location. */
+ private final ManagedObjectPath<?, S> path;
+
+ private final Map<PropertyDefinition<?>, SortedSet<?>> properties;
+
+ /**
+ * Creates an new server side managed object.
+ *
+ * @param path
+ * The managed object path.
+ * @param definition
+ * The managed object definition.
+ * @param properties
+ * The managed object's properties.
+ * @param configDN
+ * The configuration entry associated with the managed object.
+ * @param context
+ * The server management context.
+ */
+ ServerManagedObject(final ManagedObjectPath<?, S> path, final ManagedObjectDefinition<?, S> definition,
+ final Map<PropertyDefinition<?>, SortedSet<?>> properties, final DN configDN,
+ final ServerManagementContext context) {
+ this.definition = definition;
+ this.path = path;
+ this.properties = properties;
+ this.configDN = configDN;
+ this.serverContext = context;
+ this.configRepository = context.getConfigRepository();
+ }
+
+ /**
+ * Deregisters an existing configuration add listener.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The instantiable relation definition.
+ * @param listener
+ * The configuration add listener.
+ * @throws IllegalArgumentException
+ * If the instantiable relation definition is not associated
+ * with this managed object's definition.
+ */
+ public <M extends Configuration> void deregisterAddListener(InstantiableRelationDefinition<?, M> d,
+ ConfigurationAddListener<M> listener) {
+ validateRelationDefinition(d);
+ DN baseDN = DNBuilder.create(path, d);
+ deregisterAddListener(baseDN, listener);
+ }
+
+ /**
+ * Deregisters an existing server managed object add listener.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The instantiable relation definition.
+ * @param listener
+ * The server managed object add listener.
+ * @throws IllegalArgumentException
+ * If the instantiable relation definition is not associated
+ * with this managed object's definition.
+ */
+ public <M extends Configuration> void deregisterAddListener(InstantiableRelationDefinition<?, M> d,
+ ServerManagedObjectAddListener<M> listener) {
+ validateRelationDefinition(d);
+ DN baseDN = DNBuilder.create(path, d);
+ deregisterAddListener(baseDN, listener);
+ }
+
+ /**
+ * Deregisters an existing configuration add listener.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The optional relation definition.
+ * @param listener
+ * The configuration add listener.
+ * @throws IllegalArgumentException
+ * If the optional relation definition is not associated with
+ * this managed object's definition.
+ */
+ public <M extends Configuration> void deregisterAddListener(OptionalRelationDefinition<?, M> d,
+ ConfigurationAddListener<M> listener) {
+ validateRelationDefinition(d);
+ DN baseDN = DNBuilder.create(path, d).parent();
+ deregisterAddListener(baseDN, listener);
+ }
+
+ /**
+ * Deregisters an existing server managed object add listener.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The optional relation definition.
+ * @param listener
+ * The server managed object add listener.
+ * @throws IllegalArgumentException
+ * If the optional relation definition is not associated with
+ * this managed object's definition.
+ */
+ public <M extends Configuration> void deregisterAddListener(OptionalRelationDefinition<?, M> d,
+ ServerManagedObjectAddListener<M> listener) {
+ validateRelationDefinition(d);
+ DN baseDN = DNBuilder.create(path, d).parent();
+ deregisterAddListener(baseDN, listener);
+ }
+
+ /**
+ * Deregisters an existing configuration add listener.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The set relation definition.
+ * @param listener
+ * The configuration add listener.
+ * @throws IllegalArgumentException
+ * If the set relation definition is not associated with this
+ * managed object's definition.
+ */
+ public <M extends Configuration> void deregisterAddListener(SetRelationDefinition<?, M> d,
+ ConfigurationAddListener<M> listener) {
+ validateRelationDefinition(d);
+ DN baseDN = DNBuilder.create(path, d);
+ deregisterAddListener(baseDN, listener);
+ }
+
+ /**
+ * Deregisters an existing server managed object add listener.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The set relation definition.
+ * @param listener
+ * The server managed object add listener.
+ * @throws IllegalArgumentException
+ * If the set relation definition is not associated with this
+ * managed object's definition.
+ */
+ public <M extends Configuration> void deregisterAddListener(SetRelationDefinition<?, M> d,
+ ServerManagedObjectAddListener<M> listener) {
+ validateRelationDefinition(d);
+ DN baseDN = DNBuilder.create(path, d);
+ deregisterAddListener(baseDN, listener);
+ }
+
+ /**
+ * Deregisters an existing configuration change listener.
+ *
+ * @param listener
+ * The configuration change listener.
+ */
+ public void deregisterChangeListener(ConfigurationChangeListener<? super S> listener) {
+ for (ConfigChangeListener l : configRepository.getChangeListeners(configDN)) {
+ if (l instanceof ConfigChangeListenerAdaptor) {
+ ConfigChangeListenerAdaptor<?> adaptor = (ConfigChangeListenerAdaptor<?>) l;
+ ServerManagedObjectChangeListener<?> l2 = adaptor.getServerManagedObjectChangeListener();
+ if (l2 instanceof ServerManagedObjectChangeListenerAdaptor<?>) {
+ ServerManagedObjectChangeListenerAdaptor<?> adaptor2 =
+ (ServerManagedObjectChangeListenerAdaptor<?>) l2;
+ if (adaptor2.getConfigurationChangeListener() == listener) {
+ adaptor.finalizeChangeListener();
+ configRepository.deregisterChangeListener(configDN, adaptor);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Deregisters an existing server managed object change listener.
+ *
+ * @param listener
+ * The server managed object change listener.
+ */
+ public void deregisterChangeListener(ServerManagedObjectChangeListener<? super S> listener) {
+ for (ConfigChangeListener l : configRepository.getChangeListeners(configDN)) {
+ if (l instanceof ConfigChangeListenerAdaptor) {
+ ConfigChangeListenerAdaptor<?> adaptor = (ConfigChangeListenerAdaptor<?>) l;
+ if (adaptor.getServerManagedObjectChangeListener() == listener) {
+ adaptor.finalizeChangeListener();
+ configRepository.deregisterChangeListener(configDN, adaptor);
+ }
+ }
+ }
+ }
+
+ /**
+ * Deregisters an existing configuration delete listener.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The instantiable relation definition.
+ * @param listener
+ * The configuration delete listener.
+ * @throws IllegalArgumentException
+ * If the instantiable relation definition is not associated
+ * with this managed object's definition.
+ */
+ public <M extends Configuration> void deregisterDeleteListener(InstantiableRelationDefinition<?, M> d,
+ ConfigurationDeleteListener<M> listener) {
+ validateRelationDefinition(d);
+
+ DN baseDN = DNBuilder.create(path, d);
+ deregisterDeleteListener(baseDN, listener);
+ }
+
+ /**
+ * Deregisters an existing server managed object delete listener.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The instantiable relation definition.
+ * @param listener
+ * The server managed object delete listener.
+ * @throws IllegalArgumentException
+ * If the instantiable relation definition is not associated
+ * with this managed object's definition.
+ */
+ public <M extends Configuration> void deregisterDeleteListener(InstantiableRelationDefinition<?, M> d,
+ ServerManagedObjectDeleteListener<M> listener) {
+ validateRelationDefinition(d);
+
+ DN baseDN = DNBuilder.create(path, d);
+ deregisterDeleteListener(baseDN, listener);
+ }
+
+ /**
+ * Deregisters an existing configuration delete listener.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The optional relation definition.
+ * @param listener
+ * The configuration delete listener.
+ * @throws IllegalArgumentException
+ * If the optional relation definition is not associated with
+ * this managed object's definition.
+ */
+ public <M extends Configuration> void deregisterDeleteListener(OptionalRelationDefinition<?, M> d,
+ ConfigurationDeleteListener<M> listener) {
+ validateRelationDefinition(d);
+
+ DN baseDN = DNBuilder.create(path, d).parent();
+ deregisterDeleteListener(baseDN, listener);
+ }
+
+ /**
+ * Deregisters an existing server managed object delete listener.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The optional relation definition.
+ * @param listener
+ * The server managed object delete listener.
+ * @throws IllegalArgumentException
+ * If the optional relation definition is not associated with
+ * this managed object's definition.
+ */
+ public <M extends Configuration> void deregisterDeleteListener(OptionalRelationDefinition<?, M> d,
+ ServerManagedObjectDeleteListener<M> listener) {
+ validateRelationDefinition(d);
+
+ DN baseDN = DNBuilder.create(path, d).parent();
+ deregisterDeleteListener(baseDN, listener);
+ }
+
+ /**
+ * Deregisters an existing configuration delete listener.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The set relation definition.
+ * @param listener
+ * The configuration delete listener.
+ * @throws IllegalArgumentException
+ * If the set relation definition is not associated with this
+ * managed object's definition.
+ */
+ public <M extends Configuration> void deregisterDeleteListener(SetRelationDefinition<?, M> d,
+ ConfigurationDeleteListener<M> listener) {
+ validateRelationDefinition(d);
+
+ DN baseDN = DNBuilder.create(path, d);
+ deregisterDeleteListener(baseDN, listener);
+ }
+
+ /**
+ * Deregisters an existing server managed object delete listener.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The set relation definition.
+ * @param listener
+ * The server managed object delete listener.
+ * @throws IllegalArgumentException
+ * If the set relation definition is not associated with this
+ * managed object's definition.
+ */
+ public <M extends Configuration> void deregisterDeleteListener(SetRelationDefinition<?, M> d,
+ ServerManagedObjectDeleteListener<M> listener) {
+ validateRelationDefinition(d);
+
+ DN baseDN = DNBuilder.create(path, d);
+ deregisterDeleteListener(baseDN, listener);
+ }
+
+ /**
+ * Retrieve an instantiable child managed object.
+ *
+ * @param <M>
+ * The requested type of the child server managed object
+ * configuration.
+ * @param d
+ * The instantiable relation definition.
+ * @param name
+ * The name of the child managed object.
+ * @return Returns the instantiable child managed object.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ * @throws ConfigException
+ * If the child managed object could not be found or if it could
+ * not be decoded.
+ */
+ public <M extends Configuration> ServerManagedObject<? extends M> getChild(InstantiableRelationDefinition<?, M> d,
+ String name) throws ConfigException {
+ validateRelationDefinition(d);
+ return serverContext.getManagedObject(path.child(d, name));
+ }
+
+ /**
+ * Retrieve an optional child managed object.
+ *
+ * @param <M>
+ * The requested type of the child server managed object
+ * configuration.
+ * @param d
+ * The optional relation definition.
+ * @return Returns the optional child managed object.
+ * @throws IllegalArgumentException
+ * If the optional relation definition is not associated with
+ * this managed object's definition.
+ * @throws ConfigException
+ * If the child managed object could not be found or if it could
+ * not be decoded.
+ */
+ public <M extends Configuration> ServerManagedObject<? extends M> getChild(OptionalRelationDefinition<?, M> d)
+ throws ConfigException {
+ validateRelationDefinition(d);
+ return serverContext.getManagedObject(path.child(d));
+ }
+
+ /**
+ * Retrieve a set child managed object.
+ *
+ * @param <M>
+ * The requested type of the child server managed object
+ * configuration.
+ * @param d
+ * The set relation definition.
+ * @param name
+ * The name of the child managed object.
+ * @return Returns the set child managed object.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition or if {@code name} specifies a
+ * managed object definition which is not a sub-type of the
+ * relation's child definition.
+ * @throws ConfigException
+ * If the child managed object could not be found or if it could
+ * not be decoded.
+ */
+ public <M extends Configuration> ServerManagedObject<? extends M> getChild(SetRelationDefinition<?, M> d,
+ String name) throws ConfigException {
+ validateRelationDefinition(d);
+
+ return serverContext.getManagedObject(path.child(d, name));
+ }
+
+ /**
+ * Retrieve a singleton child managed object.
+ *
+ * @param <M>
+ * The requested type of the child server managed object
+ * configuration.
+ * @param d
+ * The singleton relation definition.
+ * @return Returns the singleton child managed object.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ * @throws ConfigException
+ * If the child managed object could not be found or if it could
+ * not be decoded.
+ */
+ public <M extends Configuration> ServerManagedObject<? extends M> getChild(SingletonRelationDefinition<?, M> d)
+ throws ConfigException {
+ validateRelationDefinition(d);
+ return serverContext.getManagedObject(path.child(d));
+ }
+
+ /**
+ * Returns the server management context used by this object.
+ *
+ * @return the context
+ */
+ public ServerManagementContext getServerContext() {
+ return serverContext;
+ }
+
+ /**
+ * Creates a server configuration view of this managed object.
+ *
+ * @return Returns the server configuration view of this managed object.
+ */
+ public S getConfiguration() {
+ return definition.createServerConfiguration(this);
+ }
+
+ /**
+ * Get the DN of the LDAP entry associated with this server managed object.
+ *
+ * @return Returns the DN of the LDAP entry associated with this server
+ * managed object, or an null DN if this is the root managed object.
+ */
+ public DN getDN() {
+ if (configDN != null) {
+ return configDN;
+ } else {
+ return DN.rootDN();
+ }
+ }
+
+ /**
+ * Get the definition associated with this server managed object.
+ *
+ * @return Returns the definition associated with this server managed
+ * object.
+ */
+ public ManagedObjectDefinition<?, S> getManagedObjectDefinition() {
+ return definition;
+ }
+
+ /**
+ * Get the path of this server managed object.
+ *
+ * @return Returns the path of this server managed object.
+ */
+ public ManagedObjectPath<?, S> getManagedObjectPath() {
+ return path;
+ }
+
+ /**
+ * Get the effective value of the specified property. If the property is
+ * multi-valued then just the first value is returned. If the property does
+ * not have a value then its default value is returned if it has one, or
+ * <code>null</code> indicating that any default behavior is applicable.
+ *
+ * @param <T>
+ * The type of the property to be retrieved.
+ * @param d
+ * The property to be retrieved.
+ * @return Returns the property's effective value, or <code>null</code>
+ * indicating that any default behavior is applicable.
+ * @throws IllegalArgumentException
+ * If the property definition is not associated with this
+ * managed object's definition.
+ */
+ public <T> T getPropertyValue(PropertyDefinition<T> d) {
+ Set<T> values = getPropertyValues(d);
+ if (values.isEmpty()) {
+ return null;
+ } else {
+ return values.iterator().next();
+ }
+ }
+
+ /**
+ * Get the effective values of the specified property. If the property does
+ * not have any values then its default values are returned if it has any,
+ * or an empty set indicating that any default behavior is applicable.
+ *
+ * @param <T>
+ * The type of the property to be retrieved.
+ * @param d
+ * The property to be retrieved.
+ * @return Returns an unmodifiable set containing the property's effective
+ * values. An empty set indicates that the property has no default
+ * values defined and any default behavior is applicable.
+ * @throws IllegalArgumentException
+ * If the property definition is not associated with this
+ * managed object's definition.
+ */
+ @SuppressWarnings("unchecked")
+ public <T> SortedSet<T> getPropertyValues(PropertyDefinition<T> d) {
+ if (!properties.containsKey(d)) {
+ throw new IllegalArgumentException("Unknown property " + d.getName());
+ }
+ return Collections.unmodifiableSortedSet((SortedSet<T>) properties.get(d));
+ }
+
+ /**
+ * Determines whether or not the optional managed object associated with the
+ * specified optional relations exists.
+ *
+ * @param d
+ * The optional relation definition.
+ * @return Returns <code>true</code> if the optional managed object exists,
+ * <code>false</code> otherwise.
+ * @throws IllegalArgumentException
+ * If the optional relation definition is not associated with
+ * this managed object's definition.
+ */
+ public boolean hasChild(OptionalRelationDefinition<?, ?> d) {
+ validateRelationDefinition(d);
+ return serverContext.managedObjectExists(path.child(d));
+ }
+
+ /**
+ * Lists the child managed objects associated with the specified
+ * instantiable relation.
+ *
+ * @param d
+ * The instantiable relation definition.
+ * @return Returns the names of the child managed objects.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ */
+ public String[] listChildren(InstantiableRelationDefinition<?, ?> d) {
+ validateRelationDefinition(d);
+ return serverContext.listManagedObjects(path, d);
+ }
+
+ /**
+ * Lists the child managed objects associated with the specified set
+ * relation.
+ *
+ * @param d
+ * The set relation definition.
+ * @return Returns the names of the child managed objects.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ */
+ public String[] listChildren(SetRelationDefinition<?, ?> d) {
+ validateRelationDefinition(d);
+ return serverContext.listManagedObjects(path, d);
+ }
+
+ /**
+ * Register to be notified when new child configurations are added beneath
+ * an instantiable relation.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The instantiable relation definition.
+ * @param listener
+ * The configuration add listener.
+ * @throws IllegalArgumentException
+ * If the instantiable relation definition is not associated
+ * with this managed object's definition.
+ * @throws ConfigException
+ * If the configuration entry associated with the instantiable
+ * relation could not be retrieved.
+ */
+ public <M extends Configuration> void registerAddListener(InstantiableRelationDefinition<?, M> d,
+ ConfigurationAddListener<M> listener) throws ConfigException {
+ registerAddListener(d, new ServerManagedObjectAddListenerAdaptor<M>(listener));
+ }
+
+ /**
+ * Register to be notified when new child server managed object are added
+ * beneath an instantiable relation.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The instantiable relation definition.
+ * @param listener
+ * The server managed object add listener.
+ * @throws IllegalArgumentException
+ * If the instantiable relation definition is not associated
+ * with this managed object's definition.
+ * @throws ConfigException
+ * If the configuration entry associated with the instantiable
+ * relation could not be retrieved.
+ */
+ public <M extends Configuration> void registerAddListener(InstantiableRelationDefinition<?, M> d,
+ ServerManagedObjectAddListener<M> listener) throws ConfigException {
+ validateRelationDefinition(d);
+ DN baseDN = DNBuilder.create(path, d);
+ ConfigAddListener adaptor = new ConfigAddListenerAdaptor<M>(serverContext, path, d, listener);
+ registerAddListener(baseDN, adaptor);
+ }
+
+ /**
+ * Register to be notified when a new child configurations is added beneath
+ * an optional relation.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The optional relation definition.
+ * @param listener
+ * The configuration add listener.
+ * @throws IllegalArgumentException
+ * If the optional relation definition is not associated with
+ * this managed object's definition.
+ * @throws ConfigException
+ * If the configuration entry associated with the optional
+ * relation could not be retrieved.
+ */
+ public <M extends Configuration> void registerAddListener(OptionalRelationDefinition<?, M> d,
+ ConfigurationAddListener<M> listener) throws ConfigException {
+ registerAddListener(d, new ServerManagedObjectAddListenerAdaptor<M>(listener));
+ }
+
+ /**
+ * Register to be notified when a new child server managed object is added
+ * beneath an optional relation.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The optional relation definition.
+ * @param listener
+ * The server managed object add listener.
+ * @throws IllegalArgumentException
+ * If the optional relation definition is not associated with
+ * this managed object's definition.
+ * @throws ConfigException
+ * If the configuration entry associated with the optional
+ * relation could not be retrieved.
+ */
+ public <M extends Configuration> void registerAddListener(OptionalRelationDefinition<?, M> d,
+ ServerManagedObjectAddListener<M> listener) throws ConfigException {
+ validateRelationDefinition(d);
+ DN baseDN = DNBuilder.create(path, d).parent();
+ ConfigAddListener adaptor = new ConfigAddListenerAdaptor<M>(serverContext, path, d, listener);
+ registerAddListener(baseDN, adaptor);
+ }
+
+ /**
+ * Register to be notified when new child configurations are added beneath a
+ * set relation.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The set relation definition.
+ * @param listener
+ * The configuration add listener.
+ * @throws IllegalArgumentException
+ * If the set relation definition is not associated with this
+ * managed object's definition.
+ * @throws ConfigException
+ * If the configuration entry associated with the set relation
+ * could not be retrieved.
+ */
+ public <M extends Configuration> void registerAddListener(SetRelationDefinition<?, M> d,
+ ConfigurationAddListener<M> listener) throws ConfigException {
+ registerAddListener(d, new ServerManagedObjectAddListenerAdaptor<M>(listener));
+ }
+
+ /**
+ * Register to be notified when new child server managed object are added
+ * beneath a set relation.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The set relation definition.
+ * @param listener
+ * The server managed object add listener.
+ * @throws IllegalArgumentException
+ * If the set relation definition is not associated with this
+ * managed object's definition.
+ * @throws ConfigException
+ * If the configuration entry associated with the set relation
+ * could not be retrieved.
+ */
+ public <M extends Configuration> void registerAddListener(SetRelationDefinition<?, M> d,
+ ServerManagedObjectAddListener<M> listener) throws ConfigException {
+ validateRelationDefinition(d);
+ DN baseDN = DNBuilder.create(path, d);
+ ConfigAddListener adaptor = new ConfigAddListenerAdaptor<M>(serverContext, path, d, listener);
+ registerAddListener(baseDN, adaptor);
+ }
+
+ /**
+ * Register to be notified when this server managed object is changed.
+ *
+ * @param listener
+ * The configuration change listener.
+ */
+ public void registerChangeListener(ConfigurationChangeListener<? super S> listener) {
+ registerChangeListener(new ServerManagedObjectChangeListenerAdaptor<S>(listener));
+ }
+
+ /**
+ * Register to be notified when this server managed object is changed.
+ *
+ * @param listener
+ * The server managed object change listener.
+ */
+ public void registerChangeListener(ServerManagedObjectChangeListener<? super S> listener) {
+
+ ConfigChangeListener adaptor = new ConfigChangeListenerAdaptor<S>(serverContext, path, listener);
+ configRepository.registerChangeListener(configDN, adaptor);
+
+ // TODO : go toward this
+ // Entry entry;
+ // configBackend.registerChangeListener(entry.getName(), adapter));
+
+ // Change listener registration usually signifies that a managed
+ // object has been accepted and added to the server configuration
+ // during initialization post-add.
+
+ // FIXME: we should prevent multiple invocations in the case where
+ // multiple change listeners are registered for the same object.
+ for (Constraint constraint : definition.getAllConstraints()) {
+ for (ServerConstraintHandler handler : constraint.getServerConstraintHandlers()) {
+ try {
+ handler.performPostAdd(this);
+ } catch (ConfigException e) {
+ logger.trace("Unable to perform post add", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Register to be notified when existing child configurations are deleted
+ * beneath an instantiable relation.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The instantiable relation definition.
+ * @param listener
+ * The configuration delete listener.
+ * @throws IllegalArgumentException
+ * If the instantiable relation definition is not associated
+ * with this managed object's definition.
+ * @throws ConfigException
+ * If the configuration entry associated with the instantiable
+ * relation could not be retrieved.
+ */
+ public <M extends Configuration> void registerDeleteListener(InstantiableRelationDefinition<?, M> d,
+ ConfigurationDeleteListener<M> listener) throws ConfigException {
+ registerDeleteListener(d, new ServerManagedObjectDeleteListenerAdaptor<M>(listener));
+ }
+
+ /**
+ * Register to be notified when existing child server managed objects are
+ * deleted beneath an instantiable relation.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The instantiable relation definition.
+ * @param listener
+ * The server managed objects delete listener.
+ * @throws IllegalArgumentException
+ * If the instantiable relation definition is not associated
+ * with this managed object's definition.
+ * @throws ConfigException
+ * If the configuration entry associated with the instantiable
+ * relation could not be retrieved.
+ */
+ public <M extends Configuration> void registerDeleteListener(InstantiableRelationDefinition<?, M> d,
+ ServerManagedObjectDeleteListener<M> listener) throws ConfigException {
+ validateRelationDefinition(d);
+ DN baseDN = DNBuilder.create(path, d);
+ ConfigDeleteListener adaptor = new ConfigDeleteListenerAdaptor<M>(serverContext, path, d, listener);
+ registerDeleteListener(baseDN, adaptor);
+ }
+
+ /**
+ * Register to be notified when an existing child configuration is deleted
+ * beneath an optional relation.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The optional relation definition.
+ * @param listener
+ * The configuration delete listener.
+ * @throws IllegalArgumentException
+ * If the optional relation definition is not associated with
+ * this managed object's definition.
+ * @throws ConfigException
+ * If the configuration entry associated with the optional
+ * relation could not be retrieved.
+ */
+ public <M extends Configuration> void registerDeleteListener(OptionalRelationDefinition<?, M> d,
+ ConfigurationDeleteListener<M> listener) throws ConfigException {
+ registerDeleteListener(d, new ServerManagedObjectDeleteListenerAdaptor<M>(listener));
+ }
+
+ /**
+ * Register to be notified when an existing child server managed object is
+ * deleted beneath an optional relation.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The optional relation definition.
+ * @param listener
+ * The server managed object delete listener.
+ * @throws IllegalArgumentException
+ * If the optional relation definition is not associated with
+ * this managed object's definition.
+ * @throws ConfigException
+ * If the configuration entry associated with the optional
+ * relation could not be retrieved.
+ */
+ public <M extends Configuration> void registerDeleteListener(OptionalRelationDefinition<?, M> d,
+ ServerManagedObjectDeleteListener<M> listener) throws ConfigException {
+ validateRelationDefinition(d);
+ DN baseDN = DNBuilder.create(path, d).parent();
+ ConfigDeleteListener adaptor = new ConfigDeleteListenerAdaptor<M>(serverContext, path, d, listener);
+ registerDeleteListener(baseDN, adaptor);
+ }
+
+ /**
+ * Register to be notified when existing child configurations are deleted
+ * beneath a set relation.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The set relation definition.
+ * @param listener
+ * The configuration delete listener.
+ * @throws IllegalArgumentException
+ * If the set relation definition is not associated with this
+ * managed object's definition.
+ * @throws ConfigException
+ * If the configuration entry associated with the set relation
+ * could not be retrieved.
+ */
+ public <M extends Configuration> void registerDeleteListener(SetRelationDefinition<?, M> d,
+ ConfigurationDeleteListener<M> listener) throws ConfigException {
+ registerDeleteListener(d, new ServerManagedObjectDeleteListenerAdaptor<M>(listener));
+ }
+
+ /**
+ * Register to be notified when existing child server managed objects are
+ * deleted beneath a set relation.
+ *
+ * @param <M>
+ * The type of the child server configuration object.
+ * @param d
+ * The set relation definition.
+ * @param listener
+ * The server managed objects delete listener.
+ * @throws IllegalArgumentException
+ * If the set relation definition is not associated with this
+ * managed object's definition.
+ * @throws ConfigException
+ * If the configuration entry associated with the set relation
+ * could not be retrieved.
+ */
+ public <M extends Configuration> void registerDeleteListener(SetRelationDefinition<?, M> d,
+ ServerManagedObjectDeleteListener<M> listener) throws ConfigException {
+ validateRelationDefinition(d);
+ DN baseDN = DNBuilder.create(path, d);
+ ConfigDeleteListener adaptor = new ConfigDeleteListenerAdaptor<M>(serverContext, path, d, listener);
+ registerDeleteListener(baseDN, adaptor);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+
+ builder.append("{ TYPE=");
+ builder.append(definition.getName());
+ builder.append(", DN=\"");
+ builder.append(getDN());
+ builder.append('\"');
+ for (Map.Entry<PropertyDefinition<?>, SortedSet<?>> value : properties.entrySet()) {
+ builder.append(", ");
+ builder.append(value.getKey().getName());
+ builder.append('=');
+ builder.append(value.getValue());
+ }
+ builder.append(" }");
+
+ return builder.toString();
+ }
+
+ /**
+ * Determines whether or not this managed object can be used by the server.
+ *
+ * @throws ConstraintViolationException
+ * If one or more constraints determined that this managed
+ * object cannot be used by the server.
+ */
+ void ensureIsUsable() throws ConstraintViolationException {
+ // Enforce any constraints.
+ boolean isUsable = true;
+ List<LocalizableMessage> reasons = new LinkedList<LocalizableMessage>();
+ for (Constraint constraint : definition.getAllConstraints()) {
+ for (ServerConstraintHandler handler : constraint.getServerConstraintHandlers()) {
+ try {
+ if (!handler.isUsable(this, reasons)) {
+ isUsable = false;
+ }
+ } catch (ConfigException e) {
+ LocalizableMessage message = ERR_SERVER_CONSTRAINT_EXCEPTION.get(e.getMessageObject());
+ reasons.add(message);
+ isUsable = false;
+ }
+ }
+ }
+
+ if (!isUsable) {
+ throw new ConstraintViolationException(this, reasons);
+ }
+ }
+
+ /**
+ * Update the config DN associated with this server managed object. This
+ * is only intended to be used by change listener call backs in order to
+ * update the managed object with the correct config DN.
+ *
+ * @param configDN
+ * The DN of the underlying configuration entry.
+ */
+ void setConfigDN(DN configDN) {
+ this.configDN = configDN;
+ }
+
+ // Deregister an add listener.
+ private <M extends Configuration> void deregisterAddListener(DN baseDN, ConfigurationAddListener<M> listener) {
+ try {
+ if (configRepository.hasEntry(baseDN)) {
+ for (ConfigAddListener configListener : configRepository.getAddListeners(baseDN)) {
+ if (configListener instanceof ConfigAddListenerAdaptor) {
+ ConfigAddListenerAdaptor<?> adaptor = (ConfigAddListenerAdaptor<?>) configListener;
+ ServerManagedObjectAddListener<?> smoListener = adaptor.getServerManagedObjectAddListener();
+ if (smoListener instanceof ServerManagedObjectAddListenerAdaptor<?>) {
+ ServerManagedObjectAddListenerAdaptor<?> adaptor2 =
+ (ServerManagedObjectAddListenerAdaptor<?>) smoListener;
+ if (adaptor2.getConfigurationAddListener() == listener) {
+ configRepository.deregisterAddListener(baseDN, adaptor);
+ }
+ }
+ }
+ }
+ } else {
+ // The relation entry does not exist so check for and deregister
+ // delayed add listener.
+ deregisterDelayedAddListener(baseDN, listener);
+ }
+ } catch (ConfigException e) {
+ // Ignore the exception since this implies deregistration.
+ logger.trace("Unable to deregister add listener", e);
+ }
+ }
+
+ // Deregister an add listener.
+ private <M extends Configuration> void deregisterAddListener(DN baseDN,
+ ServerManagedObjectAddListener<M> listener) {
+ try {
+ if (configRepository.hasEntry(baseDN)) {
+ for (ConfigAddListener configListener : configRepository.getAddListeners(baseDN)) {
+ if (configListener instanceof ConfigAddListenerAdaptor) {
+ ConfigAddListenerAdaptor<?> adaptor = (ConfigAddListenerAdaptor<?>) configListener;
+ if (adaptor.getServerManagedObjectAddListener() == listener) {
+ configRepository.deregisterAddListener(baseDN, adaptor);
+ }
+ }
+ }
+ } else {
+ // The relation entry does not exist so check for and deregister
+ // delayed add listener.
+ deregisterDelayedAddListener(baseDN, listener);
+ }
+ } catch (ConfigException e) {
+ // Ignore the exception since this implies deregistration.
+ logger.trace("Unable to deregister add listener", e);
+ }
+ }
+
+ /**
+ * Convenience method to retrieve the initial listener and its intermediate
+ * adaptor from the provided configListener.
+ *
+ * @param <T>
+ * Type of the configuration.
+ * @param configListener
+ * Listener from wich to extract the initial listener.
+ * @return a pair of (intermediate adaptor, intermediate listener) or
+ * {@code Pair.EMPTY} if listener can't be extracted
+ */
+ // @Checkstyle:off
+ static <T extends Configuration> Pair<ConfigAddListenerAdaptor<T>, ConfigurationAddListener<T>>
+ extractInitialListener(ConfigAddListener configListener) {
+ // @Checkstyle:on
+ Pair<ConfigAddListenerAdaptor<T>, ServerManagedObjectAddListener<T>> pair =
+ extractIntermediateListener(configListener);
+ if (!pair.equals(Pair.EMPTY) && pair.getSecond() instanceof ServerManagedObjectAddListenerAdaptor) {
+ ServerManagedObjectAddListenerAdaptor<T> adaptor2 = (ServerManagedObjectAddListenerAdaptor<T>)
+ pair.getSecond();
+ return Pair.of(pair.getFirst(), adaptor2.getConfigurationAddListener());
+ }
+ return Pair.empty();
+ }
+
+ /**
+ * Convenience method to retrieve the intermediate listener and its
+ * intermediate adaptor from the provided configListener.
+ *
+ * @param <T>
+ * Type of the configuration.
+ * @param configListener
+ * Listener from wich to extract the initial listener.
+ * @return a pair of (intermediate adaptor, initial listener) or
+ * {@code Pair.EMPTY} if listener can't be extracted
+ */
+ @SuppressWarnings("unchecked")
+ // @Checkstyle:off
+ static <T extends Configuration> Pair<ConfigAddListenerAdaptor<T>, ServerManagedObjectAddListener<T>>
+ extractIntermediateListener(ConfigAddListener configListener) {
+ // @Checkstyle:on
+ if (configListener instanceof ConfigAddListenerAdaptor) {
+ ConfigAddListenerAdaptor<T> adaptor = ((ConfigAddListenerAdaptor<T>) configListener);
+ return Pair.of(adaptor, adaptor.getServerManagedObjectAddListener());
+ }
+ return Pair.empty();
+ }
+
+ // Deregister a delete listener.
+ private <M extends Configuration> void deregisterDeleteListener(DN baseDN,
+ ConfigurationDeleteListener<M> listener) {
+ try {
+ if (configRepository.hasEntry(baseDN)) {
+ for (ConfigDeleteListener l : configRepository.getDeleteListeners(baseDN)) {
+ if (l instanceof ConfigDeleteListenerAdaptor) {
+ ConfigDeleteListenerAdaptor<?> adaptor = (ConfigDeleteListenerAdaptor<?>) l;
+ ServerManagedObjectDeleteListener<?> l2 = adaptor.getServerManagedObjectDeleteListener();
+ if (l2 instanceof ServerManagedObjectDeleteListenerAdaptor<?>) {
+ ServerManagedObjectDeleteListenerAdaptor<?> adaptor2 =
+ (ServerManagedObjectDeleteListenerAdaptor<?>) l2;
+ if (adaptor2.getConfigurationDeleteListener() == listener) {
+ configRepository.deregisterDeleteListener(baseDN, adaptor);
+ }
+ }
+ }
+ }
+ } else {
+ // The relation entry does not exist so check for and deregister
+ // delayed add listener.
+ deregisterDelayedDeleteListener(baseDN, listener);
+ }
+ } catch (ConfigException e) {
+ // Ignore the exception since this implies deregistration.
+ logger.trace("Unable to deregister delete listener", e);
+ }
+ }
+
+ // Deregister a delete listener.
+ private <M extends Configuration> void deregisterDeleteListener(DN baseDN,
+ ServerManagedObjectDeleteListener<M> listener) {
+ try {
+ if (configRepository.hasEntry(baseDN)) {
+ for (ConfigDeleteListener l : configRepository.getDeleteListeners(baseDN)) {
+ if (l instanceof ConfigDeleteListenerAdaptor) {
+ ConfigDeleteListenerAdaptor<?> adaptor = (ConfigDeleteListenerAdaptor<?>) l;
+ if (adaptor.getServerManagedObjectDeleteListener() == listener) {
+ configRepository.deregisterDeleteListener(baseDN, adaptor);
+ }
+ }
+ }
+ } else {
+ // The relation entry does not exist so check for and deregister
+ // delayed add listener.
+ deregisterDelayedDeleteListener(baseDN, listener);
+ }
+ } catch (ConfigException e) {
+ // Ignore the exception since this implies deregistration.
+ logger.trace("Unable to deregister delete listener", e);
+ }
+ }
+
+ // Register an instantiable or optional relation add listener.
+ private void registerAddListener(DN baseDN, ConfigAddListener adaptor) throws
+ ConfigException {
+ if (configRepository.hasEntry(baseDN)) {
+ configRepository.registerAddListener(baseDN, adaptor);
+ } else {
+ // The relation entry does not exist yet
+ // so register a delayed add listener.
+ ConfigAddListener delayedListener = new DelayedConfigAddListener(baseDN, adaptor, configRepository);
+ registerDelayedListener(baseDN, delayedListener);
+ }
+ }
+
+ // Register a delayed listener with the nearest existing parent
+ // entry to the provided base DN.
+ private void registerDelayedListener(DN baseDN, ConfigAddListener delayedListener) throws ConfigException {
+ DN currentDN = baseDN.parent();
+ DN previousDN = currentDN;
+ while (currentDN != null) {
+ if (!configRepository.hasEntry(currentDN)) {
+ delayedListener = new DelayedConfigAddListener(currentDN, delayedListener, configRepository);
+ previousDN = currentDN;
+ currentDN = currentDN.parent();
+ } else {
+ configRepository.registerAddListener(previousDN, delayedListener);
+ return;
+ }
+ }
+
+ // No parent entry could be found.
+ LocalizableMessage message = ERR_ADMIN_UNABLE_TO_REGISTER_LISTENER.get(String.valueOf(baseDN));
+ throw new ConfigException(message);
+ }
+
+ // Deregister a delayed listener with the nearest existing parent
+ // entry to the provided base DN.
+ private <M extends Configuration> void deregisterDelayedAddListener(DN baseDN,
+ ConfigurationAddListener<M> listener) throws ConfigException {
+ DN parentDN = baseDN.parent();
+ int delayWrappers = 0;
+ while (parentDN != null) {
+ if (!configRepository.hasEntry(parentDN)) {
+ parentDN = parentDN.parent();
+ delayWrappers++;
+ } else {
+ for (ConfigAddListener configListener : configRepository.getAddListeners(parentDN)) {
+ if (configListener instanceof DelayedConfigAddListener) {
+ DelayedConfigAddListener delayListener = (DelayedConfigAddListener) configListener;
+ ConfigAddListener wrappedListener;
+
+ int i = delayWrappers;
+ for (; i > 0; i--) {
+ wrappedListener = delayListener.getDelayedAddListener();
+ if (wrappedListener != null && wrappedListener instanceof DelayedConfigAddListener) {
+ delayListener = (DelayedConfigAddListener) configListener;
+ } else {
+ break;
+ }
+ }
+
+ if (i > 0) {
+ // There are not enough level of wrapping
+ // so this can't be the listener we are looking for.
+ continue;
+ }
+
+ ConfigAddListener delayedListener = delayListener.getDelayedAddListener();
+
+ if (delayedListener != null && delayedListener instanceof ConfigAddListenerAdaptor) {
+ ConfigAddListenerAdaptor<?> adaptor = (ConfigAddListenerAdaptor<?>) delayedListener;
+ ServerManagedObjectAddListener<?> l2 = adaptor.getServerManagedObjectAddListener();
+ if (l2 instanceof ServerManagedObjectAddListenerAdaptor<?>) {
+ ServerManagedObjectAddListenerAdaptor<?> adaptor2 =
+ (ServerManagedObjectAddListenerAdaptor<?>) l2;
+ if (adaptor2.getConfigurationAddListener() == listener) {
+ configRepository.deregisterAddListener(parentDN, configListener);
+ }
+ }
+ }
+ }
+ }
+ return;
+ }
+ }
+ }
+
+ // Deregister a delayed listener with the nearest existing parent
+ // entry to the provided base DN.
+ private <M extends Configuration> void deregisterDelayedDeleteListener(DN baseDN,
+ ConfigurationDeleteListener<M> listener) throws ConfigException {
+ DN parentDN = baseDN.parent();
+ int delayWrappers = 0;
+ while (parentDN != null) {
+ if (!configRepository.hasEntry(parentDN)) {
+ parentDN = parentDN.parent();
+ delayWrappers++;
+ } else {
+ for (ConfigAddListener l : configRepository.getAddListeners(parentDN)) {
+ if (l instanceof DelayedConfigAddListener) {
+ DelayedConfigAddListener delayListener = (DelayedConfigAddListener) l;
+ ConfigAddListener wrappedListener;
+
+ int i = delayWrappers;
+ for (; i > 0; i--) {
+ wrappedListener = delayListener.getDelayedAddListener();
+ if (wrappedListener != null && wrappedListener instanceof DelayedConfigAddListener) {
+ delayListener = (DelayedConfigAddListener) l;
+ } else {
+ break;
+ }
+ }
+
+ if (i > 0) {
+ // There are not enough level of wrapping
+ // so this can't be the listener we are looking for.
+ continue;
+ }
+
+ ConfigDeleteListener delayedListener = delayListener.getDelayedDeleteListener();
+
+ if (delayedListener != null && delayedListener instanceof ConfigDeleteListenerAdaptor) {
+ ConfigDeleteListenerAdaptor<?> adaptor = (ConfigDeleteListenerAdaptor<?>) delayedListener;
+ ServerManagedObjectDeleteListener<?> l2 = adaptor.getServerManagedObjectDeleteListener();
+ if (l2 instanceof ServerManagedObjectDeleteListenerAdaptor<?>) {
+ ServerManagedObjectDeleteListenerAdaptor<?> adaptor2 =
+ (ServerManagedObjectDeleteListenerAdaptor<?>) l2;
+ if (adaptor2.getConfigurationDeleteListener() == listener) {
+ configRepository.deregisterAddListener(parentDN, l);
+ }
+ }
+ }
+ }
+ }
+ return;
+ }
+ }
+ }
+
+ // Deregister a delayed listener with the nearest existing parent
+ // entry to the provided base DN.
+ private <M extends Configuration> void deregisterDelayedAddListener(DN baseDN,
+ ServerManagedObjectAddListener<M> listener) throws ConfigException {
+ DN parentDN = baseDN.parent();
+ int delayWrappers = 0;
+ while (parentDN != null) {
+ if (!configRepository.hasEntry(parentDN)) {
+ parentDN = parentDN.parent();
+ delayWrappers++;
+ } else {
+ for (ConfigAddListener configListener : configRepository.getAddListeners(parentDN)) {
+ if (configListener instanceof DelayedConfigAddListener) {
+ DelayedConfigAddListener delayListener = (DelayedConfigAddListener) configListener;
+ ConfigAddListener wrappedListener;
+
+ int i = delayWrappers;
+ for (; i > 0; i--) {
+ wrappedListener = delayListener.getDelayedAddListener();
+ if (wrappedListener != null && wrappedListener instanceof DelayedConfigAddListener) {
+ delayListener = (DelayedConfigAddListener) configListener;
+ } else {
+ break;
+ }
+ }
+
+ if (i > 0) {
+ // There are not enough level of wrapping
+ // so this can't be the listener we are looking for.
+ continue;
+ }
+
+ ConfigAddListener delayedListener = delayListener.getDelayedAddListener();
+
+ if (delayedListener != null && delayedListener instanceof ConfigAddListenerAdaptor) {
+ ConfigAddListenerAdaptor<?> adaptor = (ConfigAddListenerAdaptor<?>) delayedListener;
+ if (adaptor.getServerManagedObjectAddListener() == listener) {
+ configRepository.deregisterAddListener(parentDN, configListener);
+ }
+ }
+ }
+ }
+ return;
+ }
+ }
+ }
+
+ // Deregister a delayed listener with the nearest existing parent
+ // entry to the provided base DN.
+ private <M extends Configuration> void deregisterDelayedDeleteListener(DN baseDN,
+ ServerManagedObjectDeleteListener<M> listener) throws ConfigException {
+ DN parentDN = baseDN.parent();
+ int delayWrappers = 0;
+ while (parentDN != null) {
+ if (!configRepository.hasEntry(parentDN)) {
+ parentDN = parentDN.parent();
+ delayWrappers++;
+ } else {
+ for (ConfigAddListener configListener : configRepository.getAddListeners(parentDN)) {
+ if (configListener instanceof DelayedConfigAddListener) {
+ DelayedConfigAddListener delayListener = (DelayedConfigAddListener) configListener;
+ ConfigAddListener wrappedListener;
+
+ int i = delayWrappers;
+ for (; i > 0; i--) {
+ wrappedListener = delayListener.getDelayedAddListener();
+ if (wrappedListener != null && wrappedListener instanceof DelayedConfigAddListener) {
+ delayListener = (DelayedConfigAddListener) configListener;
+ } else {
+ break;
+ }
+ }
+
+ if (i > 0) {
+ // There are not enough level of wrapping
+ // so this can't be the listener we are looking for.
+ continue;
+ }
+
+ ConfigDeleteListener delayedListener = delayListener.getDelayedDeleteListener();
+
+ if (delayedListener != null && delayedListener instanceof ConfigDeleteListenerAdaptor) {
+ ConfigDeleteListenerAdaptor<?> adaptor = (ConfigDeleteListenerAdaptor<?>) delayedListener;
+ if (adaptor.getServerManagedObjectDeleteListener() == listener) {
+ configRepository.deregisterAddListener(parentDN, configListener);
+ }
+ }
+ }
+ }
+ return;
+ }
+ }
+ }
+
+ // Register an instantiable or optional relation delete listener.
+ private void registerDeleteListener(DN baseDN, ConfigDeleteListener adaptor) throws ConfigException {
+ if (configRepository.hasEntry(baseDN)) {
+ configRepository.registerDeleteListener(baseDN, adaptor);
+ } else {
+ // The relation entry does not exist yet
+ // so register a delayed add listener.
+ ConfigAddListener delayedListener = new DelayedConfigAddListener(baseDN, adaptor, configRepository);
+ registerDelayedListener(baseDN, delayedListener);
+ }
+ }
+
+ // Validate that a relation definition belongs to this managed
+ // object.
+ private void validateRelationDefinition(RelationDefinition<?, ?> rd) {
+ RelationDefinition<?, ?> tmp = definition.getRelationDefinition(rd.getName());
+ if (tmp != rd) {
+ throw new IllegalArgumentException("The relation " + rd.getName() + " is not associated with a "
+ + definition.getName());
+ }
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectAddListener.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectAddListener.java
new file mode 100644
index 0000000..0ff3399
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectAddListener.java
@@ -0,0 +1,68 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.Configuration;
+
+import java.util.List;
+
+/**
+ * This interface defines the methods that a Directory Server configurable
+ * component should implement if it wishes to be able to receive notifications
+ * when a new server managed object is added.
+ *
+ * @param <T>
+ * The type of server managed object that this listener should be
+ * notified about.
+ */
+public interface ServerManagedObjectAddListener<T extends Configuration> {
+
+ /**
+ * Indicates whether the proposed addition of a new server managed object is
+ * acceptable to this add listener.
+ *
+ * @param mo
+ * The server managed object that will be added.
+ * @param unacceptableReasons
+ * A list that can be used to hold messages about why the
+ * provided server managed object is not acceptable.
+ * @return Returns <code>true</code> if the proposed addition is acceptable,
+ * or <code>false</code> if it is not.
+ */
+ public boolean isConfigurationAddAcceptable(ServerManagedObject<? extends T> mo,
+ List<LocalizableMessage> unacceptableReasons);
+
+ /**
+ * Adds a new server managed object to this add listener.
+ *
+ * @param mo
+ * The server managed object that will be added.
+ * @return Returns information about the result of adding the server managed
+ * object.
+ */
+ public ConfigChangeResult applyConfigurationAdd(ServerManagedObject<? extends T> mo);
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectAddListenerAdaptor.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectAddListenerAdaptor.java
new file mode 100644
index 0000000..2349060
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectAddListenerAdaptor.java
@@ -0,0 +1,82 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import java.util.List;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.Configuration;
+
+/**
+ * An adaptor class which converts {@link ServerManagedObjectAddListener}
+ * callbacks to {@link ConfigurationAddListener} callbacks.
+ *
+ * @param <T>
+ * The type of server managed object that this listener should be
+ * notified about.
+ */
+final class ServerManagedObjectAddListenerAdaptor<T extends Configuration> implements
+ ServerManagedObjectAddListener<T> {
+
+ // The underlying add listener.
+ private final ConfigurationAddListener<T> listener;
+
+ /**
+ * Creates a new server managed object add listener adaptor.
+ *
+ * @param listener
+ * The underlying add listener.
+ */
+ public ServerManagedObjectAddListenerAdaptor(ConfigurationAddListener<T> listener) {
+ this.listener = listener;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ConfigChangeResult applyConfigurationAdd(ServerManagedObject<? extends T> mo) {
+ return listener.applyConfigurationAdd(mo.getConfiguration());
+ }
+
+ /**
+ * Gets the configuration add listener associated with this adaptor.
+ *
+ * @return Returns the configuration add listener associated with this
+ * adaptor.
+ */
+ public ConfigurationAddListener<T> getConfigurationAddListener() {
+ return listener;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isConfigurationAddAcceptable(ServerManagedObject<? extends T> mo,
+ List<LocalizableMessage> unacceptableReasons) {
+ return listener.isConfigurationAddAcceptable(mo.getConfiguration(), unacceptableReasons);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectChangeListener.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectChangeListener.java
new file mode 100644
index 0000000..e59938e
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectChangeListener.java
@@ -0,0 +1,68 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.Configuration;
+
+import java.util.List;
+
+/**
+ * This interface defines the methods that a Directory Server configurable
+ * component should implement if it wishes to be able to receive notifications
+ * when a its associated server managed object is changed.
+ *
+ * @param <T>
+ * The type of server managed object that this listener should be
+ * notified about.
+ */
+public interface ServerManagedObjectChangeListener<T extends Configuration> {
+
+ /**
+ * Indicates whether the proposed change to the server managed object is
+ * acceptable to this change listener.
+ *
+ * @param mo
+ * The new server managed object containing the changes.
+ * @param unacceptableReasons
+ * A list that can be used to hold messages about why the
+ * provided server managed object is not acceptable.
+ * @return Returns <code>true</code> if the proposed change is acceptable,
+ * or <code>false</code> if it is not.
+ */
+ public boolean isConfigurationChangeAcceptable(ServerManagedObject<? extends T> mo,
+ List<LocalizableMessage> unacceptableReasons);
+
+ /**
+ * Applies the server managed object changes to this change listener.
+ *
+ * @param mo
+ * The new server managed object containing the changes.
+ * @return Returns information about the result of changing the server
+ * managed object.
+ */
+ public ConfigChangeResult applyConfigurationChange(ServerManagedObject<? extends T> mo);
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectChangeListenerAdaptor.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectChangeListenerAdaptor.java
new file mode 100644
index 0000000..5227598
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectChangeListenerAdaptor.java
@@ -0,0 +1,84 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import java.util.List;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.Configuration;
+
+/**
+ * An adaptor class which converts {@link ServerManagedObjectChangeListener}
+ * callbacks to {@link ConfigurationChangeListener} callbacks.
+ *
+ * @param <T>
+ * The type of server managed object that this listener should be
+ * notified about.
+ */
+final class ServerManagedObjectChangeListenerAdaptor<T extends Configuration> implements
+ ServerManagedObjectChangeListener<T> {
+
+ // The underlying change listener.
+ private final ConfigurationChangeListener<? super T> listener;
+
+ /**
+ * Creates a new server managed object change listener adaptor.
+ *
+ * @param listener
+ * The underlying change listener.
+ */
+ public ServerManagedObjectChangeListenerAdaptor(ConfigurationChangeListener<? super T> listener) {
+ this.listener = listener;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ConfigChangeResult applyConfigurationChange(ServerManagedObject<? extends T> mo) {
+ return listener.applyConfigurationChange(mo.getConfiguration());
+ }
+
+ /**
+ * Gets the configuration change listener associated with this adaptor.
+ *
+ * @return Returns the configuration change listener associated with this
+ * adaptor.
+ */
+ public ConfigurationChangeListener<? super T> getConfigurationChangeListener() {
+ return listener;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isConfigurationChangeAcceptable(ServerManagedObject<? extends T> mo,
+ List<LocalizableMessage> unacceptableReasons) {
+ return listener.isConfigurationChangeAcceptable(mo.getConfiguration(), unacceptableReasons);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectDecodingException.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectDecodingException.java
new file mode 100644
index 0000000..756507f
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectDecodingException.java
@@ -0,0 +1,128 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config.server;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedList;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.opendj.config.DecodingException;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.PropertyException;
+import org.forgerock.util.Reject;
+
+/**
+ * The requested server managed object was found but one or more of its
+ * properties could not be decoded successfully.
+ */
+public class ServerManagedObjectDecodingException extends DecodingException {
+
+ /**
+ * Version ID required by serializable classes.
+ */
+ private static final long serialVersionUID = 1598401431084729853L;
+
+ // Create the message.
+ private static LocalizableMessage createMessage(ServerManagedObject<?> partialManagedObject,
+ Collection<PropertyException> causes) {
+ Reject.ifNull(causes);
+ Reject.ifFalse(!causes.isEmpty(), "causes should nnot be empty");
+
+ ManagedObjectDefinition<?, ?> d = partialManagedObject.getManagedObjectDefinition();
+ if (causes.size() == 1) {
+ return ERR_MANAGED_OBJECT_DECODING_EXCEPTION_SINGLE.get(d.getUserFriendlyName(), causes.iterator().next()
+ .getLocalizableMessageObject());
+ } else {
+ LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
+
+ boolean isFirst = true;
+ for (PropertyException cause : causes) {
+ if (!isFirst) {
+ builder.append("; ");
+ }
+ builder.append(cause.getLocalizableMessageObject());
+ isFirst = false;
+ }
+
+ return ERR_MANAGED_OBJECT_DECODING_EXCEPTION_PLURAL.get(d.getUserFriendlyName(), builder.toMessage());
+ }
+ }
+
+ // The exception(s) that caused this decoding exception.
+ private final Collection<PropertyException> causes;
+
+ // The partially created server managed object.
+ private final ServerManagedObject<?> partialManagedObject;
+
+ /**
+ * Create a new property decoding exception.
+ *
+ * @param partialManagedObject
+ * The partially created server managed object containing
+ * properties which were successfully decoded and empty
+ * properties for those which were not (this may include empty
+ * mandatory properties).
+ * @param causes
+ * The exception(s) that caused this decoding exception.
+ */
+ public ServerManagedObjectDecodingException(ServerManagedObject<?> partialManagedObject,
+ Collection<PropertyException> causes) {
+ super(createMessage(partialManagedObject, causes));
+
+ this.partialManagedObject = partialManagedObject;
+ this.causes = Collections.unmodifiableList(new LinkedList<PropertyException>(causes));
+ }
+
+ /**
+ * Get an unmodifiable collection view of the causes of this exception.
+ *
+ * @return Returns an unmodifiable collection view of the causes of this
+ * exception.
+ */
+ public Collection<PropertyException> getCauses() {
+ return causes;
+ }
+
+ /**
+ * Get the partially created server managed object containing properties
+ * which were successfully decoded and empty properties for those which were
+ * not (this may include empty mandatory properties).
+ *
+ * @return Returns the partially created server managed object containing
+ * properties which were successfully decoded and empty properties
+ * for those which were not (this may include empty mandatory
+ * properties).
+ */
+ public ServerManagedObject<?> getPartialManagedObject() {
+ return partialManagedObject;
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectDeleteListener.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectDeleteListener.java
new file mode 100644
index 0000000..34340c7
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectDeleteListener.java
@@ -0,0 +1,68 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.Configuration;
+
+import java.util.List;
+
+/**
+ * This interface defines the methods that a Directory Server configurable
+ * component should implement if it wishes to be able to receive notifications
+ * when an existing server managed object is deleted.
+ *
+ * @param <T>
+ * The type of server managed object that this listener should be
+ * notified about.
+ */
+public interface ServerManagedObjectDeleteListener<T extends Configuration> {
+
+ /**
+ * Indicates whether the proposed deletion of an existing server managed
+ * object is acceptable to this delete listener.
+ *
+ * @param mo
+ * The server managed object that will be deleted.
+ * @param unacceptableReasons
+ * A list that can be used to hold messages about why the
+ * provided server managed object is not acceptable.
+ * @return Returns <code>true</code> if the proposed deletion is acceptable,
+ * or <code>false</code> if it is not.
+ */
+ public boolean isConfigurationDeleteAcceptable(ServerManagedObject<? extends T> mo,
+ List<LocalizableMessage> unacceptableReasons);
+
+ /**
+ * Deletes an existing server managed object from this delete listener.
+ *
+ * @param mo
+ * The existing server managed object that will be deleted.
+ * @return Returns information about the result of deleting the server
+ * managed object.
+ */
+ public ConfigChangeResult applyConfigurationDelete(ServerManagedObject<? extends T> mo);
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectDeleteListenerAdaptor.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectDeleteListenerAdaptor.java
new file mode 100644
index 0000000..529c8fb
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagedObjectDeleteListenerAdaptor.java
@@ -0,0 +1,82 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import java.util.List;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.Configuration;
+
+/**
+ * An adaptor class which converts {@link ServerManagedObjectDeleteListener}
+ * callbacks to {@link ConfigurationDeleteListener} callbacks.
+ *
+ * @param <T>
+ * The type of server managed object that this listener should be
+ * notified about.
+ */
+final class ServerManagedObjectDeleteListenerAdaptor<T extends Configuration> implements
+ ServerManagedObjectDeleteListener<T> {
+
+ // The underlying delete listener.
+ private final ConfigurationDeleteListener<T> listener;
+
+ /**
+ * Creates a new server managed object delete listener adaptor.
+ *
+ * @param listener
+ * The underlying delete listener.
+ */
+ public ServerManagedObjectDeleteListenerAdaptor(ConfigurationDeleteListener<T> listener) {
+ this.listener = listener;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ConfigChangeResult applyConfigurationDelete(ServerManagedObject<? extends T> mo) {
+ return listener.applyConfigurationDelete(mo.getConfiguration());
+ }
+
+ /**
+ * Gets the configuration delete listener associated with this adaptor.
+ *
+ * @return Returns the configuration delete listener associated with this
+ * adaptor.
+ */
+ public ConfigurationDeleteListener<T> getConfigurationDeleteListener() {
+ return listener;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isConfigurationDeleteAcceptable(ServerManagedObject<? extends T> mo,
+ List<LocalizableMessage> unacceptableReasons) {
+ return listener.isConfigurationDeleteAcceptable(mo.getConfiguration(), unacceptableReasons);
+ }
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagementContext.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagementContext.java
new file mode 100644
index 0000000..0a06d11
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/ServerManagementContext.java
@@ -0,0 +1,845 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2009 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config.server;
+
+import static com.forgerock.opendj.ldap.AdminMessages.*;
+import static com.forgerock.opendj.util.StaticUtils.*;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.opends.server.core.DirectoryServer;
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.server.config.server.RootCfg;
+import org.forgerock.opendj.config.AbsoluteInheritedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.AggregationPropertyDefinition;
+import org.forgerock.opendj.config.AliasDefaultBehaviorProvider;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.ConfigurationClient;
+import org.forgerock.opendj.config.DefaultBehaviorException;
+import org.forgerock.opendj.config.DefaultBehaviorProviderVisitor;
+import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefinitionDecodingException;
+import org.forgerock.opendj.config.DefinitionResolver;
+import org.forgerock.opendj.config.IllegalPropertyValueException;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.LDAPProfile;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyDefinitionVisitor;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.PropertyException;
+import org.forgerock.opendj.config.PropertyIsMandatoryException;
+import org.forgerock.opendj.config.PropertyIsSingleValuedException;
+import org.forgerock.opendj.config.PropertyNotFoundException;
+import org.forgerock.opendj.config.PropertyOption;
+import org.forgerock.opendj.config.Reference;
+import org.forgerock.opendj.config.RelationDefinition;
+import org.forgerock.opendj.config.RelativeInheritedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefinitionDecodingException.Reason;
+import org.forgerock.opendj.config.server.spi.ConfigurationRepository;
+import org.forgerock.opendj.ldap.Attribute;
+import org.forgerock.opendj.ldap.AttributeDescription;
+import org.forgerock.opendj.ldap.ByteString;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.Entry;
+import org.forgerock.opendj.ldap.schema.AttributeType;
+import org.forgerock.opendj.server.util.DynamicConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Server management connection context.
+ */
+public final class ServerManagementContext {
+
+ /**
+ * A default behavior visitor used for retrieving the default values of a
+ * property.
+ *
+ * @param <T>
+ * The type of the property.
+ */
+ private final class DefaultValueFinder<T> implements DefaultBehaviorProviderVisitor<T, Collection<T>, Void> {
+
+ // Any exception that occurred whilst retrieving inherited default
+ // values.
+ private DefaultBehaviorException exception = null;
+
+ // Optional new configuration entry which does not yet exist in
+ // the configuration back-end.
+ private final Entry newConfigEntry;
+
+ // The path of the managed object containing the next property.
+ private ManagedObjectPath<?, ?> nextPath = null;
+
+ // The next property whose default values were required.
+ private PropertyDefinition<T> nextProperty = null;
+
+ // Private constructor.
+ private DefaultValueFinder(Entry newConfigEntry) {
+ this.newConfigEntry = newConfigEntry;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<T> visitAbsoluteInherited(AbsoluteInheritedDefaultBehaviorProvider<T> d, Void p) {
+ try {
+ return getInheritedProperty(d.getManagedObjectPath(), d.getManagedObjectDefinition(),
+ d.getPropertyName());
+ } catch (DefaultBehaviorException e) {
+ exception = e;
+ return Collections.emptySet();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<T> visitAlias(AliasDefaultBehaviorProvider<T> d, Void p) {
+ return Collections.emptySet();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<T> visitDefined(DefinedDefaultBehaviorProvider<T> d, Void p) {
+ Collection<String> stringValues = d.getDefaultValues();
+ List<T> values = new ArrayList<T>(stringValues.size());
+
+ for (String stringValue : stringValues) {
+ try {
+ values.add(nextProperty.decodeValue(stringValue, propertyDefOptions));
+ } catch (IllegalPropertyValueStringException e) {
+ exception = new DefaultBehaviorException(nextProperty, e);
+ break;
+ }
+ }
+
+ return values;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<T> visitRelativeInherited(RelativeInheritedDefaultBehaviorProvider<T> d, Void p) {
+ try {
+ return getInheritedProperty(d.getManagedObjectPath(nextPath), d.getManagedObjectDefinition(),
+ d.getPropertyName());
+ } catch (DefaultBehaviorException e) {
+ exception = e;
+ return Collections.emptySet();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<T> visitUndefined(UndefinedDefaultBehaviorProvider<T> d, Void p) {
+ return Collections.emptySet();
+ }
+
+ // Find the default values for the next path/property.
+ private Collection<T> find(ManagedObjectPath<?, ?> path, PropertyDefinition<T> propertyDef) {
+ nextPath = path;
+ nextProperty = propertyDef;
+
+ Collection<T> values = nextProperty.getDefaultBehaviorProvider().accept(this, null);
+
+ if (exception != null) {
+ throw exception;
+ }
+
+ if (values.size() > 1 && !propertyDef.hasOption(PropertyOption.MULTI_VALUED)) {
+ throw new DefaultBehaviorException(propertyDef, new PropertyIsSingleValuedException(propertyDef));
+ }
+
+ return values;
+ }
+
+ // Get an inherited property value.
+ @SuppressWarnings("unchecked")
+ private Collection<T> getInheritedProperty(ManagedObjectPath<?, ?> target,
+ AbstractManagedObjectDefinition<?, ?> definition, String propertyName) {
+ // First check that the requested type of managed object
+ // corresponds to the path.
+ AbstractManagedObjectDefinition<?, ?> supr = target.getManagedObjectDefinition();
+ if (!supr.isParentOf(definition)) {
+ throw new DefaultBehaviorException(nextProperty, new DefinitionDecodingException(supr,
+ Reason.WRONG_TYPE_INFORMATION));
+ }
+
+ // Save the current property in case of recursion.
+ PropertyDefinition<T> propDef1 = nextProperty;
+
+ try {
+ // Get the actual managed object definition.
+ DN dn = DNBuilder.create(target);
+ Entry configEntry;
+ if (newConfigEntry != null && newConfigEntry.getName().equals(dn)) {
+ configEntry = newConfigEntry;
+ } else {
+ configEntry = getManagedObjectConfigEntry(dn);
+ }
+
+ DefinitionResolver resolver = new MyDefinitionResolver(configEntry);
+ ManagedObjectDefinition<?, ?> mod = definition.resolveManagedObjectDefinition(resolver);
+
+ PropertyDefinition<T> propDef2;
+ try {
+ PropertyDefinition<?> propDefTmp = mod.getPropertyDefinition(propertyName);
+ propDef2 = propDef1.getClass().cast(propDefTmp);
+ } catch (IllegalArgumentException e) {
+ throw new PropertyNotFoundException(propertyName);
+ } catch (ClassCastException e) {
+ // FIXME: would be nice to throw a better exception here.
+ throw new PropertyNotFoundException(propertyName);
+ }
+
+ List<String> attributeValues = getAttributeValues(mod, propDef2, configEntry);
+ if (attributeValues.size() > 0) {
+ Collection<T> pvalues = new ArrayList<T>();
+ for (String value : attributeValues) {
+ pvalues.add(ValueDecoder.decode(propDef1, value, propertyDefOptions));
+ }
+ return pvalues;
+ } else {
+ // Recursively retrieve this property's default values.
+ Collection<T> tmp = find(target, propDef2);
+ Collection<T> pvalues = new ArrayList<T>(tmp.size());
+ for (T value : tmp) {
+ propDef1.validateValue(value, propertyDefOptions);
+ pvalues.add(value);
+ }
+ return pvalues;
+ }
+ } catch (DefinitionDecodingException e) {
+ throw new DefaultBehaviorException(propDef1, e);
+ } catch (PropertyNotFoundException e) {
+ throw new DefaultBehaviorException(propDef1, e);
+ } catch (IllegalPropertyValueException e) {
+ throw new DefaultBehaviorException(propDef1, e);
+ } catch (IllegalPropertyValueStringException e) {
+ throw new DefaultBehaviorException(propDef1, e);
+ } catch (ConfigException e) {
+ throw new DefaultBehaviorException(propDef1, e);
+ }
+ }
+ }
+
+ /**
+ * A definition resolver that determines the managed object definition from
+ * the object classes of a ConfigEntry.
+ */
+ private final class MyDefinitionResolver implements DefinitionResolver {
+
+ // The config entry.
+ private final Entry entry;
+
+ // Private constructor.
+ private MyDefinitionResolver(Entry entry) {
+ this.entry = entry;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean matches(AbstractManagedObjectDefinition<?, ?> d) {
+ String oc = LDAPProfile.getInstance().getObjectClass(d);
+ // TODO : use the schema to get object class and check it in the entry
+ // Commented because reject any config entry without proper schema loading
+ // Previous code was
+// ObjectClass oc = DirectoryServer.getObjectClass(name.toLowerCase());
+// if (oc == null) {
+// oc = DirectoryServer.getDefaultObjectClass(name);
+// }
+// return Entries.containsObjectClass(entry, oc);
+ return entry.containsAttribute("objectClass", oc);
+ }
+ }
+
+ /**
+ * A visitor which is used to decode property LDAP values.
+ */
+ private static final class ValueDecoder extends PropertyDefinitionVisitor<Object, String> {
+
+ private final PropertyDefinitionsOptions options;
+
+ /**
+ * Decodes the provided property LDAP value.
+ *
+ * @param <P>
+ * The type of the property.
+ * @param propertyDef
+ * The property definition.
+ * @param value
+ * The LDAP string representation.
+ * @param options
+ * Options to decode property definitions values.
+ * @return Returns the decoded LDAP value.
+ * @throws IllegalPropertyValueStringException
+ * If the property value could not be decoded because it was
+ * invalid.
+ */
+ public static <P> P decode(PropertyDefinition<P> propertyDef, String value,
+ PropertyDefinitionsOptions options) {
+ return propertyDef.castValue(propertyDef.accept(new ValueDecoder(options), value));
+ }
+
+ // Prevent instantiation.
+ private ValueDecoder(PropertyDefinitionsOptions options) {
+ this.options = options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <C extends ConfigurationClient, S extends Configuration> Object visitAggregation(
+ AggregationPropertyDefinition<C, S> d, String p) {
+ // Aggregations values are stored as full DNs in LDAP, but
+ // just their common name is exposed in the admin framework.
+ try {
+ Reference<C, S> reference = Reference.parseDN(d.getParentPath(), d.getRelationDefinition(), p);
+ return reference.getName();
+ } catch (IllegalArgumentException e) {
+ throw new IllegalPropertyValueStringException(d, p);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public <T> Object visitUnknown(PropertyDefinition<T> d, String p) {
+ // By default the property definition's decoder will do.
+ return d.decodeValue(p, options);
+ }
+ }
+
+ private static final Logger debugLogger = LoggerFactory.getLogger(ServerManagementContext.class);
+
+ /**
+ * The root server managed object, lazily initialized.
+ */
+ private volatile ServerManagedObject<RootCfg> root;
+
+ /** Repository of configuration entries. */
+ private final ConfigurationRepository configRepository;
+
+ /**
+ * Options to use when decoding and validating values of property
+ * definitions.
+ */
+ private final PropertyDefinitionsOptions propertyDefOptions;
+
+ /**
+ * Creates a context from the provided configuration repository.
+ *
+ * @param repository
+ * The repository of configuration entries.
+ * @param propertyDefOptions
+ * Options to use when decoding and validating values
+ * of property definitions.
+ */
+ ServerManagementContext(ConfigurationRepository repository, PropertyDefinitionsOptions propertyDefOptions) {
+ configRepository = repository;
+ this.propertyDefOptions = propertyDefOptions;
+ }
+
+ /**
+ * Gets the named managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the path
+ * definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the path
+ * definition refers to.
+ * @param path
+ * The path of the managed object.
+ * @return Returns the named managed object.
+ * @throws ConfigException
+ * If the named managed object could not be found or if it could
+ * not be decoded.
+ */
+ @SuppressWarnings("unchecked")
+ public <C extends ConfigurationClient, S extends Configuration> ServerManagedObject<? extends S> getManagedObject(
+ ManagedObjectPath<C, S> path) throws ConfigException {
+ // Be careful to handle the root configuration.
+ if (path.isEmpty()) {
+ return (ServerManagedObject<S>) getRootConfigurationManagedObject();
+ }
+
+ // Get the configuration entry.
+ DN targetDN = DNBuilder.create(path);
+ Entry configEntry = getManagedObjectConfigEntry(targetDN);
+ try {
+ ServerManagedObject<? extends S> managedObject;
+ managedObject = decode(path, configEntry);
+
+ // Enforce any constraints.
+ managedObject.ensureIsUsable();
+
+ return managedObject;
+ } catch (DefinitionDecodingException e) {
+ throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(targetDN, e);
+ } catch (ServerManagedObjectDecodingException e) {
+ throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(e);
+ } catch (ConstraintViolationException e) {
+ throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(e);
+ }
+ }
+
+ /**
+ * Gets the effective value of a property in the named managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the path
+ * definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the path
+ * definition refers to.
+ * @param <P>
+ * The type of the property to be retrieved.
+ * @param path
+ * The path of the managed object containing the property.
+ * @param pd
+ * The property to be retrieved.
+ * @return Returns the property's effective value, or <code>null</code> if
+ * there are no values defined.
+ * @throws IllegalArgumentException
+ * If the property definition is not associated with the
+ * referenced managed object's definition.
+ * @throws PropertyException
+ * If the managed object was found but the requested property
+ * could not be decoded.
+ * @throws ConfigException
+ * If the named managed object could not be found or if it could
+ * not be decoded.
+ */
+ public <C extends ConfigurationClient, S extends Configuration, P> P getPropertyValue(
+ ManagedObjectPath<C, S> path, PropertyDefinition<P> pd) throws ConfigException {
+ SortedSet<P> values = getPropertyValues(path, pd);
+ if (values.isEmpty()) {
+ return null;
+ } else {
+ return values.first();
+ }
+ }
+
+ /**
+ * Gets the effective values of a property in the named managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the path
+ * definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the path
+ * definition refers to.
+ * @param <P>
+ * The type of the property to be retrieved.
+ * @param path
+ * The path of the managed object containing the property.
+ * @param propertyDef
+ * The property to be retrieved.
+ * @return Returns the property's effective values, or an empty set if there
+ * are no values defined.
+ * @throws IllegalArgumentException
+ * If the property definition is not associated with the
+ * referenced managed object's definition.
+ * @throws PropertyException
+ * If the managed object was found but the requested property
+ * could not be decoded.
+ * @throws ConfigException
+ * If the named managed object could not be found or if it could
+ * not be decoded.
+ */
+ @SuppressWarnings("unchecked")
+ public <C extends ConfigurationClient, S extends Configuration, P> SortedSet<P> getPropertyValues(
+ ManagedObjectPath<C, S> path, PropertyDefinition<P> propertyDef) throws ConfigException {
+ // Check that the requested property is from the definition
+ // associated with the path.
+ AbstractManagedObjectDefinition<C, S> definition = path.getManagedObjectDefinition();
+ PropertyDefinition<?> tmpPropertyDef = definition.getPropertyDefinition(propertyDef.getName());
+ if (tmpPropertyDef != propertyDef) {
+ throw new IllegalArgumentException("The property " + propertyDef.getName() + " is not associated with a "
+ + definition.getName());
+ }
+
+ // Determine the exact type of managed object referenced by the
+ // path.
+ DN dn = DNBuilder.create(path);
+ Entry configEntry = getManagedObjectConfigEntry(dn);
+
+ DefinitionResolver resolver = new MyDefinitionResolver(configEntry);
+ ManagedObjectDefinition<? extends C, ? extends S> managedObjDef;
+
+ try {
+ managedObjDef = definition.resolveManagedObjectDefinition(resolver);
+ } catch (DefinitionDecodingException e) {
+ throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(dn, e);
+ }
+
+ // Make sure we use the correct property definition, the
+ // provided one might have been overridden in the resolved
+ // definition.
+ propertyDef = (PropertyDefinition<P>) managedObjDef.getPropertyDefinition(propertyDef.getName());
+
+ List<String> attributeValues = getAttributeValues(managedObjDef, propertyDef, configEntry);
+ return decodeProperty(path.asSubType(managedObjDef), propertyDef, attributeValues, null);
+ }
+
+ /**
+ * Get the root configuration manager associated with this management
+ * context.
+ *
+ * @return the root configuration manager associated with this
+ * management context.
+ */
+ public RootCfg getRootConfiguration() {
+ return getRootConfigurationManagedObject().getConfiguration();
+ }
+
+ /**
+ * Get the root configuration server managed object associated with this
+ * management context.
+ *
+ * @return the root configuration server managed object
+ */
+ public ServerManagedObject<RootCfg> getRootConfigurationManagedObject() {
+ // Use lazy initialisation
+ // because it needs a reference to this server context.
+ ServerManagedObject<RootCfg> rootObject = root;
+ if (rootObject == null) {
+ synchronized (this) {
+ rootObject = root;
+ if (rootObject == null) {
+ root = rootObject =
+ new ServerManagedObject<RootCfg>(ManagedObjectPath.emptyPath(),
+ RootCfgDefn.getInstance(), Collections.<PropertyDefinition<?>,
+ SortedSet<?>> emptyMap(), null, this);
+ }
+ }
+ }
+ return rootObject;
+ }
+
+ /**
+ * Lists the child managed objects of the named parent managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param parent
+ * The path of the parent managed object.
+ * @param relationDef
+ * The relation definition.
+ * @return Returns the names of the child managed objects.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with the parent
+ * managed object's definition.
+ */
+ public <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
+ ManagedObjectPath<?, ?> parent, RelationDefinition<C, S> relationDef) {
+ validateRelationDefinition(parent, relationDef);
+
+ // Get the target entry.
+ DN targetDN = DNBuilder.create(parent, relationDef);
+ Set<DN> children;
+ try {
+ children = configRepository.getChildren(targetDN);
+ } catch (ConfigException e) {
+ return new String[0];
+ }
+ List<String> names = new ArrayList<String>(children.size());
+ for (DN child : children) {
+ // Assume that RDNs are single-valued and can be trimmed.
+ String name = child.rdn().getFirstAVA().getAttributeValue().toString().trim();
+ names.add(name);
+ }
+
+ return names.toArray(new String[names.size()]);
+ }
+
+ /**
+ * Determines whether or not the named managed object exists.
+ *
+ * @param path
+ * The path of the named managed object.
+ * @return Returns <code>true</code> if the named managed object exists,
+ * <code>false</code> otherwise.
+ */
+ public boolean managedObjectExists(ManagedObjectPath<?, ?> path) {
+ // Get the configuration entry.
+ DN targetDN = DNBuilder.create(path);
+ try {
+ return (getManagedObjectConfigEntry(targetDN) != null);
+ } catch (ConfigException e) {
+ // Assume it doesn't exist.
+ return false;
+ }
+ }
+
+ /**
+ * Decodes a configuration entry into the required type of server managed
+ * object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the path
+ * definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the path
+ * definition refers to.
+ * @param path
+ * The location of the server managed object.
+ * @param configEntry
+ * The configuration entry that should be decoded.
+ * @return Returns the new server-side managed object from the provided
+ * definition and configuration entry.
+ * @throws DefinitionDecodingException
+ * If the managed object's type could not be determined.
+ * @throws ServerManagedObjectDecodingException
+ * If one or more of the managed object's properties could not
+ * be decoded.
+ */
+ <C extends ConfigurationClient, S extends Configuration> ServerManagedObject<? extends S> decode(
+ ManagedObjectPath<C, S> path, Entry configEntry) throws DefinitionDecodingException,
+ ServerManagedObjectDecodingException {
+ return decode(path, configEntry, null);
+ }
+
+ /**
+ * Decodes a configuration entry into the required type of server managed
+ * object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the path
+ * definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the path
+ * definition refers to.
+ * @param path
+ * The location of the server managed object.
+ * @param configEntry
+ * The configuration entry that should be decoded.
+ * @param newConfigEntry
+ * Optional new configuration that does not exist yet in the
+ * configuration back-end. This will be used for resolving
+ * inherited default values.
+ * @return Returns the new server-side managed object from the provided
+ * definition and configuration entry.
+ * @throws DefinitionDecodingException
+ * If the managed object's type could not be determined.
+ * @throws ServerManagedObjectDecodingException
+ * If one or more of the managed object's properties could not
+ * be decoded.
+ */
+ <C extends ConfigurationClient, S extends Configuration> ServerManagedObject<? extends S> decode(
+ ManagedObjectPath<C, S> path, Entry configEntry, Entry newConfigEntry)
+ throws DefinitionDecodingException, ServerManagedObjectDecodingException {
+ // First determine the correct definition to use for the entry.
+ // This could either be the provided definition, or one of its
+ // sub-definitions.
+ DefinitionResolver resolver = new MyDefinitionResolver(configEntry);
+ AbstractManagedObjectDefinition<C, S> d = path.getManagedObjectDefinition();
+ ManagedObjectDefinition<? extends C, ? extends S> mod = d.resolveManagedObjectDefinition(resolver);
+
+ // Build the managed object's properties.
+ List<PropertyException> exceptions = new LinkedList<PropertyException>();
+ Map<PropertyDefinition<?>, SortedSet<?>> properties = new HashMap<PropertyDefinition<?>, SortedSet<?>>();
+ for (PropertyDefinition<?> propertyDef : mod.getAllPropertyDefinitions()) {
+ List<String> attributeValues = getAttributeValues(mod, propertyDef, configEntry);
+ try {
+ SortedSet<?> pvalues = decodeProperty(path, propertyDef, attributeValues, newConfigEntry);
+ properties.put(propertyDef, pvalues);
+ } catch (PropertyException e) {
+ exceptions.add(e);
+ }
+ }
+
+ // If there were no decoding problems then return the managed
+ // object, otherwise throw an operations exception.
+ ServerManagedObject<? extends S> managedObject = decodeAux(path, mod, properties, configEntry.getName());
+ if (exceptions.isEmpty()) {
+ return managedObject;
+ } else {
+ throw new ServerManagedObjectDecodingException(managedObject, exceptions);
+ }
+ }
+
+ // Decode helper method required to avoid generics warning.
+ private <C extends ConfigurationClient, S extends Configuration> ServerManagedObject<S> decodeAux(
+ ManagedObjectPath<? super C, ? super S> path, ManagedObjectDefinition<C, S> d,
+ Map<PropertyDefinition<?>, SortedSet<?>> properties, DN configDN) {
+ ManagedObjectPath<C, S> newPath = path.asSubType(d);
+ return new ServerManagedObject<S>(newPath, d, properties, configDN, this);
+ }
+
+ /** Decode a property using the provided attribute values. */
+ private <T> SortedSet<T> decodeProperty(ManagedObjectPath<?, ?> path, PropertyDefinition<T> propertyDef,
+ List<String> attributeValues, Entry newConfigEntry) {
+ PropertyException exception = null;
+ SortedSet<T> pvalues = new TreeSet<T>(propertyDef);
+
+ if (attributeValues.size() > 0) {
+ // The property has values defined for it.
+ for (String value : attributeValues) {
+ try {
+ pvalues.add(ValueDecoder.decode(propertyDef, value, propertyDefOptions));
+ } catch (IllegalPropertyValueStringException e) {
+ exception = e;
+ }
+ }
+ } else {
+ // No values defined so get the defaults.
+ try {
+ pvalues.addAll(getDefaultValues(path, propertyDef, newConfigEntry));
+ } catch (DefaultBehaviorException e) {
+ exception = e;
+ }
+ }
+
+ if (pvalues.size() > 1 && !propertyDef.hasOption(PropertyOption.MULTI_VALUED)) {
+ // This exception takes precedence over previous exceptions.
+ exception = new PropertyIsSingleValuedException(propertyDef);
+ T value = pvalues.first();
+ pvalues.clear();
+ pvalues.add(value);
+ }
+
+ if (pvalues.isEmpty() && propertyDef.hasOption(PropertyOption.MANDATORY)) {
+ // The values maybe empty because of a previous exception.
+ if (exception == null) {
+ exception = new PropertyIsMandatoryException(propertyDef);
+ }
+ }
+
+ if (exception != null) {
+ throw exception;
+ } else {
+ return pvalues;
+ }
+ }
+
+ /** Gets the attribute values associated with a property from a ConfigEntry. */
+ private List<String> getAttributeValues(ManagedObjectDefinition<?, ?> d, PropertyDefinition<?> pd,
+ Entry configEntry) {
+ // TODO: we create a default attribute type if it is undefined.
+ // We should log a warning here if this is the case
+ // since the attribute should have been defined.
+ String attrID = LDAPProfile.getInstance().getAttributeName(d, pd);
+ AttributeType type = DirectoryServer.getAttributeType(attrID, true);
+ Iterable<Attribute> attributes = configEntry.getAllAttributes(AttributeDescription.create(type));
+ List<String> values = new ArrayList<String>();
+ for (Attribute attribute : attributes) {
+ for (ByteString byteValue : attribute) {
+ values.add(byteValue.toString());
+ }
+ }
+ return values;
+ }
+
+ // Get the default values for the specified property.
+ private <T> Collection<T> getDefaultValues(ManagedObjectPath<?, ?> p, PropertyDefinition<T> pd,
+ Entry newConfigEntry) {
+ DefaultValueFinder<T> v = new DefaultValueFinder<T>(newConfigEntry);
+ return v.find(p, pd);
+ }
+
+ /**
+ * Retrieves a configuration entry corresponding to the provided DN.
+ *
+ * @param dn
+ * DN of the configuration entry.
+ * @return the configuration entry
+ * @throws ConfigException
+ * If a problem occurs.
+ */
+ public Entry getConfigEntry(DN dn) throws ConfigException {
+ return configRepository.getEntry(dn);
+ }
+
+ /**
+ * Returns the repository containing all configuration entries.
+ *
+ * @return the repository
+ */
+ public ConfigurationRepository getConfigRepository() {
+ return configRepository;
+ }
+
+ // Gets a config entry required for a managed object and throws a
+ // config exception on failure.
+ private Entry getManagedObjectConfigEntry(DN dn) throws ConfigException {
+ Entry configEntry;
+ try {
+ configEntry = configRepository.getEntry(dn);
+ } catch (ConfigException e) {
+ debugLogger.trace("Unable to perform post add", e);
+
+ LocalizableMessage message = ERR_ADMIN_CANNOT_GET_MANAGED_OBJECT.get(String.valueOf(dn),
+ stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
+ throw new ConfigException(message, e);
+ }
+
+ // The configuration handler is free to return null indicating
+ // that the entry does not exist.
+ if (configEntry == null) {
+ LocalizableMessage message = ERR_ADMIN_MANAGED_OBJECT_DOES_NOT_EXIST.get(String.valueOf(dn));
+ throw new ConfigException(message);
+ }
+
+ return configEntry;
+ }
+
+ // Validate that a relation definition belongs to the path.
+ private void validateRelationDefinition(ManagedObjectPath<?, ?> path, RelationDefinition<?, ?> rd) {
+ AbstractManagedObjectDefinition<?, ?> d = path.getManagedObjectDefinition();
+ RelationDefinition<?, ?> tmp = d.getRelationDefinition(rd.getName());
+ if (tmp != rd) {
+ throw new IllegalArgumentException("The relation " + rd.getName() + " is not associated with a "
+ + d.getName());
+ }
+ }
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/package-info.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/package-info.java
new file mode 100644
index 0000000..a427012
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/package-info.java
@@ -0,0 +1,38 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+
+
+/**
+ * Server-side administration interface.
+ * <p>
+ * This package contains classes and interfaces which internal
+ * directory server components are expected to use in order to
+ * access the server's current configuration and register
+ * to be notified when the configuration changes.
+ */
+package org.forgerock.opendj.config.server;
+
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigAddListener.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigAddListener.java
new file mode 100644
index 0000000..7c8938b
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigAddListener.java
@@ -0,0 +1,63 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2006-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server.spi;
+
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.opendj.config.server.ConfigChangeResult;
+import org.forgerock.opendj.ldap.Entry;
+
+/**
+ * This interface defines the methods that a Directory Server component should
+ * implement if it wishes to be able to receive notification of new entries
+ * added below a configuration entry.
+ */
+public interface ConfigAddListener {
+ /**
+ * Indicates whether the configuration entry that will result from a
+ * proposed add is acceptable to this add listener.
+ *
+ * @param configEntry
+ * The configuration entry that will result from the requested
+ * add.
+ * @param unacceptableReason
+ * A buffer to which this method can append a human-readable
+ * message explaining why the proposed entry is not acceptable.
+ * @return {@code true} if the proposed entry contains an acceptable
+ * configuration, or {@code false} if it does not.
+ */
+ public boolean configAddIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason);
+
+ /**
+ * Attempts to apply a new configuration based on the provided added entry.
+ *
+ * @param configEntry
+ * The new configuration entry that contains the configuration to
+ * apply.
+ * @return Information about the result of processing the configuration
+ * change.
+ */
+ public ConfigChangeResult applyConfigurationAdd(Entry configEntry);
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigChangeListener.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigChangeListener.java
new file mode 100644
index 0000000..b91a990
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigChangeListener.java
@@ -0,0 +1,64 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2006-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server.spi;
+
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.opendj.config.server.ConfigChangeResult;
+import org.forgerock.opendj.ldap.Entry;
+
+/**
+ * This interface defines the methods that a Directory Server component should
+ * implement if it wishes to be able to receive notification of changes to a
+ * configuration entry.
+ */
+public interface ConfigChangeListener {
+ /**
+ * 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 unacceptableReason
+ * A buffer to which this method can append a human-readable
+ * message explaining why the proposed change is not acceptable.
+ * @return {@code true} if the proposed entry contains an acceptable
+ * configuration, or {@code false} if it does not.
+ */
+ public boolean configChangeIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason);
+
+ /**
+ * 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.
+ * @return Information about the result of processing the configuration
+ * change.
+ */
+ public ConfigChangeResult applyConfigurationChange(Entry configEntry);
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigDeleteListener.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigDeleteListener.java
new file mode 100644
index 0000000..8716433
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigDeleteListener.java
@@ -0,0 +1,63 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2006-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server.spi;
+
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.opendj.config.server.ConfigChangeResult;
+import org.forgerock.opendj.ldap.Entry;
+
+/**
+ * This interface defines the methods that a Directory Server component should
+ * implement if it wishes to be able to receive notification if entries below a
+ * configuration entry are removed.
+ */
+public interface ConfigDeleteListener {
+ /**
+ * Indicates whether it is acceptable to remove the provided configuration
+ * entry.
+ *
+ * @param configEntry
+ * The configuration entry that will be removed from the
+ * configuration.
+ * @param unacceptableReason
+ * A buffer to which this method can append a human-readable
+ * message explaining why the proposed delete is not acceptable.
+ * @return {@code true} if the proposed entry may be removed from the
+ * configuration, or {@code false} if not.
+ */
+ public boolean configDeleteIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason);
+
+ /**
+ * Attempts to apply a new configuration based on the provided deleted
+ * entry.
+ *
+ * @param configEntry
+ * The new configuration entry that has been deleted.
+ * @return Information about the result of processing the configuration
+ * change.
+ */
+ public ConfigChangeResult applyConfigurationDelete(Entry configEntry);
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigurationRepository.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigurationRepository.java
new file mode 100644
index 0000000..d5bd8fe
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/ConfigurationRepository.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2013 ForgeRock AS.
+ */
+package org.forgerock.opendj.config.server.spi;
+
+import java.util.List;
+import java.util.Set;
+
+import org.forgerock.opendj.config.server.ConfigException;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.Entry;
+
+/**
+ * Provides configuration entries and listener registration on the entries.
+ */
+public interface ConfigurationRepository {
+
+ /**
+ * Returns the set of DNs of children of the entry corresponding to the
+ * provided DN. .
+ *
+ * @param dn
+ * DN of a configuration entry.
+ * @return the set of DN of children of the corresponding entry
+ * @throws ConfigException
+ * If a problem occurs during retrieval.
+ */
+ Set<DN> getChildren(DN dn) throws ConfigException;
+
+ /**
+ * Returns the configuration entry for the provided DN.
+ *
+ * @param dn
+ * DN of the configuration entry
+ * @return the config entry
+ * @throws ConfigException
+ * If a problem occurs while trying to retrieve the requested
+ * entry.
+ */
+ Entry getEntry(DN dn) throws ConfigException;
+
+ /**
+ * Checks if the provided DN corresponds to a configuration entry.
+ *
+ * @param dn
+ * DN of the configuration entry
+ * @return {@code true} if and only if there is a configuration entry with
+ * this DN
+ * @throws ConfigException
+ * If a problem occurs.
+ */
+ boolean hasEntry(DN dn) throws ConfigException;
+
+ /**
+ * Registers the provided add listener so that it will be notified if any
+ * new entries are added immediately below the entry corresponding to the
+ * provided DN.
+ *
+ * @param dn
+ * The DN of the configuration entry.
+ * @param listener
+ * The add listener that should be registered.
+ */
+ public void registerAddListener(DN dn, ConfigAddListener listener);
+
+ /**
+ * Registers the provided delete listener so that it will be notified if any
+ * entries are deleted immediately below the entry corresponding to the
+ * provided DN.
+ *
+ * @param dn
+ * The DN of the configuration entry.
+ * @param listener
+ * The delete listener that should be registered.
+ */
+ public void registerDeleteListener(DN dn, ConfigDeleteListener listener);
+
+ /**
+ * Registers the provided change listener so that it will be notified of any
+ * changes to the entry corrresponding to provided DN. No check will be made
+ * to determine whether the provided listener is already registered.
+ *
+ * @param dn
+ * The DN of the configuration entry.
+ * @param listener
+ * The change listener that should be registered.
+ */
+ public void registerChangeListener(DN dn, ConfigChangeListener listener);
+
+ /**
+ * Deregisters the provided add listener so that it will no longer be
+ * notified if any new entries are added immediately below the entry
+ * corresponding to the provided DN.
+ *
+ * @param dn
+ * The DN of the configuration entry.
+ * @param listener
+ * The add listener that should be deregistered.
+ */
+ public void deregisterAddListener(DN dn, ConfigAddListener listener);
+
+ /**
+ * Deregisters the provided delete listener so that it will no longer be
+ * notified if any entries are deleted immediately below the entry
+ * corresponding to the provided DN.
+ *
+ * @param dn
+ * The DN of the configuration entry.
+ * @param listener
+ * The delete listener that should be deregistered.
+ */
+ public void deregisterDeleteListener(DN dn, ConfigDeleteListener listener);
+
+ /**
+ * Attempts to deregister the provided change listener with the provided DN.
+ *
+ * @param dn
+ * The DN of the configuration entry.
+ * @param listener
+ * The change listener to deregister with this DN.
+ * @return <CODE>true</CODE> if the specified listener was deregistered, or
+ * <CODE>false</CODE> if it was not.
+ */
+ public boolean deregisterChangeListener(DN dn, ConfigChangeListener listener);
+
+ /**
+ * Retrieves the add listeners that have been registered with the provided
+ * DN.
+ *
+ * @param dn
+ * The DN of the configuration entry.
+ * @return The list of add listeners.
+ */
+ public List<ConfigAddListener> getAddListeners(DN dn);
+
+ /**
+ * Retrieves the delete listeners that have been registered with the
+ * provided DN.
+ *
+ * @param dn
+ * The DN of the configuration entry.
+ * @return The list of delete listeners.
+ */
+ public List<ConfigDeleteListener> getDeleteListeners(DN dn);
+
+ /**
+ * Retrieves the change listeners that have been registered with the
+ * provided DN.
+ *
+ * @param dn
+ * The DN of the configuration entry.
+ * @return The list of change listeners.
+ */
+ public List<ConfigChangeListener> getChangeListeners(DN dn);
+
+}
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/package-info.java b/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/package-info.java
new file mode 100644
index 0000000..4254e50
--- /dev/null
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/server/spi/package-info.java
@@ -0,0 +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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2006-2008 Sun Microsystems, Inc.
+ */
+
+/**
+ * Contains a number of API declarations for use throughout the
+ * Directory Server. Whenever possible, these APIs should be declared
+ * using abstract classes rather than interfaces so that they can be
+ * altered in future versions without impacting backward
+ * compatibility.
+ * <BR><BR>
+ * Note that the mere existence of a class or interface in this
+ * package does not in itself imply that it is intended for use by
+ * third party code. Please refer to the official product
+ * documentation to indicate which APIs may be safely used by anyone
+ * other than the core Directory Server developers. Failure to heed
+ * this warning may result in code that could have unintended side
+ * effects or that does not work properly across different Directory
+ * Server versions.
+ */
+package org.forgerock.opendj.config.server.spi;
+
diff --git a/opendj-config/src/main/java/org/opends/server/admin/ACIPropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/ACIPropertyDefinition.java
deleted file mode 100644
index d9e0b19..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/ACIPropertyDefinition.java
+++ /dev/null
@@ -1,133 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import org.opends.server.authorization.dseecompat.Aci;
-import org.opends.server.authorization.dseecompat.AciException;
-import org.forgerock.opendj.ldap.ByteString;
-import org.forgerock.opendj.ldap.DN;
-
-import java.util.EnumSet;
-
-/**
- * ACI property definition.
- */
-public final class ACIPropertyDefinition extends PropertyDefinition<Aci> {
-
- /**
- * An interface for incrementally constructing ACI property definitions.
- */
- public static final class Builder extends AbstractBuilder<Aci, ACIPropertyDefinition> {
-
- // Private constructor
- private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- super(d, propertyName);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected ACIPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<Aci> defaultBehavior) {
- return new ACIPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior);
- }
- }
-
- /**
- * Create a ACI property definition builder.
- *
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param propertyName
- * The property name.
- * @return Returns the new ACI property definition builder.
- */
- public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- return new Builder(d, propertyName);
- }
-
- // Private constructor.
- private ACIPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<Aci> defaultBehavior) {
- super(d, Aci.class, propertyName, options, adminAction, defaultBehavior);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void validateValue(Aci value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- // No additional validation required.
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Aci decodeValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- try {
- return Aci.decode(ByteString.valueOf(value), DN.rootDN());
- } catch (AciException e) {
- // TODO: it would be nice to throw the cause.
- throw new IllegalPropertyValueStringException(this, value);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
- return v.visitACI(this, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyValueVisitor<R, P> v, Aci value, P p) {
- return v.visitACI(this, value, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int compare(Aci o1, Aci o2) {
- return o1.toString().compareTo(o2.toString());
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/AbsoluteInheritedDefaultBehaviorProvider.java b/opendj-config/src/main/java/org/opends/server/admin/AbsoluteInheritedDefaultBehaviorProvider.java
deleted file mode 100644
index 6c34adf..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/AbsoluteInheritedDefaultBehaviorProvider.java
+++ /dev/null
@@ -1,112 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-/**
- * A default behavior provider which retrieves default values from a managed
- * object in an absolute location. It should be used by properties which inherit
- * their default value(s) from properties held in an other managed object.
- *
- * @param <T>
- * The type of values represented by this provider.
- */
-public final class AbsoluteInheritedDefaultBehaviorProvider<T> extends DefaultBehaviorProvider<T> {
-
- // The absolute path to the managed object containing the property.
- private ManagedObjectPath<?, ?> path = null;
-
- // The string representation of the managed object path specifying
- // the absolute location of the managed object.
- private final String pathString;
-
- // The name of the property containing the inherited default values.
- private final String propertyName;
-
- /**
- * Create an absolute inherited default behavior provider associated with
- * the managed object at the specified absolute location.
- *
- * @param pathString
- * The string representation of the managed object path
- * specifying the absolute location of the managed object.
- * @param propertyName
- * The name of the property containing the inherited default
- * values.
- */
- public AbsoluteInheritedDefaultBehaviorProvider(String pathString, String propertyName) {
- this.pathString = pathString;
- this.propertyName = propertyName;
- }
-
- /**
- * {@inheritDoc}
- */
- public <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p) {
- return v.visitAbsoluteInherited(this, p);
- }
-
- /**
- * Get the definition of the parent managed object containing the inherited
- * default values.
- *
- * @return Returns the definition of the parent managed object containing
- * the inherited default values.
- */
- public AbstractManagedObjectDefinition<?, ?> getManagedObjectDefinition() {
- return path.getManagedObjectDefinition();
- }
-
- /**
- * Get the absolute path of the managed object containing the property which
- * has the default values.
- *
- * @return Returns the absolute path of the managed object containing the
- * property which has the default values.
- */
- public ManagedObjectPath<?, ?> getManagedObjectPath() {
- return path;
- }
-
- /**
- * Gets the name of the property containing the inherited default values.
- *
- * @return Returns the name of the property containing the inherited default
- * values.
- */
- public String getPropertyName() {
- return propertyName;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initialize() throws Exception {
- // Decode the path.
- path = ManagedObjectPath.valueOf(pathString);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/AbstractManagedObjectDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/AbstractManagedObjectDefinition.java
deleted file mode 100644
index 8217c3f..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/AbstractManagedObjectDefinition.java
+++ /dev/null
@@ -1,973 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2010 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.Set;
-import java.util.Vector;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.admin.DefinitionDecodingException.Reason;
-
-/**
- * Defines the structure of an abstract managed object. Abstract managed objects
- * cannot be instantiated.
- * <p>
- * Applications can query a managed object definition in order to determine the
- * overall configuration model of an application.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * definition represents.
- * @param <S>
- * The type of server managed object configuration that this
- * definition represents.
- */
-public abstract class AbstractManagedObjectDefinition<C extends ConfigurationClient, S extends Configuration> {
-
- // The name of the definition.
- private final String name;
-
- // The parent managed object definition if applicable.
- private final AbstractManagedObjectDefinition<? super C, ? super S> parent;
-
- // The set of constraints associated with this managed object
- // definition.
- private final Collection<Constraint> constraints;
-
- // The set of property definitions applicable to this managed object
- // definition.
- private final Map<String, PropertyDefinition<?>> propertyDefinitions;
-
- // The set of relation definitions applicable to this managed object
- // definition.
- private final Map<String, RelationDefinition<?, ?>> relationDefinitions;
-
- // The set of relation definitions directly referencing this managed
- // object definition.
- private final Set<RelationDefinition<C, S>> reverseRelationDefinitions;
-
- // The set of all property definitions associated with this managed
- // object definition including inherited property definitions.
- private final Map<String, PropertyDefinition<?>> allPropertyDefinitions;
-
- // The set of all relation definitions associated with this managed
- // object definition including inherited relation definitions.
- private final Map<String, RelationDefinition<?, ?>> allRelationDefinitions;
-
- // The set of aggregation property definitions applicable to this
- // managed object definition.
- private final Map<String, AggregationPropertyDefinition<?, ?>> aggregationPropertyDefinitions;
-
- // The set of aggregation property definitions directly referencing this
- // managed object definition.
- private final Vector<AggregationPropertyDefinition<?, ?>> reverseAggregationPropertyDefinitions;
-
- // The set of all aggregation property definitions associated with this
- // managed object definition including inherited relation definitions.
- private final Map<String, AggregationPropertyDefinition<?, ?>> allAggregationPropertyDefinitions;
-
- // The set of tags associated with this managed object.
- private final Set<Tag> allTags;
-
- // Options applicable to this definition.
- private final Set<ManagedObjectOption> options;
-
- // The set of managed object definitions which inherit from this definition.
- private final Map<String, AbstractManagedObjectDefinition<? extends C, ? extends S>> children;
-
- /**
- * Create a new abstract managed object definition.
- *
- * @param name
- * The name of the definition.
- * @param parent
- * The parent definition, or <code>null</code> if there is no
- * parent (only the {@link TopCfgDefn} should have a
- * <code>null</code> parent, unless the definition is being used
- * for testing).
- */
- protected AbstractManagedObjectDefinition(String name,
- AbstractManagedObjectDefinition<? super C, ? super S> parent) {
- this.name = name;
- this.parent = parent;
- this.constraints = new LinkedList<Constraint>();
- this.propertyDefinitions = new HashMap<String, PropertyDefinition<?>>();
- this.relationDefinitions = new HashMap<String, RelationDefinition<?, ?>>();
- this.reverseRelationDefinitions = new HashSet<RelationDefinition<C, S>>();
- this.allPropertyDefinitions = new HashMap<String, PropertyDefinition<?>>();
- this.allRelationDefinitions = new HashMap<String, RelationDefinition<?, ?>>();
- this.aggregationPropertyDefinitions = new HashMap<String, AggregationPropertyDefinition<?, ?>>();
- this.reverseAggregationPropertyDefinitions = new Vector<AggregationPropertyDefinition<?, ?>>();
- this.allAggregationPropertyDefinitions = new HashMap<String, AggregationPropertyDefinition<?, ?>>();
- this.allTags = new HashSet<Tag>();
- this.options = EnumSet.noneOf(ManagedObjectOption.class);
-
- this.children = new HashMap<String, AbstractManagedObjectDefinition<? extends C, ? extends S>>();
-
- // If we have a parent definition then inherit its features.
- if (parent != null) {
- registerInParent();
-
- for (PropertyDefinition<?> pd : parent.getAllPropertyDefinitions()) {
- allPropertyDefinitions.put(pd.getName(), pd);
- }
-
- for (RelationDefinition<?, ?> rd : parent.getAllRelationDefinitions()) {
- allRelationDefinitions.put(rd.getName(), rd);
- }
-
- for (AggregationPropertyDefinition<?, ?> apd : parent.getAllAggregationPropertyDefinitions()) {
-
- allAggregationPropertyDefinitions.put(apd.getName(), apd);
- }
-
- // Tag inheritance is performed during preprocessing.
- }
- }
-
- /**
- * Get all the child managed object definitions which inherit from this
- * managed object definition.
- *
- * @return Returns an unmodifiable collection containing all the subordinate
- * managed object definitions which inherit from this managed object
- * definition.
- */
- public final Collection<AbstractManagedObjectDefinition<? extends C, ? extends S>> getAllChildren() {
- List<AbstractManagedObjectDefinition<? extends C, ? extends S>> list =
- new ArrayList<AbstractManagedObjectDefinition<? extends C, ? extends S>>(children.values());
-
- for (AbstractManagedObjectDefinition<? extends C, ? extends S> child : children.values()) {
- list.addAll(child.getAllChildren());
- }
-
- return Collections.unmodifiableCollection(list);
- }
-
- /**
- * Get all the constraints associated with this type of managed object. The
- * returned collection will contain inherited constraints.
- *
- * @return Returns a collection containing all the constraints associated
- * with this type of managed object. The caller is free to modify
- * the collection if required.
- */
- public final Collection<Constraint> getAllConstraints() {
- // This method does not used a cached set of constraints because
- // constraints may be updated after child definitions have been
- // defined.
- List<Constraint> allConstraints = new LinkedList<Constraint>();
-
- if (parent != null) {
- allConstraints.addAll(parent.getAllConstraints());
- }
- allConstraints.addAll(constraints);
-
- return allConstraints;
- }
-
- /**
- * Get all the property definitions associated with this type of managed
- * object. The returned collection will contain inherited property
- * definitions.
- *
- * @return Returns an unmodifiable collection containing all the property
- * definitions associated with this type of managed object.
- */
- public final Collection<PropertyDefinition<?>> getAllPropertyDefinitions() {
- return Collections.unmodifiableCollection(allPropertyDefinitions.values());
- }
-
- /**
- * Get all the relation definitions associated with this type of managed
- * object. The returned collection will contain inherited relation
- * definitions.
- *
- * @return Returns an unmodifiable collection containing all the relation
- * definitions associated with this type of managed object.
- */
- public final Collection<RelationDefinition<?, ?>> getAllRelationDefinitions() {
- return Collections.unmodifiableCollection(allRelationDefinitions.values());
- }
-
- /**
- * Get all the relation definitions which refer to this managed object
- * definition. The returned collection will contain relation definitions
- * which refer to parents of this managed object definition.
- *
- * @return Returns a collection containing all the relation definitions
- * which refer to this managed object definition. The caller is free
- * to modify the collection if required.
- */
- public final Collection<RelationDefinition<? super C, ? super S>> getAllReverseRelationDefinitions() {
- // This method does not used a cached set of relations because
- // relations may be updated after child definitions have been
- // defined.
- List<RelationDefinition<? super C, ? super S>> rdlist =
- new LinkedList<RelationDefinition<? super C, ? super S>>();
-
- if (parent != null) {
- rdlist.addAll(parent.getAllReverseRelationDefinitions());
- }
- rdlist.addAll(reverseRelationDefinitions);
-
- return rdlist;
- }
-
- /**
- * Get all the aggregation property definitions associated with this type of
- * managed object. The returned collection will contain inherited
- * aggregation property definitions.
- *
- * @return Returns an unmodifiable collection containing all the aggregation
- * property definitions associated with this type of managed object.
- */
- public final Collection<AggregationPropertyDefinition<?, ?>> getAllAggregationPropertyDefinitions() {
- return Collections.unmodifiableCollection(allAggregationPropertyDefinitions.values());
- }
-
- /**
- * Get all the aggregation property definitions which refer to this managed
- * object definition. The returned collection will contain aggregation
- * property definitions which refer to parents of this managed object
- * definition.
- *
- * @return Returns a collection containing all the aggregation property
- * definitions which refer to this managed object definition. The
- * caller is free to modify the collection if required.
- */
- public final Collection<AggregationPropertyDefinition<?, ?>> getAllReverseAggregationPropertyDefinitions() {
- // This method does not used a cached set of aggregation properties
- // because
- // aggregation properties may be updated after child definitions have
- // been
- // defined.
- List<AggregationPropertyDefinition<?, ?>> apdlist = new LinkedList<AggregationPropertyDefinition<?, ?>>();
-
- if (parent != null) {
- apdlist.addAll(parent.getAllReverseAggregationPropertyDefinitions());
- }
- apdlist.addAll(reverseAggregationPropertyDefinitions);
-
- return apdlist;
- }
-
- /**
- * Get all the tags associated with this type of managed object. The
- * returned collection will contain inherited tags.
- *
- * @return Returns an unmodifiable collection containing all the tags
- * associated with this type of managed object.
- */
- public final Collection<Tag> getAllTags() {
- return Collections.unmodifiableCollection(allTags);
- }
-
- /**
- * Get the named child managed object definition which inherits from this
- * managed object definition. This method will recursively search down
- * through the inheritance hierarchy.
- *
- * @param name
- * The name of the managed object definition sub-type.
- * @return Returns the named child managed object definition which inherits
- * from this managed object definition.
- * @throws IllegalArgumentException
- * If the specified managed object definition name was null or
- * empty or if the requested subordinate managed object
- * definition was not found.
- */
- public final AbstractManagedObjectDefinition<? extends C, ? extends S> getChild(String name) {
- if ((name == null) || (name.length() == 0)) {
- throw new IllegalArgumentException("null or empty managed object name");
- }
-
- AbstractManagedObjectDefinition<? extends C, ? extends S> d = children.get(name);
-
- if (d == null) {
- // Recursively search.
- for (AbstractManagedObjectDefinition<? extends C, ? extends S> child : children.values()) {
- try {
- d = child.getChild(name);
- break;
- } catch (IllegalArgumentException e) {
- // Try the next child.
- }
- }
- }
-
- if (d == null) {
- throw new IllegalArgumentException("child managed object definition \"" + name + "\" not found");
- }
-
- return d;
- }
-
- /**
- * Get the child managed object definitions which inherit directly from this
- * managed object definition.
- *
- * @return Returns an unmodifiable collection containing the subordinate
- * managed object definitions which inherit directly from this
- * managed object definition.
- */
- public final Collection<AbstractManagedObjectDefinition<? extends C, ? extends S>> getChildren() {
- return Collections.unmodifiableCollection(children.values());
- }
-
- /**
- * Get the constraints defined by this managed object definition. The
- * returned collection will not contain inherited constraints.
- *
- * @return Returns an unmodifiable collection containing the constraints
- * defined by this managed object definition.
- */
- public final Collection<Constraint> getConstraints() {
- return Collections.unmodifiableCollection(constraints);
- }
-
- /**
- * Gets the optional description of this managed object definition in the
- * default locale.
- *
- * @return Returns the description of this managed object definition in the
- * default locale, or <code>null</code> if there is no description.
- * @throws UnsupportedOperationException
- * If this managed object definition is the {@link TopCfgDefn}.
- */
- public final LocalizableMessage getDescription() {
- return getDescription(Locale.getDefault());
- }
-
- /**
- * Gets the optional description of this managed object definition in the
- * specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the description of this managed object definition in the
- * specified locale, or <code>null</code> if there is no
- * description.
- * @throws UnsupportedOperationException
- * If this managed object definition is the {@link TopCfgDefn}.
- */
- public final LocalizableMessage getDescription(Locale locale) {
- try {
- return ManagedObjectDefinitionI18NResource.getInstance().getMessage(this, "description", locale);
- } catch (MissingResourceException e) {
- return null;
- }
- }
-
- /**
- * Get the name of the definition.
- *
- * @return Returns the name of the definition.
- */
- public final String getName() {
- return name;
- }
-
- /**
- * Get the parent managed object definition, if applicable.
- *
- * @return Returns the parent of this managed object definition, or
- * <code>null</code> if this definition is the {@link TopCfgDefn}.
- */
- public final AbstractManagedObjectDefinition<? super C, ? super S> getParent() {
- return parent;
- }
-
- /**
- * Get the specified property definition associated with this type of
- * managed object. The search will include any inherited property
- * definitions.
- *
- * @param name
- * The name of the property definition to be retrieved.
- * @return Returns the specified property definition associated with this
- * type of managed object.
- * @throws IllegalArgumentException
- * If the specified property name was null or empty or if the
- * requested property definition was not found.
- */
- public final PropertyDefinition<?> getPropertyDefinition(String name) {
- if ((name == null) || (name.length() == 0)) {
- throw new IllegalArgumentException("null or empty property name");
- }
-
- PropertyDefinition<?> d = allPropertyDefinitions.get(name);
- if (d == null) {
- throw new IllegalArgumentException("property definition \"" + name + "\" not found");
- }
-
- return d;
- }
-
- /**
- * Get the property definitions defined by this managed object definition.
- * The returned collection will not contain inherited property definitions.
- *
- * @return Returns an unmodifiable collection containing the property
- * definitions defined by this managed object definition.
- */
- public final Collection<PropertyDefinition<?>> getPropertyDefinitions() {
- return Collections.unmodifiableCollection(propertyDefinitions.values());
- }
-
- /**
- * Get the specified relation definition associated with this type of
- * managed object.The search will include any inherited relation
- * definitions.
- *
- * @param name
- * The name of the relation definition to be retrieved.
- * @return Returns the specified relation definition associated with this
- * type of managed object.
- * @throws IllegalArgumentException
- * If the specified relation name was null or empty or if the
- * requested relation definition was not found.
- */
- public final RelationDefinition<?, ?> getRelationDefinition(String name) {
- if ((name == null) || (name.length() == 0)) {
- throw new IllegalArgumentException("null or empty relation name");
- }
-
- RelationDefinition<?, ?> d = allRelationDefinitions.get(name);
- if (d == null) {
- throw new IllegalArgumentException("relation definition \"" + name + "\" not found");
- }
-
- return d;
- }
-
- /**
- * Get the relation definitions defined by this managed object definition.
- * The returned collection will not contain inherited relation definitions.
- *
- * @return Returns an unmodifiable collection containing the relation
- * definitions defined by this managed object definition.
- */
- public final Collection<RelationDefinition<?, ?>> getRelationDefinitions() {
- return Collections.unmodifiableCollection(relationDefinitions.values());
- }
-
- /**
- * Get the relation definitions which refer directly to this managed object
- * definition. The returned collection will not contain relation definitions
- * which refer to parents of this managed object definition.
- *
- * @return Returns an unmodifiable collection containing the relation
- * definitions which refer directly to this managed object
- * definition.
- */
- public final Collection<RelationDefinition<C, S>> getReverseRelationDefinitions() {
- return Collections.unmodifiableCollection(reverseRelationDefinitions);
- }
-
- /**
- * Get the specified aggregation property definition associated with this
- * type of managed object.The search will include any inherited aggregation
- * property definitions.
- *
- * @param name
- * The name of the aggregation property definition to be
- * retrieved.
- * @return Returns the specified aggregation property definition associated
- * with this type of managed object.
- * @throws IllegalArgumentException
- * If the specified aggregation property name was null or empty
- * or if the requested aggregation property definition was not
- * found.
- */
- public final AggregationPropertyDefinition<?, ?> getAggregationPropertyDefinition(String name) {
- if ((name == null) || (name.length() == 0)) {
- throw new IllegalArgumentException("null or empty aggregation property name");
- }
-
- AggregationPropertyDefinition<?, ?> d = allAggregationPropertyDefinitions.get(name);
- if (d == null) {
- throw new IllegalArgumentException("aggregation property definition \"" + name + "\" not found");
- }
-
- return d;
- }
-
- /**
- * Get the aggregation property definitions defined by this managed object
- * definition. The returned collection will not contain inherited
- * aggregation property definitions.
- *
- * @return Returns an unmodifiable collection containing the aggregation
- * property definitions defined by this managed object definition.
- */
- public final Collection<AggregationPropertyDefinition<?, ?>> getAggregationPropertyDefinitions() {
- return Collections.unmodifiableCollection(aggregationPropertyDefinitions.values());
- }
-
- /**
- * Get the aggregation property definitions which refer directly to this
- * managed object definition. The returned collection will not contain
- * aggregation property definitions which refer to parents of this managed
- * object definition.
- *
- * @return Returns an unmodifiable collection containing the aggregation
- * property definitions which refer directly to this managed object
- * definition.
- */
- public final Collection<AggregationPropertyDefinition<?, ?>> getReverseAggregationPropertyDefinitions() {
- return Collections.unmodifiableCollection(reverseAggregationPropertyDefinitions);
- }
-
- /**
- * Gets the synopsis of this managed object definition in the default
- * locale.
- *
- * @return Returns the synopsis of this managed object definition in the
- * default locale.
- * @throws UnsupportedOperationException
- * If this managed object definition is the {@link TopCfgDefn}.
- */
- public final LocalizableMessage getSynopsis() {
- return getSynopsis(Locale.getDefault());
- }
-
- /**
- * Gets the synopsis of this managed object definition in the specified
- * locale.
- *
- * @param locale
- * The locale.
- * @return Returns the synopsis of this managed object definition in the
- * specified locale.
- * @throws UnsupportedOperationException
- * If this managed object definition is the {@link TopCfgDefn}.
- */
- public final LocalizableMessage getSynopsis(Locale locale) {
- return ManagedObjectDefinitionI18NResource.getInstance().getMessage(this, "synopsis", locale);
- }
-
- /**
- * Gets the user friendly name of this managed object definition in the
- * default locale.
- *
- * @return Returns the user friendly name of this managed object definition
- * in the default locale.
- * @throws UnsupportedOperationException
- * If this managed object definition is the {@link TopCfgDefn}.
- */
- public final LocalizableMessage getUserFriendlyName() {
- return getUserFriendlyName(Locale.getDefault());
- }
-
- /**
- * Gets the user friendly name of this managed object definition in the
- * specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the user friendly name of this managed object definition
- * in the specified locale.
- * @throws UnsupportedOperationException
- * If this managed object definition is the {@link TopCfgDefn}.
- */
- public final LocalizableMessage getUserFriendlyName(Locale locale) {
- return LocalizableMessage.raw(ManagedObjectDefinitionI18NResource.getInstance().getMessage(this,
- "user-friendly-name", locale));
- }
-
- /**
- * Gets the user friendly plural name of this managed object definition in
- * the default locale.
- *
- * @return Returns the user friendly plural name of this managed object
- * definition in the default locale.
- * @throws UnsupportedOperationException
- * If this managed object definition is the {@link TopCfgDefn}.
- */
- public final LocalizableMessage getUserFriendlyPluralName() {
- return getUserFriendlyPluralName(Locale.getDefault());
- }
-
- /**
- * Gets the user friendly plural name of this managed object definition in
- * the specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the user friendly plural name of this managed object
- * definition in the specified locale.
- * @throws UnsupportedOperationException
- * If this managed object definition is the {@link TopCfgDefn}.
- */
- public final LocalizableMessage getUserFriendlyPluralName(Locale locale) {
- return ManagedObjectDefinitionI18NResource.getInstance()
- .getMessage(this, "user-friendly-plural-name", locale);
- }
-
- /**
- * Determine whether there are any child managed object definitions which
- * inherit from this managed object definition.
- *
- * @return Returns <code>true</code> if this type of managed object has any
- * child managed object definitions, <code>false</code> otherwise.
- */
- public final boolean hasChildren() {
- return !children.isEmpty();
- }
-
- /**
- * Determines whether or not this managed object definition has the
- * specified option.
- *
- * @param option
- * The option to test.
- * @return Returns <code>true</code> if the option is set, or
- * <code>false</code> otherwise.
- */
- public final boolean hasOption(ManagedObjectOption option) {
- return options.contains(option);
- }
-
- /**
- * Determines whether or not this managed object definition has the
- * specified tag.
- *
- * @param t
- * The tag definition.
- * @return Returns <code>true</code> if this managed object definition has
- * the specified tag.
- */
- public final boolean hasTag(Tag t) {
- return allTags.contains(t);
- }
-
- /**
- * Determines whether or not this managed object definition is a sub-type of
- * the provided managed object definition. This managed object definition is
- * a sub-type of the provided managed object definition if they are both the
- * same or if the provided managed object definition can be obtained by
- * recursive invocations of the {@link #getParent()} method.
- *
- * @param d
- * The managed object definition to be checked.
- * @return Returns <code>true</code> if this managed object definition is a
- * sub-type of the provided managed object definition.
- */
- public final boolean isChildOf(AbstractManagedObjectDefinition<?, ?> d) {
- AbstractManagedObjectDefinition<?, ?> i;
- for (i = this; i != null; i = i.parent) {
- if (i == d) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Determines whether or not this managed object definition is a super-type
- * of the provided managed object definition. This managed object definition
- * is a super-type of the provided managed object definition if they are
- * both the same or if the provided managed object definition is a member of
- * the set of children returned from {@link #getAllChildren()}.
- *
- * @param d
- * The managed object definition to be checked.
- * @return Returns <code>true</code> if this managed object definition is a
- * super-type of the provided managed object definition.
- */
- public final boolean isParentOf(AbstractManagedObjectDefinition<?, ?> d) {
- return d.isChildOf(this);
- }
-
- /**
- * Determines whether or not this managed object definition is the
- * {@link TopCfgDefn}.
- *
- * @return Returns <code>true</code> if this managed object definition is
- * the {@link TopCfgDefn}.
- */
- public final boolean isTop() {
- return (this instanceof TopCfgDefn);
- }
-
- /**
- * Finds a sub-type of this managed object definition which most closely
- * corresponds to the matching criteria of the provided definition resolver.
- *
- * @param r
- * The definition resolver.
- * @return Returns the sub-type of this managed object definition which most
- * closely corresponds to the matching criteria of the provided
- * definition resolver.
- * @throws DefinitionDecodingException
- * If no matching sub-type could be found or if the resolved
- * definition was abstract.
- * @see DefinitionResolver
- */
- public final ManagedObjectDefinition<? extends C, ? extends S> resolveManagedObjectDefinition(DefinitionResolver r)
- throws DefinitionDecodingException {
- AbstractManagedObjectDefinition<? extends C, ? extends S> rd;
- rd = resolveManagedObjectDefinitionAux(this, r);
- if (rd == null) {
- // Unable to resolve the definition.
- throw new DefinitionDecodingException(this, Reason.WRONG_TYPE_INFORMATION);
- } else if (rd instanceof ManagedObjectDefinition) {
- return (ManagedObjectDefinition<? extends C, ? extends S>) rd;
- } else {
- // Resolved definition was abstract.
- throw new DefinitionDecodingException(this, Reason.ABSTRACT_TYPE_INFORMATION);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final String toString() {
- StringBuilder builder = new StringBuilder();
- toString(builder);
- return builder.toString();
- }
-
- /**
- * Append a string representation of the managed object definition to the
- * provided string builder.
- *
- * @param builder
- * The string builder where the string representation should be
- * appended.
- */
- public final void toString(StringBuilder builder) {
- builder.append(getName());
- }
-
- /**
- * Initializes all of the components associated with this managed object
- * definition.
- *
- * @throws Exception
- * If this managed object definition could not be initialized.
- */
- protected final void initialize() throws Exception {
- for (PropertyDefinition<?> pd : getAllPropertyDefinitions()) {
- pd.initialize();
- pd.getDefaultBehaviorProvider().initialize();
- }
-
- for (RelationDefinition<?, ?> rd : getAllRelationDefinitions()) {
- rd.initialize();
- }
-
- for (AggregationPropertyDefinition<?, ?> apd : getAllAggregationPropertyDefinitions()) {
-
- apd.initialize();
- // Now register the aggregation property in the referenced managed
- // object
- // definition for reverse lookups.
- registerReverseAggregationPropertyDefinition(apd);
- }
-
- for (Constraint constraint : getAllConstraints()) {
- constraint.initialize();
- }
- }
-
- /**
- * Register a constraint with this managed object definition.
- * <p>
- * This method <b>must not</b> be called by applications.
- *
- * @param constraint
- * The constraint to be registered.
- */
- protected final void registerConstraint(Constraint constraint) {
- constraints.add(constraint);
- }
-
- /**
- * Register a property definition with this managed object definition,
- * overriding any existing property definition with the same name.
- * <p>
- * This method <b>must not</b> be called by applications.
- *
- * @param d
- * The property definition to be registered.
- */
- protected final void registerPropertyDefinition(PropertyDefinition<?> d) {
- String propName = d.getName();
-
- propertyDefinitions.put(propName, d);
- allPropertyDefinitions.put(propName, d);
-
- if (d instanceof AggregationPropertyDefinition<?, ?>) {
- AggregationPropertyDefinition<?, ?> apd = (AggregationPropertyDefinition<?, ?>) d;
- aggregationPropertyDefinitions.put(propName, apd);
- // The key must also contain the managed object name, since several
- // MOs
- // in an inheritance tree may aggregate the same aggregation
- // property name
- allAggregationPropertyDefinitions.put(apd.getManagedObjectDefinition().getName() + ":" + propName, apd);
- }
- }
-
- /**
- * Register a relation definition with this managed object definition,
- * overriding any existing relation definition with the same name.
- * <p>
- * This method <b>must not</b> be called by applications.
- *
- * @param d
- * The relation definition to be registered.
- */
- protected final void registerRelationDefinition(RelationDefinition<?, ?> d) {
- // Register the relation in this managed object definition.
- String relName = d.getName();
-
- relationDefinitions.put(relName, d);
- allRelationDefinitions.put(relName, d);
-
- // Now register the relation in the referenced managed object
- // definition for reverse lookups.
- registerReverseRelationDefinition(d);
- }
-
- /**
- * Register an option with this managed object definition.
- * <p>
- * This method <b>must not</b> be called by applications.
- *
- * @param option
- * The option to be registered.
- */
- protected final void registerOption(ManagedObjectOption option) {
- options.add(option);
- }
-
- /**
- * Register a tag with this managed object definition.
- * <p>
- * This method <b>must not</b> be called by applications.
- *
- * @param tag
- * The tag to be registered.
- */
- protected final void registerTag(Tag tag) {
- allTags.add(tag);
- }
-
- /**
- * Deregister a constraint from the managed object definition.
- * <p>
- * This method <b>must not</b> be called by applications and is only
- * intended for internal testing.
- *
- * @param constraint
- * The constraint to be deregistered.
- */
- final void deregisterConstraint(Constraint constraint) {
- if (!constraints.remove(constraint)) {
- throw new RuntimeException("Failed to deregister a constraint");
- }
- }
-
- /**
- * Deregister a relation definition from the managed object definition.
- * <p>
- * This method <b>must not</b> be called by applications and is only
- * intended for internal testing.
- *
- * @param d
- * The relation definition to be deregistered.
- */
- final void deregisterRelationDefinition(RelationDefinition<?, ?> d) {
- // Deregister the relation from this managed object definition.
- String relName = d.getName();
- relationDefinitions.remove(relName);
- allRelationDefinitions.remove(relName);
-
- // Now deregister the relation from the referenced managed object
- // definition for reverse lookups.
- d.getChildDefinition().reverseRelationDefinitions.remove(d);
- }
-
- /**
- * Register this managed object definition in its parent.
- * <p>
- * This method <b>must not</b> be called by applications and is only
- * intended for internal testing.
- */
- final void registerInParent() {
- if (parent != null) {
- parent.children.put(name, this);
- }
- }
-
- // Register a relation definition in the referenced managed object
- // definition's reverse lookup table.
- private <C1 extends ConfigurationClient, S1 extends Configuration> void registerReverseRelationDefinition(
- RelationDefinition<C1, S1> rd) {
- rd.getChildDefinition().reverseRelationDefinitions.add(rd);
- }
-
- // Register a aggregation property definition in the referenced managed
- // object
- // definition's reverse lookup table.
- private void registerReverseAggregationPropertyDefinition(AggregationPropertyDefinition<?, ?> apd) {
-
- apd.getRelationDefinition().getChildDefinition().reverseAggregationPropertyDefinitions.add(apd);
- }
-
- // Recursively descend definition hierarchy to find the best match
- // definition.
- private AbstractManagedObjectDefinition<? extends C, ? extends S> resolveManagedObjectDefinitionAux(
- AbstractManagedObjectDefinition<? extends C, ? extends S> d, DefinitionResolver r) {
- if (!r.matches(d)) {
- return null;
- }
-
- for (AbstractManagedObjectDefinition<? extends C, ? extends S> child : d.getChildren()) {
- AbstractManagedObjectDefinition<? extends C, ? extends S> rd =
- resolveManagedObjectDefinitionAux(child, r);
- if (rd != null) {
- return rd;
- }
- }
-
- return d;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/AdminException.java b/opendj-config/src/main/java/org/opends/server/admin/AdminException.java
deleted file mode 100644
index 1c748ac..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/AdminException.java
+++ /dev/null
@@ -1,63 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.types.OpenDsException;
-
-/**
- * Exceptions thrown when interacting with administration framework.
- */
-public abstract class AdminException extends OpenDsException {
-
- /**
- * Fake serialization ID.
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * Create an admin exception with a message and cause.
- *
- * @param message
- * The message.
- * @param cause
- * The cause.
- */
- protected AdminException(LocalizableMessage message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * Create an admin exception with a message.
- *
- * @param message
- * The message.
- */
- protected AdminException(LocalizableMessage message) {
- super(message);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/AdminRuntimeException.java b/opendj-config/src/main/java/org/opends/server/admin/AdminRuntimeException.java
deleted file mode 100644
index 0e4d566..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/AdminRuntimeException.java
+++ /dev/null
@@ -1,78 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * Exceptions thrown when interacting with administration framework that
- * applications are not expected to catch.
- */
-public abstract class AdminRuntimeException extends RuntimeException {
-
- /**
- * Fake serialization ID.
- */
- private static final long serialVersionUID = 1L;
-
- // LocalizableMessage that explains the problem.
- private final LocalizableMessage message;
-
- /**
- * Create an admin runtime exception with a message and cause.
- *
- * @param message
- * The message.
- * @param cause
- * The cause.
- */
- protected AdminRuntimeException(LocalizableMessage message, Throwable cause) {
- super(message.toString(), cause);
- this.message = message;
- }
-
- /**
- * Create an admin runtime exception with a message.
- *
- * @param message
- * The message.
- */
- protected AdminRuntimeException(LocalizableMessage message) {
- super(message.toString());
- this.message = message;
- }
-
- /**
- * Returns the message that explains the problem that occurred.
- *
- * @return Returns the message describing the problem that occurred (never
- * <code>null</code>).
- */
- public LocalizableMessage getLocalizableMessageObject() {
- return this.message;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/AdministratorAction.java b/opendj-config/src/main/java/org/opends/server/admin/AdministratorAction.java
deleted file mode 100644
index 33d23a8..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/AdministratorAction.java
+++ /dev/null
@@ -1,166 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.Locale;
-import java.util.MissingResourceException;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * Defines an optional action which administators must perform after they have
- * modified a property. By default modifications to properties are assumed to
- * take effect immediately and require no additional administrative action.
- * Developers should be aware that, where feasible, they should implement
- * components such that property modifications require no additional
- * administrative action. This is required in order to minimize server downtime
- * during administration and provide a more user-friendly experience.
- */
-public final class AdministratorAction {
-
- /**
- * Specifies the type of administrator action which must be performed in
- * order for pending changes to take effect.
- */
- public static enum Type {
- /**
- * Used when modifications to a property require a component restart in
- * order to take effect (usually by disabling and re-enabling the
- * component). May have a description describing any additional
- * administrator action that is required when the component is
- * restarted.
- */
- COMPONENT_RESTART("component-restart"),
-
- /**
- * Used when modifications to a property take effect immediately, and no
- * additional administrator action is required. May have a description
- * describing how changes to the modified property will take effect.
- */
- NONE("none"),
-
- /**
- * Used when modifications to a property require an additional
- * administrative action in order to take effect. This should be used
- * when neither a server restart nor a component restart are applicable.
- * Always has a description which describes the additional administrator
- * action which is required when the property is modified.
- */
- OTHER("other"),
-
- /**
- * Used when modifications to a property require a server restart in
- * order to take effect. May have a description describing any
- * additional administrator action that is required when the component
- * is restarted.
- */
- SERVER_RESTART("server-restart");
-
- // The user-friendly name of the type.
- private final String name;
-
- // Private constructor.
- private Type(String name) {
- this.name = name;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return name;
- }
-
- }
-
- // The managed object definition associated with this administrator
- // action.
- private final AbstractManagedObjectDefinition<?, ?> definition;
-
- // The name of the property definition associated with this
- // administrator action.
- private final String propertyName;
-
- // The type of administration action.
- private final Type type;
-
- /**
- * Create a new administrator action.
- *
- * @param type
- * The type of this administration action.
- * @param d
- * The managed object definition associated with this
- * administrator action.
- * @param propertyName
- * The name of the property definition associated with this
- * administrator action.
- */
- public AdministratorAction(Type type, AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- this.type = type;
- this.definition = d;
- this.propertyName = propertyName;
- }
-
- /**
- * Gets the synopsis of this administrator action in the default locale.
- *
- * @return Returns the synopsis of this administrator action in the default
- * locale, or <code>null</code> if there is no synopsis defined.
- */
- public final LocalizableMessage getSynopsis() {
- return getSynopsis(Locale.getDefault());
- }
-
- /**
- * Gets the synopsis of this administrator action in the specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the synopsis of this administrator action in the
- * specified locale, or <code>null</code> if there is no synopsis
- * defined.
- */
- public final LocalizableMessage getSynopsis(Locale locale) {
- ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
- String property = "property." + propertyName + ".requires-admin-action.synopsis";
- try {
- return resource.getMessage(definition, property, locale);
- } catch (MissingResourceException e) {
- return null;
- }
- }
-
- /**
- * Gets the type of this administrator action.
- *
- * @return Returns the type of this administrator action.
- */
- public final Type getType() {
- return type;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/AggregationPropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/AggregationPropertyDefinition.java
deleted file mode 100644
index 4a6052e..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/AggregationPropertyDefinition.java
+++ /dev/null
@@ -1,1033 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-import static com.forgerock.opendj.util.StaticUtils.*;
-
-import org.forgerock.util.Reject;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.SortedSet;
-
-import org.opends.server.admin.client.ClientConstraintHandler;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagedObjectDecodingException;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.condition.Condition;
-import org.opends.server.admin.condition.Conditions;
-import org.opends.server.admin.server.ConfigChangeResult;
-import org.opends.server.admin.server.ConfigurationDeleteListener;
-import org.opends.server.admin.server.ServerConstraintHandler;
-import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.admin.server.ServerManagedObjectChangeListener;
-import org.opends.server.admin.server.ServerManagementContext;
-import org.opends.server.config.spi.ConfigException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.opendj.ldap.ResultCode;
-
-/**
- * Aggregation property definition.
- * <p>
- * An aggregation property names one or more managed objects which are required
- * by the managed object associated with this property. An aggregation property
- * definition takes care to perform referential integrity checks: referenced
- * managed objects cannot be deleted. Nor can an aggregation reference
- * non-existent managed objects. Referential integrity checks are <b>not</b>
- * performed during value validation. Instead they are performed when changes to
- * the managed object are committed.
- * <p>
- * An aggregation property definition can optionally identify two properties:
- * <ul>
- * <li>an <code>enabled</code> property in the aggregated managed object - the
- * property must be a {@link BooleanPropertyDefinition} and indicate whether the
- * aggregated managed object is enabled or not. If specified, the administration
- * framework will prevent the aggregated managed object from being disabled
- * while it is referenced
- * <li>an <code>enabled</code> property in this property's managed object - the
- * property must be a {@link BooleanPropertyDefinition} and indicate whether
- * this property's managed object is enabled or not. If specified, and as long
- * as there is an equivalent <code>enabled</code> property defined for the
- * aggregated managed object, the <code>enabled</code> property in the
- * aggregated managed object will only be checked when this property is true.
- * </ul>
- * In other words, these properties can be used to make sure that referenced
- * managed objects are not disabled while they are referenced.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * aggregation property definition refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * aggregation property definition refers to.
- */
-public final class AggregationPropertyDefinition<C extends ConfigurationClient, S extends Configuration> extends
- PropertyDefinition<String> {
-
- /**
- * An interface for incrementally constructing aggregation property
- * definitions.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * aggregation property definition refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * aggregation property definition refers to.
- */
- public static final class Builder<C extends ConfigurationClient, S extends Configuration> extends
- AbstractBuilder<String, AggregationPropertyDefinition<C, S>> {
-
- // The string representation of the managed object path specifying
- // the parent of the aggregated managed objects.
- private String parentPathString = null;
-
- // The name of a relation in the parent managed object which
- // contains the aggregated managed objects.
- private String rdName = null;
-
- // The condition which is used to determine if a referenced
- // managed object is enabled.
- private Condition targetIsEnabledCondition = Conditions.TRUE;
-
- // The condition which is used to determine whether or not
- // referenced managed objects need to be enabled.
- private Condition targetNeedsEnablingCondition = Conditions.TRUE;
-
- // Private constructor
- private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- super(d, propertyName);
- }
-
- /**
- * Sets the name of the managed object which is the parent of the
- * aggregated managed objects.
- * <p>
- * This must be defined before the property definition can be built.
- *
- * @param pathString
- * The string representation of the managed object path
- * specifying the parent of the aggregated managed objects.
- */
- public final void setParentPath(String pathString) {
- this.parentPathString = pathString;
- }
-
- /**
- * Sets the relation in the parent managed object which contains the
- * aggregated managed objects.
- * <p>
- * This must be defined before the property definition can be built.
- *
- * @param rdName
- * The name of a relation in the parent managed object which
- * contains the aggregated managed objects.
- */
- public final void setRelationDefinition(String rdName) {
- this.rdName = rdName;
- }
-
- /**
- * Sets the condition which is used to determine if a referenced managed
- * object is enabled. By default referenced managed objects are assumed
- * to always be enabled.
- *
- * @param condition
- * The condition which is used to determine if a referenced
- * managed object is enabled.
- */
- public final void setTargetIsEnabledCondition(Condition condition) {
- this.targetIsEnabledCondition = condition;
- }
-
- /**
- * Sets the condition which is used to determine whether or not
- * referenced managed objects need to be enabled. By default referenced
- * managed objects must always be enabled.
- *
- * @param condition
- * The condition which is used to determine whether or not
- * referenced managed objects need to be enabled.
- */
- public final void setTargetNeedsEnablingCondition(Condition condition) {
- this.targetNeedsEnablingCondition = condition;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected AggregationPropertyDefinition<C, S> buildInstance(AbstractManagedObjectDefinition<?, ?> d,
- String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<String> defaultBehavior) {
- // Make sure that the parent path has been defined.
- if (parentPathString == null) {
- throw new IllegalStateException("Parent path undefined");
- }
-
- // Make sure that the relation definition has been defined.
- if (rdName == null) {
- throw new IllegalStateException("Relation definition undefined");
- }
-
- return new AggregationPropertyDefinition<C, S>(d, propertyName, options, adminAction, defaultBehavior,
- parentPathString, rdName, targetNeedsEnablingCondition, targetIsEnabledCondition);
- }
-
- }
-
- /**
- * A change listener which prevents the named component from being disabled.
- */
- private final class ReferentialIntegrityChangeListener implements ServerManagedObjectChangeListener<S> {
-
- // The error message which should be returned if an attempt is
- // made to disable the referenced component.
- private final LocalizableMessage message;
-
- // The path of the referenced component.
- private final ManagedObjectPath<C, S> path;
-
- // Creates a new referential integrity delete listener.
- private ReferentialIntegrityChangeListener(ManagedObjectPath<C, S> path, LocalizableMessage message) {
- this.path = path;
- this.message = message;
- }
-
- /**
- * {@inheritDoc}
- */
- public ConfigChangeResult applyConfigurationChange(ServerManagedObject<? extends S> mo) {
- try {
- if (targetIsEnabledCondition.evaluate(mo)) {
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
- } catch (ConfigException e) {
- // This should not happen - ignore it and throw an exception
- // anyway below.
- }
-
- // This should not happen - the previous call-back should have
- // trapped this.
- throw new IllegalStateException("Attempting to disable a referenced "
- + relationDefinition.getChildDefinition().getUserFriendlyName());
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isConfigurationChangeAcceptable(ServerManagedObject<? extends S> mo,
- List<LocalizableMessage> unacceptableReasons) {
- // Always prevent the referenced component from being
- // disabled.
- try {
- if (!targetIsEnabledCondition.evaluate(mo)) {
- unacceptableReasons.add(message);
- return false;
- } else {
- return true;
- }
- } catch (ConfigException e) {
- // The condition could not be evaluated.
- debugLogger.trace("Unable to perform post add", e);
- LocalizableMessage message =
- ERR_REFINT_UNABLE_TO_EVALUATE_TARGET_CONDITION.get(mo.getManagedObjectDefinition()
- .getUserFriendlyName(), String.valueOf(mo.getDN()), getExceptionMessage(e));
- LocalizedLogger logger =
- LocalizedLogger.getLocalizedLogger(ERR_REFINT_UNABLE_TO_EVALUATE_TARGET_CONDITION.resourceName());
- logger.error(message);
- unacceptableReasons.add(message);
- return false;
- }
- }
-
- // Gets the path associated with this listener.
- private ManagedObjectPath<C, S> getManagedObjectPath() {
- return path;
- }
-
- }
-
- /**
- * A delete listener which prevents the named component from being deleted.
- */
- private final class ReferentialIntegrityDeleteListener implements ConfigurationDeleteListener<S> {
-
- // The DN of the referenced configuration entry.
- private final DN dn;
-
- // The error message which should be returned if an attempt is
- // made to delete the referenced component.
- private final LocalizableMessage message;
-
- // Creates a new referential integrity delete listener.
- private ReferentialIntegrityDeleteListener(DN dn, LocalizableMessage message) {
- this.dn = dn;
- this.message = message;
- }
-
- /**
- * {@inheritDoc}
- */
- public ConfigChangeResult applyConfigurationDelete(S configuration) {
- // This should not happen - the
- // isConfigurationDeleteAcceptable() call-back should have
- // trapped this.
- if (configuration.dn().equals(dn)) {
- // This should not happen - the
- // isConfigurationDeleteAcceptable() call-back should have
- // trapped this.
- throw new IllegalStateException("Attempting to delete a referenced "
- + relationDefinition.getChildDefinition().getUserFriendlyName());
- } else {
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isConfigurationDeleteAcceptable(S configuration, List<LocalizableMessage> unacceptableReasons) {
- if (configuration.dn().equals(dn)) {
- // Always prevent deletion of the referenced component.
- unacceptableReasons.add(message);
- return false;
- }
-
- return true;
- }
-
- }
-
- /**
- * The server-side constraint handler implementation.
- */
- private class ServerHandler extends ServerConstraintHandler {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isUsable(ServerManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ConfigException {
- SortedSet<String> names = managedObject.getPropertyValues(AggregationPropertyDefinition.this);
- ServerManagementContext context = managedObject.getServerContext();
- LocalizableMessage thisUFN = managedObject.getManagedObjectDefinition().getUserFriendlyName();
- String thisDN = managedObject.getDN().toString();
- LocalizableMessage thatUFN = getRelationDefinition().getUserFriendlyName();
-
- boolean isUsable = true;
- boolean needsEnabling = targetNeedsEnablingCondition.evaluate(managedObject);
- for (String name : names) {
- ManagedObjectPath<C, S> path = getChildPath(name);
- String thatDN = path.toDN().toString();
-
- if (!context.managedObjectExists(path)) {
- LocalizableMessage msg =
- ERR_SERVER_REFINT_DANGLING_REFERENCE.get(name, getName(), thisUFN, thisDN, thatUFN, thatDN);
- unacceptableReasons.add(msg);
- isUsable = false;
- } else if (needsEnabling) {
- // Check that the referenced component is enabled if
- // required.
- ServerManagedObject<? extends S> ref = context.getManagedObject(path);
- if (!targetIsEnabledCondition.evaluate(ref)) {
- LocalizableMessage msg =
- ERR_SERVER_REFINT_TARGET_DISABLED.get(name, getName(), thisUFN, thisDN, thatUFN, thatDN);
- unacceptableReasons.add(msg);
- isUsable = false;
- }
- }
- }
-
- return isUsable;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void performPostAdd(ServerManagedObject<?> managedObject) throws ConfigException {
- // First make sure existing listeners associated with this
- // managed object are removed. This is required in order to
- // prevent multiple change listener registrations from
- // occurring, for example if this call-back is invoked multiple
- // times after the same add event.
- performPostDelete(managedObject);
-
- // Add change and delete listeners against all referenced
- // components.
- LocalizableMessage thisUFN = managedObject.getManagedObjectDefinition().getUserFriendlyName();
- String thisDN = managedObject.getDN().toString();
- LocalizableMessage thatUFN = getRelationDefinition().getUserFriendlyName();
-
- // Referenced managed objects will only need a change listener
- // if they have can be disabled.
- boolean needsChangeListeners = targetNeedsEnablingCondition.evaluate(managedObject);
-
- // Delete listeners need to be registered against the parent
- // entry of the referenced components.
- ServerManagementContext context = managedObject.getServerContext();
- ManagedObjectPath<?, ?> parentPath = getParentPath();
- ServerManagedObject<?> parent = context.getManagedObject(parentPath);
-
- // Create entries in the listener tables.
- List<ReferentialIntegrityDeleteListener> dlist = new LinkedList<ReferentialIntegrityDeleteListener>();
- deleteListeners.put(managedObject.getDN(), dlist);
-
- List<ReferentialIntegrityChangeListener> clist = new LinkedList<ReferentialIntegrityChangeListener>();
- changeListeners.put(managedObject.getDN(), clist);
-
- for (String name : managedObject.getPropertyValues(AggregationPropertyDefinition.this)) {
- ManagedObjectPath<C, S> path = getChildPath(name);
- DN dn = path.toDN();
- String thatDN = dn.toString();
-
- // Register the delete listener.
- LocalizableMessage msg =
- ERR_SERVER_REFINT_CANNOT_DELETE.get(thatUFN, thatDN, getName(), thisUFN, thisDN);
- ReferentialIntegrityDeleteListener dl = new ReferentialIntegrityDeleteListener(dn, msg);
- parent.registerDeleteListener(getRelationDefinition(), dl);
- dlist.add(dl);
-
- // Register the change listener if required.
- if (needsChangeListeners) {
- ServerManagedObject<? extends S> ref = context.getManagedObject(path);
- msg = ERR_SERVER_REFINT_CANNOT_DISABLE.get(thatUFN, thatDN, getName(), thisUFN, thisDN);
- ReferentialIntegrityChangeListener cl = new ReferentialIntegrityChangeListener(path, msg);
- ref.registerChangeListener(cl);
- clist.add(cl);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void performPostDelete(ServerManagedObject<?> managedObject) throws ConfigException {
- // Remove any registered delete and change listeners.
- ServerManagementContext context = managedObject.getServerContext();
- DN dn = managedObject.getDN();
-
- // Delete listeners need to be deregistered against the parent
- // entry of the referenced components.
- ManagedObjectPath<?, ?> parentPath = getParentPath();
- ServerManagedObject<?> parent = context.getManagedObject(parentPath);
- if (deleteListeners.containsKey(dn)) {
- for (ReferentialIntegrityDeleteListener dl : deleteListeners.get(dn)) {
- parent.deregisterDeleteListener(getRelationDefinition(), dl);
- }
- deleteListeners.remove(dn);
- }
-
- // Change listeners need to be deregistered from their
- // associated referenced component.
- if (changeListeners.containsKey(dn)) {
- for (ReferentialIntegrityChangeListener cl : changeListeners.get(dn)) {
- ManagedObjectPath<C, S> path = cl.getManagedObjectPath();
- ServerManagedObject<? extends S> ref = context.getManagedObject(path);
- ref.deregisterChangeListener(cl);
- }
- changeListeners.remove(dn);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void performPostModify(ServerManagedObject<?> managedObject) throws ConfigException {
- // Remove all the constraints associated with this managed
- // object and then re-register them.
- performPostDelete(managedObject);
- performPostAdd(managedObject);
- }
- }
-
- /**
- * The client-side constraint handler implementation which enforces
- * referential integrity when aggregating managed objects are added or
- * modified.
- */
- private class SourceClientHandler extends ClientConstraintHandler {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isAddAcceptable(ManagementContext context, ManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
- // If all of this managed object's "enabled" properties are true
- // then any referenced managed objects must also be enabled.
- boolean needsEnabling = targetNeedsEnablingCondition.evaluate(context, managedObject);
-
- // Check the referenced managed objects exist and, if required,
- // are enabled.
- boolean isAcceptable = true;
- LocalizableMessage ufn = getRelationDefinition().getUserFriendlyName();
- for (String name : managedObject.getPropertyValues(AggregationPropertyDefinition.this)) {
- // Retrieve the referenced managed object and make sure it
- // exists.
- ManagedObjectPath<?, ?> path = getChildPath(name);
- ManagedObject<?> ref;
- try {
- ref = context.getManagedObject(path);
- } catch (DefinitionDecodingException e) {
- LocalizableMessage msg =
- ERR_CLIENT_REFINT_TARGET_INVALID.get(ufn, name, getName(), e.getMessageObject());
- unacceptableReasons.add(msg);
- isAcceptable = false;
- continue;
- } catch (ManagedObjectDecodingException e) {
- LocalizableMessage msg =
- ERR_CLIENT_REFINT_TARGET_INVALID.get(ufn, name, getName(), e.getMessageObject());
- unacceptableReasons.add(msg);
- isAcceptable = false;
- continue;
- } catch (ManagedObjectNotFoundException e) {
- LocalizableMessage msg = ERR_CLIENT_REFINT_TARGET_DANGLING_REFERENCE.get(ufn, name, getName());
- unacceptableReasons.add(msg);
- isAcceptable = false;
- continue;
- }
-
- // Make sure the reference managed object is enabled.
- if (needsEnabling) {
- if (!targetIsEnabledCondition.evaluate(context, ref)) {
- LocalizableMessage msg = ERR_CLIENT_REFINT_TARGET_DISABLED.get(ufn, name, getName());
- unacceptableReasons.add(msg);
- isAcceptable = false;
- }
- }
- }
- return isAcceptable;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isModifyAcceptable(ManagementContext context, ManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
- // The same constraint applies as for adds.
- return isAddAcceptable(context, managedObject, unacceptableReasons);
- }
-
- }
-
- /**
- * The client-side constraint handler implementation which enforces
- * referential integrity when aggregated managed objects are deleted or
- * modified.
- */
- private class TargetClientHandler extends ClientConstraintHandler {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isDeleteAcceptable(ManagementContext context, ManagedObjectPath<?, ?> path,
- Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
- // Any references to the deleted managed object should cause a
- // constraint violation.
- boolean isAcceptable = true;
- for (ManagedObject<?> mo : findReferences(context, getManagedObjectDefinition(), path.getName())) {
- String name = mo.getManagedObjectPath().getName();
- if (name == null) {
- LocalizableMessage msg =
- ERR_CLIENT_REFINT_CANNOT_DELETE_WITHOUT_NAME.get(getName(), mo.getManagedObjectDefinition()
- .getUserFriendlyName(), getManagedObjectDefinition().getUserFriendlyName());
- unacceptableReasons.add(msg);
- } else {
- LocalizableMessage msg =
- ERR_CLIENT_REFINT_CANNOT_DELETE_WITH_NAME.get(getName(), mo.getManagedObjectDefinition()
- .getUserFriendlyName(), name, getManagedObjectDefinition().getUserFriendlyName());
- unacceptableReasons.add(msg);
- }
- isAcceptable = false;
- }
- return isAcceptable;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isModifyAcceptable(ManagementContext context, ManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
- // If the modified managed object is disabled and there are some
- // active references then refuse the change.
- if (targetIsEnabledCondition.evaluate(context, managedObject)) {
- return true;
- }
-
- // The referenced managed object is disabled. Need to check for
- // active references.
- boolean isAcceptable = true;
- for (ManagedObject<?> mo : findReferences(context, getManagedObjectDefinition(), managedObject
- .getManagedObjectPath().getName())) {
- if (targetNeedsEnablingCondition.evaluate(context, mo)) {
- String name = mo.getManagedObjectPath().getName();
- if (name == null) {
- LocalizableMessage msg =
- ERR_CLIENT_REFINT_CANNOT_DISABLE_WITHOUT_NAME.get(managedObject
- .getManagedObjectDefinition().getUserFriendlyName(), getName(), mo
- .getManagedObjectDefinition().getUserFriendlyName());
- unacceptableReasons.add(msg);
- } else {
- LocalizableMessage msg =
- ERR_CLIENT_REFINT_CANNOT_DISABLE_WITH_NAME.get(
- managedObject.getManagedObjectDefinition().getUserFriendlyName(), getName(),
- mo.getManagedObjectDefinition().getUserFriendlyName(), name);
- unacceptableReasons.add(msg);
- }
- isAcceptable = false;
- }
- }
- return isAcceptable;
- }
-
- // Find all managed objects which reference the named managed
- // object using this property.
- private <C1 extends ConfigurationClient> List<ManagedObject<? extends C1>> findReferences(
- ManagementContext context, AbstractManagedObjectDefinition<C1, ?> mod, String name)
- throws ErrorResultException {
- List<ManagedObject<? extends C1>> instances = findInstances(context, mod);
-
- Iterator<ManagedObject<? extends C1>> i = instances.iterator();
- while (i.hasNext()) {
- ManagedObject<? extends C1> mo = i.next();
- boolean hasReference = false;
-
- for (String value : mo.getPropertyValues(AggregationPropertyDefinition.this)) {
- if (compare(value, name) == 0) {
- hasReference = true;
- break;
- }
- }
-
- if (!hasReference) {
- i.remove();
- }
- }
-
- return instances;
- }
-
- // Find all instances of a specific type of managed object.
- @SuppressWarnings("unchecked")
- private <C1 extends ConfigurationClient> List<ManagedObject<? extends C1>> findInstances(
- ManagementContext context, AbstractManagedObjectDefinition<C1, ?> mod) throws ErrorResultException {
- List<ManagedObject<? extends C1>> instances = new LinkedList<ManagedObject<? extends C1>>();
-
- if (mod == RootCfgDefn.getInstance()) {
- instances.add((ManagedObject<? extends C1>) context.getRootConfigurationManagedObject());
- } else {
- for (RelationDefinition<? super C1, ?> rd : mod.getAllReverseRelationDefinitions()) {
- for (ManagedObject<?> parent : findInstances(context, rd.getParentDefinition())) {
- try {
- if (rd instanceof SingletonRelationDefinition) {
- SingletonRelationDefinition<? super C1, ?> srd =
- (SingletonRelationDefinition<? super C1, ?>) rd;
- ManagedObject<?> mo = parent.getChild(srd);
- if (mo.getManagedObjectDefinition().isChildOf(mod)) {
- instances.add((ManagedObject<? extends C1>) mo);
- }
- } else if (rd instanceof OptionalRelationDefinition) {
- OptionalRelationDefinition<? super C1, ?> ord =
- (OptionalRelationDefinition<? super C1, ?>) rd;
- ManagedObject<?> mo = parent.getChild(ord);
- if (mo.getManagedObjectDefinition().isChildOf(mod)) {
- instances.add((ManagedObject<? extends C1>) mo);
- }
- } else if (rd instanceof InstantiableRelationDefinition) {
- InstantiableRelationDefinition<? super C1, ?> ird =
- (InstantiableRelationDefinition<? super C1, ?>) rd;
-
- for (String name : parent.listChildren(ird)) {
- ManagedObject<?> mo = parent.getChild(ird, name);
- if (mo.getManagedObjectDefinition().isChildOf(mod)) {
- instances.add((ManagedObject<? extends C1>) mo);
- }
- }
- }
- } catch (OperationsException e) {
- // Ignore all operations exceptions.
- }
- }
- }
- }
-
- return instances;
- }
- }
-
- /**
- * Creates an aggregation property definition builder.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * aggregation property definition refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * aggregation property definition refers to.
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param propertyName
- * The property name.
- * @return Returns the new aggregation property definition builder.
- */
- public static <C extends ConfigurationClient, S extends Configuration> Builder<C, S> createBuilder(
- AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- return new Builder<C, S>(d, propertyName);
- }
-
- private static final Logger debugLogger = LoggerFactory.getLogger(AggregationPropertyDefinition.class);
-
- // The active server-side referential integrity change listeners
- // associated with this property.
- private final Map<DN, List<ReferentialIntegrityChangeListener>> changeListeners =
- new HashMap<DN, List<ReferentialIntegrityChangeListener>>();
-
- // The active server-side referential integrity delete listeners
- // associated with this property.
- private final Map<DN, List<ReferentialIntegrityDeleteListener>> deleteListeners =
- new HashMap<DN, List<ReferentialIntegrityDeleteListener>>();
-
- // The name of the managed object which is the parent of the
- // aggregated managed objects.
- private ManagedObjectPath<?, ?> parentPath;
-
- // The string representation of the managed object path specifying
- // the parent of the aggregated managed objects.
- private final String parentPathString;
-
- // The name of a relation in the parent managed object which
- // contains the aggregated managed objects.
- private final String rdName;
-
- // The relation in the parent managed object which contains the
- // aggregated managed objects.
- private InstantiableRelationDefinition<C, S> relationDefinition;
-
- // The source constraint.
- private final Constraint sourceConstraint;
-
- // The condition which is used to determine if a referenced managed
- // object is enabled.
- private final Condition targetIsEnabledCondition;
-
- // The condition which is used to determine whether or not
- // referenced managed objects need to be enabled.
- private final Condition targetNeedsEnablingCondition;
-
- // Private constructor.
- private AggregationPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<String> defaultBehavior, String parentPathString, String rdName,
- Condition targetNeedsEnablingCondition, Condition targetIsEnabledCondition) {
- super(d, String.class, propertyName, options, adminAction, defaultBehavior);
-
- this.parentPathString = parentPathString;
- this.rdName = rdName;
- this.targetNeedsEnablingCondition = targetNeedsEnablingCondition;
- this.targetIsEnabledCondition = targetIsEnabledCondition;
- this.sourceConstraint = new Constraint() {
-
- /**
- * {@inheritDoc}
- */
- public Collection<ClientConstraintHandler> getClientConstraintHandlers() {
- ClientConstraintHandler handler = new SourceClientHandler();
- return Collections.singleton(handler);
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<ServerConstraintHandler> getServerConstraintHandlers() {
- ServerConstraintHandler handler = new ServerHandler();
- return Collections.singleton(handler);
- }
- };
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
- return v.visitAggregation(this, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyValueVisitor<R, P> v, String value, P p) {
- return v.visitAggregation(this, value, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String decodeValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- try {
- validateValue(value, options);
- return value;
- } catch (IllegalPropertyValueException e) {
- throw new IllegalPropertyValueStringException(this, value);
- }
- }
-
- /**
- * Constructs a DN for a referenced managed object having the provided name.
- * This method is implemented by first calling {@link #getChildPath(String)}
- * and then invoking {@code ManagedObjectPath.toDN()} on the returned path.
- *
- * @param name
- * The name of the child managed object.
- * @return Returns a DN for a referenced managed object having the provided
- * name.
- */
- public final DN getChildDN(String name) {
- return getChildPath(name).toDN();
- }
-
- /**
- * Constructs a managed object path for a referenced managed object having
- * the provided name.
- *
- * @param name
- * The name of the child managed object.
- * @return Returns a managed object path for a referenced managed object
- * having the provided name.
- */
- public final ManagedObjectPath<C, S> getChildPath(String name) {
- return parentPath.child(relationDefinition, name);
- }
-
- /**
- * Gets the name of the managed object which is the parent of the aggregated
- * managed objects.
- *
- * @return Returns the name of the managed object which is the parent of the
- * aggregated managed objects.
- */
- public final ManagedObjectPath<?, ?> getParentPath() {
- return parentPath;
- }
-
- /**
- * Gets the relation in the parent managed object which contains the
- * aggregated managed objects.
- *
- * @return Returns the relation in the parent managed object which contains
- * the aggregated managed objects.
- */
- public final InstantiableRelationDefinition<C, S> getRelationDefinition() {
- return relationDefinition;
- }
-
- /**
- * Gets the constraint which should be enforced on the aggregating managed
- * object.
- *
- * @return Returns the constraint which should be enforced on the
- * aggregating managed object.
- */
- public final Constraint getSourceConstraint() {
- return sourceConstraint;
- }
-
- /**
- * Gets the optional constraint synopsis of this aggregation property
- * definition in the default locale. The constraint synopsis describes when
- * and how referenced managed objects must be enabled. When there are no
- * constraints between the source managed object and the objects it
- * references through this aggregation, <code>null</code> is returned.
- *
- * @return Returns the optional constraint synopsis of this aggregation
- * property definition in the default locale, or <code>null</code>
- * if there is no constraint synopsis.
- */
- public final LocalizableMessage getSourceConstraintSynopsis() {
- return getSourceConstraintSynopsis(Locale.getDefault());
- }
-
- /**
- * Gets the optional constraint synopsis of this aggregation property
- * definition in the specified locale.The constraint synopsis describes when
- * and how referenced managed objects must be enabled. When there are no
- * constraints between the source managed object and the objects it
- * references through this aggregation, <code>null</code> is returned.
- *
- * @param locale
- * The locale.
- * @return Returns the optional constraint synopsis of this aggregation
- * property definition in the specified locale, or <code>null</code>
- * if there is no constraint synopsis.
- */
- public final LocalizableMessage getSourceConstraintSynopsis(Locale locale) {
- ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
- String property = "property." + getName() + ".syntax.aggregation.constraint-synopsis";
- try {
- return resource.getMessage(getManagedObjectDefinition(), property, locale);
- } catch (MissingResourceException e) {
- return null;
- }
- }
-
- /**
- * Gets the condition which is used to determine if a referenced managed
- * object is enabled.
- *
- * @return Returns the condition which is used to determine if a referenced
- * managed object is enabled.
- */
- public final Condition getTargetIsEnabledCondition() {
- return targetIsEnabledCondition;
- }
-
- /**
- * Gets the condition which is used to determine whether or not referenced
- * managed objects need to be enabled.
- *
- * @return Returns the condition which is used to determine whether or not
- * referenced managed objects need to be enabled.
- */
- public final Condition getTargetNeedsEnablingCondition() {
- return targetNeedsEnablingCondition;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String normalizeValue(String value) {
- try {
- Reference<C, S> reference = Reference.parseName(parentPath, relationDefinition, value);
- return reference.getNormalizedName();
- } catch (IllegalArgumentException e) {
- throw new IllegalPropertyValueException(this, value);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void toString(StringBuilder builder) {
- super.toString(builder);
-
- builder.append(" parentPath=");
- builder.append(parentPath);
-
- builder.append(" relationDefinition=");
- builder.append(relationDefinition.getName());
-
- builder.append(" targetNeedsEnablingCondition=");
- builder.append(String.valueOf(targetNeedsEnablingCondition));
-
- builder.append(" targetIsEnabledCondition=");
- builder.append(String.valueOf(targetIsEnabledCondition));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void validateValue(String value, PropertyDefinitionsOptions options) {
- try {
- Reference.parseName(parentPath, relationDefinition, value);
- } catch (IllegalArgumentException e) {
- throw new IllegalPropertyValueException(this, value);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("unchecked")
- @Override
- public void initialize() throws Exception {
- // Decode the path.
- parentPath = ManagedObjectPath.valueOf(parentPathString);
-
- // Decode the relation definition.
- AbstractManagedObjectDefinition<?, ?> parent = parentPath.getManagedObjectDefinition();
- RelationDefinition<?, ?> rd = parent.getRelationDefinition(rdName);
- relationDefinition = (InstantiableRelationDefinition<C, S>) rd;
-
- // Now decode the conditions.
- targetNeedsEnablingCondition.initialize(getManagedObjectDefinition());
- targetIsEnabledCondition.initialize(rd.getChildDefinition());
-
- // Register a client-side constraint with the referenced
- // definition. This will be used to enforce referential integrity
- // for actions performed against referenced managed objects.
- Constraint constraint = new Constraint() {
-
- /**
- * {@inheritDoc}
- */
- public Collection<ClientConstraintHandler> getClientConstraintHandlers() {
- ClientConstraintHandler handler = new TargetClientHandler();
- return Collections.singleton(handler);
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<ServerConstraintHandler> getServerConstraintHandlers() {
- return Collections.emptyList();
- }
- };
-
- rd.getChildDefinition().registerConstraint(constraint);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/AliasDefaultBehaviorProvider.java b/opendj-config/src/main/java/org/opends/server/admin/AliasDefaultBehaviorProvider.java
deleted file mode 100644
index 5238ede..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/AliasDefaultBehaviorProvider.java
+++ /dev/null
@@ -1,99 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.Locale;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * A default behavior provider which indicates special behavior. It should be
- * used by properties which have a default behavior which cannot be directly
- * represented using real values of the property. For example, a property
- * containing a set of user names might default to "all users" when no values
- * are provided. This meaning cannot be represented using a finite set of
- * values.
- *
- * @param <T>
- * The type of values represented by this provider.
- */
-public final class AliasDefaultBehaviorProvider<T> extends DefaultBehaviorProvider<T> {
-
- // The managed object definition associated with this default
- // behavior.
- private final AbstractManagedObjectDefinition<?, ?> definition;
-
- // The name of the property definition associated with this default
- // behavior.
- private final String propertyName;
-
- /**
- * Create an alias default behavior provider.
- *
- * @param d
- * The managed object definition associated with this default
- * behavior.
- * @param propertyName
- * The name of the property definition associated with this
- * default behavior.
- */
- public AliasDefaultBehaviorProvider(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- this.definition = d;
- this.propertyName = propertyName;
- }
-
- /**
- * {@inheritDoc}
- */
- public <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p) {
- return v.visitAlias(this, p);
- }
-
- /**
- * Gets the synopsis of this alias default behavior in the default locale.
- *
- * @return Returns the synopsis of this alias default behavior in the
- * default locale.
- */
- public final LocalizableMessage getSynopsis() {
- return getSynopsis(Locale.getDefault());
- }
-
- /**
- * Gets the synopsis of this alias default behavior in the specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the synopsis of this alias default behavior in the
- * specified locale.
- */
- public final LocalizableMessage getSynopsis(Locale locale) {
- ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
- String property = "property." + propertyName + ".default-behavior.alias.synopsis";
- return resource.getMessage(definition, property, locale);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/AttributeTypePropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/AttributeTypePropertyDefinition.java
deleted file mode 100644
index d998a79..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/AttributeTypePropertyDefinition.java
+++ /dev/null
@@ -1,147 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.EnumSet;
-
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.opends.server.core.DirectoryServer;
-
-/**
- * Attribute type property definition.
- */
-public final class AttributeTypePropertyDefinition extends PropertyDefinition<AttributeType> {
-
- /**
- * An interface for incrementally constructing attribute type property
- * definitions.
- */
- public static final class Builder extends AbstractBuilder<AttributeType, AttributeTypePropertyDefinition> {
-
- // Private constructor
- private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- super(d, propertyName);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected AttributeTypePropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
- String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<AttributeType> defaultBehavior) {
- return new AttributeTypePropertyDefinition(d, propertyName, options, adminAction, defaultBehavior);
- }
- }
-
- /**
- * Create a attribute type property definition builder.
- *
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param propertyName
- * The property name.
- * @return Returns the new attribute type property definition builder.
- */
- public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- return new Builder(d, propertyName);
- }
-
- // Private constructor.
- private AttributeTypePropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<AttributeType> defaultBehavior) {
- super(d, AttributeType.class, propertyName, options, adminAction, defaultBehavior);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
- return v.visitAttributeType(this, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyValueVisitor<R, P> v, AttributeType value, P p) {
- return v.visitAttributeType(this, value, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int compare(AttributeType o1, AttributeType o2) {
- return o1.getNameOrOID().compareToIgnoreCase(o2.getNameOrOID());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public AttributeType decodeValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- String name = value.trim().toLowerCase();
- AttributeType type = DirectoryServer.getAttributeType(name, !options.checkSchemaForAttributes());
-
- if (type == null) {
- throw new IllegalPropertyValueStringException(this, value);
- } else {
- try {
- validateValue(type, options);
- return type;
- } catch (IllegalPropertyValueException e) {
- throw new IllegalPropertyValueStringException(this, value);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String encodeValue(AttributeType value) {
- return value.getNameOrOID();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void validateValue(AttributeType value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- // No implementation required.
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/BooleanPropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/BooleanPropertyDefinition.java
deleted file mode 100644
index 5eef04d..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/BooleanPropertyDefinition.java
+++ /dev/null
@@ -1,146 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Boolean property definition.
- */
-public final class BooleanPropertyDefinition extends PropertyDefinition<Boolean> {
-
- /**
- * Mapping used for parsing boolean values. This mapping is more flexible
- * than the standard boolean string parser and supports common true/false
- * synonyms used in configuration.
- */
- private static final Map<String, Boolean> VALUE_MAP;
- static {
- VALUE_MAP = new HashMap<String, Boolean>();
-
- // We could have more possibilities but decided against in issue 1960.
- VALUE_MAP.put("false", Boolean.FALSE);
- VALUE_MAP.put("true", Boolean.TRUE);
- }
-
- /**
- * An interface for incrementally constructing boolean property definitions.
- */
- public static final class Builder extends AbstractBuilder<Boolean, BooleanPropertyDefinition> {
-
- // Private constructor
- private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- super(d, propertyName);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected BooleanPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
- String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<Boolean> defaultBehavior) {
- return new BooleanPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior);
- }
-
- }
-
- /**
- * Create a boolean property definition builder.
- *
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param propertyName
- * The property name.
- * @return Returns the new boolean property definition builder.
- */
- public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- return new Builder(d, propertyName);
- }
-
- // Private constructor.
- private BooleanPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<Boolean> defaultBehavior) {
- super(d, Boolean.class, propertyName, options, adminAction, defaultBehavior);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void validateValue(Boolean value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- // No additional validation required.
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Boolean decodeValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- String nvalue = value.trim().toLowerCase();
- Boolean b = VALUE_MAP.get(nvalue);
-
- if (b == null) {
- throw new IllegalPropertyValueStringException(this, value);
- } else {
- return b;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
- return v.visitBoolean(this, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyValueVisitor<R, P> v, Boolean value, P p) {
- return v.visitBoolean(this, value, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int compare(Boolean o1, Boolean o2) {
- return o1.compareTo(o2);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/ClassLoaderProvider.java b/opendj-config/src/main/java/org/opends/server/admin/ClassLoaderProvider.java
deleted file mode 100644
index 62a916b..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/ClassLoaderProvider.java
+++ /dev/null
@@ -1,730 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-package org.opends.server.admin;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-import static com.forgerock.opendj.ldap.ExtensionMessages.*;
-import static com.forgerock.opendj.util.StaticUtils.*;
-import org.forgerock.util.Reject;
-
-import java.io.ByteArrayOutputStream;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintStream;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.jar.Attributes;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.opends.server.core.DirectoryServer;
-import org.opends.server.types.InitializationException;
-import org.opends.server.util.DynamicConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.forgerock.opendj.ldap.AdminMessages;
-
-/**
- * Manages the class loader which should be used for loading configuration
- * definition classes and associated extensions.
- * <p>
- * For extensions which define their own extended configuration definitions, the
- * class loader will make sure that the configuration definition classes are
- * loaded and initialized.
- * <p>
- * Initially the class loader provider is disabled, and calls to the
- * {@link #getClassLoader()} will return the system default class loader.
- * <p>
- * Applications <b>MUST NOT</b> maintain persistent references to the class
- * loader as it can change at run-time.
- */
-public final class ClassLoaderProvider {
-
- private static final LocalizedLogger adminLogger = LocalizedLogger.getLocalizedLogger(AdminMessages
- .resourceName());
- private static final Logger debugLogger = LoggerFactory.getLogger(ClassLoaderProvider.class);
-
- /**
- * Private URLClassLoader implementation. This is only required so that we
- * can provide access to the addURL method.
- */
- private static final class MyURLClassLoader extends URLClassLoader {
-
- /**
- * Create a class loader with the default parent class loader.
- */
- public MyURLClassLoader() {
- super(new URL[0]);
- }
-
- /**
- * Create a class loader with the provided parent class loader.
- *
- * @param parent
- * The parent class loader.
- */
- public MyURLClassLoader(ClassLoader parent) {
- super(new URL[0], parent);
- }
-
- /**
- * Add a Jar file to this class loader.
- *
- * @param jarFile
- * The name of the Jar file.
- * @throws MalformedURLException
- * If a protocol handler for the URL could not be found, or
- * if some other error occurred while constructing the URL.
- * @throws SecurityException
- * If a required system property value cannot be accessed.
- */
- public void addJarFile(File jarFile) throws MalformedURLException {
- addURL(jarFile.toURI().toURL());
- }
-
- }
-
- // The name of the manifest file listing the core configuration
- // definition classes.
- private static final String CORE_MANIFEST = "core.manifest";
-
- // The name of the manifest file listing a extension's configuration
- // definition classes.
- private static final String EXTENSION_MANIFEST = "extension.manifest";
-
- // The name of the lib directory.
- private static final String LIB_DIR = "lib";
-
- // The name of the extensions directory.
- private static final String EXTENSIONS_DIR = "extensions";
-
- // The singleton instance.
- private static final ClassLoaderProvider INSTANCE = new ClassLoaderProvider();
-
- // Attribute name in jar's MANIFEST corresponding to the revision number.
- private static final String REVISION_NUMBER = "Revision-Number";
-
- // The attribute names for build information is name, version and revision
- // number
- private static final String[] BUILD_INFORMATION_ATTRIBUTE_NAMES =
- new String[] { Attributes.Name.EXTENSION_NAME.toString(), Attributes.Name.IMPLEMENTATION_VERSION.toString(),
- REVISION_NUMBER };
-
- /**
- * Get the single application wide class loader provider instance.
- *
- * @return Returns the single application wide class loader provider
- * instance.
- */
- public static ClassLoaderProvider getInstance() {
- return INSTANCE;
- }
-
- // Set of registered Jar files.
- private Set<File> jarFiles = new HashSet<File>();
-
- // Underlying class loader used to load classes and resources (null
- // if disabled).
- //
- // We contain a reference to the URLClassLoader rather than
- // sub-class it so that it is possible to replace the loader at
- // run-time. For example, when removing or replacing extension Jar
- // files (the URLClassLoader only supports adding new
- // URLs, not removal).
- private MyURLClassLoader loader = null;
-
- // Private constructor.
- private ClassLoaderProvider() {
- // No implementation required.
- }
-
- /**
- * Add the named extensions to this class loader provider.
- *
- * @param extensions
- * The names of the extensions to be loaded. The names should not
- * contain any path elements and must be located within the
- * extensions folder.
- * @throws InitializationException
- * If one of the extensions could not be loaded and initialized.
- * @throws IllegalStateException
- * If this class loader provider is disabled.
- * @throws IllegalArgumentException
- * If one of the extension names was not a single relative path
- * name element or was an absolute path.
- */
- public synchronized void addExtension(String... extensions) throws InitializationException {
- Reject.ifNull(extensions);
-
- if (loader == null) {
- throw new IllegalStateException("Class loader provider is disabled.");
- }
-
- File libPath = new File(DirectoryServer.getInstanceRoot(), LIB_DIR);
- File extensionsPath = new File(libPath, EXTENSIONS_DIR);
-
- ArrayList<File> files = new ArrayList<File>(extensions.length);
- for (String extension : extensions) {
- File file = new File(extensionsPath, extension);
-
- // For security reasons we need to make sure that the file name
- // passed in did not contain any path elements and names a file
- // in the extensions folder.
-
- // Can handle potential null parent.
- if (!extensionsPath.equals(file.getParentFile())) {
- throw new IllegalArgumentException("Illegal file name: " + extension);
- }
-
- // The file is valid.
- files.add(file);
- }
-
- // Add the extensions.
- addExtension(files.toArray(new File[files.size()]));
- }
-
- /**
- * Disable this class loader provider and removed any registered extensions.
- *
- * @throws IllegalStateException
- * If this class loader provider is already disabled.
- */
- public synchronized void disable() {
- if (loader == null) {
- throw new IllegalStateException("Class loader provider already disabled.");
- }
- loader = null;
- jarFiles = new HashSet<File>();
- }
-
- /**
- * Enable this class loader provider using the application's class loader as
- * the parent class loader.
- *
- * @throws InitializationException
- * If the class loader provider could not initialize
- * successfully.
- * @throws IllegalStateException
- * If this class loader provider is already enabled.
- */
- public synchronized void enable() throws InitializationException {
- enable(RootCfgDefn.class.getClassLoader());
- }
-
- /**
- * Enable this class loader provider using the provided parent class loader.
- *
- * @param parent
- * The parent class loader.
- * @throws InitializationException
- * If the class loader provider could not initialize
- * successfully.
- * @throws IllegalStateException
- * If this class loader provider is already enabled.
- */
- public synchronized void enable(ClassLoader parent) throws InitializationException {
- if (loader != null) {
- throw new IllegalStateException("Class loader provider already enabled.");
- }
-
- if (parent != null) {
- loader = new MyURLClassLoader(parent);
- } else {
- loader = new MyURLClassLoader();
- }
-
- // Forcefully load all configuration definition classes in
- // OpenDS.jar.
- initializeCoreComponents();
-
- // Put extensions jars into the class loader and load all
- // configuration definition classes in that they contain.
- // First load the extension from the install directory, then
- // from the instance directory.
- File libDir;
- File installExtensionsPath;
- File instanceExtensionsPath;
-
- // load install dir extension
- libDir = new File(DirectoryServer.getServerRoot(), LIB_DIR);
- try {
- installExtensionsPath = new File(libDir, EXTENSIONS_DIR).getCanonicalFile();
- } catch (Exception e) {
- installExtensionsPath = new File(libDir, EXTENSIONS_DIR);
- }
- initializeAllExtensions(installExtensionsPath);
-
- // load instance dir extension
- libDir = new File(DirectoryServer.getInstanceRoot(), LIB_DIR);
- try {
- instanceExtensionsPath = new File(libDir, EXTENSIONS_DIR).getCanonicalFile();
- } catch (Exception e) {
- instanceExtensionsPath = new File(libDir, EXTENSIONS_DIR);
- }
- if (!installExtensionsPath.getAbsolutePath().equals(instanceExtensionsPath.getAbsolutePath())) {
- initializeAllExtensions(instanceExtensionsPath);
- }
- }
-
- /**
- * Gets the class loader which should be used for loading classes and
- * resources. When this class loader provider is disabled, the system
- * default class loader will be returned by default.
- * <p>
- * Applications <b>MUST NOT</b> maintain persistent references to the class
- * loader as it can change at run-time.
- *
- * @return Returns the class loader which should be used for loading classes
- * and resources.
- */
- public synchronized ClassLoader getClassLoader() {
- if (loader != null) {
- return loader;
- } else {
- return ClassLoader.getSystemClassLoader();
- }
- }
-
- /**
- * Indicates whether this class loader provider is enabled.
- *
- * @return Returns <code>true</code> if this class loader provider is
- * enabled.
- */
- public synchronized boolean isEnabled() {
- return loader != null;
- }
-
- /**
- * Add the named extensions to this class loader.
- *
- * @param extensions
- * The names of the extensions to be loaded.
- * @throws InitializationException
- * If one of the extensions could not be loaded and initialized.
- */
- private synchronized void addExtension(File... extensions) throws InitializationException {
- // First add the Jar files to the class loader.
- List<JarFile> jars = new LinkedList<JarFile>();
- for (File extension : extensions) {
- if (jarFiles.contains(extension)) {
- // Skip this file as it is already loaded.
- continue;
- }
-
- // Attempt to load it.
- jars.add(loadJarFile(extension));
-
- // Register the Jar file with the class loader.
- try {
- loader.addJarFile(extension);
- } catch (Exception e) {
- debugLogger.trace("Unable to register the jar file with the class loader", e);
- LocalizableMessage message =
- ERR_ADMIN_CANNOT_OPEN_JAR_FILE.get(extension.getName(), extension.getParent(),
- stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
- throw new InitializationException(message);
- }
- jarFiles.add(extension);
- }
-
- // Now forcefully load the configuration definition classes.
- for (JarFile jar : jars) {
- initializeExtension(jar);
- }
- }
-
- /**
- * Prints out all information about extensions.
- *
- * @return a String instance representing all information about extensions;
- * <code>null</code> if there is no information available.
- */
- public String printExtensionInformation() {
- File extensionsPath =
- new File(new StringBuilder(DirectoryServer.getServerRoot()).append(File.separator).append(LIB_DIR)
- .append(File.separator).append(EXTENSIONS_DIR).toString());
-
- if (!extensionsPath.exists() || !extensionsPath.isDirectory()) {
- // no extensions' directory
- return null;
- }
-
- File[] extensions = extensionsPath.listFiles(new FileFilter() {
- public boolean accept(File pathname) {
- // only files with names ending with ".jar"
- return pathname.isFile() && pathname.getName().endsWith(".jar");
- }
- });
-
- if (extensions.length == 0) {
- return null;
- }
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- PrintStream ps = new PrintStream(baos);
- // prints:
- // --
- // Name Build number Revision number
- ps.printf("--%s %-20s %-20s %-20s%s", EOL, "Name", "Build number", "Revision number", EOL);
-
- for (File extension : extensions) {
- // retrieve MANIFEST entry and display name, build number and
- // revision
- // number
- try {
- JarFile jarFile = new JarFile(extension);
- JarEntry entry = jarFile.getJarEntry("admin/" + EXTENSION_MANIFEST);
- if (entry == null) {
- continue;
- }
-
- String[] information = getBuildInformation(jarFile);
-
- ps.append("Extension: ");
- boolean addBlank = false;
- for (String name : information) {
- if (addBlank) {
- ps.append(addBlank ? " " : ""); // add blank if not
- // first append
- } else {
- addBlank = true;
- }
-
- ps.printf("%-20s", name);
- }
- ps.append(EOL);
- } catch (Exception e) {
- // ignore extra information for this extension
- }
- }
-
- return baos.toString();
- }
-
- /**
- * Returns a String array with the following information : <br>
- * index 0: the name of the extension. <br>
- * index 1: the build number of the extension. <br>
- * index 2: the revision number of the extension.
- *
- * @param extension
- * the jar file of the extension
- * @return a String array containing the name, the build number and the
- * revision number of the extension given in argument
- * @throws java.io.IOException
- * thrown if the jar file has been closed.
- */
- private String[] getBuildInformation(JarFile extension) throws IOException {
- String[] result = new String[3];
-
- // retrieve MANIFEST entry and display name, version and revision
- Manifest manifest = extension.getManifest();
-
- if (manifest != null) {
- Attributes attributes = manifest.getMainAttributes();
-
- int index = 0;
- for (String name : BUILD_INFORMATION_ATTRIBUTE_NAMES) {
- String value = attributes.getValue(name);
- if (value == null) {
- value = "<unknown>";
- }
- result[index++] = value;
- }
- }
-
- return result;
- }
-
- /**
- * Put extensions jars into the class loader and load all configuration
- * definition classes in that they contain.
- *
- * @param extensionsPath
- * Indicates where extensions are located.
- * @throws InitializationException
- * If the extensions folder could not be accessed or if a
- * extension jar file could not be accessed or if one of the
- * configuration definition classes could not be initialized.
- */
- private void initializeAllExtensions(File extensionsPath) throws InitializationException {
-
- try {
- if (!extensionsPath.exists()) {
- // The extensions directory does not exist. This is not a
- // critical problem.
- adminLogger.error(ERR_ADMIN_NO_EXTENSIONS_DIR, String.valueOf(extensionsPath));
- return;
- }
-
- if (!extensionsPath.isDirectory()) {
- // The extensions directory is not a directory. This is more
- // critical.
- LocalizableMessage message =
- ERR_ADMIN_EXTENSIONS_DIR_NOT_DIRECTORY.get(String.valueOf(extensionsPath));
- throw new InitializationException(message);
- }
-
- // Get each extension file name.
- FileFilter filter = new FileFilter() {
-
- /**
- * Must be a Jar file.
- */
- public boolean accept(File pathname) {
- if (!pathname.isFile()) {
- return false;
- }
-
- String name = pathname.getName();
- return name.endsWith(".jar");
- }
-
- };
-
- // Add and initialize the extensions.
- addExtension(extensionsPath.listFiles(filter));
- } catch (InitializationException e) {
- debugLogger.trace("Unable to initialize all extensions", e);
- throw e;
- } catch (Exception e) {
- debugLogger.trace("Unable to initialize all extensions", e);
- LocalizableMessage message =
- ERR_ADMIN_EXTENSIONS_CANNOT_LIST_FILES.get(String.valueOf(extensionsPath),
- stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
- throw new InitializationException(message, e);
- }
- }
-
- /**
- * Make sure all core configuration definitions are loaded.
- *
- * @throws InitializationException
- * If the core manifest file could not be read or if one of the
- * configuration definition classes could not be initialized.
- */
- private void initializeCoreComponents() throws InitializationException {
- InputStream is = RootCfgDefn.class.getResourceAsStream("/admin/" + CORE_MANIFEST);
-
- if (is == null) {
- LocalizableMessage message = ERR_ADMIN_CANNOT_FIND_CORE_MANIFEST.get(CORE_MANIFEST);
- throw new InitializationException(message);
- }
-
- try {
- loadDefinitionClasses(is);
- } catch (InitializationException e) {
- debugLogger.trace("Unable to initialize core components", e);
- LocalizableMessage message =
- ERR_CLASS_LOADER_CANNOT_LOAD_CORE.get(CORE_MANIFEST,
- stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
- throw new InitializationException(message);
- }
- }
-
- /**
- * Make sure all the configuration definition classes in a extension are
- * loaded.
- *
- * @param jarFile
- * The extension's Jar file.
- * @throws InitializationException
- * If the extension jar file could not be accessed or if one of
- * the configuration definition classes could not be
- * initialized.
- */
- private void initializeExtension(JarFile jarFile) throws InitializationException {
- JarEntry entry = jarFile.getJarEntry("admin/" + EXTENSION_MANIFEST);
- if (entry != null) {
- InputStream is;
- try {
- is = jarFile.getInputStream(entry);
- } catch (Exception e) {
- debugLogger.trace("Unable to get input stream from jar", e);
- LocalizableMessage message =
- ERR_ADMIN_CANNOT_READ_EXTENSION_MANIFEST.get(EXTENSION_MANIFEST, jarFile.getName(),
- stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
- throw new InitializationException(message);
- }
-
- try {
- loadDefinitionClasses(is);
- } catch (InitializationException e) {
- debugLogger.trace("Unable to load classes from input stream", e);
- LocalizableMessage message =
- ERR_CLASS_LOADER_CANNOT_LOAD_EXTENSION.get(jarFile.getName(), EXTENSION_MANIFEST,
- stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
- throw new InitializationException(message);
- }
- try {
- // Log build information of extensions in the error log
- String[] information = getBuildInformation(jarFile);
- LocalizableMessage message =
- NOTE_LOG_EXTENSION_INFORMATION.get(jarFile.getName(), information[1], information[2]);
- LocalizedLogger.getLocalizedLogger(message.resourceName()).error(message);
- } catch (Exception e) {
- // Do not log information for that extension
- }
- }
- }
-
- /**
- * Forcefully load configuration definition classes named in a manifest
- * file.
- *
- * @param is
- * The manifest file input stream.
- * @throws InitializationException
- * If the definition classes could not be loaded and
- * initialized.
- */
- private void loadDefinitionClasses(InputStream is) throws InitializationException {
- BufferedReader reader = new BufferedReader(new InputStreamReader(is));
- List<AbstractManagedObjectDefinition<?, ?>> definitions =
- new LinkedList<AbstractManagedObjectDefinition<?, ?>>();
- while (true) {
- String className;
- try {
- className = reader.readLine();
- } catch (IOException e) {
- LocalizableMessage msg =
- ERR_CLASS_LOADER_CANNOT_READ_MANIFEST_FILE.get(String.valueOf(e.getMessage()));
- throw new InitializationException(msg, e);
- }
-
- // Break out when the end of the manifest is reached.
- if (className == null) {
- break;
- }
-
- // Skip blank lines.
- className = className.trim();
- if (className.length() == 0) {
- continue;
- }
-
- // Skip lines beginning with #.
- if (className.startsWith("#")) {
- continue;
- }
-
- debugLogger.trace("Loading class " + className);
-
- // Load the class and get an instance of it if it is a definition.
- Class<?> theClass;
- try {
- theClass = Class.forName(className, true, loader);
- } catch (Exception e) {
- LocalizableMessage msg =
- ERR_CLASS_LOADER_CANNOT_LOAD_CLASS.get(className, String.valueOf(e.getMessage()));
- throw new InitializationException(msg, e);
- }
- if (AbstractManagedObjectDefinition.class.isAssignableFrom(theClass)) {
- // We need to instantiate it using its getInstance() static
- // method.
- Method method;
- try {
- method = theClass.getMethod("getInstance");
- } catch (Exception e) {
- LocalizableMessage msg =
- ERR_CLASS_LOADER_CANNOT_FIND_GET_INSTANCE_METHOD.get(className,
- String.valueOf(e.getMessage()));
- throw new InitializationException(msg, e);
- }
-
- // Get the definition instance.
- AbstractManagedObjectDefinition<?, ?> d;
- try {
- d = (AbstractManagedObjectDefinition<?, ?>) method.invoke(null);
- } catch (Exception e) {
- LocalizableMessage msg =
- ERR_CLASS_LOADER_CANNOT_INVOKE_GET_INSTANCE_METHOD.get(className,
- String.valueOf(e.getMessage()));
- throw new InitializationException(msg, e);
- }
- definitions.add(d);
- }
- }
-
- // Initialize any definitions that were loaded.
- for (AbstractManagedObjectDefinition<?, ?> d : definitions) {
- try {
- d.initialize();
- } catch (Exception e) {
- LocalizableMessage msg =
- ERR_CLASS_LOADER_CANNOT_INITIALIZE_DEFN.get(d.getName(), d.getClass().getName(),
- String.valueOf(e.getMessage()));
- throw new InitializationException(msg, e);
- }
- }
- }
-
- /**
- * Load the named Jar file.
- *
- * @param jar
- * The name of the Jar file to load.
- * @return Returns the loaded Jar file.
- * @throws InitializationException
- * If the Jar file could not be loaded.
- */
- private JarFile loadJarFile(File jar) throws InitializationException {
- JarFile jarFile;
-
- try {
- // Load the extension jar file.
- jarFile = new JarFile(jar);
- } catch (Exception e) {
- debugLogger.trace("Unable to load jar file: " + jar, e);
-
- LocalizableMessage message =
- ERR_ADMIN_CANNOT_OPEN_JAR_FILE.get(jar.getName(), jar.getParent(),
- stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
- throw new InitializationException(message);
- }
- return jarFile;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java
deleted file mode 100644
index ed0bcf2..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java
+++ /dev/null
@@ -1,273 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- * Portions copyright 2013 ForgeRock AS.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * Class property definition.
- * <p>
- * A class property definition defines a property whose values represent a Java
- * class. It is possible to restrict the type of java class by specifying
- * "instance of" constraints.
- * <p>
- * Note that in a client/server environment, the client is probably not capable
- * of validating the Java class (e.g. it will not be able to load it nor have
- * access to the interfaces it is supposed to implement). For this reason, it is
- * possible to switch off validation in the client by using the appropriate
- * {@link PropertyDefinitionsOptions}.
- */
-public final class ClassPropertyDefinition extends PropertyDefinition<String> {
-
- /**
- * An interface for incrementally constructing class property definitions.
- */
- public static final class Builder extends AbstractBuilder<String, ClassPropertyDefinition> {
-
- // List of interfaces which property values must implement.
- private List<String> instanceOfInterfaces;
-
- // Private constructor
- private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- super(d, propertyName);
-
- this.instanceOfInterfaces = new LinkedList<String>();
- }
-
- /**
- * Add an class name which property values must implement.
- *
- * @param className
- * The name of a class which property values must implement.
- */
- public final void addInstanceOf(String className) {
- Reject.ifNull(className);
-
- /*
- * Do some basic checks to make sure the string representation is
- * valid.
- */
- String value = className.trim();
- if (!value.matches(CLASS_RE)) {
- throw new IllegalArgumentException("\"" + value + "\" is not a valid Java class name");
- }
-
- instanceOfInterfaces.add(value);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected ClassPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<String> defaultBehavior) {
- return new ClassPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior,
- instanceOfInterfaces);
- }
-
- }
-
- // Regular expression for validating class names.
- private static final String CLASS_RE = "^([A-Za-z][A-Za-z0-9_]*\\.)*[A-Za-z][A-Za-z0-9_]*(\\$[A-Za-z0-9_]+)*$";
-
- /**
- * Create a class property definition builder.
- *
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param propertyName
- * The property name.
- * @return Returns the new class property definition builder.
- */
- public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- return new Builder(d, propertyName);
- }
-
- // Load a named class.
- private static Class<?> loadClass(String className, boolean initialize) throws ClassNotFoundException {
- return Class.forName(className, initialize, ClassLoaderProvider.getInstance().getClassLoader());
- }
-
- // List of interfaces which property values must implement.
- private final List<String> instanceOfInterfaces;
-
- // Private constructor.
- private ClassPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<String> defaultBehavior, List<String> instanceOfInterfaces) {
- super(d, String.class, propertyName, options, adminAction, defaultBehavior);
-
- this.instanceOfInterfaces = Collections.unmodifiableList(new LinkedList<String>(instanceOfInterfaces));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
- return v.visitClass(this, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyValueVisitor<R, P> v, String value, P p) {
- return v.visitClass(this, value, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String decodeValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- try {
- validateValue(value, options);
- } catch (IllegalPropertyValueException e) {
- throw new IllegalPropertyValueStringException(this, value, e.getCause());
- }
-
- return value;
- }
-
- /**
- * Get an unmodifiable list of classes which values of this property must
- * implement.
- *
- * @return Returns an unmodifiable list of classes which values of this
- * property must implement.
- */
- public List<String> getInstanceOfInterface() {
- return instanceOfInterfaces;
- }
-
- /**
- * Validate and load the named class, and cast it to a subclass of the
- * specified class.
- *
- * @param <T>
- * The requested type.
- * @param className
- * The name of the class to validate and load.
- * @param instanceOf
- * The class representing the requested type.
- * @return Returns the named class cast to a subclass of the specified
- * class.
- * @throws IllegalPropertyValueException
- * If the named class was invalid, could not be loaded, or did
- * not implement the required interfaces.
- * @throws ClassCastException
- * If the referenced class does not implement the requested
- * type.
- */
- public <T> Class<? extends T> loadClass(String className, Class<T> instanceOf) {
- Reject.ifNull(className, instanceOf);
-
- // Make sure that the named class is valid.
- validateClassName(className);
- Class<?> theClass = validateClassInterfaces(className, true);
-
- // Cast it to the required type.
- return theClass.asSubclass(instanceOf);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String normalizeValue(String value) {
- Reject.ifNull(value);
-
- return value.trim();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void validateValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- // Always make sure the name is a valid class name.
- validateClassName(value);
-
- /*
- * If additional validation is enabled then attempt to load the class
- * and check the interfaces that it implements/extends.
- */
- if (options.allowClassValidation()) {
- validateClassInterfaces(value, false);
- }
- }
-
- /*
- * Do some basic checks to make sure the string representation is valid.
- */
- private void validateClassName(String className) {
- String nvalue = className.trim();
- if (!nvalue.matches(CLASS_RE)) {
- throw new IllegalPropertyValueException(this, className);
- }
- }
-
- /*
- * Make sure that named class implements the interfaces named by this
- * definition.
- */
- private Class<?> validateClassInterfaces(String className, boolean initialize) {
- Class<?> theClass = loadClassForValidation(className, className, initialize);
- for (String i : instanceOfInterfaces) {
- Class<?> instanceOfClass = loadClassForValidation(className, i, initialize);
- if (!instanceOfClass.isAssignableFrom(theClass)) {
- throw new IllegalPropertyValueException(this, className);
- }
- }
- return theClass;
- }
-
- private Class<?> loadClassForValidation(String componentClassName, String classToBeLoaded, boolean initialize) {
- try {
- return loadClass(classToBeLoaded.trim(), initialize);
- } catch (ClassNotFoundException e) {
- // If the class cannot be loaded then it is an invalid value.
- throw new IllegalPropertyValueException(this, componentClassName, e);
- } catch (LinkageError e) {
- // If the class cannot be initialized then it is an invalid value.
- throw new IllegalPropertyValueException(this, componentClassName, e);
- }
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/Configuration.java b/opendj-config/src/main/java/org/opends/server/admin/Configuration.java
deleted file mode 100644
index c91ed84..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/Configuration.java
+++ /dev/null
@@ -1,51 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.opendj.ldap.DN;
-
-/**
- * A common base interface for all server managed object configurations.
- */
-public interface Configuration {
-
- /**
- * Gets the DN of the LDAP entry associated with this configuration.
- *
- * @return Returns the DN of the LDAP entry associated with this
- * configuration.
- */
- DN dn();
-
- /**
- * Gets the configuration class associated with this configuration.
- *
- * @return Returns the configuration class associated with this
- * configuration.
- */
- Class<? extends Configuration> configurationClass();
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/ConfigurationClient.java b/opendj-config/src/main/java/org/opends/server/admin/ConfigurationClient.java
deleted file mode 100644
index 21415c2..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/ConfigurationClient.java
+++ /dev/null
@@ -1,78 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.client.ConcurrentModificationException;
-import org.opends.server.admin.client.MissingMandatoryPropertiesException;
-import org.opends.server.admin.client.OperationRejectedException;
-
-/**
- * A common base interface for all managed object configuration clients.
- */
-public interface ConfigurationClient {
-
- /**
- * Get the configuration definition associated with this configuration.
- *
- * @return Returns the configuration definition associated with this
- * configuration.
- */
- ManagedObjectDefinition<? extends ConfigurationClient, ? extends Configuration> definition();
-
- /**
- * Get a property provider view of this configuration.
- *
- * @return Returns a property provider view of this configuration.
- */
- PropertyProvider properties();
-
- /**
- * If this is a new configuration this method will attempt to add it to the
- * server, otherwise it will commit any changes made to this configuration.
- *
- * @throws ManagedObjectAlreadyExistsException
- * If this is a new configuration but it could not be added to
- * the server because it already exists.
- * @throws MissingMandatoryPropertiesException
- * If this configuration contains some mandatory properties
- * which have been left undefined.
- * @throws ConcurrentModificationException
- * If this is a new configuration which is being added to the
- * server but its parent has been removed by another client, or
- * if this configuration is being modified but it has been
- * removed from the server by another client.
- * @throws OperationRejectedException
- * If the server refuses to add or modify this configuration due
- * to some server-side constraint which cannot be satisfied.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- void commit() throws ManagedObjectAlreadyExistsException, MissingMandatoryPropertiesException,
- ConcurrentModificationException, OperationRejectedException, ErrorResultException;
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/Constraint.java b/opendj-config/src/main/java/org/opends/server/admin/Constraint.java
deleted file mode 100644
index 3590439..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/Constraint.java
+++ /dev/null
@@ -1,103 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.opends.server.admin.client.ClientConstraintHandler;
-import org.opends.server.admin.server.ServerConstraintHandler;
-
-/**
- * An interface for enforcing constraints and dependencies between managed
- * objects and their properties. Constraints express relationships between
- * managed objects and their properties, for example:
- * <ul>
- * <li>referential integrity: where one managed object references another a
- * constraint can enforce referential integrity. The constraint can prevent
- * creation of references to non-existent managed objects, and also prevent
- * deletion of referenced managed objects
- * <li>property dependencies: for example, when a boolean property is
- * <code>true</code>, one or more additional properties must be specified. This
- * is useful for features like SSL, which when enabled, requires that various
- * SSL related configuration options are specified
- * <li>property constraints: for example, when an upper limit property must not
- * have a value which is less than the lower limit property.
- * </ul>
- * On the client-side constraints are enforced immediately before a write
- * operation is performed. That is to say, immediately before a new managed
- * object is created, changes to a managed object are applied, or an existing
- * managed object is deleted.
- */
-public abstract class Constraint {
-
- /**
- * Creates a new constraint.
- */
- protected Constraint() {
- // No implementation required.
- }
-
- /**
- * Gets the client-side constraint handlers which will be used to enforce
- * this constraint in client applications. The default implementation is to
- * return an empty set of client constraint handlers.
- *
- * @return Returns the client-side constraint handlers which will be used to
- * enforce this constraint in client applications. The returned
- * collection must not be <code>null</code> but maybe empty
- * (indicating that the constraint can only be enforced on the
- * server-side).
- */
- public Collection<ClientConstraintHandler> getClientConstraintHandlers() {
- return Collections.emptySet();
- }
-
- /**
- * Gets the server-side constraint handlers which will be used to enforce
- * this constraint within the server. The default implementation is to
- * return an empty set of server constraint handlers.
- *
- * @return Returns the server-side constraint handlers which will be used to
- * enforce this constraint within the server. The returned
- * collection must not be <code>null</code> and must not be empty,
- * since constraints must always be enforced on the server.
- */
- public Collection<ServerConstraintHandler> getServerConstraintHandlers() {
- return Collections.emptySet();
- }
-
- /**
- * Initializes this constraint. The default implementation is to do nothing.
- *
- * @throws Exception
- * If this constraint could not be initialized.
- */
- protected void initialize() throws Exception {
- // Default implementation is to do nothing.
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/DNPropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/DNPropertyDefinition.java
deleted file mode 100644
index ca65a04..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/DNPropertyDefinition.java
+++ /dev/null
@@ -1,192 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.EnumSet;
-
-import org.forgerock.opendj.ldap.DN;
-
-/**
- * DN property definition.
- */
-public final class DNPropertyDefinition extends PropertyDefinition<DN> {
-
- // Optional base DN which all valid values must be immediately
- // subordinate to.
- private final DN baseDN;
-
- /**
- * An interface for incrementally constructing DN property definitions.
- */
- public static final class Builder extends AbstractBuilder<DN, DNPropertyDefinition> {
-
- // Optional base DN which all valid values must be immediately
- // subordinate to.
- private DN baseDN = null;
-
- // Private constructor
- private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- super(d, propertyName);
- }
-
- /**
- * Set the base DN which all valid values must be immediately
- * subordinate to. By default there is no based DN.
- *
- * @param baseDN
- * The string representation of the base DN.
- * @throws IllegalArgumentException
- * If the provided string is not a valid DN string
- * representation.
- */
- public void setBaseDN(String baseDN) {
- if (baseDN == null) {
- setBaseDN((DN) null);
- } else {
- // TODO: is it correct to replace server DN.decode by SDK
- // valueOf ?
- setBaseDN(DN.valueOf(baseDN));
- }
- }
-
- /**
- * Set the base DN which all valid values must be immediately
- * subordinate to. By default there is no based DN.
- *
- * @param baseDN
- * The base DN.
- */
- public void setBaseDN(DN baseDN) {
- this.baseDN = baseDN;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected DNPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<DN> defaultBehavior) {
- return new DNPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior, baseDN);
- }
- }
-
- /**
- * Create a DN property definition builder.
- *
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param propertyName
- * The property name.
- * @return Returns the new boolean property definition builder.
- */
- public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- return new Builder(d, propertyName);
- }
-
- // Private constructor.
- private DNPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<DN> defaultBehavior, DN baseDN) {
- super(d, DN.class, propertyName, options, adminAction, defaultBehavior);
- this.baseDN = baseDN;
- }
-
- /**
- * Get the base DN which all valid values must be immediately subordinate
- * to, or <code>null</code> if there is no based DN.
- *
- * @return Returns the base DN which all valid values must be immediately
- * subordinate to.
- */
- public DN getBaseDN() {
- return baseDN;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void validateValue(DN value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- if (baseDN != null) {
- DN parent = value.parent();
-
- if (parent == null) {
- parent = DN.rootDN();
- }
-
- if (!parent.equals(baseDN)) {
- throw new IllegalPropertyValueException(this, value);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public DN decodeValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- try {
- DN dn = DN.valueOf(value);
- validateValue(dn, options);
- return dn;
- } catch (IllegalPropertyValueException e) {
- throw new IllegalPropertyValueStringException(this, value);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
- return v.visitDN(this, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyValueVisitor<R, P> v, DN value, P p) {
- return v.visitDN(this, value, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int compare(DN o1, DN o2) {
- return o1.compareTo(o2);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/DecodingException.java b/opendj-config/src/main/java/org/opends/server/admin/DecodingException.java
deleted file mode 100644
index 8f2353a..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/DecodingException.java
+++ /dev/null
@@ -1,51 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * The requested managed object was found but it could not be decoded.
- */
-public abstract class DecodingException extends OperationsException {
-
- /**
- * Fake serialization ID.
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * Create a decoding exception with a message.
- *
- * @param message
- * The message.
- */
- protected DecodingException(LocalizableMessage message) {
- super(message);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/DefaultBehaviorException.java b/opendj-config/src/main/java/org/opends/server/admin/DefaultBehaviorException.java
deleted file mode 100644
index 60a52b1..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/DefaultBehaviorException.java
+++ /dev/null
@@ -1,61 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-/**
- * This exception is thrown when a property's default values cannot be
- * determined. This can occur in the following situations:
- * <ul>
- * <li>the property has a well-defined set of default values but they are
- * invalid according to the property's syntax
- * <li>the property inherits its default values from another managed object but
- * they could not be retrieved, perhaps because of a communication problem.
- * </ul>
- */
-public class DefaultBehaviorException extends PropertyException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = -2542117466747573053L;
-
- /**
- * Create a new default behavior exception with a cause.
- *
- * @param pd
- * The property definition whose default values could not be
- * determined.
- * @param cause
- * The exception that prevented the default values from being
- * determined.
- */
- public DefaultBehaviorException(PropertyDefinition<?> pd, Throwable cause) {
- super(pd, ERR_DEFAULT_BEHAVIOR_PROPERTY_EXCEPTION.get(pd.getName()), cause);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/DefaultBehaviorProvider.java b/opendj-config/src/main/java/org/opends/server/admin/DefaultBehaviorProvider.java
deleted file mode 100644
index 5cf1848..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/DefaultBehaviorProvider.java
+++ /dev/null
@@ -1,92 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-/**
- * An interface for determining the default behavior of a property. A property
- * exhibits default behavior when it has no values defined. There are four
- * different types of default behavior:
- * <ol>
- * <li>there is no default behavior - e.g. leaving a "description" unset has no
- * side-effects. This default behavior is represented using the
- * {@link UndefinedDefaultBehaviorProvider} implementation
- * <li>the property defaults to one or more real values of the property. This
- * default behavior is represented using the
- * {@link DefinedDefaultBehaviorProvider} implementation
- * <li>the property defaults to some special behavior that cannot be represented
- * using real property values. This default behavior is represented using the
- * {@link AliasDefaultBehaviorProvider} implementation
- * <li>the property inherits its values from property held in another managed
- * object (e.g. the parent managed object). This default behavior is represented
- * using the {@link AbsoluteInheritedDefaultBehaviorProvider} and
- * {@link RelativeInheritedDefaultBehaviorProvider} implementations.
- * </ol>
- * An application can perform actions based on the type of the default behavior
- * by implementing the {@link DefaultBehaviorProviderVisitor} interface.
- *
- * @param <T>
- * The type of values represented by this provider.
- */
-public abstract class DefaultBehaviorProvider<T> {
-
- /**
- * Creates a new default behavior provider.
- */
- protected DefaultBehaviorProvider() {
- // No implementation required.
- }
-
- /**
- * Apply a visitor to this default behavior provider.
- *
- * @param <R>
- * The return type of the visitor's methods.
- * @param <P>
- * The type of the additional parameters to the visitor's
- * methods.
- * @param v
- * The default behavior visitor.
- * @param p
- * Optional additional visitor parameter.
- * @return Returns a result as specified by the visitor.
- */
- public abstract <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p);
-
- /**
- * Performs any run-time initialization required by this default behavior
- * provider. This may include resolving managed object paths and property
- * names.
- * <p>
- * The default implementation is to do nothing.
- *
- * @throws Exception
- * If this default behavior provider could not be initialized.
- */
- protected void initialize() throws Exception {
- // Default implementation is to do nothing.
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/DefaultBehaviorProviderVisitor.java b/opendj-config/src/main/java/org/opends/server/admin/DefaultBehaviorProviderVisitor.java
deleted file mode 100644
index b9bf1cb..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/DefaultBehaviorProviderVisitor.java
+++ /dev/null
@@ -1,104 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-/**
- * A visitor of default behavior providers, in the style of the visitor design
- * pattern. Classes implementing this interface can query default behavior
- * providers in a type-safe manner when the kind of default behavior provider is
- * unknown at compile time. When a visitor is passed to a default behavior
- * provider's accept method, the corresponding visit method most applicable to
- * that default behavior provider is invoked.
- *
- * @param <T>
- * The type of values represented by the default value provider.
- * @param <R>
- * The return type of this visitor's methods. Use
- * {@link java.lang.Void} for visitors that do not need to return
- * results.
- * @param <P>
- * The type of the additional parameter to this visitor's methods.
- * Use {@link java.lang.Void} for visitors that do not need an
- * additional parameter.
- */
-public interface DefaultBehaviorProviderVisitor<T, R, P> {
-
- /**
- * Visit an absolute inherited default behavior provider.
- *
- * @param d
- * The absolute inherited default behavior provider to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- R visitAbsoluteInherited(AbsoluteInheritedDefaultBehaviorProvider<T> d, P p);
-
- /**
- * Visit an alias default behavior provider.
- *
- * @param d
- * The alias default behavior provider to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- R visitAlias(AliasDefaultBehaviorProvider<T> d, P p);
-
- /**
- * Visit an defined default behavior provider.
- *
- * @param d
- * The defined default behavior provider to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- R visitDefined(DefinedDefaultBehaviorProvider<T> d, P p);
-
- /**
- * Visit a relative inherited default behavior provider.
- *
- * @param d
- * The relative inherited default behavior provider to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- R visitRelativeInherited(RelativeInheritedDefaultBehaviorProvider<T> d, P p);
-
- /**
- * Visit an undefined default behavior provider.
- *
- * @param d
- * The undefined default behavior provider to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- R visitUndefined(UndefinedDefaultBehaviorProvider<T> d, P p);
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/DefaultManagedObject.java b/opendj-config/src/main/java/org/opends/server/admin/DefaultManagedObject.java
deleted file mode 100644
index 09ad5c9..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/DefaultManagedObject.java
+++ /dev/null
@@ -1,173 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-/**
- * A default managed object which should be created when a parent managed object
- * is created. Default managed objects are associated with a
- * {@link RelationDefinition}.
- *
- * @param <C>
- * The type of client default managed object configuration.
- * @param <S>
- * The type of server default managed object configuration.
- */
-public final class DefaultManagedObject<C extends ConfigurationClient, S extends Configuration> implements
- PropertyProvider {
-
- /**
- * An interface for incrementally constructing default managed objects.
- *
- * @param <C>
- * The type of client default managed object configuration.
- * @param <S>
- * The type of server default managed object configuration.
- */
- public static final class Builder<C extends ConfigurationClient, S extends Configuration> {
-
- // The default managed object's definition.
- private final ManagedObjectDefinition<C, S> definition;
-
- // The string encoded default managed object's properties.
- private final Map<String, List<String>> propertyStringValues = new HashMap<String, List<String>>();
-
- /**
- * Creates a new default managed object builder.
- *
- * @param definition
- * The default managed object's definition.
- */
- public Builder(ManagedObjectDefinition<C, S> definition) {
- this.definition = definition;
- }
-
- /**
- * Construct a default managed object based on the properties of this
- * builder.
- *
- * @return Returns the new default managed object.
- */
- public DefaultManagedObject<C, S> getInstance() {
- return new DefaultManagedObject<C, S>(definition, propertyStringValues);
- }
-
- /**
- * Defines a property's values for the default managed object.
- *
- * @param name
- * The name of the property.
- * @param values
- * One or more property values in the string representation.
- */
- public void setPropertyValues(String name, String... values) {
- if (values == null || values.length == 0) {
- throw new IllegalArgumentException("null or empty values specified for property " + name);
- }
-
- propertyStringValues.put(name, Arrays.asList(values));
- }
- }
-
- // The default managed object's definition.
- private final ManagedObjectDefinition<C, S> definition;
-
- // The string encoded default managed object's properties.
- private final Map<String, List<String>> propertyStringValues;
-
- // Private constructor.
- private DefaultManagedObject(ManagedObjectDefinition<C, S> definition,
- Map<String, List<String>> propertyStringValues) {
- this.definition = definition;
- this.propertyStringValues = propertyStringValues;
- }
-
- /**
- * Gets the managed object definition associated with this default managed
- * object.
- *
- * @return Returns the managed object definition associated with this
- * default managed object.
- */
- public ManagedObjectDefinition<C, S> getManagedObjectDefinition() {
- return definition;
- }
-
- /**
- * Gets a mutable copy of the set of property values for the specified
- * property.
- *
- * @param <T>
- * The type of the property to be retrieved.
- * @param pd
- * The property to be retrieved.
- * @return Returns a newly allocated set containing a copy of the property's
- * values. An empty set indicates that the property has no values
- * defined and any default behavior is applicable.
- * @throws IllegalArgumentException
- * If the property definition is not associated with this
- * managed object's definition.
- */
- public <T> SortedSet<T> getPropertyValues(PropertyDefinition<T> pd) {
- // Validate the property definition.
- definition.getPropertyDefinition(pd.getName());
-
- // Do a defensive copy.
- SortedSet<T> values = new TreeSet<T>(pd);
- List<String> stringValues = propertyStringValues.get(pd.getName());
- if (stringValues != null) {
- for (String stringValue : stringValues) {
- // TODO : is it correct to have no validation ?
- values.add(pd.decodeValue(stringValue, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS));
- }
- }
- return values;
- }
-
- /**
- * Performs run-time initialization of properties.
- *
- * @throws Exception
- * If this default managed object could not be initialized.
- */
- void initialize() throws Exception {
- // FIXME: it would be nice if we could decode all property values
- // at this point. However this is not possible on the server side
- // since some properties will be determined to be invalid since
- // the schema is not loaded.
-
- // Validate provided property names.
- for (String name : propertyStringValues.keySet()) {
- definition.getPropertyDefinition(name);
- }
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/DefinedDefaultBehaviorProvider.java b/opendj-config/src/main/java/org/opends/server/admin/DefinedDefaultBehaviorProvider.java
deleted file mode 100644
index 3ffc492..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/DefinedDefaultBehaviorProvider.java
+++ /dev/null
@@ -1,79 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-
-/**
- * A default behavior provider which represents a well-defined set of default
- * values. It should be used by properties which have default value(s) which are
- * valid value(s) according to the constraints of the property's definition.
- *
- * @param <T>
- * The type of values represented by this provider.
- */
-public final class DefinedDefaultBehaviorProvider<T> extends DefaultBehaviorProvider<T> {
-
- // The collection of default values.
- private final Collection<String> values;
-
- /**
- * Create a new defined default behavior provider associated with the
- * specified list of values.
- *
- * @param values
- * The list of values (must be non-<code>null</code> and not
- * empty) in their string representation.
- * @throws IllegalArgumentException
- * If the list of values was <code>null</code> or empty.
- */
- public DefinedDefaultBehaviorProvider(String... values) {
- if (values == null || values.length == 0) {
- throw new IllegalArgumentException("Null or empty list of default values");
- }
- this.values = Arrays.asList(values);
- }
-
- /**
- * {@inheritDoc}
- */
- public <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p) {
- return v.visitDefined(this, p);
- }
-
- /**
- * Get a copy of the default values.
- *
- * @return Returns a newly allocated collection containing a copy of the
- * default values.
- */
- public Collection<String> getDefaultValues() {
- return new ArrayList<String>(values);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/DefinitionDecodingException.java b/opendj-config/src/main/java/org/opends/server/admin/DefinitionDecodingException.java
deleted file mode 100644
index df5ab5b..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/DefinitionDecodingException.java
+++ /dev/null
@@ -1,118 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * The requested managed object was found but its type could not be determined.
- */
-public class DefinitionDecodingException extends DecodingException {
-
- /**
- * An enumeration defining the reasons why the definition could not be
- * resolved.
- */
- public static enum Reason {
- /**
- * The managed object could be found but its type resolved to an
- * abstract managed object definition.
- */
- ABSTRACT_TYPE_INFORMATION(),
-
- /**
- * The managed object could be found but did not contain any type
- * information (eg missing object classes in LDAP).
- */
- NO_TYPE_INFORMATION(),
-
- /**
- * The managed object could be found but did not contain the expected
- * type information (eg incorrect object classes in LDAP).
- */
- WRONG_TYPE_INFORMATION();
-
- }
-
- /**
- * Version ID required by serializable classes.
- */
- private static final long serialVersionUID = 3459033551415663416L;
-
- // Create the message.
- private static LocalizableMessage createLocalizableMessage(AbstractManagedObjectDefinition<?, ?> d, Reason reason) {
- LocalizableMessage ufn = d.getUserFriendlyName();
- switch (reason) {
- case NO_TYPE_INFORMATION:
- return ERR_DECODING_EXCEPTION_NO_TYPE_INFO.get(ufn);
- case WRONG_TYPE_INFORMATION:
- return ERR_DECODING_EXCEPTION_WRONG_TYPE_INFO.get(ufn);
- default:
- return ERR_DECODING_EXCEPTION_ABSTRACT_TYPE_INFO.get(ufn);
- }
- }
-
- // The expected type of managed object.
- private final AbstractManagedObjectDefinition<?, ?> d;
-
- // The reason why the definition could not be determined.
- private final Reason reason;
-
- /**
- * Create a new definition decoding exception.
- *
- * @param d
- * The expected type of managed object.
- * @param reason
- * The reason why the definition could not be determined.
- */
- public DefinitionDecodingException(AbstractManagedObjectDefinition<?, ?> d, Reason reason) {
- super(createLocalizableMessage(d, reason));
- this.d = d;
- this.reason = reason;
- }
-
- /**
- * Gets the expected managed object definition.
- *
- * @return Returns the expected managed object definition.
- */
- public AbstractManagedObjectDefinition<?, ?> getManagedObjectDefinition() {
- return d;
- }
-
- /**
- * Gets the reason why the definition could not be determined.
- *
- * @return Returns the reason why the definition could not be determined.
- */
- public Reason getReason() {
- return reason;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/DefinitionResolver.java b/opendj-config/src/main/java/org/opends/server/admin/DefinitionResolver.java
deleted file mode 100644
index 2231d7e..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/DefinitionResolver.java
+++ /dev/null
@@ -1,66 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-/**
- * This interface is used to determine the "best match" managed object
- * definition in a definition hierarchy.
- * <p>
- * Managed object definitions, like Java classes, are arranged in an inheritance
- * hierarchy. When managed objects are decoded (e.g. from LDAP entries), the
- * driver implementation is provided with an
- * "expected managed object definition". However, the actual decoded managed
- * object is often an instance of a sub-type of this definition. For example,
- * when decoding a connection handler managed object, the actual type can never
- * be a connection handler because it is an abstract managed object type.
- * Instead, the decoded managed object must be a "concrete" sub-type: an LDAP
- * connection handler or JMX connection handler.
- * <p>
- * This resolution process is coordinated by the
- * <code>resolveManagedObjectDefinition</code> method in managed object
- * definitions, where it is passed a <code>DefinitionResolver</code>
- * implementation. The <code>resolveManagedObjectDefinition</code> method takes
- * care of recursively descending through the definition hierarchy and invokes
- * the {@link #matches(AbstractManagedObjectDefinition)} method against each
- * potential sub-type. It is the job of the resolver to indicate whether the
- * provided managed object definition is a candidate definition. For example,
- * the LDAP driver provides a definition resolver which uses the decoded LDAP
- * entry's object classes to determine the final appropriate managed object
- * definition.
- */
-public interface DefinitionResolver {
-
- /**
- * Determines whether or not the provided managed object definition matches
- * this resolver's criteria.
- *
- * @param d
- * The managed object definition.
- * @return Returns <code>true</code> if the the provided managed object
- * definition matches this resolver's criteria.
- */
- boolean matches(AbstractManagedObjectDefinition<?, ?> d);
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/DurationPropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/DurationPropertyDefinition.java
deleted file mode 100644
index 5090b99..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/DurationPropertyDefinition.java
+++ /dev/null
@@ -1,526 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.EnumSet;
-
-/**
- * Duration property definition.
- * <p>
- * A duration property definition comprises of:
- * <ul>
- * <li>a <i>base unit</i> - specifies the minimum granularity which can be used
- * to specify duration property values. For example, if the base unit is in
- * seconds then values represented in milliseconds will not be permitted. The
- * default base unit is seconds
- * <li>an optional <i>maximum unit</i> - specifies the biggest duration unit
- * which can be used to specify duration property values. Values presented in
- * units greater than this unit will not be permitted. There is no default
- * maximum unit
- * <li><i>lower limit</i> - specifies the smallest duration permitted by the
- * property. The default lower limit is 0 and can never be less than 0
- * <li>an optional <i>upper limit</i> - specifies the biggest duration permitted
- * by the property. By default, there is no upper limit
- * <li>support for <i>unlimited</i> durations - when permitted users can specify
- * "unlimited" durations. These are represented using the decoded value, -1, or
- * the encoded string value "unlimited". By default, unlimited durations are not
- * permitted. In addition, it is not possible to define an upper limit and
- * support unlimited values.
- * </ul>
- * Decoded values are represented using <code>long</code> values in the base
- * unit defined for the duration property definition.
- */
-public final class DurationPropertyDefinition extends PropertyDefinition<Long> {
-
- // String used to represent unlimited durations.
- private static final String UNLIMITED = "unlimited";
-
- // The base unit for this property definition.
- private final DurationUnit baseUnit;
-
- // The optional maximum unit for this property definition.
- private final DurationUnit maximumUnit;
-
- // The lower limit of the property value in milli-seconds.
- private final long lowerLimit;
-
- // The optional upper limit of the property value in milli-seconds.
- private final Long upperLimit;
-
- // Indicates whether this property allows the use of the "unlimited"
- // duration value (represented using a -1L or the string
- // "unlimited").
- private final boolean allowUnlimited;
-
- /**
- * An interface for incrementally constructing duration property
- * definitions.
- */
- public static final class Builder extends AbstractBuilder<Long, DurationPropertyDefinition> {
-
- // The base unit for this property definition.
- private DurationUnit baseUnit = DurationUnit.SECONDS;
-
- // The optional maximum unit for this property definition.
- private DurationUnit maximumUnit = null;
-
- // The lower limit of the property value in milli-seconds.
- private long lowerLimit = 0L;
-
- // The optional upper limit of the property value in
- // milli-seconds.
- private Long upperLimit = null;
-
- // Indicates whether this property allows the use of the
- // "unlimited" duration value (represented using a -1L or the
- // string "unlimited").
- private boolean allowUnlimited = false;
-
- // Private constructor
- private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- super(d, propertyName);
- }
-
- /**
- * Set the base unit for this property definition (values including
- * limits are specified in this unit). By default a duration property
- * definition uses seconds.
- *
- * @param unit
- * The string representation of the base unit (must not be
- * <code>null</code>).
- * @throws IllegalArgumentException
- * If the provided unit name did not correspond to a known
- * duration unit, or if the base unit is bigger than the
- * maximum unit.
- */
- public final void setBaseUnit(String unit) {
- Reject.ifNull(unit);
-
- setBaseUnit(DurationUnit.getUnit(unit));
- }
-
- /**
- * Set the base unit for this property definition (values including
- * limits are specified in this unit). By default a duration property
- * definition uses seconds.
- *
- * @param unit
- * The base unit (must not be <code>null</code>).
- * @throws IllegalArgumentException
- * If the provided base unit is bigger than the maximum
- * unit.
- */
- public final void setBaseUnit(DurationUnit unit) {
- Reject.ifNull(unit);
-
- // Make sure that the base unit is not bigger than the maximum
- // unit.
- if (maximumUnit != null) {
- if (unit.getDuration() > maximumUnit.getDuration()) {
- throw new IllegalArgumentException("Base unit greater than maximum unit");
- }
- }
-
- this.baseUnit = unit;
- }
-
- /**
- * Set the maximum unit for this property definition. By default there
- * is no maximum unit.
- *
- * @param unit
- * The string representation of the maximum unit, or
- * <code>null</code> if there should not be a maximum unit.
- * @throws IllegalArgumentException
- * If the provided unit name did not correspond to a known
- * duration unit, or if the maximum unit is smaller than the
- * base unit.
- */
- public final void setMaximumUnit(String unit) {
- if (unit == null) {
- setMaximumUnit((DurationUnit) null);
- } else {
- setMaximumUnit(DurationUnit.getUnit(unit));
- }
- }
-
- /**
- * Set the maximum unit for this property definition. By default there
- * is no maximum unit.
- *
- * @param unit
- * The maximum unit, or <code>null</code> if there should not
- * be a maximum unit.
- * @throws IllegalArgumentException
- * If the provided maximum unit is smaller than the base
- * unit.
- */
- public final void setMaximumUnit(DurationUnit unit) {
- if (unit != null) {
- // Make sure that the maximum unit is not smaller than the
- // base unit.
- if (unit.getDuration() < baseUnit.getDuration()) {
- throw new IllegalArgumentException("Maximum unit smaller than base unit");
- }
- }
-
- this.maximumUnit = unit;
- }
-
- /**
- * Set the lower limit in milli-seconds.
- *
- * @param lowerLimit
- * The new lower limit (must be >= 0) in milli-seconds.
- * @throws IllegalArgumentException
- * If a negative lower limit was specified, or the lower
- * limit is greater than the upper limit.
- */
- public final void setLowerLimit(long lowerLimit) {
- if (lowerLimit < 0) {
- throw new IllegalArgumentException("Negative lower limit");
- }
-
- if (upperLimit != null && lowerLimit > upperLimit) {
- throw new IllegalArgumentException("Lower limit greater than upper limit");
- }
-
- this.lowerLimit = lowerLimit;
- }
-
- /**
- * Set the lower limit using a string representation of the limit. If
- * the string does not specify a unit, the current base unit will be
- * used.
- *
- * @param lowerLimit
- * The string representation of the new lower limit.
- * @throws IllegalArgumentException
- * If the lower limit could not be parsed, or if a negative
- * lower limit was specified, or the lower limit is greater
- * than the upper limit.
- */
- public final void setLowerLimit(String lowerLimit) {
- setLowerLimit(DurationUnit.parseValue(lowerLimit, baseUnit));
- }
-
- /**
- * Set the upper limit in milli-seconds.
- *
- * @param upperLimit
- * The new upper limit in milli-seconds, or <code>null</code>
- * if there is no upper limit.
- * @throws IllegalArgumentException
- * If a negative upper limit was specified, or the lower
- * limit is greater than the upper limit or unlimited
- * durations are permitted.
- */
- public final void setUpperLimit(Long upperLimit) {
- if (upperLimit != null) {
- if (upperLimit < 0) {
- throw new IllegalArgumentException("Negative upper limit");
- }
-
- if (lowerLimit > upperLimit) {
- throw new IllegalArgumentException("Lower limit greater than upper limit");
- }
-
- if (allowUnlimited) {
- throw new IllegalArgumentException("Upper limit specified when unlimited durations are permitted");
- }
- }
-
- this.upperLimit = upperLimit;
- }
-
- /**
- * Set the upper limit using a string representation of the limit. If
- * the string does not specify a unit, the current base unit will be
- * used.
- *
- * @param upperLimit
- * The string representation of the new upper limit, or
- * <code>null</code> if there is no upper limit.
- * @throws IllegalArgumentException
- * If the upper limit could not be parsed, or if the lower
- * limit is greater than the upper limit.
- */
- public final void setUpperLimit(String upperLimit) {
- if (upperLimit == null) {
- setUpperLimit((Long) null);
- } else {
- setUpperLimit(DurationUnit.parseValue(upperLimit, baseUnit));
- }
- }
-
- /**
- * Specify whether or not this property definition will allow unlimited
- * values (default is false).
- *
- * @param allowUnlimited
- * <code>true</code> if the property will allow unlimited
- * values, or <code>false</code> otherwise.
- * @throws IllegalArgumentException
- * If unlimited values are to be permitted but there is an
- * upper limit specified.
- */
- public final void setAllowUnlimited(boolean allowUnlimited) {
- if (allowUnlimited && upperLimit != null) {
- throw new IllegalArgumentException("Upper limit specified when unlimited durations are permitted");
- }
-
- this.allowUnlimited = allowUnlimited;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected DurationPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
- String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<Long> defaultBehavior) {
- return new DurationPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior, baseUnit,
- maximumUnit, lowerLimit, upperLimit, allowUnlimited);
- }
- }
-
- /**
- * Create a duration property definition builder.
- *
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param propertyName
- * The property name.
- * @return Returns the new integer property definition builder.
- */
- public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- return new Builder(d, propertyName);
- }
-
- // Private constructor.
- private DurationPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<Long> defaultBehavior, DurationUnit baseUnit, DurationUnit maximumUnit,
- Long lowerLimit, Long upperLimit, boolean allowUnlimited) {
- super(d, Long.class, propertyName, options, adminAction, defaultBehavior);
- this.baseUnit = baseUnit;
- this.maximumUnit = maximumUnit;
- this.lowerLimit = lowerLimit;
- this.upperLimit = upperLimit;
- this.allowUnlimited = allowUnlimited;
- }
-
- /**
- * Get the base unit for this property definition (values including limits
- * are specified in this unit).
- *
- * @return Returns the base unit for this property definition (values
- * including limits are specified in this unit).
- */
- public DurationUnit getBaseUnit() {
- return baseUnit;
- }
-
- /**
- * Get the maximum unit for this property definition if specified.
- *
- * @return Returns the maximum unit for this property definition, or
- * <code>null</code> if there is no maximum unit.
- */
- public DurationUnit getMaximumUnit() {
- return maximumUnit;
- }
-
- /**
- * Get the lower limit in milli-seconds.
- *
- * @return Returns the lower limit in milli-seconds.
- */
- public long getLowerLimit() {
- return lowerLimit;
- }
-
- /**
- * Get the upper limit in milli-seconds.
- *
- * @return Returns the upper limit in milli-seconds, or <code>null</code> if
- * there is no upper limit.
- */
- public Long getUpperLimit() {
- return upperLimit;
- }
-
- /**
- * Determine whether this property allows unlimited durations.
- *
- * @return Returns <code>true</code> if this this property allows unlimited
- * durations.
- */
- public boolean isAllowUnlimited() {
- return allowUnlimited;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void validateValue(Long value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- long nvalue = baseUnit.toMilliSeconds(value);
- if (!allowUnlimited && nvalue < lowerLimit) {
- throw new IllegalPropertyValueException(this, value);
-
- // unlimited allowed
- } else if (nvalue >= 0 && nvalue < lowerLimit) {
- throw new IllegalPropertyValueException(this, value);
- }
-
- if ((upperLimit != null) && (nvalue > upperLimit)) {
- throw new IllegalPropertyValueException(this, value);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String encodeValue(Long value) {
- Reject.ifNull(value);
-
- // Make sure that we correctly encode negative values as
- // "unlimited".
- if (allowUnlimited) {
- if (value < 0) {
- return UNLIMITED;
- }
- }
-
- // Encode the size value using the base unit.
- StringBuilder builder = new StringBuilder();
- builder.append(value);
- builder.append(' ');
- builder.append(baseUnit.toString());
- return builder.toString();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Long decodeValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- // First check for the special "unlimited" value when necessary.
- if (allowUnlimited) {
- if (value.trim().equalsIgnoreCase(UNLIMITED)) {
- return -1L;
- }
- }
-
- // Parse the string representation.
- long ms;
- try {
- ms = DurationUnit.parseValue(value);
- } catch (NumberFormatException e) {
- throw new IllegalPropertyValueStringException(this, value);
- }
-
- // Check the unit is in range - values must not be more granular
- // than the base unit.
- if ((ms % baseUnit.getDuration()) != 0) {
- throw new IllegalPropertyValueStringException(this, value);
- }
-
- // Convert the value a long in the property's required unit.
- Long i = (long) baseUnit.fromMilliSeconds(ms);
- try {
- validateValue(i, options);
- } catch (IllegalPropertyValueException e) {
- throw new IllegalPropertyValueStringException(this, value);
- }
- return i;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
- return v.visitDuration(this, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyValueVisitor<R, P> v, Long value, P p) {
- return v.visitDuration(this, value, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void toString(StringBuilder builder) {
- super.toString(builder);
-
- builder.append(" baseUnit=");
- builder.append(baseUnit);
-
- if (maximumUnit != null) {
- builder.append(" maximumUnit=");
- builder.append(maximumUnit);
- }
-
- builder.append(" lowerLimit=");
- builder.append(lowerLimit);
- builder.append("ms");
-
- if (upperLimit != null) {
- builder.append(" upperLimit=");
- builder.append(upperLimit);
- builder.append("ms");
- }
-
- builder.append(" allowUnlimited=");
- builder.append(allowUnlimited);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int compare(Long o1, Long o2) {
- return o1.compareTo(o2);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/DurationUnit.java b/opendj-config/src/main/java/org/opends/server/admin/DurationUnit.java
deleted file mode 100644
index b7ee1d0..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/DurationUnit.java
+++ /dev/null
@@ -1,349 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * This enumeration defines various duration units.
- */
-public enum DurationUnit {
-
- /**
- * A day unit.
- */
- DAYS((long) 24 * 60 * 60 * 1000, "d", "days"),
-
- /**
- * An hour unit.
- */
- HOURS((long) 60 * 60 * 1000, "h", "hours"),
-
- /**
- * A millisecond unit.
- */
- MILLI_SECONDS(1L, "ms", "milliseconds"),
-
- /**
- * A minute unit.
- */
- MINUTES((long) 60 * 1000, "m", "minutes"),
-
- /**
- * A second unit.
- */
- SECONDS(1000L, "s", "seconds"),
-
- /**
- * A week unit.
- */
- WEEKS((long) 7 * 24 * 60 * 60 * 1000, "w", "weeks");
-
- // A lookup table for resolving a unit from its name.
- private static final Map<String, DurationUnit> NAME_TO_UNIT;
- static {
- NAME_TO_UNIT = new HashMap<String, DurationUnit>();
-
- for (DurationUnit unit : DurationUnit.values()) {
- NAME_TO_UNIT.put(unit.shortName, unit);
- NAME_TO_UNIT.put(unit.longName, unit);
- }
- }
-
- /**
- * Get the unit corresponding to the provided unit name.
- *
- * @param s
- * The name of the unit. Can be the abbreviated or long name and
- * can contain white space and mixed case characters.
- * @return Returns the unit corresponding to the provided unit name.
- * @throws IllegalArgumentException
- * If the provided name did not correspond to a known duration
- * unit.
- */
- public static DurationUnit getUnit(String s) {
- DurationUnit unit = NAME_TO_UNIT.get(s.trim().toLowerCase());
- if (unit == null) {
- throw new IllegalArgumentException("Illegal duration unit \"" + s + "\"");
- }
- return unit;
- }
-
- /**
- * Parse the provided duration string and return its equivalent duration in
- * milliseconds. The duration string must specify the unit e.g. "10s". This
- * method will parse duration string representations produced from the
- * {@link #toString(long)} method. Therefore, a duration can comprise of
- * multiple duration specifiers, for example <code>1d15m25s</code>.
- *
- * @param s
- * The duration string to be parsed.
- * @return Returns the parsed duration in milliseconds.
- * @throws NumberFormatException
- * If the provided duration string could not be parsed.
- * @see #toString(long)
- */
- public static long parseValue(String s) {
- return parseValue(s, null);
- }
-
- /**
- * Parse the provided duration string and return its equivalent duration in
- * milliseconds. This method will parse duration string representations
- * produced from the {@link #toString(long)} method. Therefore, a duration
- * can comprise of multiple duration specifiers, for example
- * <code>1d15m25s</code>.
- *
- * @param s
- * The duration string to be parsed.
- * @param defaultUnit
- * The default unit to use if there is no unit specified in the
- * duration string, or <code>null</code> if the string must
- * always contain a unit.
- * @return Returns the parsed duration in milliseconds.
- * @throws NumberFormatException
- * If the provided duration string could not be parsed.
- * @see #toString(long)
- */
- public static long parseValue(String s, DurationUnit defaultUnit) {
- String ns = s.trim();
- if (ns.length() == 0) {
- throw new NumberFormatException("Empty duration value \"" + s + "\"");
- }
-
- Pattern p1 =
- Pattern.compile("^\\s*((\\d+)\\s*w)?" + "\\s*((\\d+)\\s*d)?" + "\\s*((\\d+)\\s*h)?"
- + "\\s*((\\d+)\\s*m)?" + "\\s*((\\d+)\\s*s)?" + "\\s*((\\d+)\\s*ms)?\\s*$", Pattern.CASE_INSENSITIVE);
- Matcher m1 = p1.matcher(ns);
- if (m1.matches()) {
- // Value must be of the form produced by toString(long).
- String weeks = m1.group(2);
- String days = m1.group(4);
- String hours = m1.group(6);
- String minutes = m1.group(8);
- String seconds = m1.group(10);
- String ms = m1.group(12);
-
- long duration = 0;
-
- try {
- if (weeks != null) {
- duration += Long.valueOf(weeks) * WEEKS.getDuration();
- }
-
- if (days != null) {
- duration += Long.valueOf(days) * DAYS.getDuration();
- }
-
- if (hours != null) {
- duration += Long.valueOf(hours) * HOURS.getDuration();
- }
-
- if (minutes != null) {
- duration += Long.valueOf(minutes) * MINUTES.getDuration();
- }
-
- if (seconds != null) {
- duration += Long.valueOf(seconds) * SECONDS.getDuration();
- }
-
- if (ms != null) {
- duration += Long.valueOf(ms) * MILLI_SECONDS.getDuration();
- }
- } catch (NumberFormatException e) {
- throw new NumberFormatException("Invalid duration value \"" + s + "\"");
- }
-
- return duration;
- } else {
- // Value must be a floating point number followed by a unit.
- Pattern p2 = Pattern.compile("^\\s*(\\d+(\\.\\d+)?)\\s*(\\w+)?\\s*$");
- Matcher m2 = p2.matcher(ns);
-
- if (!m2.matches()) {
- throw new NumberFormatException("Invalid duration value \"" + s + "\"");
- }
-
- // Group 1 is the float.
- double d;
- try {
- d = Double.valueOf(m2.group(1));
- } catch (NumberFormatException e) {
- throw new NumberFormatException("Invalid duration value \"" + s + "\"");
- }
-
- // Group 3 is the unit.
- String unitString = m2.group(3);
- DurationUnit unit;
- if (unitString == null) {
- if (defaultUnit == null) {
- throw new NumberFormatException("Invalid duration value \"" + s + "\"");
- } else {
- unit = defaultUnit;
- }
- } else {
- try {
- unit = getUnit(unitString);
- } catch (IllegalArgumentException e) {
- throw new NumberFormatException("Invalid duration value \"" + s + "\"");
- }
- }
-
- return unit.toMilliSeconds(d);
- }
- }
-
- /**
- * Returns a string representation of the provided duration. The string
- * representation can be parsed using the {@link #parseValue(String)}
- * method. The string representation is comprised of one or more of the
- * number of weeks, days, hours, minutes, seconds, and milliseconds. Here
- * are some examples:
- *
- * <pre>
- * toString(0) // 0 ms
- * toString(999) // 999 ms
- * toString(1000) // 1 s
- * toString(1500) // 1 s 500 ms
- * toString(3650000) // 1 h 50 s
- * toString(3700000) // 1 h 1 m 40 s
- * </pre>
- *
- * @param duration
- * The duration in milliseconds.
- * @return Returns a string representation of the provided duration.
- * @throws IllegalArgumentException
- * If the provided duration is negative.
- * @see #parseValue(String)
- * @see #parseValue(String, DurationUnit)
- */
- public static String toString(long duration) {
- if (duration < 0) {
- throw new IllegalArgumentException("Negative duration " + duration);
- }
-
- if (duration == 0) {
- return "0 ms";
- }
-
- DurationUnit[] units = new DurationUnit[] { WEEKS, DAYS, HOURS, MINUTES, SECONDS, MILLI_SECONDS };
- long remainder = duration;
- StringBuilder builder = new StringBuilder();
- boolean isFirst = true;
- for (DurationUnit unit : units) {
- long count = remainder / unit.getDuration();
- if (count > 0) {
- if (!isFirst) {
- builder.append(' ');
- }
- builder.append(count);
- builder.append(' ');
- builder.append(unit.getShortName());
- remainder = remainder - (count * unit.getDuration());
- isFirst = false;
- }
- }
- return builder.toString();
- }
-
- // The long name of the unit.
- private final String longName;
-
- // The abbreviation of the unit.
- private final String shortName;
-
- // The size of the unit in milliseconds.
- private final long sz;
-
- // Private constructor.
- private DurationUnit(long sz, String shortName, String longName) {
- this.sz = sz;
- this.shortName = shortName;
- this.longName = longName;
- }
-
- /**
- * Converts the specified duration in milliseconds to this unit.
- *
- * @param duration
- * The duration in milliseconds.
- * @return Returns milliseconds in this unit.
- */
- public double fromMilliSeconds(long duration) {
- return ((double) duration / sz);
- }
-
- /**
- * Get the number of milliseconds that this unit represents.
- *
- * @return Returns the number of milliseconds that this unit represents.
- */
- public long getDuration() {
- return sz;
- }
-
- /**
- * Get the long name of this unit.
- *
- * @return Returns the long name of this unit.
- */
- public String getLongName() {
- return longName;
- }
-
- /**
- * Get the abbreviated name of this unit.
- *
- * @return Returns the abbreviated name of this unit.
- */
- public String getShortName() {
- return shortName;
- }
-
- /**
- * Converts the specified duration in this unit to milliseconds.
- *
- * @param duration
- * The duration as a quantity of this unit.
- * @return Returns the number of milliseconds that the duration represents.
- */
- public long toMilliSeconds(double duration) {
- return (long) (sz * duration);
- }
-
- /**
- * {@inheritDoc}
- * <p>
- * This implementation returns the abbreviated name of this duration unit.
- */
- @Override
- public String toString() {
- return shortName;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/EnumPropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/EnumPropertyDefinition.java
deleted file mode 100644
index 53812c9..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/EnumPropertyDefinition.java
+++ /dev/null
@@ -1,227 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.MissingResourceException;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * Enumeration property definition.
- *
- * @param <E>
- * The enumeration that should be used for values of this property
- * definition.
- */
-public final class EnumPropertyDefinition<E extends Enum<E>> extends PropertyDefinition<E> {
-
- /**
- * An interface for incrementally constructing enumeration property
- * definitions.
- *
- * @param <E>
- * The enumeration that should be used for values of this
- * property definition.
- */
- public final static class Builder<E extends Enum<E>> extends AbstractBuilder<E, EnumPropertyDefinition<E>> {
-
- // The enumeration class.
- private Class<E> enumClass;
-
- // Private constructor
- private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- super(d, propertyName);
- this.enumClass = null;
- }
-
- /**
- * Set the enumeration class which should be used for values of this
- * property definition.
- *
- * @param enumClass
- * The enumeration class which should be used for values of
- * this property definition.
- */
- public final void setEnumClass(Class<E> enumClass) {
- this.enumClass = enumClass;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected EnumPropertyDefinition<E> buildInstance(AbstractManagedObjectDefinition<?, ?> d,
- String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<E> defaultBehavior) {
- // Make sure that the enumeration class has been defined.
- if (enumClass == null) {
- throw new IllegalStateException("Enumeration class undefined");
- }
-
- return new EnumPropertyDefinition<E>(d, propertyName, options, adminAction, defaultBehavior, enumClass);
- }
- }
-
- /**
- * Create an enumeration property definition builder.
- *
- * @param <E>
- * The enumeration that should be used for values of this
- * property definition.
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param propertyName
- * The property name.
- * @return Returns the new enumeration property definition builder.
- */
- public static <E extends Enum<E>> Builder<E> createBuilder(AbstractManagedObjectDefinition<?, ?> d,
- String propertyName) {
- return new Builder<E>(d, propertyName);
- }
-
- // The enumeration class.
- private final Class<E> enumClass;
-
- // Map used for decoding values.
- private final Map<String, E> decodeMap;
-
- // Private constructor.
- private EnumPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction, DefaultBehaviorProvider<E> defaultBehavior,
- Class<E> enumClass) {
- super(d, enumClass, propertyName, options, adminAction, defaultBehavior);
- this.enumClass = enumClass;
-
- // Initialize the decoding map.
- this.decodeMap = new HashMap<String, E>();
- for (E value : EnumSet.<E> allOf(enumClass)) {
- String s = value.toString().trim().toLowerCase();
- this.decodeMap.put(s, value);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
- return v.visitEnum(this, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyValueVisitor<R, P> v, E value, P p) {
- return v.visitEnum(this, value, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public E decodeValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- String nvalue = value.trim().toLowerCase();
- E eValue = decodeMap.get(nvalue);
- if (eValue == null) {
- throw new IllegalPropertyValueStringException(this, value);
- } else {
- return eValue;
- }
- }
-
- /**
- * Get the enumeration class used for values of this property.
- *
- * @return Returns the enumeration class used for values of this property.
- */
- public Class<E> getEnumClass() {
- return enumClass;
- }
-
- /**
- * Gets the synopsis of the specified enumeration value of this enumeration
- * property definition in the default locale.
- *
- * @param value
- * The enumeration value.
- * @return Returns the synopsis of the specified enumeration value of this
- * enumeration property definition in the default locale.
- */
- public final LocalizableMessage getValueSynopsis(E value) {
- return getValueSynopsis(Locale.getDefault(), value);
- }
-
- /**
- * Gets the synopsis of the specified enumeration value of this enumeration
- * property definition in the specified locale.
- *
- * @param value
- * The enumeration value.
- * @param locale
- * The locale.
- * @return Returns the synopsis of the specified enumeration value of this
- * enumeration property definition in the specified locale.
- */
- public final LocalizableMessage getValueSynopsis(Locale locale, E value) {
- ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
- String property = "property." + getName() + ".syntax.enumeration.value." + value.toString() + ".synopsis";
- try {
- return resource.getMessage(getManagedObjectDefinition(), property, locale);
- } catch (MissingResourceException e) {
- return null;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String normalizeValue(E value) {
- Reject.ifNull(value);
-
- return value.toString().trim().toLowerCase();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void validateValue(E value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- // No additional validation required.
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/GenericConstraint.java b/opendj-config/src/main/java/org/opends/server/admin/GenericConstraint.java
deleted file mode 100644
index 8a50908..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/GenericConstraint.java
+++ /dev/null
@@ -1,190 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Locale;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.client.ClientConstraintHandler;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.condition.Condition;
-import org.opends.server.admin.server.ServerConstraintHandler;
-import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.spi.ConfigException;
-
-/**
- * A generic constraint which comprises of an underlying condition and a
- * description. The condition must evaluate to <code>true</code> in order for a
- * new managed object to be created or modified.
- */
-public class GenericConstraint extends Constraint {
-
- /**
- * The client-side constraint handler.
- */
- private final class ClientHandler extends ClientConstraintHandler {
-
- // Private constructor.
- private ClientHandler() {
- // No implementation required.
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isAddAcceptable(ManagementContext context, ManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
- if (!condition.evaluate(context, managedObject)) {
- unacceptableReasons.add(getSynopsis());
- return false;
- } else {
- return true;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isModifyAcceptable(ManagementContext context, ManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
- if (!condition.evaluate(context, managedObject)) {
- unacceptableReasons.add(getSynopsis());
- return false;
- } else {
- return true;
- }
- }
-
- };
-
- /**
- * The server-side constraint handler.
- */
- private final class ServerHandler extends ServerConstraintHandler {
-
- // Private constructor.
- private ServerHandler() {
- // No implementation required.
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isUsable(ServerManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ConfigException {
- if (!condition.evaluate(managedObject)) {
- unacceptableReasons.add(getSynopsis());
- return false;
- } else {
- return true;
- }
- }
-
- };
-
- // The client-side constraint handler.
- private final ClientConstraintHandler clientHandler = new ClientHandler();
-
- // The condition associated with this constraint.
- private final Condition condition;
-
- // The managed object definition associated with this constraint.
- private final AbstractManagedObjectDefinition<?, ?> definition;
-
- // The constraint ID.
- private final int id;
-
- // The server-side constraint handler.
- private final ServerConstraintHandler serverHandler = new ServerHandler();
-
- /**
- * Creates a new generic constraint.
- *
- * @param definition
- * The managed object definition associated with this constraint.
- * @param id
- * The constraint ID.
- * @param condition
- * The condition associated with this constraint.
- */
- public GenericConstraint(AbstractManagedObjectDefinition<?, ?> definition, int id, Condition condition) {
- this.definition = definition;
- this.id = id;
- this.condition = condition;
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<ClientConstraintHandler> getClientConstraintHandlers() {
- return Collections.singleton(clientHandler);
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<ServerConstraintHandler> getServerConstraintHandlers() {
- return Collections.singleton(serverHandler);
- }
-
- /**
- * Gets the synopsis of this constraint in the default locale.
- *
- * @return Returns the synopsis of this constraint in the default locale.
- */
- public final LocalizableMessage getSynopsis() {
- return getSynopsis(Locale.getDefault());
- }
-
- /**
- * Gets the synopsis of this constraint in the specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the synopsis of this constraint in the specified locale.
- */
- public final LocalizableMessage getSynopsis(Locale locale) {
- ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
- String property = "constraint." + id + ".synopsis";
- return resource.getMessage(definition, property, locale);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initialize() throws Exception {
- condition.initialize(definition);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/IPAddressMaskPropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/IPAddressMaskPropertyDefinition.java
deleted file mode 100644
index d1b2cf3..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/IPAddressMaskPropertyDefinition.java
+++ /dev/null
@@ -1,133 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.EnumSet;
-
-import org.opends.server.config.spi.ConfigException;
-import org.opends.server.types.AddressMask;
-
-/**
- * IP address mask property definition.
- */
-public final class IPAddressMaskPropertyDefinition extends PropertyDefinition<AddressMask> {
-
- /**
- * An interface for incrementally constructing IP address mask property
- * definitions.
- */
- public static final class Builder extends AbstractBuilder<AddressMask, IPAddressMaskPropertyDefinition> {
-
- // Private constructor
- private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- super(d, propertyName);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected IPAddressMaskPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
- String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<AddressMask> defaultBehavior) {
- return new IPAddressMaskPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior);
- }
-
- }
-
- /**
- * Create a IP address mask property definition builder.
- *
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param propertyName
- * The property name.
- * @return Returns the new IP address mask property definition builder.
- */
- public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- return new Builder(d, propertyName);
- }
-
- // Private constructor.
- private IPAddressMaskPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<AddressMask> defaultBehavior) {
- super(d, AddressMask.class, propertyName, options, adminAction, defaultBehavior);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void validateValue(AddressMask value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- // No additional validation required.
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public AddressMask decodeValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- try {
- return AddressMask.decode(value);
- } catch (ConfigException e) {
- // TODO: it would be nice to throw the cause.
- throw new IllegalPropertyValueStringException(this, value);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
- return v.visitIPAddressMask(this, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyValueVisitor<R, P> v, AddressMask value, P p) {
- return v.visitIPAddressMask(this, value, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int compare(AddressMask o1, AddressMask o2) {
- return o1.toString().compareTo(o2.toString());
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/IPAddressPropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/IPAddressPropertyDefinition.java
deleted file mode 100644
index 1a2cec2..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/IPAddressPropertyDefinition.java
+++ /dev/null
@@ -1,152 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.EnumSet;
-
-/**
- * IP address property definition.
- */
-public final class IPAddressPropertyDefinition extends PropertyDefinition<InetAddress> {
-
- /**
- * An interface for incrementally constructing IP address property
- * definitions.
- */
- public static final class Builder extends AbstractBuilder<InetAddress, IPAddressPropertyDefinition> {
-
- // Private constructor
- private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- super(d, propertyName);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected IPAddressPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
- String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<InetAddress> defaultBehavior) {
- return new IPAddressPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior);
- }
-
- }
-
- /**
- * Create a IP address property definition builder.
- *
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param propertyName
- * The property name.
- * @return Returns the new IP address property definition builder.
- */
- public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- return new Builder(d, propertyName);
- }
-
- // Private constructor.
- private IPAddressPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<InetAddress> defaultBehavior) {
- super(d, InetAddress.class, propertyName, options, adminAction, defaultBehavior);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void validateValue(InetAddress value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- // No additional validation required.
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public InetAddress decodeValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- try {
- return InetAddress.getByName(value);
- } catch (UnknownHostException e) {
- // TODO: it would be nice to throw the cause.
- throw new IllegalPropertyValueStringException(this, value);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String encodeValue(InetAddress value) {
- // We should return the host name if it is available, or the IP
- // address if not.
-
- // Unforunately, there is no InetAddress method for doing this, so
- // we have to resort to hacking at the toString() encoding.
- String s = value.toString();
- int i = s.indexOf('/');
- if (i > 0) {
- // Host address is before the forward slash.
- return s.substring(0, i);
- } else {
- return value.getHostAddress();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
- return v.visitIPAddress(this, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyValueVisitor<R, P> v, InetAddress value, P p) {
- return v.visitIPAddress(this, value, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int compare(InetAddress o1, InetAddress o2) {
- return o1.getHostAddress().compareTo(o2.getHostAddress());
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/IllegalPropertyValueException.java b/opendj-config/src/main/java/org/opends/server/admin/IllegalPropertyValueException.java
deleted file mode 100644
index 87143f7..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/IllegalPropertyValueException.java
+++ /dev/null
@@ -1,90 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- * Portions copyright 2013 ForgeRock AS.
- */
-package org.opends.server.admin;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * Thrown to indicate that a property value was invalid according to its
- * associated property definition.
- */
-public class IllegalPropertyValueException extends PropertyException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = -3145632074909281823L;
-
- // The illegal property value.
- private final Object value;
-
- /**
- * Create a new illegal property value exception.
- *
- * @param pd
- * The property definition.
- * @param value
- * The illegal property value.
- */
- public IllegalPropertyValueException(PropertyDefinition<?> pd, Object value) {
- super(pd, createMessage(pd, value));
- this.value = value;
- }
-
- /**
- * Create a new illegal property value exception.
- *
- * @param pd
- * The property definition.
- * @param value
- * The illegal property value.
- * @param cause
- * The cause.
- */
- public IllegalPropertyValueException(PropertyDefinition<?> pd, Object value, Throwable cause) {
- super(pd, createMessage(pd, value), cause);
- this.value = value;
- }
-
- /**
- * Get the illegal property value that caused the exception.
- *
- * @return Returns the illegal property value.
- */
- public final Object getIllegalValue() {
- return value;
- }
-
- // Create the message.
- private static LocalizableMessage createMessage(PropertyDefinition<?> pd, Object value) {
- PropertyDefinitionUsageBuilder builder = new PropertyDefinitionUsageBuilder(true);
- return ERR_ILLEGAL_PROPERTY_VALUE_EXCEPTION.get(String.valueOf(value), pd.getName(), builder.getUsage(pd));
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/IllegalPropertyValueStringException.java b/opendj-config/src/main/java/org/opends/server/admin/IllegalPropertyValueStringException.java
deleted file mode 100644
index 9d564c9..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/IllegalPropertyValueStringException.java
+++ /dev/null
@@ -1,90 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- * Portions copyright 2013 ForgeRock AS.
- */
-package org.opends.server.admin;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-/**
- * Thrown to indicate that a property value string was invalid according to its
- * associated property definition.
- */
-public class IllegalPropertyValueStringException extends PropertyException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = -3145632074909281823L;
-
- // The illegal property value string.
- private final String value;
-
- /**
- * Create a new illegal property value string exception.
- *
- * @param pd
- * The property definition.
- * @param value
- * The illegal property value string.
- */
- public IllegalPropertyValueStringException(PropertyDefinition<?> pd, String value) {
- super(pd, createMessage(pd, value));
- this.value = value;
- }
-
- /**
- * Create a new illegal property value string exception.
- *
- * @param pd
- * The property definition.
- * @param value
- * The illegal property value string.
- * @param cause
- * The cause.
- */
- public IllegalPropertyValueStringException(PropertyDefinition<?> pd, String value, Throwable cause) {
- super(pd, createMessage(pd, value), cause);
- this.value = value;
- }
-
- /**
- * Get the illegal property value string that caused the exception.
- *
- * @return Returns the illegal property value string.
- */
- public final String getIllegalValueString() {
- return value;
- }
-
- // Create the message.
- private static LocalizableMessage createMessage(PropertyDefinition<?> pd, String value) {
- PropertyDefinitionUsageBuilder builder = new PropertyDefinitionUsageBuilder(true);
- return ERR_ILLEGAL_PROPERTY_VALUE_STRING_EXCEPTION.get(value, pd.getName(), builder.getUsage(pd));
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/InstantiableRelationDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/InstantiableRelationDefinition.java
deleted file mode 100644
index 779ae76..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/InstantiableRelationDefinition.java
+++ /dev/null
@@ -1,260 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * A managed object composite relationship definition which represents a
- * composition of zero or more managed objects.
- *
- * @param <C>
- * The type of client managed object configuration that this relation
- * definition refers to.
- * @param <S>
- * The type of server managed object configuration that this relation
- * definition refers to.
- */
-public final class InstantiableRelationDefinition<C extends ConfigurationClient, S extends Configuration> extends
- RelationDefinition<C, S> {
-
- /**
- * An interface for incrementally constructing instantiable relation
- * definitions.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * relation definition refers to.
- */
- public static final class Builder<C extends ConfigurationClient, S extends Configuration> extends
- AbstractBuilder<C, S, InstantiableRelationDefinition<C, S>> {
-
- // The optional naming property definition.
- private PropertyDefinition<?> namingPropertyDefinition = null;
-
- // The plural name of the relation.
- private final String pluralName;
-
- // The optional default managed objects associated with this
- // instantiable relation definition.
- private final Map<String, DefaultManagedObject<? extends C, ? extends S>> defaultManagedObjects =
- new HashMap<String, DefaultManagedObject<? extends C, ? extends S>>();
-
- /**
- * Creates a new builder which can be used to incrementally build an
- * instantiable relation definition.
- *
- * @param pd
- * The parent managed object definition.
- * @param name
- * The name of the relation.
- * @param pluralName
- * The plural name of the relation.
- * @param cd
- * The child managed object definition.
- */
- public Builder(AbstractManagedObjectDefinition<?, ?> pd, String name, String pluralName,
- AbstractManagedObjectDefinition<C, S> cd) {
- super(pd, name, cd);
- this.pluralName = pluralName;
- }
-
- /**
- * Adds the named default managed object to this instantiable relation
- * definition.
- *
- * @param name
- * The name of the default managed object.
- * @param defaultManagedObject
- * The default managed object.
- */
- public void setDefaultManagedObject(String name,
- DefaultManagedObject<? extends C, ? extends S> defaultManagedObject) {
- this.defaultManagedObjects.put(name, defaultManagedObject);
- }
-
- /**
- * Sets the naming property for the instantiable relation definition.
- *
- * @param namingPropertyDefinition
- * The property of the child managed object definition which
- * should be used for naming, or <code>null</code> if this
- * relation does not use a property for naming.
- */
- public void setNamingProperty(PropertyDefinition<?> namingPropertyDefinition) {
- Reject.ifNull(namingPropertyDefinition);
- this.namingPropertyDefinition = namingPropertyDefinition;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected InstantiableRelationDefinition<C, S> buildInstance(Common<C, S> common) {
- return new InstantiableRelationDefinition<C, S>(common, pluralName, namingPropertyDefinition,
- defaultManagedObjects);
- }
-
- }
-
- // The optional naming property definition.
- private final PropertyDefinition<?> namingPropertyDefinition;
-
- // The plural name of the relation.
- private final String pluralName;
-
- // The optional default managed objects associated with this
- // instantiable relation definition.
- private final Map<String, DefaultManagedObject<? extends C, ? extends S>> defaultManagedObjects;
-
- // Private constructor.
- private InstantiableRelationDefinition(Common<C, S> common, String pluralName,
- PropertyDefinition<?> namingPropertyDefinition,
- Map<String, DefaultManagedObject<? extends C, ? extends S>> defaultManagedObjects) {
- super(common);
- this.pluralName = pluralName;
- this.namingPropertyDefinition = namingPropertyDefinition;
- this.defaultManagedObjects = defaultManagedObjects;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(RelationDefinitionVisitor<R, P> v, P p) {
- return v.visitInstantiable(this, p);
- }
-
- /**
- * Gets the named default managed object associated with this instantiable
- * relation definition.
- *
- * @param name
- * The name of the default managed object.
- * @return Returns the named default managed object.
- * @throws IllegalArgumentException
- * If there is no default managed object associated with the
- * provided name.
- */
- public DefaultManagedObject<? extends C, ? extends S> getDefaultManagedObject(String name) {
- if (!defaultManagedObjects.containsKey(name)) {
- throw new IllegalArgumentException("unrecognized default managed object \"" + name + "\"");
- }
- return defaultManagedObjects.get(name);
- }
-
- /**
- * Gets the names of the default managed objects associated with this
- * instantiable relation definition.
- *
- * @return Returns an unmodifiable set containing the names of the default
- * managed object.
- */
- public Set<String> getDefaultManagedObjectNames() {
- return Collections.unmodifiableSet(defaultManagedObjects.keySet());
- }
-
- /**
- * Get the property of the child managed object definition which should be
- * used for naming children.
- *
- * @return Returns the property of the child managed object definition which
- * should be used for naming, or <code>null</code> if this relation
- * does not use a property for naming.
- */
- public PropertyDefinition<?> getNamingPropertyDefinition() {
- return namingPropertyDefinition;
- }
-
- /**
- * Get the plural name of the relation.
- *
- * @return Returns the plural name of the relation.
- */
- public String getPluralName() {
- return pluralName;
- }
-
- /**
- * Gets the user friendly plural name of this relation definition in the
- * default locale.
- *
- * @return Returns the user friendly plural name of this relation definition
- * in the default locale.
- */
- public LocalizableMessage getUserFriendlyPluralName() {
- return getUserFriendlyPluralName(Locale.getDefault());
- }
-
- /**
- * Gets the user friendly plural name of this relation definition in the
- * specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the user friendly plural name of this relation definition
- * in the specified locale.
- */
- public LocalizableMessage getUserFriendlyPluralName(Locale locale) {
- String property = "relation." + getName() + ".user-friendly-plural-name";
- return ManagedObjectDefinitionI18NResource.getInstance().getMessage(getParentDefinition(), property, locale);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void toString(StringBuilder builder) {
- builder.append("name=");
- builder.append(getName());
- builder.append(" type=collection parent=");
- builder.append(getParentDefinition().getName());
- builder.append(" child=");
- builder.append(getChildDefinition().getName());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initialize() throws Exception {
- for (DefaultManagedObject<?, ?> dmo : defaultManagedObjects.values()) {
- dmo.initialize();
- }
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/IntegerPropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/IntegerPropertyDefinition.java
deleted file mode 100644
index 08104fb..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/IntegerPropertyDefinition.java
+++ /dev/null
@@ -1,337 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.EnumSet;
-import java.util.Locale;
-import java.util.MissingResourceException;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * Integer property definition.
- * <p>
- * All values must be zero or positive and within the lower/upper limit
- * constraints. Support is provided for "unlimited" values. These are
- * represented using a negative value or using the string "unlimited".
- */
-public final class IntegerPropertyDefinition extends PropertyDefinition<Integer> {
-
- // String used to represent unlimited.
- private static final String UNLIMITED = "unlimited";
-
- // The lower limit of the property value.
- private final int lowerLimit;
-
- // The optional upper limit of the property value.
- private final Integer upperLimit;
-
- // Indicates whether this property allows the use of the "unlimited" value
- // (represented using a -1 or the string "unlimited").
- private final boolean allowUnlimited;
-
- /**
- * An interface for incrementally constructing integer property definitions.
- */
- public static final class Builder extends AbstractBuilder<Integer, IntegerPropertyDefinition> {
-
- // The lower limit of the property value.
- private int lowerLimit = 0;
-
- // The optional upper limit of the property value.
- private Integer upperLimit = null;
-
- // Indicates whether this property allows the use of the "unlimited"
- // value
- // (represented using a -1 or the string "unlimited").
- private boolean allowUnlimited = false;
-
- // Private constructor
- private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- super(d, propertyName);
- }
-
- /**
- * Set the lower limit.
- *
- * @param lowerLimit
- * The new lower limit (must be >= 0).
- * @throws IllegalArgumentException
- * If a negative lower limit was specified or the lower
- * limit is greater than the upper limit.
- */
- public final void setLowerLimit(int lowerLimit) {
- if (lowerLimit < 0) {
- throw new IllegalArgumentException("Negative lower limit");
- }
- if (upperLimit != null && lowerLimit > upperLimit) {
- throw new IllegalArgumentException("Lower limit greater than upper limit");
- }
- this.lowerLimit = lowerLimit;
- }
-
- /**
- * Set the upper limit.
- *
- * @param upperLimit
- * The new upper limit or <code>null</code> if there is no
- * upper limit.
- */
- public final void setUpperLimit(Integer upperLimit) {
- if (upperLimit != null) {
- if (upperLimit < 0) {
- throw new IllegalArgumentException("Negative lower limit");
- }
- if (lowerLimit > upperLimit) {
- throw new IllegalArgumentException("Lower limit greater than upper limit");
- }
- }
- this.upperLimit = upperLimit;
- }
-
- /**
- * Specify whether or not this property definition will allow unlimited
- * values (default is false).
- *
- * @param allowUnlimited
- * <code>true</code> if the property will allow unlimited
- * values, or <code>false</code> otherwise.
- */
- public final void setAllowUnlimited(boolean allowUnlimited) {
- this.allowUnlimited = allowUnlimited;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected IntegerPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
- String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<Integer> defaultBehavior) {
- return new IntegerPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior, lowerLimit,
- upperLimit, allowUnlimited);
- }
-
- }
-
- /**
- * Create an integer property definition builder.
- *
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param propertyName
- * The property name.
- * @return Returns the new integer property definition builder.
- */
- public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- return new Builder(d, propertyName);
- }
-
- // Private constructor.
- private IntegerPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<Integer> defaultBehavior, int lowerLimit, Integer upperLimit, boolean allowUnlimited) {
- super(d, Integer.class, propertyName, options, adminAction, defaultBehavior);
- this.lowerLimit = lowerLimit;
- this.upperLimit = upperLimit;
- this.allowUnlimited = allowUnlimited;
- }
-
- /**
- * Get the lower limit.
- *
- * @return Returns the lower limit.
- */
- public int getLowerLimit() {
- return lowerLimit;
- }
-
- /**
- * Get the upper limit.
- *
- * @return Returns the upper limit or <code>null</code> if there is no upper
- * limit.
- */
- public Integer getUpperLimit() {
- return upperLimit;
- }
-
- /**
- * Gets the optional unit synopsis of this integer property definition in
- * the default locale.
- *
- * @return Returns the unit synopsis of this integer property definition in
- * the default locale, or <code>null</code> if there is no unit
- * synopsis.
- */
- public LocalizableMessage getUnitSynopsis() {
- return getUnitSynopsis(Locale.getDefault());
- }
-
- /**
- * Gets the optional unit synopsis of this integer property definition in
- * the specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the unit synopsis of this integer property definition in
- * the specified locale, or <code>null</code> if there is no unit
- * synopsis.
- */
- public LocalizableMessage getUnitSynopsis(Locale locale) {
- ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
- String property = "property." + getName() + ".syntax.integer.unit-synopsis";
- try {
- return resource.getMessage(getManagedObjectDefinition(), property, locale);
- } catch (MissingResourceException e) {
- return null;
- }
- }
-
- /**
- * Determine whether this property allows unlimited values.
- *
- * @return Returns <code>true</code> if this this property allows unlimited
- * values.
- */
- public boolean isAllowUnlimited() {
- return allowUnlimited;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void validateValue(Integer value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- if (!allowUnlimited && value < lowerLimit) {
- throw new IllegalPropertyValueException(this, value);
-
- // unlimited allowed
- } else if (value >= 0 && value < lowerLimit) {
- throw new IllegalPropertyValueException(this, value);
- }
-
- if ((upperLimit != null) && (value > upperLimit)) {
- throw new IllegalPropertyValueException(this, value);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String encodeValue(Integer value) {
- Reject.ifNull(value);
-
- // Make sure that we correctly encode negative values as "unlimited".
- if (allowUnlimited) {
- if (value < 0) {
- return UNLIMITED;
- }
- }
-
- return value.toString();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Integer decodeValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- if (allowUnlimited) {
- if (value.trim().equalsIgnoreCase(UNLIMITED)) {
- return -1;
- }
- }
-
- Integer i;
- try {
- i = Integer.valueOf(value);
- } catch (NumberFormatException e) {
- throw new IllegalPropertyValueStringException(this, value);
- }
-
- try {
- validateValue(i, options);
- } catch (IllegalPropertyValueException e) {
- throw new IllegalPropertyValueStringException(this, value);
- }
-
- return i;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
- return v.visitInteger(this, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyValueVisitor<R, P> v, Integer value, P p) {
- return v.visitInteger(this, value, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void toString(StringBuilder builder) {
- super.toString(builder);
-
- builder.append(" lowerLimit=");
- builder.append(lowerLimit);
-
- if (upperLimit != null) {
- builder.append(" upperLimit=");
- builder.append(upperLimit);
- }
-
- builder.append(" allowUnlimited=");
- builder.append(allowUnlimited);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int compare(Integer o1, Integer o2) {
- return o1.compareTo(o2);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/LDAPProfile.java b/opendj-config/src/main/java/org/opends/server/admin/LDAPProfile.java
deleted file mode 100644
index 16dd326..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/LDAPProfile.java
+++ /dev/null
@@ -1,361 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.MissingResourceException;
-import java.util.NoSuchElementException;
-import java.util.Set;
-
-/**
- * This class is used to map configuration elements to their LDAP schema names.
- * <p>
- * It is possible to augment the core LDAP profile with additional profile
- * mappings at run-time using instances of {@link Wrapper}. This is useful for
- * unit tests which need to add and remove mock components.
- */
-public final class LDAPProfile {
-
- /**
- * LDAP profile wrappers can be used to provide temporary LDAP profile
- * information for components which do not have LDAP profile property files.
- * These components are typically "mock" components used in unit-tests.
- */
- public static abstract class Wrapper {
-
- /**
- * Default constructor.
- */
- protected Wrapper() {
- // No implementation required.
- }
-
- /**
- * Get the name of the LDAP attribute associated with the specified
- * property definition.
- * <p>
- * The default implementation of this method is to return
- * <code>null</code>.
- *
- * @param d
- * The managed object definition.
- * @param pd
- * The property definition.
- * @return Returns the name of the LDAP attribute associated with the
- * specified property definition, or <code>null</code> if the
- * property definition is not handled by this LDAP profile
- * wrapper.
- */
- public String getAttributeName(AbstractManagedObjectDefinition<?, ?> d, PropertyDefinition<?> pd) {
- return null;
- }
-
- /**
- * Gets the LDAP RDN attribute type for child entries of an instantiable
- * relation.
- * <p>
- * The default implementation of this method is to return
- * <code>null</code>.
- *
- * @param r
- * The instantiable relation.
- * @return Returns the LDAP RDN attribute type for child entries of an
- * instantiable relation, or <code>null</code> if the
- * instantiable relation is not handled by this LDAP profile
- * wrapper.
- */
- public String getRelationChildRDNType(InstantiableRelationDefinition<?, ?> r) {
- return null;
- }
-
- /**
- * Gets the LDAP RDN attribute type for child entries of an set
- * relation.
- * <p>
- * The default implementation of this method is to return
- * <code>null</code>.
- *
- * @param r
- * The set relation.
- * @return Returns the LDAP RDN attribute type for child entries of an
- * set relation, or <code>null</code> if the set relation is not
- * handled by this LDAP profile wrapper.
- */
- public String getRelationChildRDNType(SetRelationDefinition<?, ?> r) {
- return null;
- }
-
- /**
- * Get the principle object class associated with the specified
- * definition.
- * <p>
- * The default implementation of this method is to return
- * <code>null</code>.
- *
- * @param d
- * The managed object definition.
- * @return Returns the principle object class associated with the
- * specified definition, or <code>null</code> if the managed
- * object definition is not handled by this LDAP profile
- * wrapper.
- */
- public String getObjectClass(AbstractManagedObjectDefinition<?, ?> d) {
- return null;
- }
-
- /**
- * Get an LDAP RDN sequence associatied with a relation.
- * <p>
- * The default implementation of this method is to return
- * <code>null</code>.
- *
- * @param r
- * The relation.
- * @return Returns the LDAP RDN sequence associatied with a relation, or
- * <code>null</code> if the relation is not handled by this LDAP
- * profile wrapper.
- */
- public String getRelationRDNSequence(RelationDefinition<?, ?> r) {
- return null;
- }
- }
-
- // The singleton instance.
- private static final LDAPProfile INSTANCE = new LDAPProfile();
-
- /**
- * Get the global LDAP profile instance.
- *
- * @return Returns the global LDAP profile instance.
- */
- public static LDAPProfile getInstance() {
- return INSTANCE;
- }
-
- // The list of profile wrappers.
- private final LinkedList<Wrapper> profiles = new LinkedList<Wrapper>();;
-
- // The LDAP profile property table.
- private final ManagedObjectDefinitionResource resource = ManagedObjectDefinitionResource.createForProfile("ldap");
-
- // Prevent construction.
- private LDAPProfile() {
- // No implementation required.
- }
-
- /**
- * Get the name of the LDAP attribute associated with the specified property
- * definition.
- *
- * @param d
- * The managed object definition.
- * @param pd
- * The property definition.
- * @return Returns the name of the LDAP attribute associated with the
- * specified property definition.
- * @throws MissingResourceException
- * If the LDAP profile properties file associated with the
- * provided managed object definition could not be loaded.
- */
- public String getAttributeName(AbstractManagedObjectDefinition<?, ?> d, PropertyDefinition<?> pd) {
- for (Wrapper profile : profiles) {
- String attributeName = profile.getAttributeName(d, pd);
- if (attributeName != null) {
- return attributeName;
- }
- }
- return resource.getString(d, "attribute." + pd.getName());
- }
-
- /**
- * Gets the LDAP RDN attribute type for child entries of an instantiable
- * relation.
- *
- * @param r
- * The instantiable relation.
- * @return Returns the LDAP RDN attribute type for child entries of an
- * instantiable relation.
- * @throws MissingResourceException
- * If the LDAP profile properties file associated with the
- * provided managed object definition could not be loaded.
- */
- public String getRelationChildRDNType(InstantiableRelationDefinition<?, ?> r) {
- if (r.getNamingPropertyDefinition() != null) {
- // Use the attribute associated with the naming property.
- return getAttributeName(r.getChildDefinition(), r.getNamingPropertyDefinition());
- } else {
- for (Wrapper profile : profiles) {
- String rdnType = profile.getRelationChildRDNType(r);
- if (rdnType != null) {
- return rdnType;
- }
- }
- return resource.getString(r.getParentDefinition(), "naming-attribute." + r.getName());
- }
- }
-
- /**
- * Gets the LDAP object classes associated with an instantiable or set
- * relation branch. The branch is the parent entry of child managed objects.
- *
- * @param r
- * The instantiable or set relation.
- * @return Returns the LDAP object classes associated with an instantiable
- * or set relation branch.
- */
- public List<String> getRelationObjectClasses(RelationDefinition<?, ?> r) {
- return Arrays.asList(new String[] { "top", "ds-cfg-branch" });
- }
-
- /**
- * Gets the LDAP RDN attribute type for child entries of an set relation.
- *
- * @param r
- * The set relation.
- * @return Returns the LDAP RDN attribute type for child entries of an set
- * relation.
- * @throws MissingResourceException
- * If the LDAP profile properties file associated with the
- * provided managed object definition could not be loaded.
- */
- public String getRelationChildRDNType(SetRelationDefinition<?, ?> r) {
- for (Wrapper profile : profiles) {
- String rdnType = profile.getRelationChildRDNType(r);
- if (rdnType != null) {
- return rdnType;
- }
- }
- return resource.getString(r.getParentDefinition(), "naming-attribute." + r.getName());
- }
-
- /**
- * Get the principle object class associated with the specified definition.
- *
- * @param d
- * The managed object definition.
- * @return Returns the principle object class associated with the specified
- * definition.
- * @throws MissingResourceException
- * If the LDAP profile properties file associated with the
- * provided managed object definition could not be loaded.
- */
- public String getObjectClass(AbstractManagedObjectDefinition<?, ?> d) {
- if (d.isTop()) {
- return "top";
- }
-
- for (Wrapper profile : profiles) {
- String objectClass = profile.getObjectClass(d);
- if (objectClass != null) {
- return objectClass;
- }
- }
- return resource.getString(d, "objectclass");
- }
-
- /**
- * Get all the object classes associated with the specified definition.
- * <p>
- * The returned list is ordered such that the uppermost object classes
- * appear first (e.g. top).
- *
- * @param d
- * The managed object definition.
- * @return Returns all the object classes associated with the specified
- * definition.
- * @throws MissingResourceException
- * If the LDAP profile properties file associated with the
- * provided managed object definition could not be loaded.
- */
- public List<String> getObjectClasses(AbstractManagedObjectDefinition<?, ?> d) {
- LinkedList<String> objectClasses = new LinkedList<String>();
- Set<String> s = new HashSet<String>();
-
- // Add the object classes from the parent hierarchy.
- while (d != null) {
- String oc = getObjectClass(d);
- if (!s.contains(oc)) {
- objectClasses.addFirst(oc);
- s.add(oc);
- }
- d = d.getParent();
- }
-
- if (!s.contains("top")) {
- objectClasses.addFirst("top");
- }
-
- return objectClasses;
- }
-
- /**
- * Get an LDAP RDN sequence associatied with a relation.
- *
- * @param r
- * The relation.
- * @return Returns the LDAP RDN sequence associatied with a relation.
- * @throws MissingResourceException
- * If the LDAP profile properties file associated with the
- * provided managed object definition could not be loaded.
- */
- public String getRelationRDNSequence(RelationDefinition<?, ?> r) {
- for (Wrapper profile : profiles) {
- String rdnSequence = profile.getRelationRDNSequence(r);
- if (rdnSequence != null) {
- return rdnSequence;
- }
- }
- return resource.getString(r.getParentDefinition(), "rdn." + r.getName());
- }
-
- /**
- * Removes the last LDAP profile wrapper added using
- * {@link #pushWrapper(org.opends.server.admin.LDAPProfile.Wrapper)}.
- *
- * @throws NoSuchElementException
- * If there are no LDAP profile wrappers.
- */
- public void popWrapper() {
- profiles.removeFirst();
- }
-
- /**
- * Decorates the core LDAP profile with the provided LDAP profile wrapper.
- * All profile requests will be directed to the provided wrapper before
- * being forwarded onto the core profile if the request could not be
- * satisfied.
- *
- * @param wrapper
- * The LDAP profile wrapper.
- */
- public void pushWrapper(Wrapper wrapper) {
- profiles.addFirst(wrapper);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectAlreadyExistsException.java b/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectAlreadyExistsException.java
deleted file mode 100644
index 3f34310..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectAlreadyExistsException.java
+++ /dev/null
@@ -1,47 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-/**
- * A managed object could not be created because there is an existing managed
- * object with the same name.
- */
-public final class ManagedObjectAlreadyExistsException extends OperationsException {
-
- /**
- * Version ID required by serializable classes.
- */
- private static final long serialVersionUID = -2344653674171609366L;
-
- /**
- * Create a managed object already exists exception.
- */
- public ManagedObjectAlreadyExistsException() {
- super(ERR_MANAGED_OBJECT_ALREADY_EXISTS_EXCEPTION.get());
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectDefinition.java
deleted file mode 100644
index bc33ef7..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectDefinition.java
+++ /dev/null
@@ -1,88 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.server.ServerManagedObject;
-
-/**
- * Defines the structure of a managed object which can be instantiated.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * definition represents.
- * @param <S>
- * The type of server managed object configuration that this
- * definition represents.
- */
-public abstract class ManagedObjectDefinition<C extends ConfigurationClient, S extends Configuration> extends
- AbstractManagedObjectDefinition<C, S> {
-
- /**
- * Create a new managed object definition.
- *
- * @param name
- * The name of the definition.
- * @param parent
- * The parent definition, or <code>null</code> if there is no
- * parent.
- */
- protected ManagedObjectDefinition(String name, AbstractManagedObjectDefinition<? super C, ? super S> parent) {
- super(name, parent);
- }
-
- /**
- * Creates a client configuration view of the provided managed object.
- * Modifications made to the underlying managed object will be reflected in
- * the client configuration view and vice versa.
- *
- * @param managedObject
- * The managed object.
- * @return Returns a client configuration view of the provided managed
- * object.
- */
- public abstract C createClientConfiguration(ManagedObject<? extends C> managedObject);
-
- /**
- * Creates a server configuration view of the provided server managed
- * object.
- *
- * @param managedObject
- * The server managed object.
- * @return Returns a server configuration view of the provided server
- * managed object.
- */
- public abstract S createServerConfiguration(ServerManagedObject<? extends S> managedObject);
-
- /**
- * Gets the server configuration class instance associated with this managed
- * object definition.
- *
- * @return Returns the server configuration class instance associated with
- * this managed object definition.
- */
- public abstract Class<S> getServerConfigurationClass();
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectDefinitionI18NResource.java b/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectDefinitionI18NResource.java
deleted file mode 100644
index 8c64aed..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectDefinitionI18NResource.java
+++ /dev/null
@@ -1,291 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * A class for retrieving internationalized resource properties associated with
- * a managed object definition.
- * <p>
- * I18N resource properties are not available for the {@link TopCfgDefn}.
- */
-public final class ManagedObjectDefinitionI18NResource {
-
- // Application-wide set of instances.
- private static final Map<String, ManagedObjectDefinitionI18NResource> INSTANCES =
- new HashMap<String, ManagedObjectDefinitionI18NResource>();
-
- /**
- * Gets the internationalized resource instance which can be used to
- * retrieve the localized descriptions for the managed objects and their
- * associated properties and relations.
- *
- * @return Returns the I18N resource instance.
- */
- public static ManagedObjectDefinitionI18NResource getInstance() {
- return getInstance("admin.messages");
- }
-
- /**
- * Gets the internationalized resource instance for the named profile.
- *
- * @param profile
- * The name of the profile.
- * @return Returns the I18N resource instance for the named profile.
- */
- public static ManagedObjectDefinitionI18NResource getInstanceForProfile(String profile) {
- return getInstance("admin.profiles." + profile);
- }
-
- // Get a resource instance creating it if necessary.
- private synchronized static ManagedObjectDefinitionI18NResource getInstance(String prefix) {
- ManagedObjectDefinitionI18NResource instance = INSTANCES.get(prefix);
-
- if (instance == null) {
- instance = new ManagedObjectDefinitionI18NResource(prefix);
- INSTANCES.put(prefix, instance);
- }
-
- return instance;
- }
-
- // Mapping from definition to locale-based resource bundle.
- private final Map<AbstractManagedObjectDefinition<?, ?>, Map<Locale, ResourceBundle>> resources;
-
- // The resource name prefix.
- private final String prefix;
-
- // Private constructor.
- private ManagedObjectDefinitionI18NResource(String prefix) {
- this.resources = new HashMap<AbstractManagedObjectDefinition<?, ?>, Map<Locale, ResourceBundle>>();
- this.prefix = prefix;
- }
-
- /**
- * Get the internationalized message associated with the specified key in
- * the default locale.
- *
- * @param d
- * The managed object definition.
- * @param key
- * The resource key.
- * @return Returns the internationalized message associated with the
- * specified key in the default locale.
- * @throws MissingResourceException
- * If the key was not found.
- * @throws UnsupportedOperationException
- * If the provided managed object definition was the
- * {@link TopCfgDefn}.
- */
- public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, String key) {
- return getMessage(d, key, Locale.getDefault(), (String[]) null);
- }
-
- /**
- * Get the internationalized message associated with the specified key and
- * locale.
- *
- * @param d
- * The managed object definition.
- * @param key
- * The resource key.
- * @param locale
- * The locale.
- * @return Returns the internationalized message associated with the
- * specified key and locale.
- * @throws MissingResourceException
- * If the key was not found.
- * @throws UnsupportedOperationException
- * If the provided managed object definition was the
- * {@link TopCfgDefn}.
- */
- public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, String key, Locale locale) {
- return getMessage(d, key, locale, (String[]) null);
- }
-
- /**
- * Get the parameterized internationalized message associated with the
- * specified key and locale.
- *
- * @param d
- * The managed object definition.
- * @param key
- * The resource key.
- * @param locale
- * The locale.
- * @param args
- * Arguments that should be inserted into the retrieved message.
- * @return Returns the internationalized message associated with the
- * specified key and locale.
- * @throws MissingResourceException
- * If the key was not found.
- * @throws UnsupportedOperationException
- * If the provided managed object definition was the
- * {@link TopCfgDefn}.
- */
- public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, String key, Locale locale,
- String... args) {
- ResourceBundle resource = getResourceBundle(d, locale);
-
- // TODO: use message framework directly
- if (args == null) {
- return LocalizableMessage.raw(resource.getString(key));
- } else {
- return LocalizableMessage.raw(resource.getString(key), (Object[]) args);
- }
- }
-
- /**
- * Get the parameterized internationalized message associated with the
- * specified key in the default locale.
- *
- * @param d
- * The managed object definition.
- * @param key
- * The resource key.
- * @param args
- * Arguments that should be inserted into the retrieved message.
- * @return Returns the internationalized message associated with the
- * specified key in the default locale.
- * @throws MissingResourceException
- * If the key was not found.
- * @throws UnsupportedOperationException
- * If the provided managed object definition was the
- * {@link TopCfgDefn}.
- */
- public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, String key, String... args) {
- return getMessage(d, key, Locale.getDefault(), args);
- }
-
- /**
- * Forcefully removes any resource bundles associated with the provided
- * definition and using the default locale.
- * <p>
- * This method is intended for internal testing only.
- *
- * @param d
- * The managed object definition.
- */
- synchronized void removeResourceBundle(AbstractManagedObjectDefinition<?, ?> d) {
- removeResourceBundle(d, Locale.getDefault());
- }
-
- /**
- * Forcefully removes any resource bundles associated with the provided
- * definition and locale.
- * <p>
- * This method is intended for internal testing only.
- *
- * @param d
- * The managed object definition.
- * @param locale
- * The locale.
- */
- synchronized void removeResourceBundle(AbstractManagedObjectDefinition<?, ?> d, Locale locale) {
- // Get the locale resource mapping.
- Map<Locale, ResourceBundle> map = resources.get(d);
- if (map != null) {
- map.remove(locale);
- }
- }
-
- /**
- * Forcefully adds the provided resource bundle to this I18N resource for
- * the default locale.
- * <p>
- * This method is intended for internal testing only.
- *
- * @param d
- * The managed object definition.
- * @param resoureBundle
- * The resource bundle to be used.
- */
- synchronized void setResourceBundle(AbstractManagedObjectDefinition<?, ?> d, ResourceBundle resoureBundle) {
- setResourceBundle(d, Locale.getDefault(), resoureBundle);
- }
-
- /**
- * Forcefully adds the provided resource bundle to this I18N resource.
- * <p>
- * This method is intended for internal testing only.
- *
- * @param d
- * The managed object definition.
- * @param locale
- * The locale.
- * @param resoureBundle
- * The resource bundle to be used.
- */
- synchronized void setResourceBundle(AbstractManagedObjectDefinition<?, ?> d, Locale locale,
- ResourceBundle resoureBundle) {
- // First get the locale-resource mapping, creating it if
- // necessary.
- Map<Locale, ResourceBundle> map = resources.get(d);
- if (map == null) {
- map = new HashMap<Locale, ResourceBundle>();
- resources.put(d, map);
- }
-
- // Add the resource bundle.
- map.put(locale, resoureBundle);
- }
-
- // Retrieve the resource bundle associated with a managed object and
- // locale, lazily loading it if necessary.
- private synchronized ResourceBundle getResourceBundle(AbstractManagedObjectDefinition<?, ?> d, Locale locale) {
- if (d.isTop()) {
- throw new UnsupportedOperationException("I18n resources are not available for the "
- + "Top configuration definition");
- }
-
- // First get the locale-resource mapping, creating it if
- // necessary.
- Map<Locale, ResourceBundle> map = resources.get(d);
- if (map == null) {
- map = new HashMap<Locale, ResourceBundle>();
- resources.put(d, map);
- }
-
- // Now get the resource based on the locale, loading it if
- // necessary.
- ResourceBundle resourceBundle = map.get(locale);
- if (resourceBundle == null) {
- String baseName = prefix + "." + d.getClass().getName();
- resourceBundle =
- ResourceBundle.getBundle(baseName, locale, ClassLoaderProvider.getInstance().getClassLoader());
- map.put(locale, resourceBundle);
- }
-
- return resourceBundle;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectDefinitionResource.java b/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectDefinitionResource.java
deleted file mode 100644
index 92ddb05..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectDefinitionResource.java
+++ /dev/null
@@ -1,130 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.Properties;
-
-/**
- * A class for retrieving non-internationalized resource properties associated
- * with a managed object definition.
- * <p>
- * Resource properties are not available for the {@link TopCfgDefn}.
- */
-public final class ManagedObjectDefinitionResource {
-
- // Mapping from definition to property tables.
- private final Map<AbstractManagedObjectDefinition<?, ?>, Properties> properties;
-
- // The resource name prefix.
- private final String prefix;
-
- /**
- * Creates a new resource instance for the named profile.
- *
- * @param profile
- * The name of the profile.
- * @return Returns the resource instance for the named profile.
- */
- public static ManagedObjectDefinitionResource createForProfile(String profile) {
- return new ManagedObjectDefinitionResource("admin.profiles." + profile);
- }
-
- // Private constructor.
- private ManagedObjectDefinitionResource(String prefix) {
- this.properties = new HashMap<AbstractManagedObjectDefinition<?, ?>, Properties>();
- this.prefix = prefix;
- }
-
- /**
- * Get the resource value associated with the specified key.
- *
- * @param d
- * The managed object definition.
- * @param key
- * The resource key.
- * @return Returns the resource value associated with the specified key.
- * @throws MissingResourceException
- * If the key was not found.
- * @throws UnsupportedOperationException
- * If the provided managed object definition was the
- * {@link TopCfgDefn}.
- */
- public String getString(AbstractManagedObjectDefinition<?, ?> d, String key) {
- if (d.isTop()) {
- throw new UnsupportedOperationException("Profile resources are not available for the "
- + "Top configuration definition");
- }
-
- Properties p = getProperties(d);
- String result = p.getProperty(key);
-
- if (result == null) {
- String baseName = prefix + "." + d.getClass().getName();
- String path = baseName.replace('.', '/') + ".properties";
-
- throw new MissingResourceException("Can't find resource " + path + ", key " + key, baseName, key);
- }
-
- return result;
- }
-
- // Retrieve the properties table associated with a managed object,
- // lazily loading it if necessary.
- private synchronized Properties getProperties(AbstractManagedObjectDefinition<?, ?> d) {
- Properties p = properties.get(d);
-
- if (p == null) {
- // Load the resource file.
- String baseName = prefix + "." + d.getClass().getName();
- String path = baseName.replace('.', '/') + ".properties";
- InputStream stream = ClassLoaderProvider.getInstance().getClassLoader().getResourceAsStream(path);
-
- if (stream == null) {
- throw new MissingResourceException("Can't find resource " + path, baseName, "");
- }
-
- p = new Properties();
- try {
- p.load(new BufferedInputStream(stream));
- } catch (IOException e) {
- throw new MissingResourceException("Can't load resource " + path + " due to IO exception: "
- + e.getMessage(), baseName, "");
- }
-
- // Cache the resource.
- properties.put(d, p);
- }
-
- return p;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectNotFoundException.java b/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectNotFoundException.java
deleted file mode 100644
index 79ff0a5..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectNotFoundException.java
+++ /dev/null
@@ -1,56 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-/**
- * The requested managed object could not be located.
- */
-public class ManagedObjectNotFoundException extends OperationsException {
-
- /**
- * Version ID required by serializable classes.
- */
- private static final long serialVersionUID = -477551786551892978L;
-
- /**
- * Create a managed object not found exception.
- */
- public ManagedObjectNotFoundException() {
- super(ERR_MANAGED_OBJECT_NOT_FOUND_EXCEPTION.get());
- }
-
- /**
- * Create a managed object not found exception with the specified cause.
- *
- * @param cause
- * The cause of this exception.
- */
- public ManagedObjectNotFoundException(Throwable cause) {
- super(ERR_MANAGED_OBJECT_NOT_FOUND_EXCEPTION.get(), cause);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectOption.java b/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectOption.java
deleted file mode 100644
index 3206eca..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectOption.java
+++ /dev/null
@@ -1,46 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-/**
- * This enumeration contains various options that can be associated with managed
- * object definitions.
- */
-public enum ManagedObjectOption {
- /**
- * Use this option to identify managed object types which should be
- * considered as advanced and should not be exposed by default in client
- * applications.
- */
- ADVANCED,
-
- /**
- * Use this option to identify managed object types which must not be
- * directly exposed in client applications.
- */
- HIDDEN;
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectPath.java b/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectPath.java
deleted file mode 100644
index 4dae1ab..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectPath.java
+++ /dev/null
@@ -1,1186 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- * Portions Copyright 2011 ForgeRock AS
- */
-
-package org.opends.server.admin;
-
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.forgerock.opendj.admin.client.RootCfgClient;
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.admin.server.RootCfg;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.RDN;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.opends.server.core.DirectoryServer;
-
-/**
- * A path which can be used to determine the location of a managed object
- * instance.
- * <p>
- * A path is made up of zero or more elements each of which represents a managed
- * object. Managed objects are arranged hierarchically with the root
- * configuration being the top-most managed object. Elements are ordered such
- * that the root configuration managed object is the first element and
- * subsequent elements representing managed objects further down the hierarchy.
- * <p>
- * A path can be encoded into a string representation using the
- * {@link #toString()} and {@link #toString(StringBuilder)} methods. Conversely,
- * this string representation can be parsed using the {@link #valueOf(String)}
- * method.
- * <p>
- * The string representation of a managed object path is similar in principle to
- * a UNIX file-system path and is defined as follows:
- * <ul>
- * <li>the root element is represented by the string <code>/</code>
- * <li>subordinate elements are arranged in big-endian order separated by a
- * forward slash <code>/</code> character
- * <li>an element representing a managed object associated with a one-to-one
- * (singleton) or one-to-zero-or-one (optional) relation has the form
- * <code>relation=</code><i>relation</i> <code>[+type=</code><i>definition</i>
- * <code>]</code>, where <i>relation</i> is the name of the relation and
- * <i>definition</i> is the name of the referenced managed object's definition
- * if required (usually this is implied by the relation itself)
- * <li>an element representing a managed object associated with a one-to-many
- * (instantiable) relation has the form <code>relation=</code><i>relation</i>
- * <code>[+type=</code> <i>definition</i><code>]</code><code>+name=</code>
- * <i>name</i>, where <i>relation</i> is the name of the relation and
- * <i>definition</i> is the name of the referenced managed object's definition
- * if required (usually this is implied by the relation itself), and <i>name</i>
- * is the name of the managed object instance
- * <li>an element representing a managed object associated with a one-to-many
- * (set) relation has the form <code>relation=</code><i>relation</i>
- * <code>[+type=</code> <i>definition</i><code>]</code>, where <i>relation</i>
- * is the name of the relation and <i>definition</i> is the name of the
- * referenced managed object's definition.
- * </ul>
- * The following path string representation identifies a connection handler
- * instance (note that the <code>type</code> is not specified indicating that
- * the path identifies a connection handler called <i>my handler</i> which can
- * be any type of connection handler):
- *
- * <pre>
- * /relation=connection-handler+name=my handler
- * </pre>
- *
- * If the identified connection handler must be an LDAP connection handler then
- * the above path should include the <code>type</code>:
- *
- * <pre>
- * /relation=connection-handler+type=ldap-connection-handler+name=my handler
- * </pre>
- *
- * The final example identifies the global configuration:
- *
- * <pre>
- * /relation=global-configuration
- * </pre>
- *
- * @param <C>
- * The type of client managed object configuration that this path
- * references.
- * @param <S>
- * The type of server managed object configuration that this path
- * references.
- */
-public final class ManagedObjectPath<C extends ConfigurationClient, S extends Configuration> {
-
- /**
- * A serialize which is used to generate the toDN representation.
- */
- private static final class DNSerializer implements ManagedObjectPathSerializer {
-
- // The current DN.
- private DN dn;
-
- // The LDAP profile.
- private final LDAPProfile profile;
-
- // Create a new DN builder.
- private DNSerializer() {
- this.dn = DN.rootDN();
- this.profile = LDAPProfile.getInstance();
- }
-
- /**
- * {@inheritDoc}
- */
- public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
- InstantiableRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d,
- String name) {
- // Add the RDN sequence representing the relation.
- appendManagedObjectPathElement(r);
-
- // Now add the single RDN representing the named instance.
- String type = profile.getRelationChildRDNType(r);
- AttributeType attrType = DirectoryServer.getAttributeType(type.toLowerCase(), true);
- dn = dn.child(new RDN(attrType, name));
- }
-
- /**
- * {@inheritDoc}
- */
- public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
- SetRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
- // Add the RDN sequence representing the relation.
- appendManagedObjectPathElement(r);
-
- // Now add the single RDN representing the instance.
- String type = profile.getRelationChildRDNType(r);
- AttributeType attrType = DirectoryServer.getAttributeType(type.toLowerCase(), true);
- dn = dn.child(new RDN(attrType, d.getName()));
- }
-
- /**
- * {@inheritDoc}
- */
- public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
- OptionalRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
- // Add the RDN sequence representing the relation.
- appendManagedObjectPathElement(r);
- }
-
- /**
- * {@inheritDoc}
- */
- public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
- SingletonRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
- // Add the RDN sequence representing the relation.
- appendManagedObjectPathElement(r);
- }
-
- // Appends the RDN sequence representing the provided relation.
- private void appendManagedObjectPathElement(RelationDefinition<?, ?> r) {
- DN localName = DN.valueOf(profile.getRelationRDNSequence(r));
- dn = dn.child(localName);
- }
-
- // Gets the serialized DN value.
- private DN toDN() {
- return dn;
- }
- }
-
- /**
- * Abstract path element.
- */
- private static abstract class Element<C extends ConfigurationClient, S extends Configuration> {
-
- // The type of managed object referenced by this element.
- private final AbstractManagedObjectDefinition<C, S> definition;
-
- /**
- * Protected constructor.
- *
- * @param definition
- * The type of managed object referenced by this element.
- */
- protected Element(AbstractManagedObjectDefinition<C, S> definition) {
- this.definition = definition;
- }
-
- /**
- * Get the managed object definition associated with this element.
- *
- * @return Returns the managed object definition associated with this
- * element.
- */
- public final AbstractManagedObjectDefinition<C, S> getManagedObjectDefinition() {
- return definition;
- }
-
- /**
- * Get the name associated with this element if applicable.
- *
- * @return Returns the name associated with this element if applicable.
- */
- public String getName() {
- return null;
- }
-
- /**
- * Get the relation definition associated with this element.
- *
- * @return Returns the relation definition associated with this element.
- */
- public abstract RelationDefinition<? super C, ? super S> getRelationDefinition();
-
- /**
- * Serialize this path element using the provided serialization
- * strategy.
- *
- * @param serializer
- * The managed object path serialization strategy.
- */
- public abstract void serialize(ManagedObjectPathSerializer serializer);
- }
-
- /**
- * A path element representing an instantiable managed object.
- */
- private static final class InstantiableElement<C extends ConfigurationClient, S extends Configuration> extends
- Element<C, S> {
-
- // Factory method.
- private static final <C extends ConfigurationClient, S extends Configuration> InstantiableElement<C, S> create(
- InstantiableRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d,
- String name) {
- return new InstantiableElement<C, S>(r, d, name);
- }
-
- // The name of the managed object.
- private final String name;
-
- // The instantiable relation.
- private final InstantiableRelationDefinition<? super C, ? super S> r;
-
- // Private constructor.
- private InstantiableElement(InstantiableRelationDefinition<? super C, ? super S> r,
- AbstractManagedObjectDefinition<C, S> d, String name) {
- super(d);
- this.r = r;
- this.name = name;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getName() {
- return name;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public InstantiableRelationDefinition<? super C, ? super S> getRelationDefinition() {
- return r;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void serialize(ManagedObjectPathSerializer serializer) {
- serializer.appendManagedObjectPathElement(r, getManagedObjectDefinition(), name);
- }
- }
-
- /**
- * A path element representing an optional managed object.
- */
- private static final class OptionalElement<C extends ConfigurationClient, S extends Configuration> extends
- Element<C, S> {
-
- // Factory method.
- private static final <C extends ConfigurationClient, S extends Configuration> OptionalElement<C, S> create(
- OptionalRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
- return new OptionalElement<C, S>(r, d);
- }
-
- // The optional relation.
- private final OptionalRelationDefinition<? super C, ? super S> r;
-
- // Private constructor.
- private OptionalElement(OptionalRelationDefinition<? super C, ? super S> r,
- AbstractManagedObjectDefinition<C, S> d) {
- super(d);
- this.r = r;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public OptionalRelationDefinition<? super C, ? super S> getRelationDefinition() {
- return r;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void serialize(ManagedObjectPathSerializer serializer) {
- serializer.appendManagedObjectPathElement(r, getManagedObjectDefinition());
- }
- }
-
- /**
- * A path element representing an set managed object.
- */
- private static final class SetElement<C extends ConfigurationClient, S extends Configuration> extends
- Element<C, S> {
-
- // Factory method.
- private static final <C extends ConfigurationClient, S extends Configuration> SetElement<C, S> create(
- SetRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
- return new SetElement<C, S>(r, d);
- }
-
- // The set relation.
- private final SetRelationDefinition<? super C, ? super S> r;
-
- // Private constructor.
- private SetElement(SetRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
- super(d);
- this.r = r;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public SetRelationDefinition<? super C, ? super S> getRelationDefinition() {
- return r;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void serialize(ManagedObjectPathSerializer serializer) {
- serializer.appendManagedObjectPathElement(r, getManagedObjectDefinition());
- }
- }
-
- /**
- * A path element representing a singleton managed object.
- */
- private static final class SingletonElement<C extends ConfigurationClient, S extends Configuration> extends
- Element<C, S> {
-
- // Factory method.
- private static final <C extends ConfigurationClient, S extends Configuration> SingletonElement<C, S> create(
- SingletonRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
- return new SingletonElement<C, S>(r, d);
- }
-
- // The singleton relation.
- private final SingletonRelationDefinition<? super C, ? super S> r;
-
- // Private constructor.
- private SingletonElement(SingletonRelationDefinition<? super C, ? super S> r,
- AbstractManagedObjectDefinition<C, S> d) {
- super(d);
- this.r = r;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public SingletonRelationDefinition<? super C, ? super S> getRelationDefinition() {
- return r;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void serialize(ManagedObjectPathSerializer serializer) {
- serializer.appendManagedObjectPathElement(r, getManagedObjectDefinition());
- }
- }
-
- /**
- * A serialize which is used to generate the toString representation.
- */
- private static final class StringSerializer implements ManagedObjectPathSerializer {
-
- // Serialize to this string builder.
- private final StringBuilder builder;
-
- // Private constructor.
- private StringSerializer(StringBuilder builder) {
- this.builder = builder;
- }
-
- /**
- * {@inheritDoc}
- */
- public <M extends ConfigurationClient, N extends Configuration> void appendManagedObjectPathElement(
- InstantiableRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d,
- String name) {
- serializeElement(r, d);
-
- // Be careful to escape any forward slashes in the name.
- builder.append("+name=");
- builder.append(name.replace("/", "//"));
- }
-
- /**
- * {@inheritDoc}
- */
- public <M extends ConfigurationClient, N extends Configuration> void appendManagedObjectPathElement(
- OptionalRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d) {
- serializeElement(r, d);
- }
-
- /**
- * {@inheritDoc}
- */
- public <M extends ConfigurationClient, N extends Configuration> void appendManagedObjectPathElement(
- SingletonRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d) {
- serializeElement(r, d);
- }
-
- /**
- * {@inheritDoc}
- */
- public <M extends ConfigurationClient, N extends Configuration> void appendManagedObjectPathElement(
- SetRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d) {
- serializeElement(r, d);
- }
-
- // Common element serialization.
- private <M, N> void serializeElement(RelationDefinition<?, ?> r, AbstractManagedObjectDefinition<?, ?> d) {
- // Always specify the relation name.
- builder.append("/relation=");
- builder.append(r.getName());
-
- // Only specify the type if it is a sub-type of the relation's
- // type.
- if (r.getChildDefinition() != d) {
- builder.append("+type=");
- builder.append(d.getName());
- }
- }
- }
-
- // Single instance of a root path.
- private static final ManagedObjectPath<RootCfgClient, RootCfg> EMPTY_PATH =
- new ManagedObjectPath<RootCfgClient, RootCfg>(new LinkedList<Element<?, ?>>(), null,
- RootCfgDefn.getInstance());
-
- // A regular expression used to parse path elements.
- private static final Pattern PE_REGEXP = Pattern.compile("^\\s*relation=\\s*([^+]+)\\s*"
- + "(\\+\\s*type=\\s*([^+]+)\\s*)?" + "(\\+\\s*name=\\s*([^+]+)\\s*)?$");
-
- /**
- * Creates a new managed object path representing the configuration root.
- *
- * @return Returns a new managed object path representing the configuration
- * root.
- */
- public static ManagedObjectPath<RootCfgClient, RootCfg> emptyPath() {
- return EMPTY_PATH;
- }
-
- /**
- * Returns a managed object path holding the value of the specified string.
- *
- * @param s
- * The string to be parsed.
- * @return Returns a managed object path holding the value of the specified
- * string.
- * @throws IllegalArgumentException
- * If the string could not be parsed.
- */
- public static ManagedObjectPath<?, ?> valueOf(String s) {
- String ns = s.trim();
-
- // Check for root special case.
- if (ns.equals("/")) {
- return EMPTY_PATH;
- }
-
- // Parse the elements.
- LinkedList<Element<?, ?>> elements = new LinkedList<Element<?, ?>>();
- Element<?, ?> lastElement = null;
- AbstractManagedObjectDefinition<?, ?> definition = RootCfgDefn.getInstance();
-
- if (!ns.startsWith("/")) {
- throw new IllegalArgumentException("Invalid path \"" + ns + "\": must begin with a \"/\"");
- }
-
- int start = 1;
- while (true) {
- // Get the next path element.
- int end;
- for (end = start; end < ns.length(); end++) {
- char c = ns.charAt(end);
- if (c == '/') {
- if (end == (ns.length() - 1)) {
- throw new IllegalArgumentException("Invalid path \"" + ns
- + "\": must not end with a trailing \"/\"");
- }
-
- if (ns.charAt(end + 1) == '/') {
- // Found an escaped forward slash.
- end++;
- } else {
- // Found the end of this path element.
- break;
- }
- }
- }
-
- // Get the next element.
- String es = ns.substring(start, end);
-
- Matcher m = PE_REGEXP.matcher(es);
- if (!m.matches()) {
- throw new IllegalArgumentException("Invalid path element \"" + es + "\" in path \"" + ns + "\"");
- }
-
- // Mandatory.
- String relation = m.group(1);
-
- // Optional.
- String type = m.group(3);
-
- // Mandatory if relation is instantiable.
- String name = m.group(5);
-
- // Get the relation definition.
- RelationDefinition<?, ?> r;
- try {
- r = definition.getRelationDefinition(relation);
- } catch (IllegalArgumentException e) {
- throw new IllegalArgumentException("Invalid path element \"" + es + "\" in path \"" + ns
- + "\": unknown relation \"" + relation + "\"");
- }
-
- // Append the next element.
- lastElement = createElement(r, ns, es, type, name);
- elements.add(lastElement);
- definition = lastElement.getManagedObjectDefinition();
-
- // Update start to point to the beginning of the next element.
- if (end < ns.length()) {
- // Skip to the beginning of the next element
- start = end + 1;
- } else {
- // We reached the end of the string.
- break;
- }
- }
-
- // Construct the new path.
- return create(elements, lastElement);
- }
-
- // Factory method required in order to allow generic wild-card
- // construction of new paths.
- private static <C extends ConfigurationClient, S extends Configuration> ManagedObjectPath<C, S> create(
- LinkedList<Element<?, ?>> elements, Element<C, S> lastElement) {
- return new ManagedObjectPath<C, S>(elements, lastElement.getRelationDefinition(),
- lastElement.getManagedObjectDefinition());
- }
-
- // Decode an element.
- // @Checkstyle:ignore
- private static <C extends ConfigurationClient, S extends Configuration> Element<? extends C, ? extends S> createElement(
- RelationDefinition<C, S> r, String path, String element, String type, String name) {
- // First determine the managed object definition.
- AbstractManagedObjectDefinition<? extends C, ? extends S> d = null;
-
- if (type != null) {
- for (AbstractManagedObjectDefinition<? extends C, ? extends S> child : r.getChildDefinition()
- .getAllChildren()) {
- if (child.getName().equals(type)) {
- d = child;
- break;
- }
- }
-
- if (d == null) {
- throw new IllegalArgumentException("Invalid path element \"" + element + "\" in path \"" + path
- + "\": unknown sub-type \"" + type + "\"");
- }
- } else {
- d = r.getChildDefinition();
- }
-
- if (r instanceof InstantiableRelationDefinition) {
- InstantiableRelationDefinition<C, S> ir = (InstantiableRelationDefinition<C, S>) r;
-
- if (name == null) {
- throw new IllegalArgumentException("Invalid path element \"" + element + "\" in path \"" + path
- + "\": no instance name for instantiable relation");
- }
-
- return InstantiableElement.create(ir, d, name);
- } else if (r instanceof SetRelationDefinition) {
- SetRelationDefinition<C, S> ir = (SetRelationDefinition<C, S>) r;
-
- if (name != null) {
- throw new IllegalArgumentException("Invalid path element \"" + element + "\" in path \"" + path
- + "\": instance name specified for set relation");
- }
-
- return SetElement.create(ir, d);
- } else if (r instanceof OptionalRelationDefinition) {
- OptionalRelationDefinition<C, S> or = (OptionalRelationDefinition<C, S>) r;
-
- if (name != null) {
- throw new IllegalArgumentException("Invalid path element \"" + element + "\" in path \"" + path
- + "\": instance name specified for optional relation");
- }
-
- return OptionalElement.create(or, d);
- } else if (r instanceof SingletonRelationDefinition) {
- SingletonRelationDefinition<C, S> sr = (SingletonRelationDefinition<C, S>) r;
-
- if (name != null) {
- throw new IllegalArgumentException("Invalid path element \"" + element + "\" in path \"" + path
- + "\": instance name specified for singleton relation");
- }
-
- return SingletonElement.create(sr, d);
- } else {
- throw new IllegalArgumentException("Invalid path element \"" + element + "\" in path \"" + path
- + "\": unsupported relation type");
- }
- }
-
- // The managed object definition in this path.
- private final AbstractManagedObjectDefinition<C, S> d;
-
- // The list of path elements in this path.
- private final List<Element<?, ?>> elements;
-
- // The last relation definition in this path.
- private final RelationDefinition<? super C, ? super S> r;
-
- // Private constructor.
- private ManagedObjectPath(LinkedList<Element<?, ?>> elements, RelationDefinition<? super C, ? super S> r,
- AbstractManagedObjectDefinition<C, S> d) {
- this.elements = Collections.unmodifiableList(elements);
- this.r = r;
- this.d = d;
- }
-
- /**
- * Creates a new managed object path which has the same structure as this
- * path except that the final path element is associated with the specified
- * managed object definition.
- *
- * @param <C1>
- * The type of client managed object configuration that this path
- * will reference.
- * @param <S1>
- * The type of server managed object configuration that this path
- * will reference.
- * @param nd
- * The new managed object definition.
- * @return Returns a new managed object path which has the same structure as
- * this path except that the final path element is associated with
- * the specified managed object definition.
- */
- // @Checkstyle:ignore
- public <C1 extends C, S1 extends S> ManagedObjectPath<C1, S1> asSubType(AbstractManagedObjectDefinition<C1, S1> nd) {
- if (r instanceof InstantiableRelationDefinition) {
- InstantiableRelationDefinition<? super C, ? super S> ir =
- (InstantiableRelationDefinition<? super C, ? super S>) r;
- if (elements.size() == 0) {
- return parent().child(ir, nd, "null");
- } else {
- return parent().child(ir, nd, elements.get(elements.size() - 1).getName());
- }
- } else if (r instanceof SetRelationDefinition) {
- SetRelationDefinition<? super C, ? super S> sr = (SetRelationDefinition<? super C, ? super S>) r;
- return parent().child(sr, nd);
- } else if (r instanceof OptionalRelationDefinition) {
- OptionalRelationDefinition<? super C, ? super S> or =
- (OptionalRelationDefinition<? super C, ? super S>) r;
- return parent().child(or, nd);
- } else {
- SingletonRelationDefinition<? super C, ? super S> sr =
- (SingletonRelationDefinition<? super C, ? super S>) r;
- return parent().child(sr, nd);
- }
- }
-
- /**
- * Creates a new child managed object path beneath the provided parent path
- * having the specified managed object definition.
- *
- * @param <M>
- * The type of client managed object configuration that the child
- * path references.
- * @param <N>
- * The type of server managed object configuration that the child
- * path references.
- * @param r
- * The instantiable relation referencing the child.
- * @param d
- * The managed object definition associated with the child (must
- * be a sub-type of the relation).
- * @param name
- * The relative name of the child managed object.
- * @return Returns a new child managed object path beneath the provided
- * parent path.
- * @throws IllegalArgumentException
- * If the provided name is empty or blank.
- */
- public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
- InstantiableRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d, String name) {
- if (name.trim().length() == 0) {
- throw new IllegalArgumentException("Empty or blank managed object names are not allowed");
- }
- LinkedList<Element<?, ?>> celements = new LinkedList<Element<?, ?>>(elements);
- celements.add(new InstantiableElement<M, N>(r, d, name));
- return new ManagedObjectPath<M, N>(celements, r, d);
- }
-
- /**
- * Creates a new child managed object path beneath the provided parent path
- * using the relation's child managed object definition.
- *
- * @param <M>
- * The type of client managed object configuration that the child
- * path references.
- * @param <N>
- * The type of server managed object configuration that the child
- * path references.
- * @param r
- * The instantiable relation referencing the child.
- * @param name
- * The relative name of the child managed object.
- * @return Returns a new child managed object path beneath the provided
- * parent path.
- * @throws IllegalArgumentException
- * If the provided name is empty or blank.
- */
- public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
- InstantiableRelationDefinition<M, N> r, String name) {
- return child(r, r.getChildDefinition(), name);
- }
-
- /**
- * Creates a new child managed object path beneath the provided parent path
- * having the specified managed object definition.
- *
- * @param <M>
- * The type of client managed object configuration that the child
- * path references.
- * @param <N>
- * The type of server managed object configuration that the child
- * path references.
- * @param r
- * The optional relation referencing the child.
- * @param d
- * The managed object definition associated with the child (must
- * be a sub-type of the relation).
- * @return Returns a new child managed object path beneath the provided
- * parent path.
- */
- public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
- OptionalRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d) {
- LinkedList<Element<?, ?>> celements = new LinkedList<Element<?, ?>>(elements);
- celements.add(new OptionalElement<M, N>(r, d));
- return new ManagedObjectPath<M, N>(celements, r, d);
- }
-
- /**
- * Creates a new child managed object path beneath the provided parent path
- * using the relation's child managed object definition.
- *
- * @param <M>
- * The type of client managed object configuration that the child
- * path references.
- * @param <N>
- * The type of server managed object configuration that the child
- * path references.
- * @param r
- * The optional relation referencing the child.
- * @return Returns a new child managed object path beneath the provided
- * parent path.
- */
- public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
- OptionalRelationDefinition<M, N> r) {
- return child(r, r.getChildDefinition());
- }
-
- /**
- * Creates a new child managed object path beneath the provided parent path
- * having the specified managed object definition.
- *
- * @param <M>
- * The type of client managed object configuration that the child
- * path references.
- * @param <N>
- * The type of server managed object configuration that the child
- * path references.
- * @param r
- * The singleton relation referencing the child.
- * @param d
- * The managed object definition associated with the child (must
- * be a sub-type of the relation).
- * @return Returns a new child managed object path beneath the provided
- * parent path.
- */
- public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
- SingletonRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d) {
- LinkedList<Element<?, ?>> celements = new LinkedList<Element<?, ?>>(elements);
- celements.add(new SingletonElement<M, N>(r, d));
- return new ManagedObjectPath<M, N>(celements, r, d);
- }
-
- /**
- * Creates a new child managed object path beneath the provided parent path
- * using the relation's child managed object definition.
- *
- * @param <M>
- * The type of client managed object configuration that the child
- * path references.
- * @param <N>
- * The type of server managed object configuration that the child
- * path references.
- * @param r
- * The singleton relation referencing the child.
- * @return Returns a new child managed object path beneath the provided
- * parent path.
- */
- public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
- SingletonRelationDefinition<M, N> r) {
- return child(r, r.getChildDefinition());
- }
-
- /**
- * Creates a new child managed object path beneath the provided parent path
- * having the specified managed object definition.
- *
- * @param <M>
- * The type of client managed object configuration that the child
- * path references.
- * @param <N>
- * The type of server managed object configuration that the child
- * path references.
- * @param r
- * The set relation referencing the child.
- * @param d
- * The managed object definition associated with the child (must
- * be a sub-type of the relation).
- * @return Returns a new child managed object path beneath the provided
- * parent path.
- * @throws IllegalArgumentException
- * If the provided name is empty or blank.
- */
- public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
- SetRelationDefinition<? super M, ? super N> r, AbstractManagedObjectDefinition<M, N> d) {
- LinkedList<Element<?, ?>> celements = new LinkedList<Element<?, ?>>(elements);
- celements.add(new SetElement<M, N>(r, d));
- return new ManagedObjectPath<M, N>(celements, r, d);
- }
-
- /**
- * Creates a new child managed object path beneath the provided parent path
- * having the managed object definition indicated by <code>name</code>.
- *
- * @param <M>
- * The type of client managed object configuration that the path
- * references.
- * @param <N>
- * The type of server managed object configuration that the path
- * references.
- * @param r
- * The set relation referencing the child.
- * @param name
- * The name of the managed object definition associated with the
- * child (must be a sub-type of the relation).
- * @return Returns a new child managed object path beneath the provided
- * parent path.
- * @throws IllegalArgumentException
- * If the provided name is empty or blank or specifies a managed
- * object definition which is not a sub-type of the relation's
- * child definition.
- */
- public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<? extends M, ? extends N> child(
- SetRelationDefinition<M, N> r, String name) {
- AbstractManagedObjectDefinition<M, N> d = r.getChildDefinition();
- return child(r, d.getChild(name));
- }
-
- /**
- * Creates a new child managed object path beneath the provided parent path
- * using the relation's child managed object definition.
- *
- * @param <M>
- * The type of client managed object configuration that the child
- * path references.
- * @param <N>
- * The type of server managed object configuration that the child
- * path references.
- * @param r
- * The set relation referencing the child.
- * @return Returns a new child managed object path beneath the provided
- * parent path.
- * @throws IllegalArgumentException
- * If the provided name is empty or blank.
- */
- public <M extends ConfigurationClient, N extends Configuration> ManagedObjectPath<M, N> child(
- SetRelationDefinition<M, N> r) {
- return child(r, r.getChildDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean equals(Object obj) {
- if (obj == this) {
- return true;
- } else if (obj instanceof ManagedObjectPath) {
- ManagedObjectPath<?, ?> other = (ManagedObjectPath<?, ?>) obj;
- return toString().equals(other.toString());
- } else {
- return false;
- }
- }
-
- /**
- * Get the definition of the managed object referred to by this path.
- * <p>
- * When the path is empty, the {@link RootCfgDefn} is returned.
- *
- * @return Returns the definition of the managed object referred to by this
- * path, or the {@link RootCfgDefn} if the path is empty.
- */
- public AbstractManagedObjectDefinition<C, S> getManagedObjectDefinition() {
- return d;
- }
-
- /**
- * Get the name of the managed object referred to by this path if
- * applicable.
- * <p>
- * If there path does not refer to an instantiable managed object
- * <code>null</code> is returned.
- *
- * @return Returns the name of the managed object referred to by this path,
- * or <code>null</code> if the managed object does not have a name.
- */
- public String getName() {
- if (elements.isEmpty()) {
- return null;
- } else {
- return elements.get(elements.size() - 1).getName();
- }
- }
-
- /**
- * Get the relation definition of the managed object referred to by this
- * path.
- * <p>
- * When the path is empty, the <code>null</code> is returned.
- *
- * @return Returns the relation definition of the managed object referred to
- * by this path, or the <code>null</code> if the path is empty.
- */
- public RelationDefinition<? super C, ? super S> getRelationDefinition() {
- return r;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int hashCode() {
- return toString().hashCode();
- }
-
- /**
- * Determine whether or not this path contains any path elements.
- *
- * @return Returns <code>true</code> if this path does not contain any path
- * elements.
- */
- public boolean isEmpty() {
- return elements.isEmpty();
- }
-
- /**
- * Determines whether this managed object path references the same location
- * as the provided managed object path.
- * <p>
- * This method differs from <code>equals</code> in that it ignores sub-type
- * definitions.
- *
- * @param other
- * The managed object path to be compared.
- * @return Returns <code>true</code> if this managed object path references
- * the same location as the provided managed object path.
- */
- public boolean matches(ManagedObjectPath<?, ?> other) {
- DN thisDN = toDN();
- DN otherDN = other.toDN();
- return thisDN.equals(otherDN);
- }
-
- /**
- * Creates a new parent managed object path representing the immediate
- * parent of this path. This method is a short-hand for
- * <code>parent(1)</code>.
- *
- * @return Returns a new parent managed object path representing the
- * immediate parent of this path.
- * @throws IllegalArgumentException
- * If this path does not have a parent (i.e. it is the empty
- * path).
- */
- public ManagedObjectPath<?, ?> parent() {
- return parent(1);
- }
-
- /**
- * Creates a new parent managed object path the specified number of path
- * elements above this path.
- *
- * @param offset
- * The number of path elements (0 - means no offset, 1 means the
- * parent, and 2 means the grand-parent).
- * @return Returns a new parent managed object path the specified number of
- * path elements above this path.
- * @throws IllegalArgumentException
- * If the offset is less than 0, or greater than the number of
- * path elements in this path.
- */
- public ManagedObjectPath<?, ?> parent(int offset) {
- if (offset < 0) {
- throw new IllegalArgumentException("Negative offset");
- }
-
- if (offset > elements.size()) {
- throw new IllegalArgumentException("Offset is greater than the number of path elements");
- }
-
- // An offset of 0 leaves the path unchanged.
- if (offset == 0) {
- return this;
- }
-
- // Return the empty path if the parent has zero elements.
- if (elements.size() == offset) {
- return emptyPath();
- }
-
- LinkedList<Element<?, ?>> celements =
- new LinkedList<Element<?, ?>>(elements.subList(0, elements.size() - offset));
- return create(celements, celements.getLast());
- }
-
- /**
- * Creates a new managed object path which has the same structure as this
- * path except that the final path element is renamed. The final path
- * element must comprise of an instantiable relation.
- *
- * @param newName
- * The new name of the final path element.
- * @return Returns a new managed object path which has the same structure as
- * this path except that the final path element is renamed.
- * @throws IllegalStateException
- * If this managed object path is empty or if its final path
- * element does not comprise of an instantiable relation.
- */
- public ManagedObjectPath<C, S> rename(String newName) {
- if (elements.size() == 0) {
- throw new IllegalStateException("Cannot rename an empty path");
- }
-
- if (r instanceof InstantiableRelationDefinition) {
- InstantiableRelationDefinition<? super C, ? super S> ir =
- (InstantiableRelationDefinition<? super C, ? super S>) r;
- return parent().child(ir, d, newName);
- } else {
- throw new IllegalStateException("Not an instantiable relation");
- }
- }
-
- /**
- * Serialize this managed object path using the provided serialization
- * strategy.
- * <p>
- * The path elements will be passed to the serializer in big-endian order:
- * starting from the root element and proceeding down to the leaf.
- *
- * @param serializer
- * The managed object path serialization strategy.
- */
- public void serialize(ManagedObjectPathSerializer serializer) {
- for (Element<?, ?> element : elements) {
- element.serialize(serializer);
- }
- }
-
- /**
- * Get the number of path elements in this managed object path.
- *
- * @return Returns the number of path elements (0 - means no offset, 1 means
- * the parent, and 2 means the grand-parent).
- */
- public int size() {
- return elements.size();
- }
-
- /**
- * Creates a DN representation of this managed object path.
- *
- * @return Returns a DN representation of this managed object path.
- */
- public DN toDN() {
- // Use a simple serializer to create the contents.
- DNSerializer serializer = new DNSerializer();
- serialize(serializer);
- return serializer.toDN();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- StringBuilder builder = new StringBuilder();
- toString(builder);
- return builder.toString();
- }
-
- /**
- * Appends a string representation of this managed object path to the
- * provided string builder.
- *
- * @param builder
- * Append the string representation to this builder.
- * @see #toString()
- */
- public void toString(final StringBuilder builder) {
- if (isEmpty()) {
- // Special treatment of root configuration paths.
- builder.append('/');
- } else {
- // Use a simple serializer to create the contents.
- ManagedObjectPathSerializer serializer = new StringSerializer(builder);
- serialize(serializer);
- }
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectPathSerializer.java b/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectPathSerializer.java
deleted file mode 100644
index a0edc95..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/ManagedObjectPathSerializer.java
+++ /dev/null
@@ -1,114 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-/**
- * A strategy for serializing managed object paths.
- * <p>
- * This interface provides a generic means for serializing managed object paths
- * into application specific forms. For example, a JNDI client would use this
- * interface to construct <code>LdapName</code> objects from a path. Similarly,
- * on the server side, a serialization strategy is used to construct
- * <code>DN</code> instances from a path.
- * <p>
- * During serialization the serializer is invoked for each element in the
- * managed object path in big-endian order, starting from the root and
- * proceeding down to the leaf element.
- */
-public interface ManagedObjectPathSerializer {
-
- /**
- * Append a managed object path element identified by an instantiable
- * relation and an instance name.
- *
- * @param <C>
- * The type of client managed object configuration that this path
- * element references.
- * @param <S>
- * The type of server managed object configuration that this path
- * element references.
- * @param r
- * The instantiable relation.
- * @param d
- * The managed object definition.
- * @param name
- * The instance name.
- */
- <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
- InstantiableRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d, String name);
-
- /**
- * Append a managed object path element identified by an optional relation.
- *
- * @param <C>
- * The type of client managed object configuration that this path
- * element references.
- * @param <S>
- * The type of server managed object configuration that this path
- * element references.
- * @param r
- * The optional relation.
- * @param d
- * The managed object definition.
- */
- <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
- OptionalRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d);
-
- /**
- * Append a managed object path element identified by a singleton relation.
- *
- * @param <C>
- * The type of client managed object configuration that this path
- * element references.
- * @param <S>
- * The type of server managed object configuration that this path
- * element references.
- * @param r
- * The singleton relation.
- * @param d
- * The managed object definition.
- */
- <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
- SingletonRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d);
-
- /**
- * Append a managed object path element identified by a set relation.
- *
- * @param <C>
- * The type of client managed object configuration that this path
- * element references.
- * @param <S>
- * The type of server managed object configuration that this path
- * element references.
- * @param r
- * The set relation.
- * @param d
- * The managed object definition.
- */
- <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
- SetRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d);
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/OperationsException.java b/opendj-config/src/main/java/org/opends/server/admin/OperationsException.java
deleted file mode 100644
index c3ae8cd..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/OperationsException.java
+++ /dev/null
@@ -1,63 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * Exceptions thrown as a result of errors that occurred when reading, listing,
- * and modifying managed objects.
- */
-public abstract class OperationsException extends AdminException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = 6329910102360262187L;
-
- /**
- * Create an operations exception with a message and cause.
- *
- * @param message
- * The message.
- * @param cause
- * The cause.
- */
- protected OperationsException(LocalizableMessage message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * Create an operations exception with a message.
- *
- * @param message
- * The message.
- */
- protected OperationsException(LocalizableMessage message) {
- super(message);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/OptionalRelationDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/OptionalRelationDefinition.java
deleted file mode 100644
index 10aa694..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/OptionalRelationDefinition.java
+++ /dev/null
@@ -1,155 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-/**
- * A managed object composite relationship definition which represents a
- * composition of an optional single managed object (i.e. the referenced managed
- * object may or may not be present).
- *
- * @param <C>
- * The type of client managed object configuration that this relation
- * definition refers to.
- * @param <S>
- * The type of server managed object configuration that this relation
- * definition refers to.
- */
-public final class OptionalRelationDefinition<C extends ConfigurationClient, S extends Configuration> extends
- RelationDefinition<C, S> {
-
- /**
- * An interface for incrementally constructing optional relation
- * definitions.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * relation definition refers to.
- */
- public static final class Builder<C extends ConfigurationClient, S extends Configuration> extends
- AbstractBuilder<C, S, OptionalRelationDefinition<C, S>> {
-
- // The optional default managed object associated with this
- // optional relation.
- private DefaultManagedObject<? extends C, ? extends S> defaultManagedObject = null;
-
- /**
- * Creates a new builder which can be used to incrementally build an
- * optional relation definition.
- *
- * @param pd
- * The parent managed object definition.
- * @param name
- * The name of the relation.
- * @param cd
- * The child managed object definition.
- */
- // @Checkstyle:ignore
- public Builder(AbstractManagedObjectDefinition<?, ?> pd, String name, AbstractManagedObjectDefinition<C, S> cd) {
- super(pd, name, cd);
- }
-
- /**
- * Sets the optional default managed object associated with this
- * optional relation definition.
- *
- * @param defaultManagedObject
- * The default managed object or <code>null</code> if there
- * is no default managed object defined for this relation
- * definition.
- */
- public void setDefaultManagedObject(DefaultManagedObject<? extends C, ? extends S> defaultManagedObject) {
- this.defaultManagedObject = defaultManagedObject;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected OptionalRelationDefinition<C, S> buildInstance(Common<C, S> common) {
- return new OptionalRelationDefinition<C, S>(common, defaultManagedObject);
- }
-
- }
-
- // The optional default managed object associated with this
- // optional relation.
- private final DefaultManagedObject<? extends C, ? extends S> defaultManagedObject;
-
- // Private constructor.
- private OptionalRelationDefinition(Common<C, S> common,
- DefaultManagedObject<? extends C, ? extends S> defaultManagedObject) {
- super(common);
- this.defaultManagedObject = defaultManagedObject;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(RelationDefinitionVisitor<R, P> v, P p) {
- return v.visitOptional(this, p);
- }
-
- /**
- * Gets the optional default managed object associated with this optional
- * relation definition.
- *
- * @return Returns the default managed object or <code>null</code> if there
- * is no default managed object defined for this relation
- * definition.
- */
- public DefaultManagedObject<? extends C, ? extends S> getDefaultManagedObject() {
- return defaultManagedObject;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void toString(StringBuilder builder) {
- builder.append("name=");
- builder.append(getName());
- builder.append(" type=optional parent=");
- builder.append(getParentDefinition().getName());
- builder.append(" child=");
- builder.append(getChildDefinition().getName());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initialize() throws Exception {
- if (defaultManagedObject != null) {
- defaultManagedObject.initialize();
- }
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/PropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/PropertyDefinition.java
deleted file mode 100644
index e9bd5ba..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/PropertyDefinition.java
+++ /dev/null
@@ -1,585 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.Comparator;
-import java.util.EnumSet;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.Set;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * An interface for querying generic property definition features.
- * <p>
- * Property definitions are analogous to ConfigAttributes in the current model
- * and will play a similar role. Eventually these will replace them.
- * <p>
- * Implementations <b>must</b> take care to implement the various comparison
- * methods.
- *
- * @param <T>
- * The data-type of values of the property.
- */
-public abstract class PropertyDefinition<T> implements Comparator<T>, Comparable<PropertyDefinition<?>> {
-
- /**
- * An interface for incrementally constructing property definitions.
- *
- * @param <T>
- * The data-type of values of the property.
- * @param <D>
- * The type of property definition constructed by this builder.
- */
- protected abstract static class AbstractBuilder<T, D extends PropertyDefinition<T>> {
-
- // The administrator action.
- private AdministratorAction adminAction;
-
- // The default behavior provider.
- private DefaultBehaviorProvider<T> defaultBehavior;
-
- // The abstract managed object
- private final AbstractManagedObjectDefinition<?, ?> definition;
-
- // The options applicable to this definition.
- private final EnumSet<PropertyOption> options;
-
- // The name of this property definition.
- private final String propertyName;
-
- /**
- * Create a property definition builder.
- *
- * @param d
- * The managed object definition associated with this
- * property definition.
- * @param propertyName
- * The property name.
- */
- protected AbstractBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- this.definition = d;
- this.propertyName = propertyName;
- this.options = EnumSet.noneOf(PropertyOption.class);
- this.adminAction = new AdministratorAction(AdministratorAction.Type.NONE, d, propertyName);
- this.defaultBehavior = new UndefinedDefaultBehaviorProvider<T>();
- }
-
- /**
- * Construct a property definition based on the properties of this
- * builder.
- *
- * @return The new property definition.
- */
- public final D getInstance() {
- return buildInstance(definition, propertyName, options, adminAction, defaultBehavior);
- }
-
- /**
- * Set the administrator action.
- *
- * @param adminAction
- * The administrator action.
- */
- public final void setAdministratorAction(AdministratorAction adminAction) {
- Reject.ifNull(adminAction);
- this.adminAction = adminAction;
- }
-
- /**
- * Set the default behavior provider.
- *
- * @param defaultBehavior
- * The default behavior provider.
- */
- public final void setDefaultBehaviorProvider(DefaultBehaviorProvider<T> defaultBehavior) {
- Reject.ifNull(defaultBehavior);
- this.defaultBehavior = defaultBehavior;
- }
-
- /**
- * Add a property definition option.
- *
- * @param option
- * The property option.
- */
- public final void setOption(PropertyOption option) {
- Reject.ifNull(option);
- options.add(option);
- }
-
- /**
- * Build a property definition based on the properties of this builder.
- *
- * @param d
- * The managed object definition associated with this
- * property definition.
- * @param propertyName
- * The property name.
- * @param options
- * Options applicable to this definition.
- * @param adminAction
- * The administrator action.
- * @param defaultBehavior
- * The default behavior provider.
- * @return The new property definition.
- */
- protected abstract D buildInstance(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<T> defaultBehavior);
- }
-
- // The administrator action.
- private final AdministratorAction adminAction;
-
- // The default behavior provider.
- private final DefaultBehaviorProvider<T> defaultBehavior;
-
- // The abstract managed object
- private final AbstractManagedObjectDefinition<?, ?> definition;
-
- // Options applicable to this definition.
- private final Set<PropertyOption> options;
-
- // The property name.
- private final String propertyName;
-
- // The property value class.
- private final Class<T> theClass;
-
- /**
- * Create a property definition.
- *
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param theClass
- * The property value class.
- * @param propertyName
- * The property name.
- * @param options
- * Options applicable to this definition.
- * @param adminAction
- * The administrator action.
- * @param defaultBehavior
- * The default behavior provider.
- */
- protected PropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, Class<T> theClass, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction, DefaultBehaviorProvider<T> defaultBehavior) {
- Reject.ifNull(d, theClass, propertyName, options, adminAction, defaultBehavior);
-
- this.definition = d;
- this.theClass = theClass;
- this.propertyName = propertyName;
- this.options = EnumSet.copyOf(options);
- this.adminAction = adminAction;
- this.defaultBehavior = defaultBehavior;
- }
-
- /**
- * Apply a visitor to this property definition.
- *
- * @param <R>
- * The return type of the visitor's methods.
- * @param <P>
- * The type of the additional parameters to the visitor's
- * methods.
- * @param v
- * The property definition visitor.
- * @param p
- * Optional additional visitor parameter.
- * @return Returns a result as specified by the visitor.
- */
- public abstract <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p);
-
- /**
- * Apply a visitor to a property value associated with this property
- * definition.
- *
- * @param <R>
- * The return type of the visitor's methods.
- * @param <P>
- * The type of the additional parameters to the visitor's
- * methods.
- * @param v
- * The property value visitor.
- * @param value
- * The property value.
- * @param p
- * Optional additional visitor parameter.
- * @return Returns a result as specified by the visitor.
- */
- public abstract <R, P> R accept(PropertyValueVisitor<R, P> v, T value, P p);
-
- /**
- * Cast the provided value to the type associated with this property
- * definition.
- * <p>
- * This method only casts the object to the required type; it does not
- * validate the value once it has been cast. Subsequent validation should be
- * performed using the method {@link #validateValue(Object, PropertyDefinitionsOptions)}.
- * <p>
- * This method guarantees the following expression is always
- * <code>true</code>:
- *
- * <pre>
- * PropertyDefinition d;
- * x == d.cast(x);
- * </pre>
- *
- * @param object
- * The property value to be cast (can be <code>null</code>).
- * @return Returns the property value cast to the correct type.
- * @throws ClassCastException
- * If the provided property value did not have the correct type.
- */
- public final T castValue(Object object) {
- return theClass.cast(object);
- }
-
- /**
- * Compares two property values for order. Returns a negative integer, zero,
- * or a positive integer as the first argument is less than, equal to, or
- * greater than the second.
- * <p>
- * This default implementation normalizes both values using
- * {@link #normalizeValue(Object)} and then performs a case-sensitive string
- * comparison.
- *
- * @param o1
- * the first object to be compared.
- * @param o2
- * the second object to be compared.
- * @return a negative integer, zero, or a positive integer as the first
- * argument is less than, equal to, or greater than the second.
- */
- public int compare(T o1, T o2) {
- Reject.ifNull(o1);
- Reject.ifNull(o2);
-
- String s1 = normalizeValue(o1);
- String s2 = normalizeValue(o2);
-
- return s1.compareTo(s2);
- }
-
- /**
- * Compares this property definition with the specified property definition
- * for order. Returns a negative integer, zero, or a positive integer if
- * this property definition is less than, equal to, or greater than the
- * specified property definition.
- * <p>
- * The ordering must be determined first from the property name and then
- * base on the underlying value type.
- *
- * @param o
- * The reference property definition with which to compare.
- * @return Returns a negative integer, zero, or a positive integer if this
- * property definition is less than, equal to, or greater than the
- * specified property definition.
- */
- public final int compareTo(PropertyDefinition<?> o) {
- int rc = propertyName.compareTo(o.propertyName);
- if (rc == 0) {
- rc = theClass.getName().compareTo(o.theClass.getName());
- }
- return rc;
- }
-
- /**
- * Parse and validate a string representation of a property value.
- *
- * @param value
- * The property string value (must not be <code>null</code>).
- * @param options
- * Options to use when decoding value.
- * @return Returns the decoded property value.
- * @throws IllegalPropertyValueStringException
- * If the property value string is invalid.
- */
- public abstract T decodeValue(String value, PropertyDefinitionsOptions options);
-
- /**
- * Encode the provided property value into its string representation.
- * <p>
- * This default implementation simply returns invokes the
- * {@link Object#toString()} method on the provided value.
- *
- * @param value
- * The property value (must not be <code>null</code>).
- * @return Returns the encoded property string value.
- * @throws IllegalPropertyValueException
- * If the property value is invalid.
- */
- public String encodeValue(T value) {
- Reject.ifNull(value);
-
- return value.toString();
- }
-
- /**
- * Indicates whether some other object is "equal to" this property
- * definition. This method must obey the general contract of
- * <tt>Object.equals(Object)</tt>. Additionally, this method can return
- * <tt>true</tt> <i>only</i> if the specified Object is also a property
- * definition and it has the same name, as returned by {@link #getName()},
- * and also is deemed to be "compatible" with this property
- * definition. Compatibility means that the two property definitions share
- * the same underlying value type and provide similar comparator
- * implementations.
- *
- * @param o
- * The reference object with which to compare.
- * @return Returns <code>true</code> only if the specified object is also a
- * property definition and it has the same name and is compatible
- * with this property definition.
- * @see java.lang.Object#equals(java.lang.Object)
- * @see java.lang.Object#hashCode()
- */
- @Override
- public final boolean equals(Object o) {
- if (this == o) {
- return true;
- } else if (o instanceof PropertyDefinition) {
- PropertyDefinition<?> other = (PropertyDefinition<?>) o;
- if (propertyName.equals(other.propertyName)) {
- if (theClass.equals(other.theClass)) {
- return true;
- }
- }
- return false;
- } else {
- return false;
- }
- }
-
- /**
- * Get the administrator action associated with this property definition.
- * The administrator action describes any action which the administrator
- * must perform in order for changes to this property to take effect.
- *
- * @return Returns the administrator action associated with this property
- * definition.
- */
- public final AdministratorAction getAdministratorAction() {
- return adminAction;
- }
-
- /**
- * Get the default behavior provider associated with this property
- * definition.
- *
- * @return Returns the default behavior provider associated with this
- * property definition.
- */
- public final DefaultBehaviorProvider<T> getDefaultBehaviorProvider() {
- return defaultBehavior;
- }
-
- /**
- * Gets the optional description of this property definition in the default
- * locale.
- *
- * @return Returns the description of this property definition in the
- * default locale, or <code>null</code> if there is no description.
- */
- public final LocalizableMessage getDescription() {
- return getDescription(Locale.getDefault());
- }
-
- /**
- * Gets the optional description of this property definition in the
- * specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the description of this property definition in the
- * specified locale, or <code>null</code> if there is no
- * description.
- */
- public final LocalizableMessage getDescription(Locale locale) {
- ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
- String property = "property." + propertyName + ".description";
- try {
- return resource.getMessage(definition, property, locale);
- } catch (MissingResourceException e) {
- return null;
- }
- }
-
- /**
- * Gets the managed object definition associated with this property
- * definition.
- *
- * @return Returns the managed object definition associated with this
- * property definition.
- */
- public final AbstractManagedObjectDefinition<?, ?> getManagedObjectDefinition() {
- return definition;
- }
-
- /**
- * Get the name of the property.
- *
- * @return Returns the name of the property.
- */
- public final String getName() {
- return propertyName;
- }
-
- /**
- * Gets the synopsis of this property definition in the default locale.
- *
- * @return Returns the synopsis of this property definition in the default
- * locale.
- */
- public final LocalizableMessage getSynopsis() {
- return getSynopsis(Locale.getDefault());
- }
-
- /**
- * Gets the synopsis of this property definition in the specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the synopsis of this property definition in the specified
- * locale.
- */
- public final LocalizableMessage getSynopsis(Locale locale) {
- ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
- String property = "property." + propertyName + ".synopsis";
- return resource.getMessage(definition, property, locale);
- }
-
- /**
- * Returns a hash code value for this property definition. The hash code
- * should be derived from the property name and the type of values handled
- * by this property definition.
- *
- * @return Returns the hash code value for this property definition.
- */
- @Override
- public final int hashCode() {
- int rc = 17 + propertyName.hashCode();
- return 37 * rc + theClass.hashCode();
- }
-
- /**
- * Check if the specified option is set for this property definition.
- *
- * @param option
- * The option to test.
- * @return Returns <code>true</code> if the option is set, or
- * <code>false</code> otherwise.
- */
- public final boolean hasOption(PropertyOption option) {
- return options.contains(option);
- }
-
- /**
- * Get a normalized string representation of a property value. This can then
- * be used for comparisons and for generating hash-codes.
- * <p>
- * This method may throw an exception if the provided value is invalid.
- * However, applications should not assume that implementations of this
- * method will always validate a value. This task is the responsibility of
- * {@link #validateValue(Object, PropertyDefinitionsOptions)}.
- * <p>
- * This default implementation simply returns the string representation of
- * the provided value. Sub-classes might want to override this method if
- * this behavior is insufficient (for example, a string property definition
- * might strip white-space and convert characters to lower-case).
- *
- * @param value
- * The property value to be normalized.
- * @return Returns the normalized property value.
- * @throws IllegalPropertyValueException
- * If the property value is invalid.
- */
- public String normalizeValue(T value) {
- Reject.ifNull(value);
-
- return encodeValue(value);
- }
-
- /**
- * Returns a string representation of this property definition.
- *
- * @return Returns a string representation of this property definition.
- * @see Object#toString()
- */
- @Override
- public final String toString() {
- StringBuilder builder = new StringBuilder();
- toString(builder);
- return builder.toString();
- }
-
- /**
- * Append a string representation of the property definition to the provided
- * string builder.
- * <p>
- * This simple implementation just outputs the propertyName of the property
- * definition. Sub-classes should override this method to provide more
- * complete string representations.
- *
- * @param builder
- * The string builder where the string representation should be
- * appended.
- */
- public void toString(StringBuilder builder) {
- builder.append(propertyName);
- }
-
- /**
- * Determine if the provided property value is valid according to this
- * property definition.
- *
- * @param value
- * The property value (must not be <code>null</code>).
- * @param options
- * Options to use when decoding value.
- * @throws IllegalPropertyValueException
- * If the property value is invalid.
- */
- public abstract void validateValue(T value, PropertyDefinitionsOptions options);
-
- /**
- * Performs any run-time initialization required by this property
- * definition. This may include resolving managed object paths and property
- * names.
- *
- * @throws Exception
- * If this property definition could not be initialized.
- */
- protected void initialize() throws Exception {
- // No implementation required.
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/PropertyDefinitionUsageBuilder.java b/opendj-config/src/main/java/org/opends/server/admin/PropertyDefinitionUsageBuilder.java
deleted file mode 100644
index fb34eff..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/PropertyDefinitionUsageBuilder.java
+++ /dev/null
@@ -1,341 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.text.NumberFormat;
-import java.util.EnumSet;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-
-/**
- * A property definition visitor which can be used to generate syntax usage
- * information.
- */
-public final class PropertyDefinitionUsageBuilder {
-
- /**
- * Underlying implementation.
- */
- private final class MyPropertyDefinitionVisitor extends PropertyDefinitionVisitor<LocalizableMessage, Void> {
-
- // Flag indicating whether detailed syntax information will be
- // generated.
- private final boolean isDetailed;
-
- // The formatter to use for numeric values.
- private final NumberFormat numberFormat;
-
- // Private constructor.
- private MyPropertyDefinitionVisitor(boolean isDetailed) {
- this.isDetailed = isDetailed;
-
- this.numberFormat = NumberFormat.getNumberInstance();
- this.numberFormat.setGroupingUsed(true);
- this.numberFormat.setMaximumFractionDigits(2);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <C extends ConfigurationClient, S extends Configuration> LocalizableMessage visitAggregation(
- AggregationPropertyDefinition<C, S> d, Void p) {
- return LocalizableMessage.raw("NAME");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LocalizableMessage visitAttributeType(AttributeTypePropertyDefinition d, Void p) {
- return LocalizableMessage.raw("OID");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LocalizableMessage visitACI(ACIPropertyDefinition d, Void p) {
- return LocalizableMessage.raw("ACI");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LocalizableMessage visitBoolean(BooleanPropertyDefinition d, Void p) {
- if (isDetailed) {
- return LocalizableMessage.raw("false | true");
- } else {
- return LocalizableMessage.raw("BOOLEAN");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LocalizableMessage visitClass(ClassPropertyDefinition d, Void p) {
- if (isDetailed && !d.getInstanceOfInterface().isEmpty()) {
- return LocalizableMessage.raw("CLASS <= " + d.getInstanceOfInterface().get(0));
- } else {
- return LocalizableMessage.raw("CLASS");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LocalizableMessage visitDN(DNPropertyDefinition d, Void p) {
- if (isDetailed && d.getBaseDN() != null) {
- return LocalizableMessage.raw("DN <= " + d.getBaseDN());
- } else {
- return LocalizableMessage.raw("DN");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LocalizableMessage visitDuration(DurationPropertyDefinition d, Void p) {
- LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
- DurationUnit unit = d.getBaseUnit();
-
- if (isDetailed && d.getLowerLimit() > 0) {
- builder.append(DurationUnit.toString(d.getLowerLimit()));
- builder.append(" <= ");
- }
-
- builder.append("DURATION (");
- builder.append(unit.getShortName());
- builder.append(")");
-
- if (isDetailed) {
- if (d.getUpperLimit() != null) {
- builder.append(" <= ");
- builder.append(DurationUnit.toString(d.getUpperLimit()));
- }
-
- if (d.isAllowUnlimited()) {
- builder.append(" | unlimited");
- }
- }
-
- return builder.toMessage();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <E extends Enum<E>> LocalizableMessage visitEnum(EnumPropertyDefinition<E> d, Void p) {
- if (!isDetailed) {
- // Use the last word in the property name.
- String name = d.getName();
- int i = name.lastIndexOf('-');
- if (i == -1 || i == (name.length() - 1)) {
- return LocalizableMessage.raw(name.toUpperCase());
- } else {
- return LocalizableMessage.raw(name.substring(i + 1).toUpperCase());
- }
- } else {
- Set<String> values = new TreeSet<String>();
-
- for (Object value : EnumSet.allOf(d.getEnumClass())) {
- values.add(value.toString().trim().toLowerCase());
- }
-
- boolean isFirst = true;
- LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
- for (String s : values) {
- if (!isFirst) {
- builder.append(" | ");
- }
- builder.append(s);
- isFirst = false;
- }
-
- return builder.toMessage();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LocalizableMessage visitInteger(IntegerPropertyDefinition d, Void p) {
- LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
-
- if (isDetailed) {
- builder.append(String.valueOf(d.getLowerLimit()));
- builder.append(" <= ");
- }
-
- builder.append("INTEGER");
-
- if (isDetailed) {
- if (d.getUpperLimit() != null) {
- builder.append(" <= ");
- builder.append(String.valueOf(d.getUpperLimit()));
- } else if (d.isAllowUnlimited()) {
- builder.append(" | unlimited");
- }
- }
-
- return builder.toMessage();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LocalizableMessage visitIPAddress(IPAddressPropertyDefinition d, Void p) {
- return LocalizableMessage.raw("HOST_NAME");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LocalizableMessage visitIPAddressMask(IPAddressMaskPropertyDefinition d, Void p) {
- return LocalizableMessage.raw("IP_ADDRESS_MASK");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LocalizableMessage visitSize(SizePropertyDefinition d, Void p) {
- LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
-
- if (isDetailed && d.getLowerLimit() > 0) {
- SizeUnit unit = SizeUnit.getBestFitUnitExact(d.getLowerLimit());
- builder.append(numberFormat.format(unit.fromBytes(d.getLowerLimit())));
- builder.append(' ');
- builder.append(unit.getShortName());
- builder.append(" <= ");
- }
-
- builder.append("SIZE");
-
- if (isDetailed) {
- if (d.getUpperLimit() != null) {
- long upperLimit = d.getUpperLimit();
- SizeUnit unit = SizeUnit.getBestFitUnitExact(upperLimit);
-
- // Quite often an upper limit is some power of 2 minus 1. In
- // those
- // cases lets use a "less than" relation rather than a "less
- // than
- // or equal to" relation. This will result in a much more
- // readable
- // quantity.
- if (unit == SizeUnit.BYTES && upperLimit < Long.MAX_VALUE) {
- unit = SizeUnit.getBestFitUnitExact(upperLimit + 1);
- if (unit != SizeUnit.BYTES) {
- upperLimit += 1;
- builder.append(" < ");
- } else {
- builder.append(" <= ");
- }
- } else {
- builder.append(" <= ");
- }
-
- builder.append(numberFormat.format(unit.fromBytes(upperLimit)));
- builder.append(' ');
- builder.append(unit.getShortName());
- }
-
- if (d.isAllowUnlimited()) {
- builder.append(" | unlimited");
- }
- }
-
- return builder.toMessage();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LocalizableMessage visitString(StringPropertyDefinition d, Void p) {
- if (d.getPattern() != null) {
- if (isDetailed) {
- LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
- builder.append(d.getPatternUsage());
- builder.append(" - ");
- builder.append(d.getPatternSynopsis());
- return builder.toMessage();
- } else {
- return LocalizableMessage.raw(d.getPatternUsage());
- }
- } else {
- return LocalizableMessage.raw("STRING");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <T> LocalizableMessage visitUnknown(PropertyDefinition<T> d, Void p) {
- return LocalizableMessage.raw("?");
- }
- }
-
- // Underlying implementation.
- private final MyPropertyDefinitionVisitor pimpl;
-
- /**
- * Creates a new property usage builder.
- *
- * @param isDetailed
- * Indicates whether or not the generated usage should contain
- * detailed information such as constraints.
- */
- public PropertyDefinitionUsageBuilder(boolean isDetailed) {
- this.pimpl = new MyPropertyDefinitionVisitor(isDetailed);
- }
-
- /**
- * Generates the usage information for the provided property definition.
- *
- * @param pd
- * The property definitions.
- * @return Returns the usage information for the provided property
- * definition.
- */
- public LocalizableMessage getUsage(PropertyDefinition<?> pd) {
- return pd.accept(pimpl, null);
- };
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/PropertyDefinitionVisitor.java b/opendj-config/src/main/java/org/opends/server/admin/PropertyDefinitionVisitor.java
deleted file mode 100644
index f684ebf..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/PropertyDefinitionVisitor.java
+++ /dev/null
@@ -1,262 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-/**
- * A visitor of property definitions, in the style of the visitor design
- * pattern. Classes implementing this interface can query property definitions
- * in a type-safe manner when the kind of property definition is unknown at
- * compile time. When a visitor is passed to a property definition's accept
- * method, the corresponding visit method most applicable to that property
- * definition is invoked.
- * <p>
- * Each <code>visitXXX</code> method is provided with a default implementation
- * which calls {@link #visitUnknown(PropertyDefinition, Object)}. Sub-classes
- * can override any or all of the methods to provide their own type-specific
- * behavior.
- *
- * @param <R>
- * The return type of this visitor's methods. Use
- * {@link java.lang.Void} for visitors that do not need to return
- * results.
- * @param <P>
- * The type of the additional parameter to this visitor's methods.
- * Use {@link java.lang.Void} for visitors that do not need an
- * additional parameter.
- */
-public abstract class PropertyDefinitionVisitor<R, P> {
-
- /**
- * Default constructor.
- */
- protected PropertyDefinitionVisitor() {
- // No implementation required.
- }
-
- /**
- * Visit a dseecompat Global ACI property definition.
- *
- * @param pd
- * The Global ACI property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitACI(ACIPropertyDefinition pd, P p) {
- return visitUnknown(pd, p);
- }
-
- /**
- * Visit an aggregation property definition.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * aggregation property definition refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * aggregation property definition refers to.
- * @param pd
- * The aggregation property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public <C extends ConfigurationClient, S extends Configuration> R visitAggregation(
- AggregationPropertyDefinition<C, S> pd, P p) {
- return visitUnknown(pd, p);
- }
-
- /**
- * Visit an attribute type property definition.
- *
- * @param pd
- * The attribute type property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitAttributeType(AttributeTypePropertyDefinition pd, P p) {
- return visitUnknown(pd, p);
- }
-
- /**
- * Visit a boolean property definition.
- *
- * @param pd
- * The boolean property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitBoolean(BooleanPropertyDefinition pd, P p) {
- return visitUnknown(pd, p);
- }
-
- /**
- * Visit a class property definition.
- *
- * @param pd
- * The class property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitClass(ClassPropertyDefinition pd, P p) {
- return visitUnknown(pd, p);
- }
-
- /**
- * Visit a DN property definition.
- *
- * @param pd
- * The DN property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitDN(DNPropertyDefinition pd, P p) {
- return visitUnknown(pd, p);
- }
-
- /**
- * Visit a duration property definition.
- *
- * @param pd
- * The duration property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitDuration(DurationPropertyDefinition pd, P p) {
- return visitUnknown(pd, p);
- }
-
- /**
- * Visit an enumeration property definition.
- *
- * @param <E>
- * The enumeration that should be used for values of the property
- * definition.
- * @param pd
- * The enumeration property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public <E extends Enum<E>> R visitEnum(EnumPropertyDefinition<E> pd, P p) {
- return visitUnknown(pd, p);
- }
-
- /**
- * Visit an integer property definition.
- *
- * @param pd
- * The integer property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitInteger(IntegerPropertyDefinition pd, P p) {
- return visitUnknown(pd, p);
- }
-
- /**
- * Visit a IP address property definition.
- *
- * @param pd
- * The IP address property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitIPAddress(IPAddressPropertyDefinition pd, P p) {
- return visitUnknown(pd, p);
- }
-
- /**
- * Visit a IP address mask property definition.
- *
- * @param pd
- * The IP address mask property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitIPAddressMask(IPAddressMaskPropertyDefinition pd, P p) {
- return visitUnknown(pd, p);
- }
-
- /**
- * Visit a size property definition.
- *
- * @param pd
- * The size property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitSize(SizePropertyDefinition pd, P p) {
- return visitUnknown(pd, p);
- }
-
- /**
- * Visit a string property definition.
- *
- * @param pd
- * The string property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitString(StringPropertyDefinition pd, P p) {
- return visitUnknown(pd, p);
- }
-
- /**
- * Visit an unknown type of property definition. Implementations of this
- * method can provide default behavior for unknown property definition
- * types.
- * <p>
- * The default implementation of this method throws an
- * {@link UnknownPropertyDefinitionException}. Sub-classes can override this
- * method with their own default behavior.
- *
- * @param <T>
- * The type of the underlying property.
- * @param pd
- * The property definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- * @throws UnknownPropertyDefinitionException
- * Visitor implementations may optionally throw this exception.
- */
- public <T> R visitUnknown(PropertyDefinition<T> pd, P p) {
- throw new UnknownPropertyDefinitionException(pd, p);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/PropertyDefinitionsOptions.java b/opendj-config/src/main/java/org/opends/server/admin/PropertyDefinitionsOptions.java
deleted file mode 100644
index 2b83adb..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/PropertyDefinitionsOptions.java
+++ /dev/null
@@ -1,137 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2013 ForgeRock AS.
- */
-package org.opends.server.admin;
-
-/**
- * Provides options for {@code PropertyDefinition property definitions}.
- * <p>
- * These options are used by some {@code PropertyDefinition} methods to define
- * strategy used when processing value(s) of a property definition.
- */
-public final class PropertyDefinitionsOptions {
-
- /** Immutable options with no validation of java classes or LDAP attributes. */
- public static final PropertyDefinitionsOptions NO_VALIDATION_OPTIONS = new PropertyDefinitionsOptions().
- setAllowClassValidation(false).
- setCheckSchemaForAttributes(false).
- freeze();
-
- /** By default, class validation is enabled. */
- private boolean allowClassValidation = true;
-
- /** By default, attributes validation against the schema is enabled. */
- private boolean checkSchemaForAttributes = true;
-
- /**
- * If true, then the instance is frozen so state can't be changed (object is
- * immutable).
- */
- private boolean isFrozen = false;
-
- /**
- * Creates a new set of properties options with default settings. By
- * default, class validation and attributes checking are enabled.
- */
- public PropertyDefinitionsOptions() {
- // empty implementation
- }
-
- /**
- * Determine whether or not class property definitions should validate class
- * name property values. Validation involves checking that the class exists
- * and that it implements the required interfaces.
- *
- * @return Returns <code>true</code> if class property definitions should
- * validate class name property values.
- */
- public boolean allowClassValidation() {
- return allowClassValidation;
- }
-
- /**
- * Specify whether or not class property definitions should validate class
- * name property values. Validation involves checking that the class exists
- * and that it implements the required interfaces.
- * <p>
- * By default validation is switched on.
- *
- * @param value
- * <code>true</code> if class property definitions should
- * validate class name property values.
- * @return A reference to this definitions options.
- */
- public PropertyDefinitionsOptions setAllowClassValidation(boolean value) {
- if (isFrozen) {
- throw new IllegalStateException("This object is frozen, it can't be changed");
- }
- allowClassValidation = value;
- return this;
- }
-
- /**
- * Determines whether or not attribute type names should be validated
- * against the schema.
- *
- * @return Returns <code>true</code> if attribute type names should be
- * validated against the schema.
- */
- public boolean checkSchemaForAttributes() {
- return checkSchemaForAttributes;
- }
-
- /**
- * Specify whether or not attribute type names should be validated against
- * the schema.
- * <p>
- * By default validation is switched on.
- *
- * @param value
- * <code>true</code> if attribute type names should be validated
- * against the schema.
- * @return A reference to this definitions options.
- */
- public PropertyDefinitionsOptions setCheckSchemaForAttributes(boolean value) {
- if (isFrozen) {
- throw new IllegalStateException("This object is frozen, it can't be changed");
- }
- checkSchemaForAttributes = value;
- return this;
- }
-
- /**
- * Freeze this object, making it effectively immutable.
- * <p>
- * Once this method is called, all {@code set} methods will throw
- * an IllegalStateException if called.
- *
- * @return A reference to this definitions options.
- */
- public PropertyDefinitionsOptions freeze() {
- isFrozen = true;
- return this;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/PropertyException.java b/opendj-config/src/main/java/org/opends/server/admin/PropertyException.java
deleted file mode 100644
index bdcea6f..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/PropertyException.java
+++ /dev/null
@@ -1,87 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * Exceptions thrown as a result of errors that occurred when decoding and
- * modifying property values.
- */
-public abstract class PropertyException extends AdminRuntimeException {
-
- /**
- * Version ID required by serializable classes.
- */
- private static final long serialVersionUID = -8465109598081914482L;
-
- // The property definition associated with the property that caused
- // the exception.
- private final PropertyDefinition<?> pd;
-
- /**
- * Creates property exception without a cause.
- *
- * @param pd
- * The property definition associated with the property that
- * caused the exception.
- * @param message
- * The message.
- */
- protected PropertyException(PropertyDefinition<?> pd, LocalizableMessage message) {
- super(message);
- this.pd = pd;
- }
-
- /**
- * Creates property exception with a cause.
- *
- * @param pd
- * The property definition associated with the property that
- * caused the exception.
- * @param message
- * The message.
- * @param cause
- * The cause.
- */
- protected PropertyException(PropertyDefinition<?> pd, LocalizableMessage message, Throwable cause) {
- super(message, cause);
- this.pd = pd;
- }
-
- /**
- * Get the property definition associated with the property that caused the
- * exception.
- *
- * @return Returns the property definition associated with the property that
- * caused the exception.
- */
- public final PropertyDefinition<?> getPropertyDefinition() {
- return pd;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/PropertyIsMandatoryException.java b/opendj-config/src/main/java/org/opends/server/admin/PropertyIsMandatoryException.java
deleted file mode 100644
index d108c6d..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/PropertyIsMandatoryException.java
+++ /dev/null
@@ -1,50 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-/**
- * Thrown when an attempt is made to remove a mandatory property.
- */
-public class PropertyIsMandatoryException extends PropertyException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = 5328211711156565625L;
-
- /**
- * Create a new property is mandatory exception.
- *
- * @param pd
- * The property definition.
- */
- public PropertyIsMandatoryException(PropertyDefinition<?> pd) {
- super(pd, ERR_PROPERTY_IS_MANDATORY_EXCEPTION.get(pd.getName()));
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/PropertyIsReadOnlyException.java b/opendj-config/src/main/java/org/opends/server/admin/PropertyIsReadOnlyException.java
deleted file mode 100644
index dea72ef..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/PropertyIsReadOnlyException.java
+++ /dev/null
@@ -1,50 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-/**
- * Thrown when an attempt is made to modify a read-only property.
- */
-public class PropertyIsReadOnlyException extends PropertyException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = 5315348044141024459L;
-
- /**
- * Create a new property is read-only exception.
- *
- * @param pd
- * The property definition.
- */
- public PropertyIsReadOnlyException(PropertyDefinition<?> pd) {
- super(pd, ERR_PROPERTY_IS_READ_ONLY_EXCEPTION.get(pd.getName()));
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/PropertyIsSingleValuedException.java b/opendj-config/src/main/java/org/opends/server/admin/PropertyIsSingleValuedException.java
deleted file mode 100644
index bd748a4..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/PropertyIsSingleValuedException.java
+++ /dev/null
@@ -1,50 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-/**
- * Thrown when an attempt is made to add more than value to a single-valued
- * property.
- */
-public class PropertyIsSingleValuedException extends PropertyException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = -8056602690887917027L;
-
- /**
- * Create a new property is single valued exception.
- *
- * @param pd
- * The property definition.
- */
- public PropertyIsSingleValuedException(PropertyDefinition<?> pd) {
- super(pd, ERR_PROPERTY_IS_SINGLE_VALUED_EXCEPTION.get(pd.getName()));
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/PropertyNotFoundException.java b/opendj-config/src/main/java/org/opends/server/admin/PropertyNotFoundException.java
deleted file mode 100644
index 5d7cad1..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/PropertyNotFoundException.java
+++ /dev/null
@@ -1,68 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-/**
- * Thrown when an attempt is made to retrieve a property using its name but the
- * name was not recognized.
- * <p>
- * This exception can occur when attempt is made to retrieve inherited default
- * values from a managed object.
- */
-public class PropertyNotFoundException extends OperationsException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = -895548482881819610L;
-
- // The name of the property that could not be found.
- private final String propertyName;
-
- /**
- * Create a new property not found exception.
- *
- * @param propertyName
- * The name of the property that could not be found.
- */
- public PropertyNotFoundException(String propertyName) {
- super(ERR_PROPERTY_NOT_FOUND_EXCEPTION.get(propertyName));
-
- this.propertyName = propertyName;
- }
-
- /**
- * Get the name of the property that could not be found.
- *
- * @return Returns the name of the property that could not be found.
- */
- public String getPropertyName() {
- return propertyName;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/PropertyOption.java b/opendj-config/src/main/java/org/opends/server/admin/PropertyOption.java
deleted file mode 100644
index 655a284..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/PropertyOption.java
+++ /dev/null
@@ -1,67 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-/**
- * This enumeration contains various options that can be associated with
- * property definitions.
- */
-public enum PropertyOption {
- /**
- * Use this option to identify properties which should be considered as
- * advanced and should not be exposed by default in client applications.
- */
- ADVANCED,
-
- /**
- * Use this option to identify properties which must not be directly exposed
- * in client applications.
- */
- HIDDEN,
-
- /**
- * Use this option to identify properties which must have a value.
- */
- MANDATORY,
-
- /**
- * Use this option to identify properties which are multi-valued.
- */
- MULTI_VALUED,
-
- /**
- * Use this option to identify properties which can be initialized once only
- * and are read-only thereafter.
- */
- READ_ONLY,
-
- /**
- * Use this option to identify properties which are for monitoring purposes
- * only and are generated automatically by the server..
- */
- MONITORING;
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/PropertyProvider.java b/opendj-config/src/main/java/org/opends/server/admin/PropertyProvider.java
deleted file mode 100644
index 95c2fe6..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/PropertyProvider.java
+++ /dev/null
@@ -1,80 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import java.util.Collection;
-import java.util.Collections;
-
-/**
- * An interface which can be used to initialize the contents of a managed
- * object.
- */
-public interface PropertyProvider {
-
- /**
- * A property provider which always returns empty property values,
- * indicating default behavior.
- */
- public static final PropertyProvider DEFAULT_PROVIDER = new PropertyProvider() {
-
- /**
- * {@inheritDoc}
- */
- public <T> Collection<T> getPropertyValues(PropertyDefinition<T> d) {
- return Collections.<T> emptySet();
- }
-
- };
-
- /**
- * Get the property values associated with the specified property
- * definition.
- * <p>
- * Implementations are not required to validate the values that they
- * provide. Specifically:
- * <ul>
- * <li>they do not need to guarantee that the provided values are valid
- * according to the property's syntax
- * <li>they do not need to provide values for mandatory properties
- * <li>they do not need to ensure that single-valued properties do contain
- * at most one value.
- * </ul>
- * The returned set of values is allowed to contain duplicates.
- *
- * @param <T>
- * The underlying type of the property.
- * @param d
- * The Property definition.
- * @return Returns a newly allocated set containing a copy of the property's
- * values. An empty set indicates that the property has no values
- * defined and any default behavior is applicable.
- * @throws IllegalArgumentException
- * If this property provider does not recognise the requested
- * property definition.
- */
- <T> Collection<T> getPropertyValues(PropertyDefinition<T> d);
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/PropertyValueVisitor.java b/opendj-config/src/main/java/org/opends/server/admin/PropertyValueVisitor.java
deleted file mode 100644
index 1f35e84..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/PropertyValueVisitor.java
+++ /dev/null
@@ -1,296 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import java.net.InetAddress;
-
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.opends.server.authorization.dseecompat.Aci;
-import org.opends.server.types.AddressMask;
-
-/**
- * A visitor of property values, in the style of the visitor design pattern.
- * Classes implementing this interface can query a property a value and its
- * associated property definition in a type-safe manner when the kind of
- * property value is unknown at compile time. When a visitor is passed to a
- * property definition's accept method, the corresponding visit method most
- * applicable to that property definition is invoked.
- * <p>
- * Each <code>visitXXX</code> method is provided with a default implementation
- * which calls {@link #visitUnknown(PropertyDefinition, Object, Object)}.
- * Sub-classes can override any or all of the methods to provide their own
- * type-specific behavior.
- *
- * @param <R>
- * The return type of this visitor's methods. Use
- * {@link java.lang.Void} for visitors that do not need to return
- * results.
- * @param <P>
- * The type of the additional parameter to this visitor's methods.
- * Use {@link java.lang.Void} for visitors that do not need an
- * additional parameter.
- */
-public abstract class PropertyValueVisitor<R, P> {
-
- /**
- * Default constructor.
- */
- protected PropertyValueVisitor() {
- // No implementation required.
- }
-
- /**
- * Visit a dseecompat ACI.
- *
- * @param pd
- * The dseecompat ACI property definition.
- * @param v
- * The property value to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitACI(ACIPropertyDefinition pd, Aci v, P p) {
- return visitUnknown(pd, v, p);
- }
-
- /**
- * Visit an aggregation property value.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * aggregation property definition refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * aggregation property definition refers to.
- * @param pd
- * The aggregation property definition to visit.
- * @param v
- * The property value to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public <C extends ConfigurationClient, S extends Configuration> R visitAggregation(
- AggregationPropertyDefinition<C, S> pd, String v, P p) {
- return visitUnknown(pd, v, p);
- }
-
- /**
- * Visit an attribute type.
- *
- * @param pd
- * The attribute type property definition.
- * @param v
- * The property value to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitAttributeType(AttributeTypePropertyDefinition pd, AttributeType v, P p) {
- return visitUnknown(pd, v, p);
- }
-
- /**
- * Visit a boolean.
- *
- * @param pd
- * The boolean property definition.
- * @param v
- * The property value to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitBoolean(BooleanPropertyDefinition pd, Boolean v, P p) {
- return visitUnknown(pd, v, p);
- }
-
- /**
- * Visit a class.
- *
- * @param pd
- * The class property definition.
- * @param v
- * The property value to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitClass(ClassPropertyDefinition pd, String v, P p) {
- return visitUnknown(pd, v, p);
- }
-
- /**
- * Visit a DN.
- *
- * @param pd
- * The DN property definition.
- * @param v
- * The property value to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitDN(DNPropertyDefinition pd, DN v, P p) {
- return visitUnknown(pd, v, p);
- }
-
- /**
- * Visit a duration.
- *
- * @param pd
- * The duration property definition.
- * @param v
- * The property value to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitDuration(DurationPropertyDefinition pd, Long v, P p) {
- return visitUnknown(pd, v, p);
- }
-
- /**
- * Visit an enumeration.
- *
- * @param <E>
- * The enumeration that should be used for values of the property
- * definition.
- * @param pd
- * The enumeration property definition.
- * @param v
- * The property value to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public <E extends Enum<E>> R visitEnum(EnumPropertyDefinition<E> pd, E v, P p) {
- return visitUnknown(pd, v, p);
- }
-
- /**
- * Visit an integer.
- *
- * @param pd
- * The integer property definition.
- * @param v
- * The property value to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitInteger(IntegerPropertyDefinition pd, Integer v, P p) {
- return visitUnknown(pd, v, p);
- }
-
- /**
- * Visit a IP address.
- *
- * @param pd
- * The IP address property definition.
- * @param v
- * The property value to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitIPAddress(IPAddressPropertyDefinition pd, InetAddress v, P p) {
- return visitUnknown(pd, v, p);
- }
-
- /**
- * Visit a IP address mask.
- *
- * @param pd
- * The IP address mask property definition.
- * @param v
- * The property value to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitIPAddressMask(IPAddressMaskPropertyDefinition pd, AddressMask v, P p) {
- return visitUnknown(pd, v, p);
- }
-
- /**
- * Visit a size.
- *
- * @param pd
- * The size property definition.
- * @param v
- * The property value to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitSize(SizePropertyDefinition pd, Long v, P p) {
- return visitUnknown(pd, v, p);
- }
-
- /**
- * Visit a string.
- *
- * @param pd
- * The string property definition.
- * @param v
- * The property value to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- public R visitString(StringPropertyDefinition pd, String v, P p) {
- return visitUnknown(pd, v, p);
- }
-
- /**
- * Visit an unknown type of property value. Implementations of this method
- * can provide default behavior for unknown types of property.
- * <p>
- * The default implementation of this method throws an
- * {@link UnknownPropertyDefinitionException}. Sub-classes can override this
- * method with their own default behavior.
- *
- * @param <T>
- * The type of property value to visit.
- * @param pd
- * The property definition.
- * @param v
- * The property value.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- * @throws UnknownPropertyDefinitionException
- * Visitor implementations may optionally throw this exception.
- */
- public <T> R visitUnknown(PropertyDefinition<T> pd, T v, P p) {
- throw new UnknownPropertyDefinitionException(pd, p);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/Reference.java b/opendj-config/src/main/java/org/opends/server/admin/Reference.java
deleted file mode 100644
index b3aafa6..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/Reference.java
+++ /dev/null
@@ -1,204 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static com.forgerock.opendj.util.StaticUtils.*;
-
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.RDN;
-
-/**
- * A reference to another managed object.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * reference refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * reference refers to.
- */
-public final class Reference<C extends ConfigurationClient, S extends Configuration> {
-
- /**
- * Parses a DN string value as a reference using the provided managed object
- * path and relation definition.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * reference refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * reference refers to.
- * @param path
- * The path of the referenced managed object's parent.
- * @param relationDef
- * The instantiable relation in the parent which contains the
- * referenced managed object.
- * @param dnAsString
- * The DN string value.
- * @return Returns the new reference based on the provided DN string value.
- * @throws IllegalArgumentException
- * If the DN string value could not be decoded as a DN or if the
- * provided DN did not correspond to the provided path and
- * relation.
- */
- public static <C extends ConfigurationClient, S extends Configuration> Reference<C, S> parseDN(
- ManagedObjectPath<?, ?> path, InstantiableRelationDefinition<C, S> relationDef, String dnAsString) {
- AbstractManagedObjectDefinition<?, ?> definition = path.getManagedObjectDefinition();
- RelationDefinition<?, ?> tmp = definition.getRelationDefinition(relationDef.getName());
- if (tmp != relationDef) {
- // TODO : i18n ?
- throw new IllegalArgumentException("The relation \"" + relationDef.getName()
- + "\" is not associated with the definition \"" + definition.getName() + "\"");
- }
-
- DN dn = DN.valueOf(dnAsString);
- RDN rdn = dn.rdn();
- if (rdn == null) {
- // TODO : i18n ?
- throw new IllegalArgumentException("Unabled to decode the DN string: \"" + dnAsString + "\"");
- }
-
- // Check that the DN was valid.
- String name = rdn.getFirstAVA().getAttributeValue().toString();
- DN expected = path.child(relationDef, name).toDN();
- if (!dn.equals(expected)) {
- // TODO : i18n ?
- throw new IllegalArgumentException("Unabled to decode the DN string: \"" + dnAsString + "\"");
- }
-
- return new Reference<C, S>(path, relationDef, name);
- }
-
- /**
- * Parses a name as a reference using the provided managed object path and
- * relation definition.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * reference refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * reference refers to.
- * @param p
- * The path of the referenced managed object's parent.
- * @param rd
- * The instantiable relation in the parent which contains the
- * referenced managed object.
- * @param s
- * The name of the referenced managed object.
- * @return Returns the new reference based on the provided name.
- * @throws IllegalArgumentException
- * If the relation is not associated with the provided parent's
- * definition, or if the provided name is empty.
- */
- public static <C extends ConfigurationClient, S extends Configuration> Reference<C, S> parseName(
- ManagedObjectPath<?, ?> p, InstantiableRelationDefinition<C, S> rd, String s) {
- // Sanity checks.
- AbstractManagedObjectDefinition<?, ?> d = p.getManagedObjectDefinition();
- RelationDefinition<?, ?> tmp = d.getRelationDefinition(rd.getName());
- if (tmp != rd) {
- throw new IllegalArgumentException("The relation \"" + rd.getName()
- + "\" is not associated with the definition \"" + d.getName() + "\"");
- }
-
- if (s.trim().length() == 0) {
- throw new IllegalArgumentException("Empty names are not allowed");
- }
-
- return new Reference<C, S>(p, rd, s);
- }
-
- // The name of the referenced managed object.
- private final String name;
-
- // The path of the referenced managed object.
- private final ManagedObjectPath<C, S> path;
-
- // The instantiable relation in the parent which contains the
- // referenced managed object.
- private final InstantiableRelationDefinition<C, S> relation;
-
- // Private constructor.
- private Reference(ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> relation, String name) {
- this.relation = relation;
- this.name = name;
- this.path = parent.child(relation, name);
- }
-
- /**
- * Gets the name of the referenced managed object.
- *
- * @return Returns the name of the referenced managed object.
- */
- public String getName() {
- return name;
- }
-
- /**
- * Gets the normalized name of the referenced managed object.
- *
- * @return Returns the normalized name of the referenced managed object.
- */
- public String getNormalizedName() {
- PropertyDefinition<?> pd = relation.getNamingPropertyDefinition();
- return normalizeName(pd);
- }
-
- /**
- * Gets the DN of the referenced managed object.
- *
- * @return Returns the DN of the referenced managed object.
- */
- public DN toDN() {
- return path.toDN();
- }
-
- /**
- * {@inheritDoc}
- */
- public String toString() {
- return name;
- }
-
- // Normalize a value using the specified naming property definition
- // if defined.
- private <T> String normalizeName(PropertyDefinition<T> pd) {
- if (pd != null) {
- try {
- // TODO : is it correct to have no validation ?
- T tvalue = pd.decodeValue(name, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- return pd.normalizeValue(tvalue);
- } catch (IllegalPropertyValueStringException e) {
- // Fall through to default normalization.
- }
- }
-
- // FIXME: should really use directory string normalizer.
- String s = name.trim().replaceAll(" +", " ");
- return toLowerCase(s);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/RelationDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/RelationDefinition.java
deleted file mode 100644
index 2ab0034..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/RelationDefinition.java
+++ /dev/null
@@ -1,361 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.EnumSet;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.Set;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * Relation definitions define relationships between types of managed objects.
- * In addition they define the ownership model:
- * <ul>
- * <li>composition - referenced managed objects are owned by the parent managed
- * object and are deleted when the parent is deleted
- * <li>aggregation - referenced managed objects are not owned by the parent
- * managed object. Instead they are shared by other managed objects.
- * </ul>
- * Relations define how clients interact with the configuration. For example,
- * clients manage aggregated managed objects in a shared location and attach
- * them to parent managed objects. Composed managed objects, on the other hand,
- * would be created directly beneath the parent managed object and destroyed
- * with it too.
- * <p>
- * Within the server, listeners can choose to request notification of managed
- * objects being added or removed from relations.
- * <p>
- * In LDAP, compositions are represented as follows:
- * <ul>
- * <li>singleton relations (one to one): a referenced managed object is
- * represented using a child entry directly beneath the parent
- * <li>optional relations (one to zero or one): a referenced managed object is
- * represented using a child entry directly beneath the parent
- * <li>instantiable relations (one to many): the relation is represented using a
- * child entry directly beneath the parent. Referenced managed objects are
- * represented using child entries of this "relation entry" and are named by the
- * user
- * <li>set relations (one to many): the relation is represented using a child
- * entry directly beneath the parent. Referenced managed objects are represented
- * using child entries of this "relation entry" whose name is the type of the
- * managed object.
- * </ul>
- * Whereas, aggregations are represented by storing the DNs of the referenced
- * managed objects in an attribute of the aggregating managed object.
- *
- * @param <C>
- * The type of client managed object configuration that this relation
- * definition refers to.
- * @param <S>
- * The type of server managed object configuration that this relation
- * definition refers to.
- */
-public abstract class RelationDefinition<C extends ConfigurationClient, S extends Configuration> {
-
- /**
- * An interface for incrementally constructing relation definitions.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * relation definition refers to.
- * @param <D>
- * The type of relation definition constructed by this builder.
- */
- protected abstract static class AbstractBuilder<C extends ConfigurationClient, S extends Configuration,
- D extends RelationDefinition<C, S>> {
-
- // Common fields.
- private final Common<C, S> common;
-
- /**
- * Create a property definition builder.
- *
- * @param pd
- * The parent managed object definition.
- * @param name
- * The name of the relation.
- * @param cd
- * The child managed object definition.
- */
- protected AbstractBuilder(AbstractManagedObjectDefinition<?, ?> pd, String name,
- AbstractManagedObjectDefinition<C, S> cd) {
- this.common = new Common<C, S>(pd, name, cd);
- }
-
- /**
- * Construct a relation definition based on the properties of this
- * builder.
- *
- * @return The new relation definition.
- */
- public final D getInstance() {
- return buildInstance(common);
- }
-
- /**
- * Add a relation definition option.
- *
- * @param option
- * The relation option.
- */
- public final void setOption(RelationOption option) {
- Reject.ifNull(option);
- common.options.add(option);
- }
-
- /**
- * Build a relation definition based on the properties of this builder.
- *
- * @param common
- * The common fields of the new relation definition.
- * @return The new relation definition.
- */
- protected abstract D buildInstance(Common<C, S> common);
- }
-
- /**
- * Opaque structure containing fields common to all relation definition
- * types.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * relation definition refers to.
- */
- protected static final class Common<C extends ConfigurationClient, S extends Configuration> {
-
- // The definition of the child managed object.
- private final AbstractManagedObjectDefinition<C, S> cd;
-
- // The name of the relation.
- private final String name;
-
- // Options applicable to this definition.
- private final Set<RelationOption> options;
-
- // The definition of the parent managed object.
- private final AbstractManagedObjectDefinition<?, ?> pd;
-
- // Private constructor.
- private Common(AbstractManagedObjectDefinition<?, ?> pd, String name,
- AbstractManagedObjectDefinition<C, S> cd) {
- this.name = name;
- this.pd = pd;
- this.cd = cd;
- this.options = EnumSet.noneOf(RelationOption.class);
- }
- }
-
- // Common fields.
- private final Common<C, S> common;
-
- /**
- * Create a new managed object relation definition with the specified common
- * fields.
- *
- * @param common
- * The common fields of the new relation definition.
- */
- protected RelationDefinition(Common<C, S> common) {
- this.common = common;
- }
-
- /**
- * Apply a visitor to this relation definition.
- *
- * @param <R>
- * The return type of the visitor's methods.
- * @param <P>
- * The type of the additional parameters to the visitor's
- * methods.
- * @param v
- * The relation definition visitor.
- * @param p
- * Optional additional visitor parameter.
- * @return Returns a result as specified by the visitor.
- */
- public abstract <R, P> R accept(RelationDefinitionVisitor<R, P> v, P p);
-
- /**
- * Get the definition of the child managed object.
- *
- * @return Returns the definition of the child managed object.
- */
- public final AbstractManagedObjectDefinition<C, S> getChildDefinition() {
- return common.cd;
- }
-
- /**
- * Gets the optional description of this relation definition in the default
- * locale.
- *
- * @return Returns the description of this relation definition in the
- * default locale, or <code>null</code> if there is no description.
- */
- public final LocalizableMessage getDescription() {
- return getDescription(Locale.getDefault());
- }
-
- /**
- * Gets the optional description of this relation definition in the
- * specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the description of this relation definition in the
- * specified locale, or <code>null</code> if there is no
- * description.
- */
- public final LocalizableMessage getDescription(Locale locale) {
- try {
- String property = "relation." + common.name + ".description";
- return ManagedObjectDefinitionI18NResource.getInstance().getMessage(getParentDefinition(), property,
- locale);
- } catch (MissingResourceException e) {
- return null;
- }
- }
-
- /**
- * Get the name of the relation.
- *
- * @return Returns the name of the relation.
- */
- public final String getName() {
- return common.name;
- }
-
- /**
- * Get the definition of the parent managed object.
- *
- * @return Returns the definition of the parent managed object.
- */
- public final AbstractManagedObjectDefinition<?, ?> getParentDefinition() {
- return common.pd;
- }
-
- /**
- * Gets the synopsis of this relation definition in the default locale.
- *
- * @return Returns the synopsis of this relation definition in the default
- * locale.
- */
- public final LocalizableMessage getSynopsis() {
- return getSynopsis(Locale.getDefault());
- }
-
- /**
- * Gets the synopsis of this relation definition in the specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the synopsis of this relation definition in the specified
- * locale.
- */
- public final LocalizableMessage getSynopsis(Locale locale) {
- String property = "relation." + common.name + ".synopsis";
- return ManagedObjectDefinitionI18NResource.getInstance().getMessage(getParentDefinition(), property, locale);
- }
-
- /**
- * Gets the user friendly name of this relation definition in the default
- * locale.
- *
- * @return Returns the user friendly name of this relation definition in the
- * default locale.
- */
- public final LocalizableMessage getUserFriendlyName() {
- return getUserFriendlyName(Locale.getDefault());
- }
-
- /**
- * Gets the user friendly name of this relation definition in the specified
- * locale.
- *
- * @param locale
- * The locale.
- * @return Returns the user friendly name of this relation definition in the
- * specified locale.
- */
- public final LocalizableMessage getUserFriendlyName(Locale locale) {
- String property = "relation." + common.name + ".user-friendly-name";
- return ManagedObjectDefinitionI18NResource.getInstance().getMessage(getParentDefinition(), property, locale);
- }
-
- /**
- * Check if the specified option is set for this relation definition.
- *
- * @param option
- * The option to test.
- * @return Returns <code>true</code> if the option is set, or
- * <code>false</code> otherwise.
- */
- public final boolean hasOption(RelationOption option) {
- return common.options.contains(option);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final String toString() {
- StringBuilder builder = new StringBuilder();
- toString(builder);
- return builder.toString();
- }
-
- /**
- * Append a string representation of the managed object relation to the
- * provided string builder.
- *
- * @param builder
- * The string builder where the string representation should be
- * appended.
- */
- public abstract void toString(StringBuilder builder);
-
- /**
- * Performs any run-time initialization required by this relation
- * definition. This may include resolving managed object paths and property
- * names.
- *
- * @throws Exception
- * If this relation definition could not be initialized.
- */
- protected void initialize() throws Exception {
- // No implementation required.
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/RelationDefinitionVisitor.java b/opendj-config/src/main/java/org/opends/server/admin/RelationDefinitionVisitor.java
deleted file mode 100644
index 1832573..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/RelationDefinitionVisitor.java
+++ /dev/null
@@ -1,118 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-/**
- * A visitor of relation definitions, in the style of the visitor design
- * pattern. Classes implementing this interface can query relation definitions
- * in a type-safe manner when the kind of relation definition is unknown at
- * compile time. When a visitor is passed to a relation definition's accept
- * method, the corresponding visit method most applicable to that relation
- * definition is invoked.
- *
- * @param <R>
- * The return type of this visitor's methods. Use
- * {@link java.lang.Void} for visitors that do not need to return
- * results.
- * @param <P>
- * The type of the additional parameter to this visitor's methods.
- * Use {@link java.lang.Void} for visitors that do not need an
- * additional parameter.
- */
-public interface RelationDefinitionVisitor<R, P> {
-
- /**
- * Visit an instantiable relation definition.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param rd
- * The instantiable relation definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- <C extends ConfigurationClient, S extends Configuration> R visitInstantiable(
- InstantiableRelationDefinition<C, S> rd, P p);
-
- /**
- * Visit a set relation definition.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param rd
- * The set relation definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- <C extends ConfigurationClient, S extends Configuration> R visitSet(SetRelationDefinition<C, S> rd, P p);
-
- /**
- * Visit an optional relation definition.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param rd
- * The optional relation definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- <C extends ConfigurationClient, S extends Configuration> R visitOptional(OptionalRelationDefinition<C, S> rd, P p);
-
- /**
- * Visit a singleton relation definition.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param rd
- * The singleton relation definition to visit.
- * @param p
- * A visitor specified parameter.
- * @return Returns a visitor specified result.
- */
- <C extends ConfigurationClient, S extends Configuration> R visitSingleton(SingletonRelationDefinition<C, S> rd,
- P p);
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/RelationOption.java b/opendj-config/src/main/java/org/opends/server/admin/RelationOption.java
deleted file mode 100644
index ec758b7..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/RelationOption.java
+++ /dev/null
@@ -1,45 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-/**
- * This enumeration contains various options that can be associated with
- * relation definitions.
- */
-public enum RelationOption {
- /**
- * Use this option to identify relations which should be considered as
- * advanced and should not be exposed by default in client applications.
- */
- ADVANCED,
-
- /**
- * Use this option to identify relations which must not be directly exposed
- * in client applications.
- */
- HIDDEN;
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/RelativeInheritedDefaultBehaviorProvider.java b/opendj-config/src/main/java/org/opends/server/admin/RelativeInheritedDefaultBehaviorProvider.java
deleted file mode 100644
index a5fd94e..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/RelativeInheritedDefaultBehaviorProvider.java
+++ /dev/null
@@ -1,130 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-/**
- * A default behavior provider which retrieves default values from a parent
- * managed object. It should be used by properties which inherit their default
- * value(s) from properties held in an other managed object.
- *
- * @param <T>
- * The type of values represented by this provider.
- */
-public final class RelativeInheritedDefaultBehaviorProvider<T> extends DefaultBehaviorProvider<T> {
-
- // The type of managed object expected at the relative offset.
- private final AbstractManagedObjectDefinition<?, ?> d;
-
- // The relative offset (where 1 = parent, 2 = grandparent) of the
- // managed object containing the property.
- private final int offset;
-
- // The name of the property containing the inherited default values.
- private final String propertyName;
-
- /**
- * Create a relative inherited default behavior provider associated with a
- * parent managed object.
- *
- * @param d
- * The type of parent managed object expected at the relative
- * location.
- * @param propertyName
- * The name of the property containing the inherited default
- * values.
- * @param offset
- * The relative location of the parent managed object (where 0 is
- * the managed object itself, 1 is the parent, and 2 is the
- * grand-parent).
- * @throws IllegalArgumentException
- * If the offset is less than 0.
- */
- public RelativeInheritedDefaultBehaviorProvider(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- int offset) {
- // We do not decode the property name now because the property
- // might not have been constructed at this point (e.g. when the
- // offset is 0).
- if (offset < 0) {
- throw new IllegalArgumentException("Negative offset");
- }
- this.d = d;
- this.propertyName = propertyName;
- this.offset = offset;
- }
-
- /**
- * {@inheritDoc}
- */
- public <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p) {
- return v.visitRelativeInherited(this, p);
- }
-
- /**
- * Get the definition of the parent managed object containing the inherited
- * default values.
- *
- * @return Returns the definition of the parent managed object containing
- * the inherited default values.
- */
- public AbstractManagedObjectDefinition<?, ?> getManagedObjectDefinition() {
- return d;
- }
-
- /**
- * Get the absolute path of the managed object containing the property which
- * has the default values.
- *
- * @param path
- * The path of the current managed object from which the relative
- * path should be determined.
- * @return Returns the absolute path of the managed object containing the
- * property which has the default values.
- */
- public ManagedObjectPath<?, ?> getManagedObjectPath(ManagedObjectPath<?, ?> path) {
- return path.parent(offset);
- }
-
- /**
- * Gets the name of the property containing the inherited default values.
- *
- * @return Returns the name of the property containing the inherited default
- * values.
- */
- public String getPropertyName() {
- return propertyName;
- }
-
- /**
- * Get the relative location of the parent managed object.
- *
- * @return Returns the relative location of the parent managed object (where
- * 0 is the managed object itself, 1 is the parent, and 2 is the
- * grand-parent).
- */
- public int getRelativeOffset() {
- return offset;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/SetRelationDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/SetRelationDefinition.java
deleted file mode 100644
index aafa42e..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/SetRelationDefinition.java
+++ /dev/null
@@ -1,222 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * A managed object composite relationship definition which represents a
- * composition of zero or more managed objects each of which must have a
- * different type. The manage objects are named using their type name.
- *
- * @param <C>
- * The type of client managed object configuration that this relation
- * definition refers to.
- * @param <S>
- * The type of server managed object configuration that this relation
- * definition refers to.
- */
-public final class SetRelationDefinition<C extends ConfigurationClient, S extends Configuration> extends
- RelationDefinition<C, S> {
-
- /**
- * An interface for incrementally constructing set relation definitions.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * relation definition refers to.
- */
- public static final class Builder<C extends ConfigurationClient, S extends Configuration> extends
- AbstractBuilder<C, S, SetRelationDefinition<C, S>> {
-
- // The plural name of the relation.
- private final String pluralName;
-
- // The optional default managed objects associated with this
- // set relation definition.
- private final Map<String, DefaultManagedObject<? extends C, ? extends S>> defaultManagedObjects =
- new HashMap<String, DefaultManagedObject<? extends C, ? extends S>>();
-
- /**
- * Creates a new builder which can be used to incrementally build a set
- * relation definition.
- *
- * @param pd
- * The parent managed object definition.
- * @param name
- * The name of the relation.
- * @param pluralName
- * The plural name of the relation.
- * @param cd
- * The child managed object definition.
- */
- public Builder(AbstractManagedObjectDefinition<?, ?> pd, String name, String pluralName,
- AbstractManagedObjectDefinition<C, S> cd) {
- super(pd, name, cd);
- this.pluralName = pluralName;
- }
-
- /**
- * Adds the default managed object to this set relation definition.
- *
- * @param defaultManagedObject
- * The default managed object.
- */
- public void setDefaultManagedObject(DefaultManagedObject<? extends C, ? extends S> defaultManagedObject) {
- this.defaultManagedObjects.put(defaultManagedObject.getManagedObjectDefinition().getName(),
- defaultManagedObject);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected SetRelationDefinition<C, S> buildInstance(Common<C, S> common) {
- return new SetRelationDefinition<C, S>(common, pluralName, defaultManagedObjects);
- }
-
- }
-
- // The plural name of the relation.
- private final String pluralName;
-
- // The optional default managed objects associated with this
- // set relation definition.
- private final Map<String, DefaultManagedObject<? extends C, ? extends S>> defaultManagedObjects;
-
- // Private constructor.
- private SetRelationDefinition(Common<C, S> common, String pluralName,
- Map<String, DefaultManagedObject<? extends C, ? extends S>> defaultManagedObjects) {
- super(common);
- this.pluralName = pluralName;
- this.defaultManagedObjects = defaultManagedObjects;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(RelationDefinitionVisitor<R, P> v, P p) {
- return v.visitSet(this, p);
- }
-
- /**
- * Gets the named default managed object associated with this set relation
- * definition.
- *
- * @param name
- * The name of the default managed object (for set relations this
- * is the type of the default managed object).
- * @return The named default managed object.
- * @throws IllegalArgumentException
- * If there is no default managed object associated with the
- * provided name.
- */
- public DefaultManagedObject<? extends C, ? extends S> getDefaultManagedObject(String name) {
- if (!defaultManagedObjects.containsKey(name)) {
- throw new IllegalArgumentException("unrecognized default managed object \"" + name + "\"");
- }
- return defaultManagedObjects.get(name);
- }
-
- /**
- * Gets the names of the default managed objects associated with this set
- * relation definition.
- *
- * @return An unmodifiable set containing the names of the default managed
- * object.
- */
- public Set<String> getDefaultManagedObjectNames() {
- return Collections.unmodifiableSet(defaultManagedObjects.keySet());
- }
-
- /**
- * Gets the plural name of the relation.
- *
- * @return The plural name of the relation.
- */
- public String getPluralName() {
- return pluralName;
- }
-
- /**
- * Gets the user friendly plural name of this relation definition in the
- * default locale.
- *
- * @return Returns the user friendly plural name of this relation definition
- * in the default locale.
- */
- public LocalizableMessage getUserFriendlyPluralName() {
- return getUserFriendlyPluralName(Locale.getDefault());
- }
-
- /**
- * Gets the user friendly plural name of this relation definition in the
- * specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the user friendly plural name of this relation definition
- * in the specified locale.
- */
- public LocalizableMessage getUserFriendlyPluralName(Locale locale) {
- String property = "relation." + getName() + ".user-friendly-plural-name";
- return ManagedObjectDefinitionI18NResource.getInstance().getMessage(getParentDefinition(), property, locale);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void toString(StringBuilder builder) {
- builder.append("name=");
- builder.append(getName());
- builder.append(" type=set parent=");
- builder.append(getParentDefinition().getName());
- builder.append(" child=");
- builder.append(getChildDefinition().getName());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initialize() throws Exception {
- for (DefaultManagedObject<?, ?> dmo : defaultManagedObjects.values()) {
- dmo.initialize();
- }
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/SingletonRelationDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/SingletonRelationDefinition.java
deleted file mode 100644
index 8631a66..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/SingletonRelationDefinition.java
+++ /dev/null
@@ -1,155 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-/**
- * A managed object composite relationship definition which represents a
- * composition of a single managed object (i.e. the managed object must be
- * present).
- *
- * @param <C>
- * The type of client managed object configuration that this relation
- * definition refers to.
- * @param <S>
- * The type of server managed object configuration that this relation
- * definition refers to.
- */
-public final class SingletonRelationDefinition<C extends ConfigurationClient, S extends Configuration> extends
- RelationDefinition<C, S> {
-
- /**
- * An interface for incrementally constructing singleton relation
- * definitions.
- *
- * @param <C>
- * The type of client managed object configuration that this
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that this
- * relation definition refers to.
- */
- public static final class Builder<C extends ConfigurationClient, S extends Configuration> extends
- AbstractBuilder<C, S, SingletonRelationDefinition<C, S>> {
-
- // The optional default managed object associated with this
- // singleton relation.
- private DefaultManagedObject<? extends C, ? extends S> defaultManagedObject = null;
-
- /**
- * Creates a new builder which can be used to incrementally build an
- * singleton relation definition.
- *
- * @param pd
- * The parent managed object definition.
- * @param name
- * The name of the relation.
- * @param cd
- * The child managed object definition.
- */
- // @Checkstyle:ignore
- public Builder(AbstractManagedObjectDefinition<?, ?> pd, String name, AbstractManagedObjectDefinition<C, S> cd) {
- super(pd, name, cd);
- }
-
- /**
- * Sets the optional default managed object associated with this
- * singleton relation definition.
- *
- * @param defaultManagedObject
- * The default managed object or <code>null</code> if there
- * is no default managed object defined for this relation
- * definition.
- */
- public void setDefaultManagedObject(DefaultManagedObject<? extends C, ? extends S> defaultManagedObject) {
- this.defaultManagedObject = defaultManagedObject;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected SingletonRelationDefinition<C, S> buildInstance(Common<C, S> common) {
- return new SingletonRelationDefinition<C, S>(common, defaultManagedObject);
- }
-
- }
-
- // The optional default managed object associated with this
- // singleton relation.
- private final DefaultManagedObject<? extends C, ? extends S> defaultManagedObject;
-
- // Private constructor.
- private SingletonRelationDefinition(Common<C, S> common,
- DefaultManagedObject<? extends C, ? extends S> defaultManagedObject) {
- super(common);
- this.defaultManagedObject = defaultManagedObject;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(RelationDefinitionVisitor<R, P> v, P p) {
- return v.visitSingleton(this, p);
- }
-
- /**
- * Gets the optional default managed object associated with this singleton
- * relation definition.
- *
- * @return Returns the default managed object or <code>null</code> if there
- * is no default managed object defined for this relation
- * definition.
- */
- public DefaultManagedObject<? extends C, ? extends S> getDefaultManagedObject() {
- return defaultManagedObject;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void toString(StringBuilder builder) {
- builder.append("name=");
- builder.append(getName());
- builder.append(" type=singleton parent=");
- builder.append(getParentDefinition().getName());
- builder.append(" child=");
- builder.append(getChildDefinition().getName());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initialize() throws Exception {
- if (defaultManagedObject != null) {
- defaultManagedObject.initialize();
- }
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/SizePropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/SizePropertyDefinition.java
deleted file mode 100644
index 8cf9059..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/SizePropertyDefinition.java
+++ /dev/null
@@ -1,349 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.EnumSet;
-
-/**
- * Memory size property definition.
- * <p>
- * All memory size property values are represented in bytes using longs.
- * <p>
- * All values must be zero or positive and within the lower/upper limit
- * constraints. Support is provided for "unlimited" memory sizes. These are
- * represented using a negative memory size value or using the string
- * "unlimited".
- */
-public final class SizePropertyDefinition extends PropertyDefinition<Long> {
-
- // String used to represent unlimited memory sizes.
- private static final String UNLIMITED = "unlimited";
-
- // The lower limit of the property value in bytes.
- private final long lowerLimit;
-
- // The optional upper limit of the property value in bytes.
- private final Long upperLimit;
-
- // Indicates whether this property allows the use of the "unlimited" memory
- // size value (represented using a -1L or the string "unlimited").
- private final boolean allowUnlimited;
-
- /**
- * An interface for incrementally constructing memory size property
- * definitions.
- */
- public static final class Builder extends AbstractBuilder<Long, SizePropertyDefinition> {
-
- // The lower limit of the property value in bytes.
- private long lowerLimit = 0L;
-
- // The optional upper limit of the property value in bytes.
- private Long upperLimit = null;
-
- // Indicates whether this property allows the use of the "unlimited"
- // memory
- // size value (represented using a -1L or the string "unlimited").
- private boolean allowUnlimited = false;
-
- // Private constructor
- private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- super(d, propertyName);
- }
-
- /**
- * Set the lower limit in bytes.
- *
- * @param lowerLimit
- * The new lower limit (must be >= 0) in bytes.
- * @throws IllegalArgumentException
- * If a negative lower limit was specified, or if the lower
- * limit is greater than the upper limit.
- */
- public final void setLowerLimit(long lowerLimit) {
- if (lowerLimit < 0) {
- throw new IllegalArgumentException("Negative lower limit");
- }
- if (upperLimit != null && lowerLimit > upperLimit) {
- throw new IllegalArgumentException("Lower limit greater than upper limit");
- }
- this.lowerLimit = lowerLimit;
- }
-
- /**
- * Set the lower limit using a string representation of the limit.
- *
- * @param lowerLimit
- * The string representation of the new lower limit.
- * @throws IllegalArgumentException
- * If the lower limit could not be parsed, or if a negative
- * lower limit was specified, or the lower limit is greater
- * than the upper limit.
- */
- public final void setLowerLimit(String lowerLimit) {
- setLowerLimit(SizeUnit.parseValue(lowerLimit, SizeUnit.BYTES));
- }
-
- /**
- * Set the upper limit in bytes.
- *
- * @param upperLimit
- * The new upper limit in bytes or <code>null</code> if there
- * is no upper limit.
- * @throws IllegalArgumentException
- * If the lower limit is greater than the upper limit.
- */
- public final void setUpperLimit(Long upperLimit) {
- if (upperLimit != null) {
- if (upperLimit < 0) {
- throw new IllegalArgumentException("Negative upper limit");
- }
- if (lowerLimit > upperLimit) {
- throw new IllegalArgumentException("Lower limit greater than upper limit");
- }
- }
- this.upperLimit = upperLimit;
- }
-
- /**
- * Set the upper limit using a string representation of the limit.
- *
- * @param upperLimit
- * The string representation of the new upper limit, or
- * <code>null</code> if there is no upper limit.
- * @throws IllegalArgumentException
- * If the upper limit could not be parsed, or if the lower
- * limit is greater than the upper limit.
- */
- public final void setUpperLimit(String upperLimit) {
- if (upperLimit == null) {
- setUpperLimit((Long) null);
- } else {
- setUpperLimit(SizeUnit.parseValue(upperLimit, SizeUnit.BYTES));
- }
- }
-
- /**
- * Specify whether or not this property definition will allow unlimited
- * values (default is false).
- *
- * @param allowUnlimited
- * <code>true</code> if the property will allow unlimited
- * values, or <code>false</code> otherwise.
- */
- public final void setAllowUnlimited(boolean allowUnlimited) {
- this.allowUnlimited = allowUnlimited;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected SizePropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<Long> defaultBehavior) {
- return new SizePropertyDefinition(d, propertyName, options, adminAction, defaultBehavior, lowerLimit,
- upperLimit, allowUnlimited);
- }
-
- }
-
- /**
- * Create an memory size property definition builder.
- *
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param propertyName
- * The property name.
- * @return Returns the new integer property definition builder.
- */
- public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- return new Builder(d, propertyName);
- }
-
- // Private constructor.
- private SizePropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<Long> defaultBehavior, Long lowerLimit, Long upperLimit, boolean allowUnlimited) {
- super(d, Long.class, propertyName, options, adminAction, defaultBehavior);
- this.lowerLimit = lowerLimit;
- this.upperLimit = upperLimit;
- this.allowUnlimited = allowUnlimited;
- }
-
- /**
- * Get the lower limit in bytes.
- *
- * @return Returns the lower limit in bytes.
- */
- public long getLowerLimit() {
- return lowerLimit;
- }
-
- /**
- * Get the upper limit in bytes.
- *
- * @return Returns the upper limit in bytes or <code>null</code> if there is
- * no upper limit.
- */
- public Long getUpperLimit() {
- return upperLimit;
- }
-
- /**
- * Determine whether this property allows unlimited memory sizes.
- *
- * @return Returns <code>true</code> if this this property allows unlimited
- * memory sizes.
- */
- public boolean isAllowUnlimited() {
- return allowUnlimited;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void validateValue(Long value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- if (!allowUnlimited && value < lowerLimit) {
- throw new IllegalPropertyValueException(this, value);
-
- // unlimited allowed
- } else if (value >= 0 && value < lowerLimit) {
- throw new IllegalPropertyValueException(this, value);
- }
-
- if ((upperLimit != null) && (value > upperLimit)) {
- throw new IllegalPropertyValueException(this, value);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String encodeValue(Long value) {
- Reject.ifNull(value);
-
- // Make sure that we correctly encode negative values as "unlimited".
- if (allowUnlimited) {
- if (value < 0) {
- return UNLIMITED;
- }
- }
-
- // Encode the size value using the best-fit unit.
- StringBuilder builder = new StringBuilder();
- SizeUnit unit = SizeUnit.getBestFitUnitExact(value);
-
- // Cast to a long to remove fractional part (which should not be there
- // anyway as the best-fit unit should result in an exact conversion).
- builder.append((long) unit.fromBytes(value));
- builder.append(' ');
- builder.append(unit.toString());
- return builder.toString();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Long decodeValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- // First check for the special "unlimited" value when necessary.
- if (allowUnlimited) {
- if (value.trim().equalsIgnoreCase(UNLIMITED)) {
- return -1L;
- }
- }
-
- // Decode the value.
- Long i;
- try {
- i = SizeUnit.parseValue(value, SizeUnit.BYTES);
- } catch (NumberFormatException e) {
- throw new IllegalPropertyValueStringException(this, value);
- }
-
- try {
- validateValue(i, options);
- } catch (IllegalPropertyValueException e) {
- throw new IllegalPropertyValueStringException(this, value);
- }
- return i;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
- return v.visitSize(this, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyValueVisitor<R, P> v, Long value, P p) {
- return v.visitSize(this, value, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void toString(StringBuilder builder) {
- super.toString(builder);
-
- builder.append(" lowerLimit=");
- builder.append(lowerLimit);
-
- if (upperLimit != null) {
- builder.append(" upperLimit=");
- builder.append(upperLimit);
- }
-
- builder.append(" allowUnlimited=");
- builder.append(allowUnlimited);
-
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int compare(Long o1, Long o2) {
- return o1.compareTo(o2);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/SizeUnit.java b/opendj-config/src/main/java/org/opends/server/admin/SizeUnit.java
deleted file mode 100644
index 43a9249..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/SizeUnit.java
+++ /dev/null
@@ -1,352 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * This enumeration defines various memory size units.
- */
-public enum SizeUnit {
-
- /**
- * A byte unit.
- */
- BYTES(1L, "b", "bytes"),
-
- /**
- * A gibi-byte unit.
- */
- GIBI_BYTES((long) 1024 * 1024 * 1024, "gib", "gibibytes"),
-
- /**
- * A giga-byte unit.
- */
- GIGA_BYTES((long) 1000 * 1000 * 1000, "gb", "gigabytes"),
-
- /**
- * A kibi-byte unit.
- */
- KIBI_BYTES(1024L, "kib", "kibibytes"),
-
- /**
- * A kilo-byte unit.
- */
- KILO_BYTES(1000L, "kb", "kilobytes"),
-
- /**
- * A mebi-byte unit.
- */
- MEBI_BYTES((long) 1024 * 1024, "mib", "mebibytes"),
-
- /**
- * A mega-byte unit.
- */
- MEGA_BYTES((long) 1000 * 1000, "mb", "megabytes"),
-
- /**
- * A tebi-byte unit.
- */
- TEBI_BYTES((long) 1024 * 1024 * 1024 * 1024, "tib", "tebibytes"),
-
- /**
- * A tera-byte unit.
- */
- TERA_BYTES((long) 1000 * 1000 * 1000 * 1000, "tb", "terabytes");
-
- // A lookup table for resolving a unit from its name.
- private static final Map<String, SizeUnit> NAME_TO_UNIT;
- static {
- NAME_TO_UNIT = new HashMap<String, SizeUnit>();
-
- for (SizeUnit unit : SizeUnit.values()) {
- NAME_TO_UNIT.put(unit.shortName, unit);
- NAME_TO_UNIT.put(unit.longName, unit);
- }
- }
-
- /**
- * Gets the best-fit unit for the specified number of bytes. The returned
- * unit will be able to represent the number of bytes using a decimal number
- * comprising of an integer part which is greater than zero. Bigger units
- * are chosen in preference to smaller units and binary units are only
- * returned if they are an exact fit. If the number of bytes is zero then
- * the {@link #BYTES} unit is always returned. For example:
- *
- * <pre>
- * getBestFitUnit(0) // BYTES
- * getBestFitUnit(999) // BYTES
- * getBestFitUnit(1000) // KILO_BYTES
- * getBestFitUnit(1024) // KIBI_BYTES
- * getBestFitUnit(1025) // KILO_BYTES
- * getBestFitUnit(999999) // KILO_BYTES
- * getBestFitUnit(1000000) // MEGA_BYTES
- * </pre>
- *
- * @param bytes
- * The number of bytes.
- * @return Returns the best fit unit.
- * @throws IllegalArgumentException
- * If <code>bytes</code> is negative.
- * @see #getBestFitUnitExact(long)
- */
- public static SizeUnit getBestFitUnit(long bytes) {
- if (bytes < 0) {
- throw new IllegalArgumentException("negative number of bytes: " + bytes);
- } else if (bytes == 0) {
- // Always use bytes for zero values.
- return BYTES;
- } else {
- // Determine best fit: prefer non-binary units unless binary
- // fits exactly.
- SizeUnit[] nonBinary = new SizeUnit[] { TERA_BYTES, GIGA_BYTES, MEGA_BYTES, KILO_BYTES };
- SizeUnit[] binary = new SizeUnit[] { TEBI_BYTES, GIBI_BYTES, MEBI_BYTES, KIBI_BYTES };
-
- for (int i = 0; i < nonBinary.length; i++) {
- if ((bytes % binary[i].getSize()) == 0) {
- return binary[i];
- } else if ((bytes / nonBinary[i].getSize()) > 0) {
- return nonBinary[i];
- }
- }
-
- return BYTES;
- }
- }
-
- /**
- * Gets the best-fit unit for the specified number of bytes which can
- * represent the provided value using an integral value. Bigger units are
- * chosen in preference to smaller units. If the number of bytes is zero
- * then the {@link #BYTES} unit is always returned. For example:
- *
- * <pre>
- * getBestFitUnitExact(0) // BYTES
- * getBestFitUnitExact(999) // BYTES
- * getBestFitUnitExact(1000) // KILO_BYTES
- * getBestFitUnitExact(1024) // KIBI_BYTES
- * getBestFitUnitExact(1025) // BYTES
- * getBestFitUnitExact(999999) // BYTES
- * getBestFitUnitExact(1000000) // MEGA_BYTES
- * </pre>
- *
- * @param bytes
- * The number of bytes.
- * @return Returns the best fit unit can represent the provided value using
- * an integral value.
- * @throws IllegalArgumentException
- * If <code>bytes</code> is negative.
- * @see #getBestFitUnit(long)
- */
- public static SizeUnit getBestFitUnitExact(long bytes) {
- if (bytes < 0) {
- throw new IllegalArgumentException("negative number of bytes: " + bytes);
- } else if (bytes == 0) {
- // Always use bytes for zero values.
- return BYTES;
- } else {
- // Determine best fit.
- SizeUnit[] units =
- new SizeUnit[] { TEBI_BYTES, TERA_BYTES, GIBI_BYTES, GIGA_BYTES, MEBI_BYTES, MEGA_BYTES, KIBI_BYTES,
- KILO_BYTES };
-
- for (SizeUnit unit : units) {
- if ((bytes % unit.getSize()) == 0) {
- return unit;
- }
- }
-
- return BYTES;
- }
- }
-
- /**
- * Get the unit corresponding to the provided unit name.
- *
- * @param s
- * The name of the unit. Can be the abbreviated or long name and
- * can contain white space and mixed case characters.
- * @return Returns the unit corresponding to the provided unit name.
- * @throws IllegalArgumentException
- * If the provided name did not correspond to a known memory
- * size unit.
- */
- public static SizeUnit getUnit(String s) {
- SizeUnit unit = NAME_TO_UNIT.get(s.trim().toLowerCase());
- if (unit == null) {
- throw new IllegalArgumentException("Illegal memory size unit \"" + s + "\"");
- }
- return unit;
- }
-
- /**
- * Parse the provided size string and return its equivalent size in bytes.
- * The size string must specify the unit e.g. "10kb".
- *
- * @param s
- * The size string to be parsed.
- * @return Returns the parsed duration in bytes.
- * @throws NumberFormatException
- * If the provided size string could not be parsed.
- */
- public static long parseValue(String s) {
- return parseValue(s, null);
- }
-
- /**
- * Parse the provided size string and return its equivalent size in bytes.
- *
- * @param s
- * The size string to be parsed.
- * @param defaultUnit
- * The default unit to use if there is no unit specified in the
- * size string, or <code>null</code> if the string must always
- * contain a unit.
- * @return Returns the parsed size in bytes.
- * @throws NumberFormatException
- * If the provided size string could not be parsed.
- */
- public static long parseValue(String s, SizeUnit defaultUnit) {
- // Value must be a floating point number followed by a unit.
- Pattern p = Pattern.compile("^\\s*(\\d+(\\.\\d+)?)\\s*(\\w+)?\\s*$");
- Matcher m = p.matcher(s);
-
- if (!m.matches()) {
- throw new NumberFormatException("Invalid size value \"" + s + "\"");
- }
-
- // Group 1 is the float.
- double d;
- try {
- d = Double.valueOf(m.group(1));
- } catch (NumberFormatException e) {
- throw new NumberFormatException("Invalid size value \"" + s + "\"");
- }
-
- // Group 3 is the unit.
- String unitString = m.group(3);
- SizeUnit unit;
- if (unitString == null) {
- if (defaultUnit == null) {
- throw new NumberFormatException("Invalid size value \"" + s + "\"");
- } else {
- unit = defaultUnit;
- }
- } else {
- try {
- unit = getUnit(unitString);
- } catch (IllegalArgumentException e) {
- throw new NumberFormatException("Invalid size value \"" + s + "\"");
- }
- }
-
- return unit.toBytes(d);
- }
-
- // The long name of the unit.
- private final String longName;
-
- // The abbreviation of the unit.
- private final String shortName;
-
- // The size of the unit in bytes.
- private final long sz;
-
- // Private constructor.
- private SizeUnit(long sz, String shortName, String longName) {
- this.sz = sz;
- this.shortName = shortName;
- this.longName = longName;
- }
-
- /**
- * Converts the specified size in bytes to this unit.
- *
- * @param amount
- * The size in bytes.
- * @return Returns size in this unit.
- */
- public double fromBytes(long amount) {
- return ((double) amount / sz);
- }
-
- /**
- * Get the long name of this unit.
- *
- * @return Returns the long name of this unit.
- */
- public String getLongName() {
- return longName;
- }
-
- /**
- * Get the abbreviated name of this unit.
- *
- * @return Returns the abbreviated name of this unit.
- */
- public String getShortName() {
- return shortName;
- }
-
- /**
- * Get the number of bytes that this unit represents.
- *
- * @return Returns the number of bytes that this unit represents.
- */
- public long getSize() {
- return sz;
- }
-
- /**
- * Converts the specified size in this unit to bytes.
- *
- * @param amount
- * The size as a quantity of this unit.
- * @return Returns the number of bytes that the size represents.
- * @throws NumberFormatException
- * If the provided size exceeded long.MAX_VALUE.
- */
- public long toBytes(double amount) {
- double value = sz * amount;
- if (value > Long.MAX_VALUE) {
- throw new NumberFormatException("number too big (exceeded long.MAX_VALUE");
- }
- return (long) (value);
- }
-
- /**
- * {@inheritDoc}
- * <p>
- * This implementation returns the abbreviated name of this size unit.
- */
- @Override
- public String toString() {
- return shortName;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/StringPropertyDefinition.java b/opendj-config/src/main/java/org/opends/server/admin/StringPropertyDefinition.java
deleted file mode 100644
index 74da070..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/StringPropertyDefinition.java
+++ /dev/null
@@ -1,282 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.EnumSet;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * String property definition.
- */
-public final class StringPropertyDefinition extends PropertyDefinition<String> {
-
- /**
- * An interface for incrementally constructing string property definitions.
- */
- public static final class Builder extends AbstractBuilder<String, StringPropertyDefinition> {
-
- // Flag indicating whether values of this property are
- // case-insensitive.
- private boolean isCaseInsensitive = true;
-
- // Optional pattern which values of this property must match.
- private Pattern pattern = null;
-
- // Pattern usage which provides a user-friendly summary of the
- // pattern if present.
- private String patternUsage = null;
-
- // Private constructor
- private Builder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- super(d, propertyName);
- }
-
- /**
- * Set a flag indicating whether values of this property are
- * case-insensitive.
- *
- * @param value
- * <code>true</code> if values are case-insensitive, or
- * <code>false</code> otherwise.
- */
- public final void setCaseInsensitive(boolean value) {
- isCaseInsensitive = value;
- }
-
- /**
- * Set the regular expression pattern which values of this property must
- * match. By default there is no pattern defined.
- *
- * @param pattern
- * The regular expression pattern string, or
- * <code>null</code> if there is no pattern.
- * @param patternUsage
- * A user-friendly usage string representing the pattern
- * which can be used in error messages and help (e.g. for
- * patterns which match a host/port combination, the usage
- * string "HOST:PORT" would be appropriate).
- * @throws PatternSyntaxException
- * If the provided regular expression pattern has an invalid
- * syntax.
- */
- public final void setPattern(String pattern, String patternUsage) {
- if (pattern == null) {
- this.pattern = null;
- this.patternUsage = null;
- } else {
- this.pattern = Pattern.compile(pattern);
- this.patternUsage = patternUsage;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected StringPropertyDefinition buildInstance(AbstractManagedObjectDefinition<?, ?> d,
- String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<String> defaultBehavior) {
- return new StringPropertyDefinition(d, propertyName, options, adminAction, defaultBehavior,
- isCaseInsensitive, pattern, patternUsage);
- }
-
- }
-
- /**
- * Create a string property definition builder.
- *
- * @param d
- * The managed object definition associated with this property
- * definition.
- * @param propertyName
- * The property name.
- * @return Returns the new string property definition builder.
- */
- public static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- return new Builder(d, propertyName);
- }
-
- // Flag indicating whether values of this property are
- // case-insensitive.
- private final boolean isCaseInsensitive;
-
- // Optional pattern which values of this property must match.
- private final Pattern pattern;
-
- // Pattern usage which provides a user-friendly summary of the
- // pattern if present.
- private final String patternUsage;
-
- // Private constructor.
- private StringPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
- EnumSet<PropertyOption> options, AdministratorAction adminAction,
- DefaultBehaviorProvider<String> defaultBehavior, boolean isCaseInsensitive, Pattern pattern,
- String patternUsage) {
- super(d, String.class, propertyName, options, adminAction, defaultBehavior);
- this.isCaseInsensitive = isCaseInsensitive;
- this.pattern = pattern;
- this.patternUsage = patternUsage;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
- return v.visitString(this, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R, P> R accept(PropertyValueVisitor<R, P> v, String value, P p) {
- return v.visitString(this, value, p);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String decodeValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- try {
- validateValue(value, options);
- } catch (IllegalPropertyValueException e) {
- throw new IllegalPropertyValueStringException(this, value);
- }
-
- return value;
- }
-
- /**
- * Gets the optional regular expression pattern which values of this
- * property must match.
- *
- * @return Returns the optional regular expression pattern which values of
- * this property must match, or <code>null</code> if there is no
- * pattern.
- */
- public Pattern getPattern() {
- return pattern;
- }
-
- /**
- * Gets the pattern synopsis of this string property definition in the
- * default locale.
- *
- * @return Returns the pattern synopsis of this string property definition
- * in the default locale, or <code>null</code> if there is no
- * pattern synopsis (which is the case when there is no pattern
- * matching defined for this string property definition).
- */
- public LocalizableMessage getPatternSynopsis() {
- return getPatternSynopsis(Locale.getDefault());
- }
-
- /**
- * Gets the optional pattern synopsis of this string property definition in
- * the specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the pattern synopsis of this string property definition
- * in the specified locale, or <code>null</code> if there is no
- * pattern synopsis (which is the case when there is no pattern
- * matching defined for this string property definition).
- */
- public LocalizableMessage getPatternSynopsis(Locale locale) {
- ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
- String property = "property." + getName() + ".syntax.string.pattern.synopsis";
- try {
- return resource.getMessage(getManagedObjectDefinition(), property, locale);
- } catch (MissingResourceException e) {
- return null;
- }
- }
-
- /**
- * Gets a user-friendly usage string representing the pattern which can be
- * used in error messages and help (e.g. for patterns which match a
- * host/port combination, the usage string "HOST:PORT" would be
- * appropriate).
- *
- * @return Returns the user-friendly pattern usage string, or
- * <code>null</code> if there is no pattern.
- */
- public String getPatternUsage() {
- return patternUsage;
- }
-
- /**
- * Query whether values of this property are case-insensitive.
- *
- * @return Returns <code>true</code> if values are case-insensitive, or
- * <code>false</code> otherwise.
- */
- public boolean isCaseInsensitive() {
- return isCaseInsensitive;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String normalizeValue(String value) {
- Reject.ifNull(value);
-
- if (isCaseInsensitive()) {
- return value.trim().toLowerCase();
- } else {
- return value.trim();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void validateValue(String value, PropertyDefinitionsOptions options) {
- Reject.ifNull(value);
-
- if (pattern != null) {
- Matcher matcher = pattern.matcher(value);
- if (!matcher.matches()) {
- throw new IllegalPropertyValueException(this, value);
- }
- }
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/Tag.java b/opendj-config/src/main/java/org/opends/server/admin/Tag.java
deleted file mode 100644
index cbea691..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/Tag.java
+++ /dev/null
@@ -1,175 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import org.forgerock.util.Reject;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.MissingResourceException;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-
-/**
- * An interface for querying the properties of a tag.
- * <p>
- * Tags are used to group related managed objects together into categories.
- */
-public final class Tag implements Comparable<Tag> {
-
- /** All the tags. */
- private static final Map<String, Tag> TAGS = new HashMap<String, Tag>();
-
- /**
- * Defines a new tag with the specified name.
- *
- * @param name
- * The name of the new tag.
- */
- public static void define(String name) {
- Tag tag = new Tag(name);
-
- // Register the tag.
- TAGS.put(name, tag);
- }
-
- /**
- * Returns the tag associated with the specified name.
- *
- * @param name
- * The name of the tag.
- * @return Returns the tag associated with the specified name.
- * @throws IllegalArgumentException
- * If the tag name was not recognized.
- */
- public static Tag valueOf(String name) {
- Reject.ifNull(name);
-
- // Hack to force initialization of the tag definitions.
- RootCfgDefn.getInstance();
-
- Tag tag = TAGS.get(name.toLowerCase());
-
- if (tag == null) {
- throw new IllegalArgumentException("Unknown tag \"" + name + "\"");
- }
-
- return tag;
- }
-
- /**
- * Returns an unmodifiable collection view of the set of registered tags.
- *
- * @return Returns an unmodifiable collection view of the set of registered
- * tags.
- */
- public static Collection<Tag> values() {
- // Hack to force initialization of the tag definitions.
- RootCfgDefn.getInstance();
-
- return Collections.unmodifiableCollection(TAGS.values());
- }
-
- /** The name of the tag. */
- private final String name;
-
- /** Private constructor. */
- private Tag(String name) {
- this.name = name;
- }
-
- /** {@inheritDoc} */
- public final int compareTo(Tag o) {
- return name.compareTo(o.name);
- }
-
- /** {@inheritDoc} */
- @Override
- public final boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (obj instanceof Tag) {
- Tag other = (Tag) obj;
- return other.name.equals(this.name);
- }
-
- return false;
- }
-
- /**
- * Gets the name of this tag.
- *
- * @return Returns the name of this tag.
- */
- public final String getName() {
- return name;
- }
-
- /**
- * Gets the synopsis of this tag in the default locale.
- *
- * @return Returns the synopsis of this tag in the default locale.
- */
- public final LocalizableMessage getSynopsis() {
- return getSynopsis(Locale.getDefault());
- }
-
- /**
- * Gets the synopsis of this tag in the specified locale.
- *
- * @param locale
- * The locale.
- * @return Returns the synopsis of this tag in the specified locale.
- */
- public final LocalizableMessage getSynopsis(Locale locale) {
- ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
- String property = "tag." + name + ".synopsis";
- try {
- return resource.getMessage(RootCfgDefn.getInstance(), property, locale);
- } catch (MissingResourceException e) {
- return null;
- }
- }
-
- /** {@inheritDoc} */
- @Override
- public final int hashCode() {
- return name.hashCode();
- }
-
- /** {@inheritDoc} */
- @Override
- public final String toString() {
- return name;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/TopCfgDefn.java b/opendj-config/src/main/java/org/opends/server/admin/TopCfgDefn.java
deleted file mode 100644
index 34a9fae..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/TopCfgDefn.java
+++ /dev/null
@@ -1,64 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-/**
- * Configuration definition <code>TopCfgDefn</code> is the root of the
- * configuration definition hierarchy. Every configuration has
- * <code>TopCfgDefn</code> as a superclass.
- * <p>
- * The <code>TopCfgDefn</code> has no properties or relations. However, it can
- * be used to determine all the configuration definitions currently available to
- * the administration framework using the {@link #getAllChildren()}.
- * <p>
- * <b>NOTE:</b> it is not possible to retrieve I18N related information or
- * profile information for this managed object definition. In particular, calls
- * to the methods {@link #getSynopsis()}, {@link #getDescription()},
- * {@link #getUserFriendlyName()}, and {@link #getUserFriendlyPluralName()} will
- * not work.
- */
-public final class TopCfgDefn extends AbstractManagedObjectDefinition<ConfigurationClient, Configuration> {
-
- // The singleton configuration definition instance.
- private static final TopCfgDefn INSTANCE = new TopCfgDefn();
-
- /**
- * Get the Top configuration definition singleton.
- *
- * @return Returns the Top configuration definition singleton.
- */
- public static TopCfgDefn getInstance() {
- return INSTANCE;
- }
-
- /**
- * Private constructor.
- */
- private TopCfgDefn() {
- super("top", null);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/UndefinedDefaultBehaviorProvider.java b/opendj-config/src/main/java/org/opends/server/admin/UndefinedDefaultBehaviorProvider.java
deleted file mode 100644
index ab292ff..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/UndefinedDefaultBehaviorProvider.java
+++ /dev/null
@@ -1,53 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-/**
- * A default behavior provider which indicates undefined behavior. It should be
- * used by properties which have no default values or behavior as such. For
- * example, a description property, when left unset, has no default value and no
- * side-effects.
- *
- * @param <T>
- * The type of values represented by this provider.
- */
-public final class UndefinedDefaultBehaviorProvider<T> extends DefaultBehaviorProvider<T> {
-
- /**
- * Create an undefined default behavior provider.
- */
- public UndefinedDefaultBehaviorProvider() {
- // No implementation required.
- }
-
- /**
- * {@inheritDoc}
- */
- public <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p) {
- return v.visitUndefined(this, p);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/UnknownPropertyDefinitionException.java b/opendj-config/src/main/java/org/opends/server/admin/UnknownPropertyDefinitionException.java
deleted file mode 100644
index e9ccea0..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/UnknownPropertyDefinitionException.java
+++ /dev/null
@@ -1,65 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-/**
- * Indicates that an unknown type of property definition was encountered. This
- * can occur as the management prototype develops and new kinds of property
- * definitions are added.
- */
-public final class UnknownPropertyDefinitionException extends PropertyException {
-
- // Generated serialization ID.
- private static final long serialVersionUID = 7042646409131322385L;
-
- // The visitor parameter if there was one.
- private Object parameter;
-
- /**
- * Creates a new unknown property definition exception.
- *
- * @param pd
- * The unknown property definition.
- * @param p
- * The visitor parameter if there was one.
- */
- public UnknownPropertyDefinitionException(PropertyDefinition<?> pd, Object p) {
- super(pd, ERR_UNKNOWN_PROPERTY_DEFINITION_EXCEPTION.get(pd.getName(), pd.getClass().getName()));
- this.parameter = p;
- }
-
- /**
- * Get the visitor parameter if there was one.
- *
- * @return Returns the visitor parameter if there was one.
- */
- public Object getParameter() {
- return parameter;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/AdminClientException.java b/opendj-config/src/main/java/org/opends/server/admin/client/AdminClientException.java
deleted file mode 100644
index a376316..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/AdminClientException.java
+++ /dev/null
@@ -1,68 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.admin.AdminException;
-
-/**
- * Administration client exceptions represent non-operational problems which
- * occur whilst interacting with the administration framework. They provide
- * clients with a transport independent interface for handling transport related
- * exceptions.
- * <p>
- * Client exceptions represent communications problems, security problems, and
- * service related problems.
- */
-public abstract class AdminClientException extends AdminException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = 4044747533980824456L;
-
- /**
- * Create an administration client exception with a message and cause.
- *
- * @param message
- * The message.
- * @param cause
- * The cause.
- */
- protected AdminClientException(LocalizableMessage message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * Create an administration client exception with a message.
- *
- * @param message
- * The message.
- */
- protected AdminClientException(LocalizableMessage message) {
- super(message);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/AdminSecurityException.java b/opendj-config/src/main/java/org/opends/server/admin/client/AdminSecurityException.java
deleted file mode 100644
index 0c1d093..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/AdminSecurityException.java
+++ /dev/null
@@ -1,64 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin.client;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * This exception is thrown when a security related problem occurs whilst
- * interacting with the Directory Server. These fall broadly into two
- * categories: authentication problems and authorization problems.
- */
-public abstract class AdminSecurityException extends AdminClientException {
-
- /**
- * Fake serialization ID.
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * Create a security exception with a message and cause.
- *
- * @param message
- * The message.
- * @param cause
- * The cause.
- */
- protected AdminSecurityException(LocalizableMessage message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * Create a security exception with a message.
- *
- * @param message
- * The message.
- */
- protected AdminSecurityException(LocalizableMessage message) {
- super(message);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/AuthenticationException.java b/opendj-config/src/main/java/org/opends/server/admin/client/AuthenticationException.java
deleted file mode 100644
index 070d310..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/AuthenticationException.java
+++ /dev/null
@@ -1,82 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-/**
- * This exception is thrown when an authentication error occurs while connecting
- * to the Directory Server. An authentication error can happen, for example,
- * when the client credentials are invalid.
- */
-public class AuthenticationException extends AdminSecurityException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = 3544797197747686958L;
-
- /**
- * Creates an authentication exception with a default message.
- */
- public AuthenticationException() {
- super(ERR_AUTHENTICATION_EXCEPTION_DEFAULT.get());
- }
-
- /**
- * Create an authentication exception with a cause and a default message.
- *
- * @param cause
- * The cause.
- */
- public AuthenticationException(Throwable cause) {
- super(ERR_AUTHENTICATION_EXCEPTION_DEFAULT.get(), cause);
- }
-
- /**
- * Create an authentication exception with a message and cause.
- *
- * @param message
- * The message.
- * @param cause
- * The cause.
- */
- public AuthenticationException(LocalizableMessage message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * Create an authentication exception with a message.
- *
- * @param message
- * The message.
- */
- public AuthenticationException(LocalizableMessage message) {
- super(message);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/AuthenticationNotSupportedException.java b/opendj-config/src/main/java/org/opends/server/admin/client/AuthenticationNotSupportedException.java
deleted file mode 100644
index 66a3bea..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/AuthenticationNotSupportedException.java
+++ /dev/null
@@ -1,83 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-/**
- * This exception is thrown when the particular flavor of authentication
- * requested is not supported by the Directory Server.
- */
-public class AuthenticationNotSupportedException extends AdminSecurityException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = 7387834052676291793L;
-
- /**
- * Creates an authentication not supported exception with a default message.
- */
- public AuthenticationNotSupportedException() {
- super(ERR_AUTHENTICATION_NOT_SUPPORTED_EXCEPTION_DEFAULT.get());
- }
-
- /**
- * Creates an authentication not supported exception with a cause and a
- * default message.
- *
- * @param cause
- * The cause.
- */
- public AuthenticationNotSupportedException(Throwable cause) {
- super(ERR_AUTHENTICATION_NOT_SUPPORTED_EXCEPTION_DEFAULT.get(), cause);
- }
-
- /**
- * Create an authentication not supported exception with a message and
- * cause.
- *
- * @param message
- * The message.
- * @param cause
- * The cause.
- */
- public AuthenticationNotSupportedException(LocalizableMessage message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * Create an authentication not supported exception with a message.
- *
- * @param message
- * The message.
- */
- public AuthenticationNotSupportedException(LocalizableMessage message) {
- super(message);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/ClientConstraintHandler.java b/opendj-config/src/main/java/org/opends/server/admin/client/ClientConstraintHandler.java
deleted file mode 100644
index 24c6411..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/ClientConstraintHandler.java
+++ /dev/null
@@ -1,133 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client;
-
-import java.util.Collection;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.ManagedObjectPath;
-
-/**
- * An interface for performing client-side constraint validation.
- * <p>
- * Constraints are evaluated immediately before the client performs a write
- * operation. If one or more constraints fails, the write operation is refused
- * and fails with an {@link OperationRejectedException}.
- * <p>
- * A client constraint handler must override at least one of the provided
- * methods.
- *
- * @see org.opends.server.admin.Constraint
- */
-public abstract class ClientConstraintHandler {
-
- /**
- * Creates a new client constraint handler.
- */
- protected ClientConstraintHandler() {
- // No implementation required.
- }
-
- /**
- * Determines whether or not the newly created managed object which is about
- * to be added to the server configuration satisfies this constraint.
- * <p>
- * If the constraint is not satisfied, the implementation must return
- * <code>false</code> and add a message describing why the constraint was
- * not satisfied.
- * <p>
- * The default implementation is to return <code>true</code>.
- *
- * @param context
- * The management context.
- * @param managedObject
- * The new managed object.
- * @param unacceptableReasons
- * A list of messages to which error messages should be added.
- * @return Returns <code>true</code> if this constraint is satisfied, or
- * <code>false</code> if it is not.
- * @throws ErrorResultException
- * If an error occurs.
- */
- public boolean isAddAcceptable(ManagementContext context, ManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
- return true;
- }
-
- /**
- * Determines whether or not the changes to an existing managed object which
- * are about to be committed to the server configuration satisfies this
- * constraint.
- * <p>
- * If the constraint is not satisfied, the implementation must return
- * <code>false</code> and add a message describing why the constraint was
- * not satisfied.
- * <p>
- * The default implementation is to return <code>true</code>.
- *
- * @param context
- * The management context.
- * @param managedObject
- * The modified managed object.
- * @param unacceptableReasons
- * A list of messages to which error messages should be added.
- * @return Returns <code>true</code> if this modify is satisfied, or
- * <code>false</code> if it is not.
- * @throws ErrorResultException
- * If an error occurs.
- */
- public boolean isModifyAcceptable(ManagementContext context, ManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
- return true;
- }
-
- /**
- * Determines whether or not the existing managed object which is about to
- * be deleted from the server configuration satisfies this constraint.
- * <p>
- * If the constraint is not satisfied, the implementation must return
- * <code>false</code> and add a message describing why the constraint was
- * not satisfied.
- * <p>
- * The default implementation is to return <code>true</code>.
- *
- * @param context
- * The management context.
- * @param path
- * The path of the managed object which is about to be deleted.
- * @param unacceptableReasons
- * A list of messages to which error messages should be added.
- * @return Returns <code>true</code> if this constraint is satisfied, or
- * <code>false</code> if it is not.
- * @throws ErrorResultException
- * If an error occurs.
- */
- public boolean isDeleteAcceptable(ManagementContext context, ManagedObjectPath<?, ?> path,
- Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
- return true;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/ConcurrentModificationException.java b/opendj-config/src/main/java/org/opends/server/admin/client/ConcurrentModificationException.java
deleted file mode 100644
index bc0dba0..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/ConcurrentModificationException.java
+++ /dev/null
@@ -1,84 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.admin.OperationsException;
-
-/**
- * This exception is thrown when a critical concurrent modification is detected
- * by the client. This may be caused by another client application removing a
- * managed object whilst it is being managed.
- */
-public class ConcurrentModificationException extends OperationsException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = -1467024486347612820L;
-
- /**
- * Create a concurrent modification exception with a default message.
- */
- public ConcurrentModificationException() {
- super(ERR_CONCURRENT_MODIFICATION_EXCEPTION_DEFAULT.get());
- }
-
- /**
- * Create a concurrent modification exception with a cause and a default
- * message.
- *
- * @param cause
- * The cause.
- */
- public ConcurrentModificationException(Throwable cause) {
- super(ERR_CONCURRENT_MODIFICATION_EXCEPTION_DEFAULT.get(), cause);
- }
-
- /**
- * Create a concurrent modification exception with a message and cause.
- *
- * @param message
- * The message.
- * @param cause
- * The cause.
- */
- public ConcurrentModificationException(LocalizableMessage message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * Create a concurrent modification exception with a message.
- *
- * @param message
- * The message.
- */
- public ConcurrentModificationException(LocalizableMessage message) {
- super(message);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/IllegalManagedObjectNameException.java b/opendj-config/src/main/java/org/opends/server/admin/client/IllegalManagedObjectNameException.java
deleted file mode 100644
index e9c56b6..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/IllegalManagedObjectNameException.java
+++ /dev/null
@@ -1,126 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.admin.IllegalPropertyValueStringException;
-import org.opends.server.admin.OperationsException;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.PropertyDefinitionUsageBuilder;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-
-/**
- * Thrown when an attempt is made to create a new managed object with an illegal
- * name.
- * <p>
- * This exception can occur when a new managed object is given a name which is
- * either an empty string, a string containing just white-spaces, or a string
- * which is invalid according to the managed object's naming property (if it has
- * one).
- */
-public class IllegalManagedObjectNameException extends OperationsException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = 7491748228684293291L;
-
- /** Create the message. */
- private static LocalizableMessage createMessage(String illegalName, PropertyDefinition<?> namingPropertyDefinition,
- PropertyDefinitionsOptions options) {
- if (illegalName.length() == 0) {
- return ERR_ILLEGAL_MANAGED_OBJECT_NAME_EXCEPTION_EMPTY.get();
- } else if (illegalName.trim().length() == 0) {
- return ERR_ILLEGAL_MANAGED_OBJECT_NAME_EXCEPTION_BLANK.get();
- } else if (namingPropertyDefinition != null) {
- try {
- namingPropertyDefinition.decodeValue(illegalName, options);
- } catch (IllegalPropertyValueStringException e) {
- PropertyDefinitionUsageBuilder builder = new PropertyDefinitionUsageBuilder(true);
- return ERR_ILLEGAL_MANAGED_OBJECT_NAME_EXCEPTION_SYNTAX.get(illegalName,
- namingPropertyDefinition.getName(), builder.getUsage(namingPropertyDefinition));
- }
- }
-
- return ERR_ILLEGAL_MANAGED_OBJECT_NAME_EXCEPTION_OTHER.get(illegalName);
- }
-
- /** The illegal name. */
- private final String illegalName;
-
- /** The naming property definition if applicable. */
- private final PropertyDefinition<?> namingPropertyDefinition;
-
- /**
- * Create a new illegal name exception and no naming property definition.
- *
- * @param illegalName
- * The illegal managed object name.
- */
- public IllegalManagedObjectNameException(String illegalName) {
- this(illegalName, null, null);
- }
-
- /**
- * Create a new illegal name exception and a naming property definition.
- *
- * @param illegalName
- * The illegal managed object name.
- * @param namingPropertyDefinition
- * The naming property definition.
- * @param options
- * Options to decode property definition values.
- */
- public IllegalManagedObjectNameException(String illegalName, PropertyDefinition<?> namingPropertyDefinition,
- PropertyDefinitionsOptions options) {
- super(createMessage(illegalName, namingPropertyDefinition, options));
-
- this.illegalName = illegalName;
- this.namingPropertyDefinition = namingPropertyDefinition;
- }
-
- /**
- * Get the illegal managed object name.
- *
- * @return Returns the illegal managed object name.
- */
- public String getIllegalName() {
- return illegalName;
- }
-
- /**
- * Get the naming property definition if applicable.
- *
- * @return Returns naming property definition, or <code>null</code> if none
- * was specified.
- */
- public PropertyDefinition<?> getNamingPropertyDefinition() {
- return namingPropertyDefinition;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/ManagedObject.java b/opendj-config/src/main/java/org/opends/server/admin/client/ManagedObject.java
deleted file mode 100644
index 262f52f..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/ManagedObject.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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin.client;
-
-import java.util.Collection;
-import java.util.SortedSet;
-
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.DefaultBehaviorException;
-import org.opends.server.admin.DefinitionDecodingException;
-import org.opends.server.admin.InstantiableRelationDefinition;
-import org.opends.server.admin.ManagedObjectAlreadyExistsException;
-import org.opends.server.admin.ManagedObjectDefinition;
-import org.opends.server.admin.ConfigurationClient;
-import org.opends.server.admin.ManagedObjectNotFoundException;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.OptionalRelationDefinition;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.PropertyIsMandatoryException;
-import org.opends.server.admin.PropertyIsReadOnlyException;
-import org.opends.server.admin.PropertyIsSingleValuedException;
-import org.opends.server.admin.PropertyProvider;
-import org.opends.server.admin.SetRelationDefinition;
-import org.opends.server.admin.SingletonRelationDefinition;
-
-/**
- * A generic interface for accessing client-side managed objects.
- * <p>
- * A managed object comprises of zero or more properties. A property has
- * associated with it three sets of property value(s). These are:
- * <ul>
- * <li><i>default value(s)</i> - these value(s) represent the default behavior
- * for the property when it has no active values. When a property inherits its
- * default value(s) from elsewhere (i.e. a property in another managed object),
- * the default value(s) represent the active value(s) of the inherited property
- * at the time the managed object was retrieved
- * <li><i>active value(s)</i> - these value(s) represent the state of the
- * property at the time the managed object was retrieved
- * <li><i>pending value(s)</i> - these value(s) represent any modifications made
- * to the property's value(s) since the managed object object was retrieved and
- * before the changes have been committed using the {@link #commit()} method,
- * the pending values can be empty indicating that the property should be
- * modified back to its default values.
- * </ul>
- * In addition, a property has an <i>effective state</i> defined by its
- * <i>effective values</i> which are derived by evaluating the following rules
- * in the order presented:
- * <ul>
- * <li>the <i>pending values</i> if defined and non-empty
- * <li>or, the <i>default values</i> if the pending values are defined but are
- * empty
- * <li>or, the <i>active values</i> if defined and non-empty
- * <li>or, the <i>default values</i> if there are no active values
- * <li>or, an empty set of values, if there are no default values.
- * </ul>
- *
- * @param <T>
- * The type of client configuration represented by the client managed
- * object.
- */
-public interface ManagedObject<T extends ConfigurationClient> extends PropertyProvider {
-
- /**
- * Adds this managed object to the server or commits any changes made to it
- * depending on whether or not the managed object already exists on the
- * server. Pending property values will be committed to the managed object.
- * If successful, the pending values will become active values.
- * <p>
- * See the class description for more information regarding pending and
- * active values.
- *
- * @throws ManagedObjectAlreadyExistsException
- * If the managed object cannot be added to the server because
- * it already exists.
- * @throws MissingMandatoryPropertiesException
- * If the managed object contains some mandatory properties
- * which have been left undefined.
- * @throws ConcurrentModificationException
- * If the managed object is being added to the server but its
- * parent has been removed by another client, or if this managed
- * object is being modified but it has been removed from the
- * server by another client.
- * @throws OperationRejectedException
- * If this managed object cannot be added or modified due to
- * some client-side or server-side constraint which cannot be
- * satisfied.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- void commit() throws ManagedObjectAlreadyExistsException, MissingMandatoryPropertiesException,
- ConcurrentModificationException, OperationRejectedException, ErrorResultException;
-
- /**
- * Determines whether or not this managed object has been modified since it
- * was constructed. In other words, whether or not the set of pending values
- * differs from the set of active values.
- *
- * @return Returns <code>true</code> if this managed object has been
- * modified since it was constructed.
- */
- boolean isModified();
-
- /**
- * Creates a new child managed object bound to the specified instantiable
- * relation. The new managed object will initially not contain any property
- * values (including mandatory properties). Once the managed object has been
- * configured it can be added to the server using the {@link #commit()}
- * method.
- *
- * @param <C>
- * The expected type of the child managed object configuration
- * client.
- * @param <S>
- * The expected type of the child managed object server
- * configuration.
- * @param <C1>
- * The actual type of the added managed object configuration
- * client.
- * @param r
- * The instantiable relation definition.
- * @param d
- * The definition of the managed object to be created.
- * @param name
- * The name of the child managed object.
- * @param exceptions
- * A collection in which to place any
- * {@link DefaultBehaviorException}s that occurred whilst
- * attempting to determine the managed object's default values.
- * @return Returns a new child managed object bound to the specified
- * instantiable relation.
- * @throws IllegalManagedObjectNameException
- * If the name of the child managed object is invalid.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- */
- <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
- InstantiableRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d, String name,
- Collection<DefaultBehaviorException> exceptions) throws IllegalManagedObjectNameException;
-
- /**
- * Creates a new child managed object bound to the specified optional
- * relation. The new managed object will initially not contain any property
- * values (including mandatory properties). Once the managed object has been
- * configured it can be added to the server using the {@link #commit()}
- * method.
- *
- * @param <C>
- * The expected type of the child managed object configuration
- * client.
- * @param <S>
- * The expected type of the child managed object server
- * configuration.
- * @param <C1>
- * The actual type of the added managed object configuration
- * client.
- * @param r
- * The optional relation definition.
- * @param d
- * The definition of the managed object to be created.
- * @param exceptions
- * A collection in which to place any
- * {@link DefaultBehaviorException}s that occurred whilst
- * attempting to determine the managed object's default values.
- * @return Returns a new child managed object bound to the specified
- * optional relation.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- */
- <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
- OptionalRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d,
- Collection<DefaultBehaviorException> exceptions);
-
- /**
- * Creates a new child managed object bound to the specified set relation.
- * The new managed object will initially not contain any property values
- * (including mandatory properties). Once the managed object has been
- * configured it can be added to the server using the {@link #commit()}
- * method.
- *
- * @param <C>
- * The expected type of the child managed object configuration
- * client.
- * @param <S>
- * The expected type of the child managed object server
- * configuration.
- * @param <C1>
- * The actual type of the added managed object configuration
- * client.
- * @param r
- * The set relation definition.
- * @param d
- * The definition of the managed object to be created.
- * @param exceptions
- * A collection in which to place any
- * {@link DefaultBehaviorException}s that occurred whilst
- * attempting to determine the managed object's default values.
- * @return Returns a new child managed object bound to the specified set
- * relation.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- */
- <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
- SetRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d,
- Collection<DefaultBehaviorException> exceptions);
-
- /**
- * Retrieves an instantiable child managed object.
- *
- * @param <C>
- * The requested type of the child managed object configuration
- * client.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param r
- * The instantiable relation definition.
- * @param name
- * The name of the child managed object.
- * @return Returns the instantiable child managed object.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- * @throws DefinitionDecodingException
- * If the managed object was found but its type could not be
- * determined.
- * @throws ManagedObjectDecodingException
- * If the managed object was found but one or more of its
- * properties could not be decoded.
- * @throws ManagedObjectNotFoundException
- * If the requested managed object could not be found on the
- * server.
- * @throws ConcurrentModificationException
- * If this managed object has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
- InstantiableRelationDefinition<C, S> r, String name) throws
- DefinitionDecodingException, ManagedObjectDecodingException, ManagedObjectNotFoundException,
- ConcurrentModificationException, ErrorResultException;
-
- /**
- * Retrieves an optional child managed object.
- *
- * @param <C>
- * The requested type of the child managed object configuration
- * client.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param r
- * The optional relation definition.
- * @return Returns the optional child managed object.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- * @throws DefinitionDecodingException
- * If the managed object was found but its type could not be
- * determined.
- * @throws ManagedObjectDecodingException
- * If the managed object was found but one or more of its
- * properties could not be decoded.
- * @throws ManagedObjectNotFoundException
- * If the requested managed object could not be found on the
- * server.
- * @throws ConcurrentModificationException
- * If this managed object has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
- OptionalRelationDefinition<C, S> r) throws DefinitionDecodingException,
- ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
- ErrorResultException;
-
- /**
- * Retrieves a singleton child managed object.
- *
- * @param <C>
- * The requested type of the child managed object configuration
- * client.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param r
- * The singleton relation definition.
- * @return Returns the singleton child managed object.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- * @throws DefinitionDecodingException
- * If the managed object was found but its type could not be
- * determined.
- * @throws ManagedObjectDecodingException
- * If the managed object was found but one or more of its
- * properties could not be decoded.
- * @throws ManagedObjectNotFoundException
- * If the requested managed object could not be found on the
- * server.
- * @throws ConcurrentModificationException
- * If this managed object has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
- SingletonRelationDefinition<C, S> r) throws DefinitionDecodingException,
- ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
- ErrorResultException;
-
- /**
- * Retrieves a set child managed object.
- *
- * @param <C>
- * The requested type of the child managed object configuration
- * client.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param r
- * The set relation definition.
- * @param name
- * The name of the child managed object.
- * @return Returns the set child managed object.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- * @throws DefinitionDecodingException
- * If the managed object was found but its type could not be
- * determined.
- * @throws ManagedObjectDecodingException
- * If the managed object was found but one or more of its
- * properties could not be decoded.
- * @throws ManagedObjectNotFoundException
- * If the requested managed object could not be found on the
- * server.
- * @throws ConcurrentModificationException
- * If this managed object has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
- SetRelationDefinition<C, S> r, String name) throws DefinitionDecodingException,
- ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
- ErrorResultException;
-
- /**
- * Creates a client configuration view of this managed object. Modifications
- * made to this managed object will be reflected in the client configuration
- * view and vice versa.
- *
- * @return Returns a client configuration view of this managed object.
- */
- T getConfiguration();
-
- /**
- * Gets the definition associated with this managed object.
- *
- * @return Returns the definition associated with this managed object.
- */
- ManagedObjectDefinition<T, ? extends Configuration> getManagedObjectDefinition();
-
- /**
- * Gets the path of this managed object.
- *
- * @return Returns the path of this managed object.
- */
- ManagedObjectPath<T, ? extends Configuration> getManagedObjectPath();
-
- /**
- * Gets a mutable copy of the set of default values for the specified
- * property.
- *
- * @param <P>
- * The type of the property to be retrieved.
- * @param pd
- * The property to be retrieved.
- * @return Returns the property's default values, or an empty set if there
- * are no default values defined.
- * @throws IllegalArgumentException
- * If the property definition is not associated with this
- * managed object's definition.
- */
- <P> SortedSet<P> getPropertyDefaultValues(PropertyDefinition<P> pd);
-
- /**
- * Gets the effective value of the specified property.
- * <p>
- * See the class description for more information about how the effective
- * property value is derived.
- *
- * @param <P>
- * The type of the property to be retrieved.
- * @param pd
- * The property to be retrieved.
- * @return Returns the property's effective value, or <code>null</code> if
- * there is no effective value defined.
- * @throws IllegalArgumentException
- * If the property definition is not associated with this
- * managed object's definition.
- */
- <P> P getPropertyValue(PropertyDefinition<P> pd);
-
- /**
- * Gets a mutable copy of the set of effective values for the specified
- * property.
- * <p>
- * See the class description for more information about how the effective
- * property values are derived.
- *
- * @param <P>
- * The type of the property to be retrieved.
- * @param pd
- * The property to be retrieved.
- * @return Returns the property's effective values, or an empty set if there
- * are no effective values defined.
- * @throws IllegalArgumentException
- * If the property definition is not associated with this
- * managed object's definition.
- */
- @Override
- <P> SortedSet<P> getPropertyValues(PropertyDefinition<P> pd);
-
- /**
- * Determines whether or not the specified property is set. If the property
- * is unset, then any default behavior associated with the property applies.
- *
- * @param pd
- * The property definition.
- * @return Returns <code>true</code> if the property has been set, or
- * <code>false</code> if it is unset and any default behavior
- * associated with the property applies.
- * @throws IllegalArgumentException
- * If the property definition is not associated with this
- * managed object's definition.
- */
- boolean isPropertyPresent(PropertyDefinition<?> pd);
-
- /**
- * Determines whether or not the optional managed object associated with the
- * specified optional relations exists.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param r
- * The optional relation definition.
- * @return Returns <code>true</code> if the optional managed object exists,
- * <code>false</code> otherwise.
- * @throws ConcurrentModificationException
- * If this managed object has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If there is any other error.
- */
- <C extends ConfigurationClient, S extends Configuration> boolean hasChild(OptionalRelationDefinition<C, S> r)
- throws ConcurrentModificationException, ErrorResultException;
-
- /**
- * Lists the child managed objects associated with the specified
- * instantiable relation.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param r
- * The instantiable relation definition.
- * @return Returns the names of the child managed objects.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- * @throws ConcurrentModificationException
- * If this managed object has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
- InstantiableRelationDefinition<C, S> r) throws ConcurrentModificationException,
- ErrorResultException;
-
- /**
- * Lists the child managed objects associated with the specified
- * instantiable relation which are a sub-type of the specified managed
- * object definition.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param r
- * The instantiable relation definition.
- * @param d
- * The managed object definition.
- * @return Returns the names of the child managed objects which are a
- * sub-type of the specified managed object definition.
- * @throws ConcurrentModificationException
- * If this managed object has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
- InstantiableRelationDefinition<C, S> r, AbstractManagedObjectDefinition<? extends C, ? extends S> d)
- throws ConcurrentModificationException, ErrorResultException;
-
- /**
- * Lists the child managed objects associated with the specified set
- * relation.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param r
- * The set relation definition.
- * @return Returns the names of the child managed objects which for set
- * relations are the definition names of each managed object.
- * @throws ConcurrentModificationException
- * If this managed object has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- <C extends ConfigurationClient, S extends Configuration> String[] listChildren(SetRelationDefinition<C, S> r)
- throws ConcurrentModificationException, ErrorResultException;
-
- /**
- * Lists the child managed objects associated with the specified set
- * relation which are a sub-type of the specified managed object definition.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param r
- * The set relation definition.
- * @param d
- * The managed object definition.
- * @return Returns the names of the child managed objects which for set
- * relations are the definition names of each managed object.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- * @throws ConcurrentModificationException
- * If this managed object has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- <C extends ConfigurationClient, S extends Configuration> String[] listChildren(SetRelationDefinition<C, S> r,
- AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws
- ConcurrentModificationException, ErrorResultException;
-
- /**
- * Removes the named instantiable child managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param r
- * The instantiable relation definition.
- * @param name
- * The name of the child managed object to be removed.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- * @throws ManagedObjectNotFoundException
- * If the managed object could not be removed because it could
- * not found on the server.
- * @throws OperationRejectedException
- * If the managed object cannot be removed due to some
- * client-side or server-side constraint which cannot be
- * satisfied (for example, if it is referenced by another
- * managed object).
- * @throws ConcurrentModificationException
- * If this managed object has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- <C extends ConfigurationClient, S extends Configuration> void removeChild(InstantiableRelationDefinition<C, S> r,
- String name) throws ManagedObjectNotFoundException, OperationRejectedException,
- ConcurrentModificationException, ErrorResultException;
-
- /**
- * Removes an optional child managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param r
- * The optional relation definition.
- * @throws ManagedObjectNotFoundException
- * If the managed object could not be removed because it could
- * not found on the server.
- * @throws OperationRejectedException
- * If the managed object cannot be removed due to some
- * client-side or server-side constraint which cannot be
- * satisfied (for example, if it is referenced by another
- * managed object).
- * @throws ConcurrentModificationException
- * If this managed object has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- <C extends ConfigurationClient, S extends Configuration> void removeChild(OptionalRelationDefinition<C, S> r)
- throws ManagedObjectNotFoundException, OperationRejectedException,
- ConcurrentModificationException, ErrorResultException;
-
- /**
- * Removes s set child managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param r
- * The set relation definition.
- * @param name
- * The name of the child managed object to be removed.
- * @throws ManagedObjectNotFoundException
- * If the managed object could not be removed because it could
- * not found on the server.
- * @throws OperationRejectedException
- * If the managed object cannot be removed due to some
- * client-side or server-side constraint which cannot be
- * satisfied (for example, if it is referenced by another
- * managed object).
- * @throws ConcurrentModificationException
- * If this managed object has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- <C extends ConfigurationClient, S extends Configuration> void removeChild(SetRelationDefinition<C, S> r,
- String name) throws ManagedObjectNotFoundException, OperationRejectedException,
- ConcurrentModificationException, ErrorResultException;
-
- /**
- * Sets a new pending value for the specified property.
- * <p>
- * See the class description for more information regarding pending values.
- *
- * @param <P>
- * The type of the property to be modified.
- * @param pd
- * The property to be modified.
- * @param value
- * The new pending value for the property, or <code>null</code>
- * if the property should be reset to its default behavior.
- * @throws PropertyIsReadOnlyException
- * If this is not a new managed object and the property is
- * read-only or for monitoring purposes.
- * @throws PropertyIsMandatoryException
- * If an attempt was made to remove a mandatory property.
- */
- <P> void setPropertyValue(PropertyDefinition<P> pd, P value);
-
- /**
- * Sets a new pending values for the specified property.
- * <p>
- * See the class description for more information regarding pending values.
- *
- * @param <P>
- * The type of the property to be modified.
- * @param pd
- * The property to be modified.
- * @param values
- * A non-<code>null</code> set of new pending values for the
- * property (an empty set indicates that the property should be
- * reset to its default behavior). The set will not be referenced
- * by this managed object.
- * @throws PropertyIsSingleValuedException
- * If an attempt was made to add multiple pending values to a
- * single-valued property.
- * @throws PropertyIsReadOnlyException
- * If this is not a new managed object and the property is
- * read-only or for monitoring purposes.
- * @throws PropertyIsMandatoryException
- * If an attempt was made to remove a mandatory property.
- */
- <P> void setPropertyValues(PropertyDefinition<P> pd, Collection<P> values);
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/ManagedObjectDecodingException.java b/opendj-config/src/main/java/org/opends/server/admin/client/ManagedObjectDecodingException.java
deleted file mode 100644
index 9c78524..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/ManagedObjectDecodingException.java
+++ /dev/null
@@ -1,125 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedList;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.util.Reject;
-import org.opends.server.admin.DecodingException;
-import org.opends.server.admin.ManagedObjectDefinition;
-import org.opends.server.admin.PropertyException;
-
-/**
- * The requested managed object was found but one or more of its properties
- * could not be decoded successfully.
- */
-public class ManagedObjectDecodingException extends DecodingException {
-
- /**
- * Version ID required by serializable classes.
- */
- private static final long serialVersionUID = -4268510652395945357L;
-
- // Create the message.
- private static LocalizableMessage createMessage(ManagedObject<?> partialManagedObject,
- Collection<PropertyException> causes) {
- Reject.ifNull(causes);
- Reject.ifFalse(!causes.isEmpty(), "causes should not be empty");
-
- ManagedObjectDefinition<?, ?> d = partialManagedObject.getManagedObjectDefinition();
- if (causes.size() == 1) {
- return ERR_MANAGED_OBJECT_DECODING_EXCEPTION_SINGLE.get(d.getUserFriendlyName(), causes.iterator().next()
- .getLocalizableMessageObject());
- } else {
- LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
-
- boolean isFirst = true;
- for (PropertyException cause : causes) {
- if (!isFirst) {
- builder.append("; ");
- }
- builder.append(cause.getLocalizableMessageObject());
- isFirst = false;
- }
-
- return ERR_MANAGED_OBJECT_DECODING_EXCEPTION_PLURAL.get(d.getUserFriendlyName(), builder.toMessage());
- }
- }
-
- // The exception(s) that caused this decoding exception.
- private final Collection<PropertyException> causes;
-
- // The partially created managed object.
- private final ManagedObject<?> partialManagedObject;
-
- /**
- * Create a new property decoding exception.
- *
- * @param partialManagedObject
- * The partially created managed object containing properties
- * which were successfully decoded and empty properties for those
- * which were not (this may include empty mandatory properties).
- * @param causes
- * The exception(s) that caused this decoding exception.
- */
- public ManagedObjectDecodingException(ManagedObject<?> partialManagedObject, Collection<PropertyException> causes) {
- super(createMessage(partialManagedObject, causes));
-
- this.partialManagedObject = partialManagedObject;
- this.causes = Collections.unmodifiableList(new LinkedList<PropertyException>(causes));
- }
-
- /**
- * Get an unmodifiable collection view of the causes of this exception.
- *
- * @return Returns an unmodifiable collection view of the causes of this
- * exception.
- */
- public Collection<PropertyException> getCauses() {
- return causes;
- }
-
- /**
- * Get the partially created managed object containing properties which were
- * successfully decoded and empty properties for those which were not (this
- * may include empty mandatory properties).
- *
- * @return Returns the partially created managed object containing
- * properties which were successfully decoded and empty properties
- * for those which were not (this may include empty mandatory
- * properties).
- */
- public ManagedObject<?> getPartialManagedObject() {
- return partialManagedObject;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/ManagementContext.java b/opendj-config/src/main/java/org/opends/server/admin/client/ManagementContext.java
deleted file mode 100644
index 1890048..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/ManagementContext.java
+++ /dev/null
@@ -1,414 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin.client;
-
-import java.util.Set;
-import java.util.SortedSet;
-
-import org.forgerock.opendj.admin.client.RootCfgClient;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.ConfigurationClient;
-import org.opends.server.admin.DefinitionDecodingException;
-import org.opends.server.admin.InstantiableRelationDefinition;
-import org.opends.server.admin.ManagedObjectNotFoundException;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.OptionalRelationDefinition;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.PropertyException;
-import org.opends.server.admin.SetRelationDefinition;
-import org.opends.server.admin.client.spi.Driver;
-
-/**
- * Client management connection context.
- */
-public abstract class ManagementContext {
-
- /**
- * Creates a new management context.
- */
- protected ManagementContext() {
- // No implementation required.
- }
-
- /**
- * Deletes the named instantiable child managed object from the named parent
- * managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param parent
- * The path of the parent managed object.
- * @param rd
- * The instantiable relation definition.
- * @param name
- * The name of the child managed object to be removed.
- * @return Returns <code>true</code> if the named instantiable child managed
- * object was found, or <code>false</code> if it was not found.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with the parent
- * managed object's definition.
- * @throws ManagedObjectNotFoundException
- * If the parent managed object could not be found.
- * @throws OperationRejectedException
- * If the managed object cannot be removed due to some
- * client-side or server-side constraint which cannot be
- * satisfied (for example, if it is referenced by another
- * managed object).
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject(
- ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd, String name)
- throws ManagedObjectNotFoundException, OperationRejectedException,
- ErrorResultException {
- return getDriver().deleteManagedObject(parent, rd, name);
- }
-
- /**
- * Deletes the optional child managed object from the named parent managed
- * object.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param parent
- * The path of the parent managed object.
- * @param rd
- * The optional relation definition.
- * @return Returns <code>true</code> if the optional child managed object
- * was found, or <code>false</code> if it was not found.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with the parent
- * managed object's definition.
- * @throws ManagedObjectNotFoundException
- * If the parent managed object could not be found.
- * @throws OperationRejectedException
- * If the managed object cannot be removed due to some
- * client-side or server-side constraint which cannot be
- * satisfied (for example, if it is referenced by another
- * managed object).
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject(
- ManagedObjectPath<?, ?> parent, OptionalRelationDefinition<C, S> rd) throws
- ManagedObjectNotFoundException, OperationRejectedException, ErrorResultException {
- return getDriver().deleteManagedObject(parent, rd);
- }
-
- /**
- * Deletes s set child managed object from the named parent managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param parent
- * The path of the parent managed object.
- * @param rd
- * The set relation definition.
- * @param name
- * The name of the child managed object to be removed.
- * @return Returns <code>true</code> if the set child managed object was
- * found, or <code>false</code> if it was not found.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with the parent
- * managed object's definition.
- * @throws ManagedObjectNotFoundException
- * If the parent managed object could not be found.
- * @throws OperationRejectedException
- * If the managed object cannot be removed due to some
- * client-side or server-side constraint which cannot be
- * satisfied (for example, if it is referenced by another
- * managed object).
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject(
- ManagedObjectPath<?, ?> parent, SetRelationDefinition<C, S> rd, String name)
- throws ManagedObjectNotFoundException, OperationRejectedException,
- ErrorResultException {
- return getDriver().deleteManagedObject(parent, rd, name);
- }
-
- /**
- * Gets the named managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the path
- * definition refers to.
- * @param <S>
- * The type of server managed object configuration that the path
- * definition refers to.
- * @param path
- * The path of the managed object.
- * @return Returns the named managed object.
- * @throws DefinitionDecodingException
- * If the managed object was found but its type could not be
- * determined.
- * @throws ManagedObjectDecodingException
- * If the managed object was found but one or more of its
- * properties could not be decoded.
- * @throws ManagedObjectNotFoundException
- * If the requested managed object could not be found on the
- * server.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- @SuppressWarnings("unchecked")
- public final <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getManagedObject(
- ManagedObjectPath<C, S> path) throws DefinitionDecodingException, ManagedObjectDecodingException,
- ManagedObjectNotFoundException, ErrorResultException {
- // Be careful to handle the root configuration.
- if (path.isEmpty()) {
- return (ManagedObject<C>) getRootConfigurationManagedObject();
- }
-
- return getDriver().getManagedObject(path);
- }
-
- /**
- * Gets the effective value of a property in the named managed object.
- *
- * @param <P>
- * The type of the property to be retrieved.
- * @param path
- * The path of the managed object containing the property.
- * @param pd
- * The property to be retrieved.
- * @return Returns the property's effective value, or <code>null</code> if
- * there are no values defined.
- * @throws IllegalArgumentException
- * If the property definition is not associated with the
- * referenced managed object's definition.
- * @throws DefinitionDecodingException
- * If the managed object was found but its type could not be
- * determined.
- * @throws PropertyException
- * If the managed object was found but the requested property
- * could not be decoded.
- * @throws ManagedObjectNotFoundException
- * If the requested managed object could not be found on the
- * server.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public final <P> P getPropertyValue(ManagedObjectPath<?, ?> path, PropertyDefinition<P> pd)
- throws DefinitionDecodingException, ErrorResultException, ManagedObjectNotFoundException {
- Set<P> values = getPropertyValues(path, pd);
- if (values.isEmpty()) {
- return null;
- } else {
- return values.iterator().next();
- }
- }
-
- /**
- * Gets the effective values of a property in the named managed object.
- *
- * @param <P>
- * The type of the property to be retrieved.
- * @param path
- * The path of the managed object containing the property.
- * @param pd
- * The property to be retrieved.
- * @return Returns the property's effective values, or an empty set if there
- * are no values defined.
- * @throws IllegalArgumentException
- * If the property definition is not associated with the
- * referenced managed object's definition.
- * @throws DefinitionDecodingException
- * If the managed object was found but its type could not be
- * determined.
- * @throws PropertyException
- * If the managed object was found but the requested property
- * could not be decoded.
- * @throws ManagedObjectNotFoundException
- * If the requested managed object could not be found on the
- * server.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public final <P> SortedSet<P> getPropertyValues(ManagedObjectPath<?, ?> path, PropertyDefinition<P> pd)
- throws DefinitionDecodingException, ErrorResultException, ManagedObjectNotFoundException {
- return getDriver().getPropertyValues(path, pd);
- }
-
- /**
- * Gets the root configuration client associated with this management
- * context.
- *
- * @return Returns the root configuration client associated with this
- * management context.
- */
- public final RootCfgClient getRootConfiguration() {
- return getRootConfigurationManagedObject().getConfiguration();
- }
-
- /**
- * Gets the root configuration managed object associated with this
- * management context.
- *
- * @return Returns the root configuration managed object associated with
- * this management context.
- */
- public final ManagedObject<RootCfgClient> getRootConfigurationManagedObject() {
- return getDriver().getRootConfigurationManagedObject();
- }
-
- /**
- * Lists the child managed objects of the named parent managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param parent
- * The path of the parent managed object.
- * @param rd
- * The instantiable relation definition.
- * @return Returns the names of the child managed objects.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with the parent
- * managed object's definition.
- * @throws ManagedObjectNotFoundException
- * If the parent managed object could not be found.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public final <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
- ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd) throws
- ManagedObjectNotFoundException, ErrorResultException {
- return listManagedObjects(parent, rd, rd.getChildDefinition());
- }
-
- /**
- * Lists the child managed objects of the named parent managed object which
- * are a sub-type of the specified managed object definition.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param parent
- * The path of the parent managed object.
- * @param rd
- * The instantiable relation definition.
- * @param d
- * The managed object definition.
- * @return Returns the names of the child managed objects which are a
- * sub-type of the specified managed object definition.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with the parent
- * managed object's definition.
- * @throws ManagedObjectNotFoundException
- * If the parent managed object could not be found.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public final <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
- ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd,
- AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws
- ManagedObjectNotFoundException, ErrorResultException {
- return getDriver().listManagedObjects(parent, rd, d);
- }
-
- /**
- * Lists the child managed objects of the named parent managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param parent
- * The path of the parent managed object.
- * @param rd
- * The set relation definition.
- * @return Returns the names of the child managed objects.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with the parent
- * managed object's definition.
- * @throws ManagedObjectNotFoundException
- * If the parent managed object could not be found.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public final <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
- ManagedObjectPath<?, ?> parent, SetRelationDefinition<C, S> rd) throws
- ManagedObjectNotFoundException, ErrorResultException {
- return getDriver().listManagedObjects(parent, rd, rd.getChildDefinition());
- }
-
- /**
- * Determines whether or not the named managed object exists.
- *
- * @param path
- * The path of the named managed object.
- * @return Returns <code>true</code> if the named managed object exists,
- * <code>false</code> otherwise.
- * @throws ManagedObjectNotFoundException
- * If the parent managed object could not be found.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public final boolean managedObjectExists(ManagedObjectPath<?, ?> path) throws ManagedObjectNotFoundException,
- ErrorResultException {
- return getDriver().managedObjectExists(path);
- }
-
- /**
- * Gets the driver associated with this management context.
- *
- * @return Returns the driver associated with this management context.
- */
- protected abstract Driver getDriver();
-
- /**
- * Closes this management context.
- */
- public final void close() {
- this.getDriver().close();
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/MissingMandatoryPropertiesException.java b/opendj-config/src/main/java/org/opends/server/admin/client/MissingMandatoryPropertiesException.java
deleted file mode 100644
index 086101e..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/MissingMandatoryPropertiesException.java
+++ /dev/null
@@ -1,150 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.util.Reject;
-import org.opends.server.admin.OperationsException;
-import org.opends.server.admin.PropertyIsMandatoryException;
-
-/**
- * This exception is thrown when an attempt is made to add or modify a managed
- * object when one or more of its mandatory properties are undefined.
- */
-public class MissingMandatoryPropertiesException extends OperationsException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = 6342522125252055588L;
-
- // Create the message.
- private static LocalizableMessage createMessage(Collection<PropertyIsMandatoryException> causes) {
- Reject.ifNull(causes);
- Reject.ifFalse(!causes.isEmpty(), "causes should not be empty");
-
- if (causes.size() == 1) {
- return ERR_MISSING_MANDATORY_PROPERTIES_EXCEPTION_SINGLE.get(causes.iterator().next()
- .getPropertyDefinition().getName());
- } else {
- LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
-
- boolean isFirst = true;
- for (PropertyIsMandatoryException cause : causes) {
- if (!isFirst) {
- builder.append(", ");
- }
- builder.append(cause.getPropertyDefinition().getName());
- isFirst = false;
- }
-
- return ERR_MISSING_MANDATORY_PROPERTIES_EXCEPTION_PLURAL.get(builder.toMessage());
- }
- }
-
- // The causes of this exception.
- private final Collection<PropertyIsMandatoryException> causes;
-
- // Indicates whether the exception occurred during managed object
- // creation.
- private final boolean isCreate;
-
- // The user friendly name of the component that caused this
- // exception.
- private final LocalizableMessage ufn;
-
- /**
- * Creates a new missing mandatory properties exception with the provided
- * causes.
- *
- * @param ufn
- * The user friendly name of the component that caused this
- * exception.
- * @param causes
- * The causes of this exception (must be non-<code>null</code>
- * and non-empty).
- * @param isCreate
- * Indicates whether the exception occurred during managed object
- * creation.
- */
- public MissingMandatoryPropertiesException(LocalizableMessage ufn,
- Collection<PropertyIsMandatoryException> causes, boolean isCreate) {
- super(createMessage(causes));
-
- this.causes = new ArrayList<PropertyIsMandatoryException>(causes);
- this.ufn = ufn;
- this.isCreate = isCreate;
- }
-
- /**
- * Gets the first exception that caused this exception.
- *
- * @return Returns the first exception that caused this exception.
- */
- @Override
- public PropertyIsMandatoryException getCause() {
- return causes.iterator().next();
- }
-
- /**
- * Gets an unmodifiable collection view of the causes of this exception.
- *
- * @return Returns an unmodifiable collection view of the causes of this
- * exception.
- */
- public Collection<PropertyIsMandatoryException> getCauses() {
- return Collections.unmodifiableCollection(causes);
- }
-
- /**
- * Gets the user friendly name of the component that caused this exception.
- *
- * @return Returns the user friendly name of the component that caused this
- * exception.
- */
- public LocalizableMessage getUserFriendlyName() {
- return ufn;
- }
-
- /**
- * Indicates whether or not this exception was thrown during managed object
- * creation or during modification.
- *
- * @return Returns <code>true</code> if this exception was thrown during
- * managed object creation.
- */
- public boolean isCreate() {
- return isCreate;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/OperationRejectedException.java b/opendj-config/src/main/java/org/opends/server/admin/client/OperationRejectedException.java
deleted file mode 100644
index 1b91658..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/OperationRejectedException.java
+++ /dev/null
@@ -1,208 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.util.Reject;
-
-/**
- * This exception is thrown when the client or server refuses to create, delete,
- * or modify a managed object due to one or more constraints that cannot be
- * satisfied.
- * <p>
- * Operations can be rejected either by a client-side constraint violation
- * triggered by {@link ClientConstraintHandler}, or by a server-side error.
- * <p>
- * For example, the Directory Server might not be able perform an operation due
- * to some OS related problem, such as lack of disk space, or missing files.
- */
-public class OperationRejectedException extends AdminClientException {
-
- /**
- * The type of operation that caused this exception.
- */
- public enum OperationType {
- /**
- * A managed object could not be created.
- */
- CREATE,
-
- /**
- * A managed object could not be deleted.
- */
- DELETE,
-
- /**
- * A managed object could not be modified.
- */
- MODIFY;
- }
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = 8547688890613079044L;
-
- // Gets the default message.
- private static LocalizableMessage getDefaultMessage(Collection<LocalizableMessage> messages) {
- Reject.ifNull(messages);
- Reject.ifFalse(!messages.isEmpty(), "Messages should not be empty");
-
- if (messages.size() == 1) {
- return ERR_OPERATION_REJECTED_EXCEPTION_SINGLE.get(messages.iterator().next());
- } else {
- return ERR_OPERATION_REJECTED_EXCEPTION_PLURAL.get(getSingleMessage(messages));
- }
- }
-
- // Merge the messages into a single message.
- private static LocalizableMessage getSingleMessage(Collection<LocalizableMessage> messages) {
- if (messages.size() == 1) {
- return messages.iterator().next();
- } else {
- LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
-
- boolean isFirst = true;
- for (LocalizableMessage m : messages) {
- if (!isFirst) {
- builder.append("; ");
- }
- builder.append(m);
- isFirst = false;
- }
-
- return builder.toMessage();
- }
- }
-
- // The messages describing the constraint violations that occurred.
- private final Collection<LocalizableMessage> messages;
-
- // The type of operation that caused this exception.
- private final OperationType type;
-
- // The user friendly name of the component that caused this
- // exception.
- private final LocalizableMessage ufn;
-
- /**
- * Creates a new operation rejected exception with a default message.
- *
- * @param type
- * The type of operation that caused this exception.
- * @param ufn
- * The user friendly name of the component that caused this
- * exception.
- */
- public OperationRejectedException(OperationType type, LocalizableMessage ufn) {
- this(type, ufn, ERR_OPERATION_REJECTED_DEFAULT.get());
- }
-
- /**
- * Creates a new operation rejected exception with the provided messages.
- *
- * @param type
- * The type of operation that caused this exception.
- * @param ufn
- * The user friendly name of the component that caused this
- * exception.
- * @param messages
- * The messages describing the constraint violations that
- * occurred (must be non-<code>null</code> and non-empty).
- */
- public OperationRejectedException(OperationType type, LocalizableMessage ufn,
- Collection<LocalizableMessage> messages) {
- super(getDefaultMessage(messages));
-
- this.messages = new ArrayList<LocalizableMessage>(messages);
- this.type = type;
- this.ufn = ufn;
- }
-
- /**
- * Creates a new operation rejected exception with the provided message.
- *
- * @param type
- * The type of operation that caused this exception.
- * @param ufn
- * The user friendly name of the component that caused this
- * exception.
- * @param message
- * The message describing the constraint violation that occurred.
- */
- public OperationRejectedException(OperationType type, LocalizableMessage ufn, LocalizableMessage message) {
- this(type, ufn, Collections.singleton(message));
- }
-
- /**
- * Gets an unmodifiable collection view of the messages describing the
- * constraint violations that occurred.
- *
- * @return Returns an unmodifiable collection view of the messages
- * describing the constraint violations that occurred.
- */
- public Collection<LocalizableMessage> getMessages() {
- return Collections.unmodifiableCollection(messages);
- }
-
- /**
- * Creates a single message listing all the messages combined into a single
- * list separated by semi-colons.
- *
- * @return Returns a single message listing all the messages combined into a
- * single list separated by semi-colons.
- */
- public LocalizableMessage getMessagesAsSingleMessage() {
- return getSingleMessage(messages);
- }
-
- /**
- * Gets the type of operation that caused this exception.
- *
- * @return Returns the type of operation that caused this exception.
- */
- public OperationType getOperationType() {
- return type;
- }
-
- /**
- * Gets the user friendly name of the component that caused this exception.
- *
- * @return Returns the user friendly name of the component that caused this
- * exception.
- */
- public LocalizableMessage getUserFriendlyName() {
- return ufn;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPConnection.java b/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPConnection.java
deleted file mode 100644
index d5cbd17..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPConnection.java
+++ /dev/null
@@ -1,125 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client.ldap;
-
-import java.util.Collection;
-
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.Entry;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.opendj.ldap.requests.ModifyRequest;
-import org.forgerock.opendj.ldap.responses.SearchResultEntry;
-
-/**
- * An LDAP connection adaptor interface which is used to perform LDAP client
- * operations.
- * <p>
- * This interface is provided in order to make it easier to keep track of which
- * JNDI DirContext methods we require and also to facilitate implementation of
- * mock JNDI contexts for unit-testing.
- */
-public abstract class LDAPConnection {
-
- /**
- * Create a new LDAP connection.
- */
- protected LDAPConnection() {
- // No implementation required.
- }
-
- /**
- * Creates a new entry.
- *
- * @param entry
- * The entry to create.
- * @throws ErrorResultException
- * If an error occurred whilst creating the entry.
- */
- public abstract void createEntry(Entry entry) throws ErrorResultException;
-
- /**
- * Deletes the named subtree.
- *
- * @param dn
- * The name of the subtree to be deleted.
- * @throws ErrorResultException
- * If an error occurred whilst deleting the subtree.
- */
- public abstract void deleteSubtree(DN dn) throws ErrorResultException;
-
- /**
- * Determines whether or not the named entry exists.
- *
- * @param dn
- * The name of the entry.
- * @return Returns <code>true</code> if the entry exists.
- * @throws ErrorResultException
- * If an error occurred whilst making the determination.
- */
- public abstract boolean entryExists(DN dn) throws ErrorResultException;
-
- /**
- * Lists the children of the named entry.
- *
- * @param dn
- * The name of the entry to list.
- * @param filter
- * An LDAP filter string, or <code>null</code> indicating the
- * default filter of <code>(objectclass=*)</code>.
- * @return Returns the names of the children.
- * @throws ErrorResultException
- * If an error occurred whilst listing the children.
- */
- public abstract Collection<DN> listEntries(DN dn, String filter) throws ErrorResultException;
-
- /**
- * Modifies an entry according to the provided modify request.
- *
- * @param request
- * The modification request to perform.
- * @throws ErrorResultException
- * If an error occurred whilst applying the modifications.
- */
- public abstract void modifyEntry(ModifyRequest request) throws ErrorResultException;
-
- /**
- * Reads the attributes of the named entry.
- *
- * @param dn
- * The name of the entry to be read.
- * @param attrIds
- * The list of attributes to be retrievd.
- * @return Returns the attributes of the requested entry.
- * @throws ErrorResultException
- * If an error occurred whilst reading the entry.
- */
- public abstract SearchResultEntry readEntry(DN dn, Collection<String> attrIds) throws ErrorResultException;
-
- /**
- * Closes the LDAP connection.
- */
- public abstract void unbind();
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPDriver.java b/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPDriver.java
deleted file mode 100644
index 1a4e9e6..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPDriver.java
+++ /dev/null
@@ -1,572 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- * Portions Copyright 2013 ForgeRock, AS.
- */
-package org.opends.server.admin.client.ldap;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.opendj.admin.client.RootCfgClient;
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.ldap.Attribute;
-import org.forgerock.opendj.ldap.ByteString;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.opendj.ldap.ResultCode;
-import org.forgerock.opendj.ldap.responses.SearchResultEntry;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.AggregationPropertyDefinition;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.ConfigurationClient;
-import org.opends.server.admin.DefaultBehaviorException;
-import org.opends.server.admin.DefinitionDecodingException;
-import org.opends.server.admin.DefinitionResolver;
-import org.opends.server.admin.IllegalPropertyValueStringException;
-import org.opends.server.admin.InstantiableRelationDefinition;
-import org.opends.server.admin.LDAPProfile;
-import org.opends.server.admin.ManagedObjectDefinition;
-import org.opends.server.admin.ManagedObjectNotFoundException;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.PropertyDefinitionVisitor;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.PropertyException;
-import org.opends.server.admin.PropertyIsMandatoryException;
-import org.opends.server.admin.PropertyIsSingleValuedException;
-import org.opends.server.admin.PropertyOption;
-import org.opends.server.admin.Reference;
-import org.opends.server.admin.RelationDefinition;
-import org.opends.server.admin.SetRelationDefinition;
-import org.opends.server.admin.DefinitionDecodingException.Reason;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagedObjectDecodingException;
-import org.opends.server.admin.client.OperationRejectedException;
-import org.opends.server.admin.client.OperationRejectedException.OperationType;
-import org.opends.server.admin.client.spi.Driver;
-import org.opends.server.admin.client.spi.PropertySet;
-
-/**
- * The LDAP management context driver implementation.
- */
-final class LDAPDriver extends Driver {
-
- /**
- * A visitor which is used to decode property LDAP values.
- */
- private static final class ValueDecoder extends PropertyDefinitionVisitor<Object, String> {
-
- private final PropertyDefinitionsOptions options;
-
- /**
- * Decodes the provided property LDAP value.
- *
- * @param <P>
- * The type of the property.
- * @param pd
- * The property definition.
- * @param value
- * The LDAP string representation.
- * @param options
- * Decoding options for property definitions.
- * @return Returns the decoded LDAP value.
- * @throws IllegalPropertyValueStringException
- * If the property value could not be decoded because it was
- * invalid.
- */
- public static <P> P decode(PropertyDefinition<P> pd, Object value, PropertyDefinitionsOptions options) {
- String s = String.valueOf(value);
- return pd.castValue(pd.accept(new ValueDecoder(options), s));
- }
-
- // Prevent instantiation.
- private ValueDecoder(PropertyDefinitionsOptions options) {
- this.options = options;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <C extends ConfigurationClient, S extends Configuration> Object visitAggregation(
- AggregationPropertyDefinition<C, S> d, String p) {
- // Aggregations values are stored as full DNs in LDAP, but
- // just their common name is exposed in the admin framework.
- try {
- Reference<C, S> reference = Reference.parseDN(d.getParentPath(), d.getRelationDefinition(), p);
- return reference.getName();
- } catch (IllegalArgumentException e) {
- throw new IllegalPropertyValueStringException(d, p);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <T> Object visitUnknown(PropertyDefinition<T> d, String p) {
- // By default the property definition's decoder will do.
- return d.decodeValue(p, options);
- }
- }
-
- private LDAPManagementContext context;
-
- private final LDAPConnection connection;
-
- // The LDAP profile which should be used to construct LDAP
- // requests and decode LDAP responses.
- private final LDAPProfile profile;
-
- /**
- * Creates a new LDAP driver using the specified LDAP connection and
- * profile.
- *
- * @param connection
- * The LDAP connection.
- * @param profile
- * The LDAP profile.
- * @param propertyDefOptions
- * Options used to validate property definitions values
- */
- public LDAPDriver(LDAPConnection connection, LDAPProfile profile, PropertyDefinitionsOptions propertyDefOptions) {
- super(propertyDefOptions);
- this.connection = connection;
- this.profile = profile;
- }
-
- void setManagementContext(LDAPManagementContext context) {
- this.context = context;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void close() {
- connection.unbind();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getManagedObject(
- ManagedObjectPath<C, S> path) throws DefinitionDecodingException, ManagedObjectDecodingException,
- ManagedObjectNotFoundException, ErrorResultException {
- if (!managedObjectExists(path)) {
- throw new ManagedObjectNotFoundException();
- }
-
- try {
- // Read the entry associated with the managed object.
- DN dn = LDAPNameBuilder.create(path, profile);
- AbstractManagedObjectDefinition<C, S> d = path.getManagedObjectDefinition();
- ManagedObjectDefinition<? extends C, ? extends S> mod = getEntryDefinition(d, dn);
-
- ArrayList<String> attrIds = new ArrayList<String>();
- for (PropertyDefinition<?> pd : mod.getAllPropertyDefinitions()) {
- String attrId = profile.getAttributeName(mod, pd);
- attrIds.add(attrId);
- }
-
- SearchResultEntry searchResultEntry = connection.readEntry(dn, attrIds);
-
- // Build the managed object's properties.
- List<PropertyException> exceptions = new LinkedList<PropertyException>();
- PropertySet newProperties = new PropertySet();
- for (PropertyDefinition<?> pd : mod.getAllPropertyDefinitions()) {
- String attrID = profile.getAttributeName(mod, pd);
- Attribute attribute = searchResultEntry.getAttribute(attrID);
- try {
- decodeProperty(newProperties, path, pd, attribute);
- } catch (PropertyException e) {
- exceptions.add(e);
- }
- }
-
- // If there were no decoding problems then return the object,
- // otherwise throw an operations exception.
- ManagedObject<? extends C> mo = createExistingManagedObject(mod, path, newProperties);
- if (exceptions.isEmpty()) {
- return mo;
- } else {
- throw new ManagedObjectDecodingException(mo, exceptions);
- }
- } catch (ErrorResultException e) {
- if (e.getResult().getResultCode() == ResultCode.NO_SUCH_OBJECT) {
- throw new ManagedObjectNotFoundException();
- }
- throw e;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("unchecked")
- @Override
- public <C extends ConfigurationClient, S extends Configuration, P> SortedSet<P> getPropertyValues(
- ManagedObjectPath<C, S> path, PropertyDefinition<P> propertyDef) throws DefinitionDecodingException,
- ManagedObjectNotFoundException, ErrorResultException {
- // Check that the requested property is from the definition
- // associated with the path.
- AbstractManagedObjectDefinition<C, S> d = path.getManagedObjectDefinition();
- PropertyDefinition<?> tmp = d.getPropertyDefinition(propertyDef.getName());
- if (tmp != propertyDef) {
- throw new IllegalArgumentException("The property " + propertyDef.getName() + " is not associated with a "
- + d.getName());
- }
-
- if (!managedObjectExists(path)) {
- throw new ManagedObjectNotFoundException();
- }
-
- try {
- // Read the entry associated with the managed object.
- DN dn = LDAPNameBuilder.create(path, profile);
- ManagedObjectDefinition<? extends C, ? extends S> objectDef = getEntryDefinition(d, dn);
-
- // Make sure we use the correct property definition, the
- // provided one might have been overridden in the resolved
- // definition.
- propertyDef = (PropertyDefinition<P>) objectDef.getPropertyDefinition(propertyDef.getName());
-
- String attrID = profile.getAttributeName(objectDef, propertyDef);
- SearchResultEntry resultEntry = connection.readEntry(dn, Collections.singleton(attrID));
- Attribute attribute = resultEntry.getAttribute(attrID);
-
- // Decode the values.
- SortedSet<P> values = new TreeSet<P>(propertyDef);
- PropertyDefinitionsOptions options = context.getPropertyDefOptions();
- if (attribute != null) {
- for (ByteString byteValue : attribute) {
- P value = ValueDecoder.decode(propertyDef, byteValue, options);
- values.add(value);
- }
- }
-
- // Sanity check the returned values.
- if (values.size() > 1 && !propertyDef.hasOption(PropertyOption.MULTI_VALUED)) {
- throw new PropertyIsSingleValuedException(propertyDef);
- }
-
- if (values.isEmpty() && propertyDef.hasOption(PropertyOption.MANDATORY)) {
- throw new PropertyIsMandatoryException(propertyDef);
- }
-
- if (values.isEmpty()) {
- // Use the property's default values.
- values.addAll(findDefaultValues(path.asSubType(objectDef), propertyDef, false));
- }
-
- return values;
- } catch (ErrorResultException e) {
- if (e.getResult().getResultCode() == ResultCode.NO_SUCH_OBJECT) {
- throw new ManagedObjectNotFoundException();
- }
- throw e;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public ManagedObject<RootCfgClient> getRootConfigurationManagedObject() {
- return new LDAPManagedObject<RootCfgClient>(this, RootCfgDefn.getInstance(), ManagedObjectPath.emptyPath(),
- new PropertySet(), true, null);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
- ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd,
- AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws ManagedObjectNotFoundException,
- ErrorResultException {
- validateRelationDefinition(parent, rd);
-
- if (!managedObjectExists(parent)) {
- throw new ManagedObjectNotFoundException();
- }
-
- // Get the search base DN.
- DN dn = LDAPNameBuilder.create(parent, rd, profile);
-
- // Retrieve only those entries which are sub-types of the
- // specified definition.
- StringBuilder builder = new StringBuilder();
- builder.append("(objectclass=");
- builder.append(profile.getObjectClass(d));
- builder.append(')');
- String filter = builder.toString();
-
- List<String> children = new ArrayList<String>();
- try {
- for (DN child : connection.listEntries(dn, filter)) {
- children.add(child.rdn().getFirstAVA().getAttributeValue().toString());
- }
- } catch (ErrorResultException e) {
- if (e.getResult().getResultCode() == ResultCode.NO_SUCH_OBJECT) {
- // Ignore this
- // It means that the base entry does not exist
- // It might not if this managed object has just been created.
- } else {
- throw e;
- }
- }
- return children.toArray(new String[children.size()]);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
- ManagedObjectPath<?, ?> parent, SetRelationDefinition<C, S> rd,
- AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws ManagedObjectNotFoundException,
- ErrorResultException {
- validateRelationDefinition(parent, rd);
-
- if (!managedObjectExists(parent)) {
- throw new ManagedObjectNotFoundException();
- }
-
- // Get the search base DN.
- DN dn = LDAPNameBuilder.create(parent, rd, profile);
-
- // Retrieve only those entries which are sub-types of the
- // specified definition.
- StringBuilder builder = new StringBuilder();
- builder.append("(objectclass=");
- builder.append(profile.getObjectClass(d));
- builder.append(')');
- String filter = builder.toString();
-
- List<String> children = new ArrayList<String>();
- try {
- for (DN child : connection.listEntries(dn, filter)) {
- children.add(child.rdn().getFirstAVA().getAttributeValue().toString());
- }
- } catch (ErrorResultException e) {
- if (e.getResult().getResultCode() == ResultCode.NO_SUCH_OBJECT) {
- // Ignore this
- // It means that the base entry does not exist
- // It might not if this managed object has just been created.
- } else {
- throw e;
- }
- }
-
- return children.toArray(new String[children.size()]);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean managedObjectExists(ManagedObjectPath<?, ?> path) throws ManagedObjectNotFoundException,
- ErrorResultException {
- if (path.isEmpty()) {
- return true;
- }
-
- ManagedObjectPath<?, ?> parent = path.parent();
- DN dn = LDAPNameBuilder.create(parent, profile);
- if (!entryExists(dn)) {
- throw new ManagedObjectNotFoundException();
- }
-
- dn = LDAPNameBuilder.create(path, profile);
- return entryExists(dn);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected <C extends ConfigurationClient, S extends Configuration> void deleteManagedObject(
- ManagedObjectPath<C, S> path) throws OperationRejectedException, ErrorResultException {
- // Delete the entry and any subordinate entries.
- DN dn = LDAPNameBuilder.create(path, profile);
- try {
- connection.deleteSubtree(dn);
- } catch (ErrorResultException e) {
- if (e.getResult().getResultCode() == ResultCode.UNWILLING_TO_PERFORM) {
- AbstractManagedObjectDefinition<?, ?> d = path.getManagedObjectDefinition();
- LocalizableMessage m = LocalizableMessage.raw("%s", e.getMessage());
- throw new OperationRejectedException(OperationType.DELETE, d.getUserFriendlyName(), m);
- }
- throw e;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected LDAPManagementContext getManagementContext() {
- return context;
- }
-
- /**
- * Determines whether the named LDAP entry exists.
- *
- * @param dn
- * The LDAP entry name.
- * @return Returns <code>true</code> if the named LDAP entry exists.
- * @throws ErrorResultException
- * if a problem occurs.
- */
- boolean entryExists(DN dn) throws ErrorResultException {
- return connection.entryExists(dn);
- }
-
- /**
- * Gets the LDAP connection used for interacting with the server.
- *
- * @return Returns the LDAP connection used for interacting with the server.
- */
- LDAPConnection getLDAPConnection() {
- return connection;
- }
-
- /**
- * Gets the LDAP profile which should be used to construct LDAP requests and
- * decode LDAP responses.
- *
- * @return Returns the LDAP profile which should be used to construct LDAP
- * requests and decode LDAP responses.
- */
- LDAPProfile getLDAPProfile() {
- return profile;
- }
-
- // Create a managed object which already exists on the server.
- private <M extends ConfigurationClient, N extends Configuration> ManagedObject<M> createExistingManagedObject(
- ManagedObjectDefinition<M, N> d, ManagedObjectPath<? super M, ? super N> p, PropertySet properties) {
- RelationDefinition<?, ?> rd = p.getRelationDefinition();
- PropertyDefinition<?> pd = null;
- if (rd instanceof InstantiableRelationDefinition) {
- InstantiableRelationDefinition<?, ?> ird = (InstantiableRelationDefinition<?, ?>) rd;
- pd = ird.getNamingPropertyDefinition();
- }
- return new LDAPManagedObject<M>(this, d, p.asSubType(d), properties, true, pd);
- }
-
- // Create a property using the provided string values.
- private <P> void decodeProperty(PropertySet newProperties, ManagedObjectPath<?, ?> path,
- PropertyDefinition<P> propertyDef, Attribute attribute) {
- PropertyException exception = null;
-
- // Get the property's active values.
- SortedSet<P> activeValues = new TreeSet<P>(propertyDef);
- PropertyDefinitionsOptions options = context.getPropertyDefOptions();
- if (attribute != null) {
- for (ByteString byteValue : attribute) {
- P value = ValueDecoder.decode(propertyDef, byteValue, options);
- activeValues.add(value);
- }
- }
-
- if (activeValues.size() > 1 && !propertyDef.hasOption(PropertyOption.MULTI_VALUED)) {
- // This exception takes precedence over previous exceptions.
- exception = new PropertyIsSingleValuedException(propertyDef);
- P value = activeValues.first();
- activeValues.clear();
- activeValues.add(value);
- }
-
- // Get the property's default values.
- Collection<P> defaultValues;
- try {
- defaultValues = findDefaultValues(path, propertyDef, false);
- } catch (DefaultBehaviorException e) {
- defaultValues = Collections.emptySet();
- exception = e;
- }
-
- newProperties.addProperty(propertyDef, defaultValues, activeValues);
-
- if (activeValues.isEmpty() && defaultValues.isEmpty() && propertyDef.hasOption(PropertyOption.MANDATORY)) {
- // The active values maybe empty because of a previous
- // exception.
- if (exception == null) {
- exception = new PropertyIsMandatoryException(propertyDef);
- }
- }
-
- if (exception != null) {
- throw exception;
- }
- }
-
- // Determine the type of managed object associated with the named
- // entry.
- // @Checkstyle:off
- private <C extends ConfigurationClient, S extends Configuration> ManagedObjectDefinition<? extends C, ? extends S>
- getEntryDefinition(AbstractManagedObjectDefinition<C, S> d, DN dn) throws ErrorResultException,
- DefinitionDecodingException {
- // @Checkstyle:on
- SearchResultEntry searchResultEntry = connection.readEntry(dn, Collections.singleton("objectclass"));
- Attribute objectClassAttr = searchResultEntry.getAttribute("objectclass");
-
- if (objectClassAttr == null) {
- // No object classes.
- throw new DefinitionDecodingException(d, Reason.NO_TYPE_INFORMATION);
- }
-
- final Set<String> objectClasses = new HashSet<String>();
- for (ByteString byteValue : objectClassAttr) {
- objectClasses.add(byteValue.toString().toLowerCase().trim());
- }
-
- if (objectClasses.isEmpty()) {
- // No object classes.
- throw new DefinitionDecodingException(d, Reason.NO_TYPE_INFORMATION);
- }
-
- // Resolve the appropriate sub-type based on the object classes.
- DefinitionResolver resolver = new DefinitionResolver() {
- @Override
- public boolean matches(AbstractManagedObjectDefinition<?, ?> d) {
- String objectClass = profile.getObjectClass(d);
- return objectClasses.contains(objectClass);
- }
- };
-
- return d.resolveManagedObjectDefinition(resolver);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPManagedObject.java b/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPManagedObject.java
deleted file mode 100644
index 9f8af69..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPManagedObject.java
+++ /dev/null
@@ -1,330 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin.client.ldap;
-
-import java.util.List;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.opendj.ldap.Attribute;
-import org.forgerock.opendj.ldap.ByteString;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.Entry;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.opendj.ldap.LinkedAttribute;
-import org.forgerock.opendj.ldap.LinkedHashMapEntry;
-import org.forgerock.opendj.ldap.ModificationType;
-import org.forgerock.opendj.ldap.ResultCode;
-import org.forgerock.opendj.ldap.requests.ModifyRequest;
-import org.forgerock.opendj.ldap.requests.Requests;
-import org.opends.server.admin.AggregationPropertyDefinition;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.ConfigurationClient;
-import org.opends.server.admin.InstantiableRelationDefinition;
-import org.opends.server.admin.ManagedObjectAlreadyExistsException;
-import org.opends.server.admin.ManagedObjectDefinition;
-import org.opends.server.admin.ManagedObjectNotFoundException;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.PropertyOption;
-import org.opends.server.admin.PropertyValueVisitor;
-import org.opends.server.admin.Reference;
-import org.opends.server.admin.RelationDefinition;
-import org.opends.server.admin.SetRelationDefinition;
-import org.opends.server.admin.client.ConcurrentModificationException;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.OperationRejectedException;
-import org.opends.server.admin.client.OperationRejectedException.OperationType;
-import org.opends.server.admin.client.spi.AbstractManagedObject;
-import org.opends.server.admin.client.spi.Driver;
-import org.opends.server.admin.client.spi.Property;
-import org.opends.server.admin.client.spi.PropertySet;
-
-/**
- * A managed object bound to an LDAP connection.
- *
- * @param <T>
- * The type of client configuration represented by the client managed
- * object.
- */
-final class LDAPManagedObject<T extends ConfigurationClient> extends AbstractManagedObject<T> {
-
- /**
- * A visitor which is used to encode property LDAP values.
- */
- private static final class ValueEncoder extends PropertyValueVisitor<Object, Void> {
-
- // Prevent instantiation.
- private ValueEncoder() {
- // No implementation required.
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <C extends ConfigurationClient, S extends Configuration> Object visitAggregation(
- AggregationPropertyDefinition<C, S> pd, String v, Void p) {
- // Aggregations values are stored as full DNs in LDAP, but
- // just their common name is exposed in the admin framework.
- Reference<C, S> reference = Reference.parseName(pd.getParentPath(), pd.getRelationDefinition(), v);
- return reference.toDN().toString();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <P> Object visitUnknown(PropertyDefinition<P> propertyDef, P value, Void p) {
- return propertyDef.encodeValue(value);
- }
- }
-
- // The LDAP management driver associated with this managed object.
- private final LDAPDriver driver;
-
- /**
- * Creates a new LDAP managed object instance.
- *
- * @param driver
- * The underlying LDAP management driver.
- * @param d
- * The managed object's definition.
- * @param path
- * The managed object's path.
- * @param properties
- * The managed object's properties.
- * @param existsOnServer
- * Indicates whether or not the managed object already exists.
- * @param namingPropertyDefinition
- * The managed object's naming property definition if there is
- * one.
- */
- LDAPManagedObject(LDAPDriver driver, ManagedObjectDefinition<T, ? extends Configuration> d,
- ManagedObjectPath<T, ? extends Configuration> path, PropertySet properties, boolean existsOnServer,
- PropertyDefinition<?> namingPropertyDefinition) {
- super(d, path, properties, existsOnServer, namingPropertyDefinition,
- driver.getManagementContext().getPropertyDefOptions());
- this.driver = driver;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void addNewManagedObject() throws ErrorResultException, OperationRejectedException,
- ConcurrentModificationException, ManagedObjectAlreadyExistsException {
- // First make sure that the parent managed object still exists.
- ManagedObjectDefinition<?, ?> d = getManagedObjectDefinition();
- ManagedObjectPath<?, ?> path = getManagedObjectPath();
- ManagedObjectPath<?, ?> parent = path.parent();
-
- try {
- if (!driver.managedObjectExists(parent)) {
- throw new ConcurrentModificationException();
- }
- } catch (ManagedObjectNotFoundException e) {
- throw new ConcurrentModificationException();
- }
-
- // We may need to create the parent "relation" entry if this is a
- // child of an instantiable or set relation.
- RelationDefinition<?, ?> r = path.getRelationDefinition();
- if (r instanceof InstantiableRelationDefinition || r instanceof SetRelationDefinition) {
-
- // TODO: this implementation does not handle relations which
- // comprise of more than one RDN arc (this will probably never
- // be required anyway).
- DN dn;
- if (r instanceof InstantiableRelationDefinition) {
- dn = LDAPNameBuilder.create(parent, (InstantiableRelationDefinition<?, ?>) r,
- driver.getLDAPProfile());
- } else {
- dn = LDAPNameBuilder.create(parent, (SetRelationDefinition<?, ?>) r,
- driver.getLDAPProfile());
- }
-
- if (!driver.entryExists(dn)) {
- Entry entry = new LinkedHashMapEntry(dn);
-
- // Create the branch's object class attribute.
- List<String> objectClasses = driver.getLDAPProfile().getRelationObjectClasses(r);
- addObjectClassesToEntry(objectClasses, entry);
-
- // Create the branch's naming attribute.
- entry.addAttribute(dn.rdn().getFirstAVA().toAttribute());
-
- // Create the entry.
- try {
- driver.getLDAPConnection().createEntry(entry);
- } catch (ErrorResultException e) {
- if (e.getResult().getResultCode() == ResultCode.UNWILLING_TO_PERFORM) {
- LocalizableMessage m = LocalizableMessage.raw("%s", e.getLocalizedMessage());
- throw new OperationRejectedException(OperationType.CREATE, d.getUserFriendlyName(), m);
- } else {
- throw e;
- }
- }
- }
- }
-
- // Now add the entry representing this new managed object.
- DN dn = LDAPNameBuilder.create(path, driver.getLDAPProfile());
- Entry entry = new LinkedHashMapEntry(dn);
-
- // Create the object class attribute.
- ManagedObjectDefinition<?, ?> definition = getManagedObjectDefinition();
- List<String> objectClasses = driver.getLDAPProfile().getObjectClasses(definition);
- addObjectClassesToEntry(objectClasses, entry);
-
- // Create the naming attribute if there is not naming property.
- PropertyDefinition<?> namingPropertyDef = getNamingPropertyDefinition();
- if (namingPropertyDef == null) {
- entry.addAttribute(dn.rdn().getFirstAVA().toAttribute());
- }
-
- // Create the remaining attributes.
- for (PropertyDefinition<?> propertyDef : definition.getAllPropertyDefinitions()) {
- String attrID = driver.getLDAPProfile().getAttributeName(definition, propertyDef);
- Attribute attribute = new LinkedAttribute(attrID);
- encodeProperty(attribute, propertyDef);
- if (attribute.size() != 0) {
- entry.addAttribute(attribute);
- }
- }
-
- try {
- // Create the entry.
- driver.getLDAPConnection().createEntry(entry);
- } catch (ErrorResultException e) {
- if (e.getResult().getResultCode() == ResultCode.ENTRY_ALREADY_EXISTS) {
- throw new ManagedObjectAlreadyExistsException();
- } else if (e.getResult().getResultCode() == ResultCode.UNWILLING_TO_PERFORM) {
- LocalizableMessage m = LocalizableMessage.raw("%s", e.getLocalizedMessage());
- throw new OperationRejectedException(OperationType.CREATE, d.getUserFriendlyName(), m);
- } else {
- throw e;
- }
- }
- }
-
- private void addObjectClassesToEntry(List<String> objectClasses, Entry entry) {
- for (String objectClass : objectClasses) {
- Attribute attr = new LinkedAttribute("objectClass");
- attr.add(ByteString.valueOf(objectClass));
- entry.addAttribute(attr);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Driver getDriver() {
- return driver;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void modifyExistingManagedObject() throws ConcurrentModificationException, OperationRejectedException,
- ErrorResultException {
- // Build the modify request
- ManagedObjectPath<?, ?> path = getManagedObjectPath();
- DN dn = LDAPNameBuilder.create(path, driver.getLDAPProfile());
- ModifyRequest request = Requests.newModifyRequest(dn);
- ManagedObjectDefinition<?, ?> d = getManagedObjectDefinition();
- for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) {
- Property<?> p = getProperty(pd);
- if (p.isModified()) {
- String attrID = driver.getLDAPProfile().getAttributeName(d, pd);
- Attribute attribute = new LinkedAttribute(attrID);
- encodeProperty(attribute, pd);
- request.addModification(ModificationType.REPLACE, attrID,
- attribute.toArray(new Object[attribute.size()]));
- }
- }
-
- // Perform the LDAP modification if something has changed.
- if (!request.getModifications().isEmpty()) {
- try {
- driver.getLDAPConnection().modifyEntry(request);
- } catch (ErrorResultException e) {
- if (e.getResult().getResultCode() == ResultCode.UNWILLING_TO_PERFORM) {
- LocalizableMessage m = LocalizableMessage.raw("%s", e.getLocalizedMessage());
- throw new OperationRejectedException(OperationType.CREATE, d.getUserFriendlyName(), m);
- } else {
- throw e;
- }
- }
-
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected <M extends ConfigurationClient> ManagedObject<M> newInstance(ManagedObjectDefinition<M, ?> d,
- ManagedObjectPath<M, ?> path, PropertySet properties, boolean existsOnServer,
- PropertyDefinition<?> namingPropertyDefinition) {
- return new LDAPManagedObject<M>(driver, d, path, properties, existsOnServer, namingPropertyDefinition);
- }
-
- // Encode a property into LDAP string values.
- private <P> void encodeProperty(Attribute attribute, PropertyDefinition<P> propertyDef) {
- PropertyValueVisitor<Object, Void> visitor = new ValueEncoder();
- Property<P> property = getProperty(propertyDef);
- if (propertyDef.hasOption(PropertyOption.MANDATORY)) {
- // For mandatory properties we fall-back to the default values
- // if defined which can sometimes be the case e.g when a
- // mandatory property is overridden.
- for (P value : property.getEffectiveValues()) {
- attribute.add(propertyDef.accept(visitor, value, null));
- }
- } else {
- for (P value : property.getPendingValues()) {
- attribute.add(propertyDef.accept(visitor, value, null));
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isModified() {
- ManagedObjectDefinition<?, ?> d = getManagedObjectDefinition();
- for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) {
- Property<?> p = getProperty(pd);
- if (p.isModified()) {
- return true;
- }
- }
- return false;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPManagementContext.java b/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPManagementContext.java
deleted file mode 100644
index 348d7e9..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPManagementContext.java
+++ /dev/null
@@ -1,87 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin.client.ldap;
-
-import org.opends.server.admin.LDAPProfile;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.client.spi.Driver;
-import org.forgerock.util.Reject;
-
-/**
- * An LDAP management connection context.
- */
-public final class LDAPManagementContext extends ManagementContext {
-
- /**
- * Create a new LDAP management context using the provided LDAP connection.
- *
- * @param connection
- * The LDAP connection.
- * @param profile
- * The LDAP profile.
- * @param options
- * Options to decode values of property definitions.
- * @return Returns the new management context.
- */
- public static ManagementContext createFromContext(LDAPConnection connection, LDAPProfile profile,
- PropertyDefinitionsOptions options) {
- Reject.ifNull(connection, profile, options);
- LDAPDriver driver = new LDAPDriver(connection, profile, options);
- LDAPManagementContext context = new LDAPManagementContext(driver, options);
- driver.setManagementContext(context);
- return context;
- }
-
- /** The LDAP management context driver. */
- private final LDAPDriver driver;
-
- /** Options to validate and decode values of property definitions. */
- private final PropertyDefinitionsOptions options;
-
- /** Private constructor. */
- private LDAPManagementContext(LDAPDriver driver, PropertyDefinitionsOptions options) {
- this.driver = driver;
- this.options = options;
- }
-
- /** {@inheritDoc} */
- @Override
- protected Driver getDriver() {
- return driver;
- }
-
- /**
- * Returns the property definitions options.
- *
- * @return the options to validate and decode values of property
- * definitions.
- */
- protected PropertyDefinitionsOptions getPropertyDefOptions() {
- return options;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPNameBuilder.java b/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPNameBuilder.java
deleted file mode 100644
index 074f3ff..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/ldap/LDAPNameBuilder.java
+++ /dev/null
@@ -1,214 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin.client.ldap;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.RDN;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.ConfigurationClient;
-import org.opends.server.admin.InstantiableRelationDefinition;
-import org.opends.server.admin.LDAPProfile;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.ManagedObjectPathSerializer;
-import org.opends.server.admin.OptionalRelationDefinition;
-import org.opends.server.admin.RelationDefinition;
-import org.opends.server.admin.SetRelationDefinition;
-import org.opends.server.admin.SingletonRelationDefinition;
-
-/**
- * A strategy for creating <code>DN</code>s from managed object paths.
- */
-final class LDAPNameBuilder implements ManagedObjectPathSerializer {
-
- /**
- * Creates a new DN representing the specified managed object path.
- *
- * @param path
- * The managed object path.
- * @param profile
- * The LDAP profile which should be used to construct LDAP names.
- * @return Returns a new DN representing the specified managed object path.
- */
- public static DN create(ManagedObjectPath<?, ?> path, LDAPProfile profile) {
- LDAPNameBuilder builder = new LDAPNameBuilder(profile);
- path.serialize(builder);
- return builder.getInstance();
- }
-
- /**
- * Creates a new DN representing the specified managed object path and
- * instantiable relation.
- *
- * @param path
- * The managed object path.
- * @param relation
- * The child instantiable relation.
- * @param profile
- * The LDAP profile which should be used to construct LDAP names.
- * @return Returns a new DN representing the specified managed object path
- * and instantiable relation.
- */
- public static DN create(ManagedObjectPath<?, ?> path, InstantiableRelationDefinition<?, ?> relation,
- LDAPProfile profile) {
- LDAPNameBuilder builder = new LDAPNameBuilder(profile);
- path.serialize(builder);
- builder.appendManagedObjectPathElement(relation);
- return builder.getInstance();
- }
-
- /**
- * Creates a new DN representing the specified managed object path and set
- * relation.
- *
- * @param path
- * The managed object path.
- * @param relation
- * The child set relation.
- * @param profile
- * The LDAP profile which should be used to construct LDAP names.
- * @return Returns a new DN representing the specified managed object path
- * and set relation.
- */
- public static DN create(ManagedObjectPath<?, ?> path, SetRelationDefinition<?, ?> relation, LDAPProfile profile) {
- LDAPNameBuilder builder = new LDAPNameBuilder(profile);
- path.serialize(builder);
- builder.appendManagedObjectPathElement(relation);
- return builder.getInstance();
- }
-
- /** The list of RDNs in big-endian order. */
- private final LinkedList<RDN> rdns;
-
- private final LDAPProfile profile;
-
- /**
- * Create a new DN builder.
- *
- * @param profile
- * The LDAP profile which should be used to construct DNs.
- */
- public LDAPNameBuilder(LDAPProfile profile) {
- this.rdns = new LinkedList<RDN>();
- this.profile = profile;
- }
-
- /**
- * {@inheritDoc}
- */
- public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
- InstantiableRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d,
- String name) {
- // Add the RDN sequence representing the relation.
- appendManagedObjectPathElement(r);
-
- // Now add the single RDN representing the named instance.
- String type = profile.getRelationChildRDNType(r);
- RDN rdn = new RDN(type, name.trim());
- rdns.add(rdn);
-
- }
-
- /**
- * Appends the RDN sequence representing the provided relation.
- *
- * @param r
- * The relation definition.
- */
- public void appendManagedObjectPathElement(RelationDefinition<?, ?> r) {
- // Add the RDN sequence representing the relation.
- DN dn = DN.valueOf(profile.getRelationRDNSequence(r));
- List<RDN> rdnsOfDn = getRdnsInBigEndianOrder(dn);
- rdns.addAll(rdnsOfDn);
- }
-
- /**
- * Returns list of RDNs of provided DN in big-endian order.
- *
- * @param dn
- * The DN to decompose in RDNs.
- * @return rdns in big endian order
- */
- private List<RDN> getRdnsInBigEndianOrder(DN dn) {
- List<RDN> rdnsOfDn = new ArrayList<RDN>();
- for (RDN rdn : dn) {
- rdnsOfDn.add(rdn);
- }
- Collections.reverse(rdnsOfDn);
- return rdnsOfDn;
- }
-
- /**
- * {@inheritDoc}
- */
- public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
- OptionalRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
- // Add the RDN sequence representing the relation.
- appendManagedObjectPathElement(r);
- }
-
- /**
- * {@inheritDoc}
- */
- public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
- SingletonRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
- // Add the RDN sequence representing the relation.
- appendManagedObjectPathElement(r);
- }
-
- /**
- * {@inheritDoc}
- */
- public <C extends ConfigurationClient, S extends Configuration> void appendManagedObjectPathElement(
- SetRelationDefinition<? super C, ? super S> r, AbstractManagedObjectDefinition<C, S> d) {
- // Add the RDN sequence representing the relation.
- appendManagedObjectPathElement(r);
-
- // Now add the single RDN representing the named instance.
- String type = profile.getRelationChildRDNType(r);
- RDN rdn = new RDN(type, d.getName());
- rdns.add(rdn);
- }
-
- /**
- * Create a new DN using the current state of this builder.
- *
- * @return Returns the new DN instance.
- */
- public DN getInstance() {
- DN dn = DN.rootDN();
- for (RDN rdn : rdns) {
- dn = dn.child(rdn);
- }
- return dn;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/ldap/package-info.java b/opendj-config/src/main/java/org/opends/server/admin/client/ldap/package-info.java
deleted file mode 100644
index 67be3f9..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/ldap/package-info.java
+++ /dev/null
@@ -1,37 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-
-
-/**
- * LDAP configuration transport implementation.
- * <p>
- * This implementation uses JNDI for all communication. It is expected
- * that, at some point in the future, we will replace this implementation
- * with our own LDAP client SDK based implementation.
- */
-package org.opends.server.admin.client.ldap;
-
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/package-info.java b/opendj-config/src/main/java/org/opends/server/admin/client/package-info.java
deleted file mode 100644
index 679c31e..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/package-info.java
+++ /dev/null
@@ -1,34 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-/**
- * Common client-side administration classes.
- * <p>
- * This package contains classes which client applications are
- * expected to use.
- */
-package org.opends.server.admin.client;
-
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/spi/AbstractManagedObject.java b/opendj-config/src/main/java/org/opends/server/admin/client/spi/AbstractManagedObject.java
deleted file mode 100644
index 3adbbc0..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/spi/AbstractManagedObject.java
+++ /dev/null
@@ -1,865 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client.spi;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.ConfigurationClient;
-import org.opends.server.admin.Constraint;
-import org.opends.server.admin.DefaultBehaviorException;
-import org.opends.server.admin.DefaultManagedObject;
-import org.opends.server.admin.DefinitionDecodingException;
-import org.opends.server.admin.IllegalPropertyValueStringException;
-import org.opends.server.admin.InstantiableRelationDefinition;
-import org.opends.server.admin.ManagedObjectAlreadyExistsException;
-import org.opends.server.admin.ManagedObjectDefinition;
-import org.opends.server.admin.ManagedObjectNotFoundException;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.OptionalRelationDefinition;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.PropertyIsMandatoryException;
-import org.opends.server.admin.PropertyIsReadOnlyException;
-import org.opends.server.admin.PropertyOption;
-import org.opends.server.admin.RelationDefinition;
-import org.opends.server.admin.RelationDefinitionVisitor;
-import org.opends.server.admin.SetRelationDefinition;
-import org.opends.server.admin.SingletonRelationDefinition;
-import org.opends.server.admin.DefinitionDecodingException.Reason;
-import org.opends.server.admin.client.ClientConstraintHandler;
-import org.opends.server.admin.client.ConcurrentModificationException;
-import org.opends.server.admin.client.IllegalManagedObjectNameException;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagedObjectDecodingException;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.client.MissingMandatoryPropertiesException;
-import org.opends.server.admin.client.OperationRejectedException;
-import org.opends.server.admin.client.OperationRejectedException.OperationType;
-
-/**
- * An abstract managed object implementation.
- *
- * @param <T>
- * The type of client configuration represented by the client managed
- * object.
- */
-public abstract class AbstractManagedObject<T extends ConfigurationClient> implements ManagedObject<T> {
-
- /**
- * Creates any default managed objects associated with a relation
- * definition.
- */
- private final class DefaultManagedObjectFactory implements RelationDefinitionVisitor<Void, Void> {
-
- // Possible exceptions.
- private ManagedObjectAlreadyExistsException moaee = null;
-
- private MissingMandatoryPropertiesException mmpe = null;
-
- private ConcurrentModificationException cme = null;
-
- private OperationRejectedException ore = null;
-
- private ErrorResultException ere = null;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <C extends ConfigurationClient, S extends Configuration> Void visitInstantiable(
- InstantiableRelationDefinition<C, S> rd, Void p) {
- for (String name : rd.getDefaultManagedObjectNames()) {
- DefaultManagedObject<? extends C, ? extends S> dmo = rd.getDefaultManagedObject(name);
- ManagedObjectDefinition<? extends C, ? extends S> d = dmo.getManagedObjectDefinition();
- ManagedObject<? extends C> child;
- try {
- child = createChild(rd, d, name, null);
- } catch (IllegalManagedObjectNameException e) {
- // This should not happen.
- throw new RuntimeException(e);
- }
- createDefaultManagedObject(d, child, dmo);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <C extends ConfigurationClient, S extends Configuration> Void visitOptional(
- OptionalRelationDefinition<C, S> rd, Void p) {
- if (rd.getDefaultManagedObject() != null) {
- DefaultManagedObject<? extends C, ? extends S> dmo = rd.getDefaultManagedObject();
- ManagedObjectDefinition<? extends C, ? extends S> d = dmo.getManagedObjectDefinition();
- ManagedObject<? extends C> child = createChild(rd, d, null);
- createDefaultManagedObject(d, child, dmo);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <C extends ConfigurationClient, S extends Configuration> Void visitSingleton(
- SingletonRelationDefinition<C, S> rd, Void p) {
- // Do nothing - not possible to create singletons
- // dynamically.
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <C extends ConfigurationClient, S extends Configuration> Void visitSet(SetRelationDefinition<C, S> rd,
- Void p) {
- for (String name : rd.getDefaultManagedObjectNames()) {
- DefaultManagedObject<? extends C, ? extends S> dmo = rd.getDefaultManagedObject(name);
- ManagedObjectDefinition<? extends C, ? extends S> d = dmo.getManagedObjectDefinition();
- ManagedObject<? extends C> child = createChild(rd, d, null);
- createDefaultManagedObject(d, child, dmo);
- }
- return null;
- }
-
- // Create the child managed object.
- private void createDefaultManagedObject(ManagedObjectDefinition<?, ?> d, ManagedObject<?> child,
- DefaultManagedObject<?, ?> dmo) {
- for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) {
- setPropertyValues(child, pd, dmo);
- }
-
- try {
- child.commit();
- } catch (ManagedObjectAlreadyExistsException e) {
- moaee = e;
- } catch (MissingMandatoryPropertiesException e) {
- mmpe = e;
- } catch (ConcurrentModificationException e) {
- cme = e;
- } catch (OperationRejectedException e) {
- ore = e;
- } catch (ErrorResultException e) {
- ere = e;
- }
- }
-
- /**
- * Creates the default managed objects associated with the provided
- * relation definition.
- *
- * @param rd
- * The relation definition.
- */
- private void createDefaultManagedObjects(RelationDefinition<?, ?> rd) throws ErrorResultException,
- ConcurrentModificationException, MissingMandatoryPropertiesException,
- ManagedObjectAlreadyExistsException, OperationRejectedException {
- rd.accept(this, null);
-
- if (ere != null) {
- throw ere;
- } else if (cme != null) {
- throw cme;
- } else if (mmpe != null) {
- throw mmpe;
- } else if (moaee != null) {
- throw moaee;
- } else if (ore != null) {
- throw ore;
- }
- }
-
- // Set property values.
- private <P> void setPropertyValues(ManagedObject<?> mo, PropertyDefinition<P> pd,
- DefaultManagedObject<?, ?> dmo) {
- mo.setPropertyValues(pd, dmo.getPropertyValues(pd));
- }
- }
-
- // The managed object definition associated with this managed
- // object.
- private final ManagedObjectDefinition<T, ? extends Configuration> definition;
-
- // Indicates whether or not this managed object exists on the server
- // (false means the managed object is new and has not been
- // committed).
- private boolean existsOnServer;
-
- // Optional naming property definition.
- private final PropertyDefinition<?> namingPropertyDefinition;
-
- // The path associated with this managed object.
- private ManagedObjectPath<T, ? extends Configuration> path;
-
- // The managed object's properties.
- private final PropertySet properties;
-
- /** Decoding options for property definitions values. */
- private final PropertyDefinitionsOptions propertyDefOptions;
-
- /**
- * Creates a new abstract managed object.
- *
- * @param d
- * The managed object's definition.
- * @param path
- * The managed object's path.
- * @param properties
- * The managed object's properties.
- * @param existsOnServer
- * Indicates whether or not the managed object exists on the
- * server (false means the managed object is new and has not been
- * committed).
- * @param namingPropertyDefinition
- * Optional naming property definition.
- * @param propertyDefOptions TODO
- */
- protected AbstractManagedObject(ManagedObjectDefinition<T, ? extends Configuration> d,
- ManagedObjectPath<T, ? extends Configuration> path, PropertySet properties, boolean existsOnServer,
- PropertyDefinition<?> namingPropertyDefinition, PropertyDefinitionsOptions propertyDefOptions) {
- this.definition = d;
- this.path = path;
- this.properties = properties;
- this.existsOnServer = existsOnServer;
- this.namingPropertyDefinition = namingPropertyDefinition;
- this.propertyDefOptions = propertyDefOptions;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final void commit() throws ManagedObjectAlreadyExistsException, MissingMandatoryPropertiesException,
- ConcurrentModificationException, OperationRejectedException, ErrorResultException {
- // First make sure all mandatory properties are defined.
- List<PropertyIsMandatoryException> exceptions = new LinkedList<PropertyIsMandatoryException>();
-
- for (PropertyDefinition<?> pd : definition.getAllPropertyDefinitions()) {
- Property<?> p = getProperty(pd);
- if (pd.hasOption(PropertyOption.MANDATORY) && p.getEffectiveValues().isEmpty()) {
- exceptions.add(new PropertyIsMandatoryException(pd));
- }
- }
-
- if (!exceptions.isEmpty()) {
- throw new MissingMandatoryPropertiesException(definition.getUserFriendlyName(), exceptions,
- !existsOnServer);
- }
-
- // Now enforce any constraints.
- List<LocalizableMessage> messages = new LinkedList<LocalizableMessage>();
- boolean isAcceptable = true;
- ManagementContext context = getDriver().getManagementContext();
-
- for (Constraint constraint : definition.getAllConstraints()) {
- for (ClientConstraintHandler handler : constraint.getClientConstraintHandlers()) {
- if (existsOnServer) {
- if (!handler.isModifyAcceptable(context, this, messages)) {
- isAcceptable = false;
- }
- } else {
- if (!handler.isAddAcceptable(context, this, messages)) {
- isAcceptable = false;
- }
- }
- }
- if (!isAcceptable) {
- break;
- }
- }
-
- if (!isAcceptable) {
- if (existsOnServer) {
- throw new OperationRejectedException(OperationType.MODIFY, definition.getUserFriendlyName(), messages);
- } else {
- throw new OperationRejectedException(OperationType.CREATE, definition.getUserFriendlyName(), messages);
- }
- }
-
- // Commit the managed object.
- if (existsOnServer) {
- modifyExistingManagedObject();
- } else {
- addNewManagedObject();
- }
-
- // Make all pending property values active.
- properties.commit();
-
- // If the managed object was created make sure that any default
- // subordinate managed objects are also created.
- if (!existsOnServer) {
- DefaultManagedObjectFactory factory = new DefaultManagedObjectFactory();
- for (RelationDefinition<?, ?> rd : definition.getAllRelationDefinitions()) {
- factory.createDefaultManagedObjects(rd);
- }
-
- existsOnServer = true;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
- InstantiableRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d, String name,
- Collection<DefaultBehaviorException> exceptions) throws IllegalManagedObjectNameException {
- validateRelationDefinition(r);
-
- // Empty names are not allowed.
- if (name.trim().length() == 0) {
- throw new IllegalManagedObjectNameException(name);
- }
-
- // If the relation uses a naming property definition then it must
- // be a valid value.
- PropertyDefinition<?> pd = r.getNamingPropertyDefinition();
- if (pd != null) {
- try {
- pd.decodeValue(name, propertyDefOptions);
- } catch (IllegalPropertyValueStringException e) {
- throw new IllegalManagedObjectNameException(name, pd, propertyDefOptions);
- }
- }
-
- ManagedObjectPath<C1, ? extends S> childPath = path.child(r, d, name);
- return createNewManagedObject(d, childPath, pd, name, exceptions);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
- OptionalRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d,
- Collection<DefaultBehaviorException> exceptions) {
- validateRelationDefinition(r);
- ManagedObjectPath<C1, ? extends S> childPath = path.child(r, d);
- return createNewManagedObject(d, childPath, null, null, exceptions);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
- SetRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d,
- Collection<DefaultBehaviorException> exceptions) {
- validateRelationDefinition(r);
-
- ManagedObjectPath<C1, ? extends S> childPath = path.child(r, d);
- return createNewManagedObject(d, childPath, null, null, exceptions);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
- InstantiableRelationDefinition<C, S> r, String name) throws DefinitionDecodingException,
- ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
- ErrorResultException {
- validateRelationDefinition(r);
- ensureThisManagedObjectExists();
- Driver ctx = getDriver();
- return ctx.getManagedObject(path.child(r, name));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
- OptionalRelationDefinition<C, S> r) throws DefinitionDecodingException, ManagedObjectDecodingException,
- ManagedObjectNotFoundException, ConcurrentModificationException, ErrorResultException {
- validateRelationDefinition(r);
- ensureThisManagedObjectExists();
- Driver ctx = getDriver();
- return ctx.getManagedObject(path.child(r));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
- SingletonRelationDefinition<C, S> r) throws DefinitionDecodingException, ManagedObjectDecodingException,
- ManagedObjectNotFoundException, ConcurrentModificationException, ErrorResultException {
- validateRelationDefinition(r);
- ensureThisManagedObjectExists();
- Driver ctx = getDriver();
- return ctx.getManagedObject(path.child(r));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
- SetRelationDefinition<C, S> r, String name) throws DefinitionDecodingException,
- ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
- ErrorResultException {
- validateRelationDefinition(r);
- ensureThisManagedObjectExists();
- Driver ctx = getDriver();
-
- AbstractManagedObjectDefinition<C, S> d = r.getChildDefinition();
- AbstractManagedObjectDefinition<? extends C, ? extends S> cd;
-
- try {
- cd = d.getChild(name);
- } catch (IllegalArgumentException e) {
- // Unrecognized definition name - report this as a decoding
- // exception.
- throw new DefinitionDecodingException(d, Reason.WRONG_TYPE_INFORMATION);
- }
-
- return ctx.getManagedObject(path.child(r, cd));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final T getConfiguration() {
- return definition.createClientConfiguration(this);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final ManagedObjectDefinition<T, ? extends Configuration> getManagedObjectDefinition() {
- return definition;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final ManagedObjectPath<T, ? extends Configuration> getManagedObjectPath() {
- return path;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <P> SortedSet<P> getPropertyDefaultValues(PropertyDefinition<P> pd) {
- return new TreeSet<P>(getProperty(pd).getDefaultValues());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <P> P getPropertyValue(PropertyDefinition<P> pd) {
- Set<P> values = getProperty(pd).getEffectiveValues();
- if (values.isEmpty()) {
- return null;
- } else {
- return values.iterator().next();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <P> SortedSet<P> getPropertyValues(PropertyDefinition<P> pd) {
- return new TreeSet<P>(getProperty(pd).getEffectiveValues());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration> boolean hasChild(
- OptionalRelationDefinition<C, S> r) throws ConcurrentModificationException, ErrorResultException {
- validateRelationDefinition(r);
- Driver ctx = getDriver();
- try {
- return ctx.managedObjectExists(path.child(r));
- } catch (ManagedObjectNotFoundException e) {
- throw new ConcurrentModificationException();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final boolean isPropertyPresent(PropertyDefinition<?> pd) {
- return !getProperty(pd).isEmpty();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
- InstantiableRelationDefinition<C, S> r) throws ConcurrentModificationException, ErrorResultException {
- return listChildren(r, r.getChildDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
- InstantiableRelationDefinition<C, S> r, AbstractManagedObjectDefinition<? extends C, ? extends S> d)
- throws ConcurrentModificationException, ErrorResultException {
- validateRelationDefinition(r);
- Driver ctx = getDriver();
- try {
- return ctx.listManagedObjects(path, r, d);
- } catch (ManagedObjectNotFoundException e) {
- throw new ConcurrentModificationException();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
- SetRelationDefinition<C, S> r) throws ConcurrentModificationException, ErrorResultException {
- return listChildren(r, r.getChildDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
- SetRelationDefinition<C, S> r, AbstractManagedObjectDefinition<? extends C, ? extends S> d)
- throws ConcurrentModificationException, ErrorResultException {
- validateRelationDefinition(r);
- Driver ctx = getDriver();
- try {
- return ctx.listManagedObjects(path, r, d);
- } catch (ManagedObjectNotFoundException e) {
- throw new ConcurrentModificationException();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration> void removeChild(
- InstantiableRelationDefinition<C, S> r, String name) throws ManagedObjectNotFoundException,
- OperationRejectedException, ConcurrentModificationException, ErrorResultException {
- validateRelationDefinition(r);
- Driver ctx = getDriver();
- boolean found;
-
- try {
- found = ctx.deleteManagedObject(path, r, name);
- } catch (ManagedObjectNotFoundException e) {
- throw new ConcurrentModificationException();
- }
-
- if (!found) {
- throw new ManagedObjectNotFoundException();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration> void removeChild(
- OptionalRelationDefinition<C, S> r) throws ManagedObjectNotFoundException, OperationRejectedException,
- ConcurrentModificationException, ErrorResultException {
- validateRelationDefinition(r);
- Driver ctx = getDriver();
- boolean found;
-
- try {
- found = ctx.deleteManagedObject(path, r);
- } catch (ManagedObjectNotFoundException e) {
- throw new ConcurrentModificationException();
- }
-
- if (!found) {
- throw new ManagedObjectNotFoundException();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <C extends ConfigurationClient, S extends Configuration> void removeChild(
- SetRelationDefinition<C, S> r, String name) throws ManagedObjectNotFoundException,
- OperationRejectedException, ConcurrentModificationException, ErrorResultException {
- validateRelationDefinition(r);
- Driver ctx = getDriver();
- boolean found;
-
- try {
- found = ctx.deleteManagedObject(path, r, name);
- } catch (ManagedObjectNotFoundException e) {
- throw new ConcurrentModificationException();
- }
-
- if (!found) {
- throw new ManagedObjectNotFoundException();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <P> void setPropertyValue(PropertyDefinition<P> pd, P value) {
- if (value == null) {
- setPropertyValues(pd, Collections.<P> emptySet());
- } else {
- setPropertyValues(pd, Collections.singleton(value));
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public final <P> void setPropertyValues(PropertyDefinition<P> pd, Collection<P> values) {
- if (pd.hasOption(PropertyOption.MONITORING)) {
- throw new PropertyIsReadOnlyException(pd);
- }
-
- if (existsOnServer && pd.hasOption(PropertyOption.READ_ONLY)) {
- throw new PropertyIsReadOnlyException(pd);
- }
-
- properties.setPropertyValues(pd, values, propertyDefOptions);
-
- // If this is a naming property then update the name.
- if (pd.equals(namingPropertyDefinition)) {
- // The property must be single-valued and mandatory.
- String newName = pd.encodeValue(values.iterator().next());
- path = path.rename(newName);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- StringBuilder builder = new StringBuilder();
-
- builder.append("{ TYPE=");
- builder.append(definition.getName());
- builder.append(", PATH=\"");
- builder.append(path);
- builder.append('\"');
- for (PropertyDefinition<?> pd : definition.getAllPropertyDefinitions()) {
- builder.append(", ");
- builder.append(pd.getName());
- builder.append('=');
- builder.append(getPropertyValues(pd));
- }
- builder.append(" }");
-
- return builder.toString();
- }
-
- /**
- * Adds this new managed object.
- *
- * @throws ManagedObjectAlreadyExistsException
- * If the managed object cannot be added to the server because
- * it already exists.
- * @throws ConcurrentModificationException
- * If the managed object's parent has been removed by another
- * client.
- * @throws OperationRejectedException
- * If the managed object cannot be added due to some client-side
- * or server-side constraint which cannot be satisfied.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- protected abstract void addNewManagedObject() throws ErrorResultException, OperationRejectedException,
- ConcurrentModificationException, ManagedObjectAlreadyExistsException;
-
- /**
- * Gets the management context driver associated with this managed object.
- *
- * @return Returns the management context driver associated with this
- * managed object.
- */
- protected abstract Driver getDriver();
-
- /**
- * Gets the naming property definition associated with this managed object.
- *
- * @return Returns the naming property definition associated with this
- * managed object, or <code>null</code> if this managed object does
- * not have a naming property.
- */
- protected final PropertyDefinition<?> getNamingPropertyDefinition() {
- return namingPropertyDefinition;
- }
-
- /**
- * Gets the property associated with the specified property definition.
- *
- * @param <P>
- * The underlying type of the property.
- * @param pd
- * The Property definition.
- * @return Returns the property associated with the specified property
- * definition.
- * @throws IllegalArgumentException
- * If this property provider does not recognize the requested
- * property definition.
- */
- protected final <P> Property<P> getProperty(PropertyDefinition<P> pd) {
- return properties.getProperty(pd);
- }
-
- /**
- * Applies changes made to this managed object.
- *
- * @throws ConcurrentModificationException
- * If this managed object has been removed from the server by
- * another client.
- * @throws OperationRejectedException
- * If the managed object cannot be added due to some client-side
- * or server-side constraint which cannot be satisfied.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- protected abstract void modifyExistingManagedObject() throws ConcurrentModificationException,
- OperationRejectedException, ErrorResultException;
-
- /**
- * Creates a new managed object.
- *
- * @param <M>
- * The type of client configuration represented by the client
- * managed object.
- * @param d
- * The managed object's definition.
- * @param path
- * The managed object's path.
- * @param properties
- * The managed object's properties.
- * @param existsOnServer
- * Indicates whether or not the managed object exists on the
- * server (false means the managed object is new and has not been
- * committed).
- * @param namingPropertyDefinition
- * Optional naming property definition.
- * @return Returns the new managed object.
- */
- protected abstract <M extends ConfigurationClient> ManagedObject<M> newInstance(ManagedObjectDefinition<M, ?> d,
- ManagedObjectPath<M, ?> path, PropertySet properties, boolean existsOnServer,
- PropertyDefinition<?> namingPropertyDefinition);
-
- // Creates a new managed object with no active values, just default
- // values.
- private <M extends ConfigurationClient, P> ManagedObject<M> createNewManagedObject(
- ManagedObjectDefinition<M, ?> d, ManagedObjectPath<M, ?> p, PropertyDefinition<P> namingPropertyDefinition,
- String name, Collection<DefaultBehaviorException> exceptions) {
- PropertySet childProperties = new PropertySet();
- for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) {
- try {
- createProperty(childProperties, p, pd);
- } catch (DefaultBehaviorException e) {
- // Add the exception if requested.
- if (exceptions != null) {
- exceptions.add(e);
- }
- }
- }
-
- // Set the naming property if there is one.
- if (namingPropertyDefinition != null) {
- P value = namingPropertyDefinition.decodeValue(name, propertyDefOptions);
- childProperties.setPropertyValues(namingPropertyDefinition, Collections.singleton(value),
- propertyDefOptions);
- }
-
- return newInstance(d, p, childProperties, false, namingPropertyDefinition);
- }
-
- // Create an empty property.
- private <P> void createProperty(PropertySet properties, ManagedObjectPath<?, ?> p, PropertyDefinition<P> pd) {
- try {
- Driver context = getDriver();
- Collection<P> defaultValues = context.findDefaultValues(p, pd, true);
- properties.addProperty(pd, defaultValues, Collections.<P> emptySet());
- } catch (DefaultBehaviorException e) {
- // Make sure that we have still created the property.
- properties.addProperty(pd, Collections.<P> emptySet(), Collections.<P> emptySet());
- throw e;
- }
- }
-
- // Makes sure that this managed object exists.
- private void ensureThisManagedObjectExists() throws ConcurrentModificationException, ErrorResultException {
- if (!path.isEmpty()) {
- Driver ctx = getDriver();
-
- try {
- if (!ctx.managedObjectExists(path)) {
- throw new ConcurrentModificationException();
- }
- } catch (ManagedObjectNotFoundException e) {
- throw new ConcurrentModificationException();
- }
- }
- }
-
- // Validate that a relation definition belongs to this managed
- // object.
- private void validateRelationDefinition(RelationDefinition<?, ?> rd) {
- ManagedObjectDefinition<T, ?> d = getManagedObjectDefinition();
- RelationDefinition<?, ?> tmp = d.getRelationDefinition(rd.getName());
- if (tmp != rd) {
- throw new IllegalArgumentException("The relation " + rd.getName() + " is not associated with a "
- + d.getName());
- }
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/spi/Driver.java b/opendj-config/src/main/java/org/opends/server/admin/client/spi/Driver.java
deleted file mode 100644
index fcf09e3..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/spi/Driver.java
+++ /dev/null
@@ -1,671 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2009 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client.spi;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.SortedSet;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.opendj.admin.client.RootCfgClient;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.AliasDefaultBehaviorProvider;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.ConfigurationClient;
-import org.opends.server.admin.Constraint;
-import org.opends.server.admin.DefaultBehaviorException;
-import org.opends.server.admin.DefaultBehaviorProviderVisitor;
-import org.opends.server.admin.DefinedDefaultBehaviorProvider;
-import org.opends.server.admin.DefinitionDecodingException;
-import org.opends.server.admin.IllegalPropertyValueStringException;
-import org.opends.server.admin.InstantiableRelationDefinition;
-import org.opends.server.admin.ManagedObjectNotFoundException;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.OptionalRelationDefinition;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.PropertyException;
-import org.opends.server.admin.PropertyIsSingleValuedException;
-import org.opends.server.admin.PropertyNotFoundException;
-import org.opends.server.admin.PropertyOption;
-import org.opends.server.admin.RelationDefinition;
-import org.opends.server.admin.RelativeInheritedDefaultBehaviorProvider;
-import org.opends.server.admin.SetRelationDefinition;
-import org.opends.server.admin.UndefinedDefaultBehaviorProvider;
-import org.opends.server.admin.DefinitionDecodingException.Reason;
-import org.opends.server.admin.client.ClientConstraintHandler;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagedObjectDecodingException;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.client.OperationRejectedException;
-import org.opends.server.admin.client.OperationRejectedException.OperationType;
-
-/**
- * An abstract management connection context driver which should form the basis
- * of driver implementations.
- */
-public abstract class Driver {
-
- /**
- * A default behavior visitor used for retrieving the default values of a
- * property.
- *
- * @param <T>
- * The type of the property.
- */
- private final class DefaultValueFinder<T> implements DefaultBehaviorProviderVisitor<T, Collection<T>, Void> {
-
- // Any exception that occurred whilst retrieving inherited default
- // values.
- private DefaultBehaviorException exception = null;
-
- // The path of the managed object containing the first property.
- private final ManagedObjectPath<?, ?> firstPath;
-
- // Indicates whether the managed object has been created yet.
- private final boolean isCreate;
-
- // The path of the managed object containing the next property.
- private ManagedObjectPath<?, ?> nextPath = null;
-
- // The next property whose default values were required.
- private PropertyDefinition<T> nextProperty = null;
-
- // Private constructor.
- private DefaultValueFinder(ManagedObjectPath<?, ?> p, boolean isCreate) {
- this.firstPath = p;
- this.isCreate = isCreate;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Collection<T> visitAbsoluteInherited(AbsoluteInheritedDefaultBehaviorProvider<T> d, Void p) {
- try {
- return getInheritedProperty(d.getManagedObjectPath(), d.getManagedObjectDefinition(),
- d.getPropertyName());
- } catch (DefaultBehaviorException e) {
- exception = e;
- return Collections.emptySet();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Collection<T> visitAlias(AliasDefaultBehaviorProvider<T> d, Void p) {
- return Collections.emptySet();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Collection<T> visitDefined(DefinedDefaultBehaviorProvider<T> d, Void p) {
- Collection<String> stringValues = d.getDefaultValues();
- List<T> values = new ArrayList<T>(stringValues.size());
-
- for (String stringValue : stringValues) {
- try {
- values.add(nextProperty.decodeValue(stringValue, propertyDefOptions));
- } catch (IllegalPropertyValueStringException e) {
- exception = new DefaultBehaviorException(nextProperty, e);
- break;
- }
- }
-
- return values;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Collection<T> visitRelativeInherited(RelativeInheritedDefaultBehaviorProvider<T> d, Void p) {
- try {
- return getInheritedProperty(d.getManagedObjectPath(nextPath), d.getManagedObjectDefinition(),
- d.getPropertyName());
- } catch (DefaultBehaviorException e) {
- exception = e;
- return Collections.emptySet();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Collection<T> visitUndefined(UndefinedDefaultBehaviorProvider<T> d, Void p) {
- return Collections.emptySet();
- }
-
- // Find the default values for the next path/property.
- private Collection<T> find(ManagedObjectPath<?, ?> p, PropertyDefinition<T> pd) {
- this.nextPath = p;
- this.nextProperty = pd;
-
- Collection<T> values = nextProperty.getDefaultBehaviorProvider().accept(this, null);
-
- if (exception != null) {
- throw exception;
- }
-
- if (values.size() > 1 && !pd.hasOption(PropertyOption.MULTI_VALUED)) {
- throw new DefaultBehaviorException(pd, new PropertyIsSingleValuedException(pd));
- }
-
- return values;
- }
-
- // Get an inherited property value.
- @SuppressWarnings("unchecked")
- private Collection<T> getInheritedProperty(ManagedObjectPath<?, ?> target,
- AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
- // First check that the requested type of managed object
- // corresponds to the path.
- AbstractManagedObjectDefinition<?, ?> supr = target.getManagedObjectDefinition();
- if (!supr.isParentOf(d)) {
- throw new DefaultBehaviorException(nextProperty, new DefinitionDecodingException(supr,
- Reason.WRONG_TYPE_INFORMATION));
- }
-
- // Save the current property in case of recursion.
- PropertyDefinition<T> pd1 = nextProperty;
-
- try {
- // Determine the requested property definition.
- PropertyDefinition<T> pd2;
- try {
- // FIXME: we use the definition taken from the default
- // behavior here when we should really use the exact
- // definition of the component being created.
- PropertyDefinition<?> pdTmp = d.getPropertyDefinition(propertyName);
- pd2 = pd1.getClass().cast(pdTmp);
- } catch (IllegalArgumentException e) {
- throw new PropertyNotFoundException(propertyName);
- } catch (ClassCastException e) {
- // FIXME: would be nice to throw a better exception here.
- throw new PropertyNotFoundException(propertyName);
- }
-
- // If the path relates to the current managed object and the
- // managed object is in the process of being created it won't
- // exist, so we should just use the default values of the
- // referenced property.
- if (isCreate && firstPath.equals(target)) {
- // Recursively retrieve this property's default values.
- Collection<T> tmp = find(target, pd2);
- Collection<T> values = new ArrayList<T>(tmp.size());
- for (T value : tmp) {
- pd1.validateValue(value, propertyDefOptions);
- values.add(value);
- }
- return values;
- } else {
- // FIXME: issue 2481 - this is broken if the referenced
- // property
- // inherits its defaults from the newly created managed
- // object.
- return getPropertyValues(target, pd2);
- }
- } catch (DefaultBehaviorException e) {
- // Wrap any errors due to recursion.
- throw new DefaultBehaviorException(pd1, e);
- } catch (DefinitionDecodingException e) {
- throw new DefaultBehaviorException(pd1, e);
- } catch (PropertyNotFoundException e) {
- throw new DefaultBehaviorException(pd1, e);
- } catch (ErrorResultException e) {
- throw new DefaultBehaviorException(pd1, e);
- } catch (ManagedObjectNotFoundException e) {
- throw new DefaultBehaviorException(pd1, e);
- } catch (PropertyException e) {
- throw new DefaultBehaviorException(pd1, e);
- }
- }
- };
-
- private final PropertyDefinitionsOptions propertyDefOptions;
-
- /**
- * Creates a new abstract driver.
- *
- * @param propertyDefOptions
- * Decoding options for property definitions values.
- */
- protected Driver(PropertyDefinitionsOptions propertyDefOptions) {
- this.propertyDefOptions = propertyDefOptions;
- }
-
- /**
- * Closes any context associated with this management context driver.
- */
- public void close() {
- // do nothing by default
- }
-
- /**
- * Deletes the named instantiable child managed object from the named parent
- * managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param parent
- * The path of the parent managed object.
- * @param rd
- * The instantiable relation definition.
- * @param name
- * The name of the child managed object to be removed.
- * @return Returns <code>true</code> if the named instantiable child managed
- * object was found, or <code>false</code> if it was not found.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with the parent
- * managed object's definition.
- * @throws ManagedObjectNotFoundException
- * If the parent managed object could not be found.
- * @throws OperationRejectedException
- * If the managed object cannot be removed due to some
- * client-side or server-side constraint which cannot be
- * satisfied (for example, if it is referenced by another
- * managed object).
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject(
- ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd, String name)
- throws ManagedObjectNotFoundException, OperationRejectedException, ErrorResultException {
- validateRelationDefinition(parent, rd);
- ManagedObjectPath<?, ?> child = parent.child(rd, name);
- return doDeleteManagedObject(child);
- }
-
- /**
- * Deletes the optional child managed object from the named parent managed
- * object.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param parent
- * The path of the parent managed object.
- * @param rd
- * The optional relation definition.
- * @return Returns <code>true</code> if the optional child managed object
- * was found, or <code>false</code> if it was not found.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with the parent
- * managed object's definition.
- * @throws ManagedObjectNotFoundException
- * If the parent managed object could not be found.
- * @throws OperationRejectedException
- * If the managed object cannot be removed due to some
- * client-side or server-side constraint which cannot be
- * satisfied (for example, if it is referenced by another
- * managed object).
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject(
- ManagedObjectPath<?, ?> parent, OptionalRelationDefinition<C, S> rd) throws ManagedObjectNotFoundException,
- OperationRejectedException, ErrorResultException {
- validateRelationDefinition(parent, rd);
- ManagedObjectPath<?, ?> child = parent.child(rd);
- return doDeleteManagedObject(child);
- }
-
- /**
- * Deletes the named instantiable child managed object from the named parent
- * managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param parent
- * The path of the parent managed object.
- * @param rd
- * The instantiable relation definition.
- * @param name
- * The name of the child managed object to be removed.
- * @return Returns <code>true</code> if the named instantiable child managed
- * object was found, or <code>false</code> if it was not found.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with the parent
- * managed object's definition.
- * @throws ManagedObjectNotFoundException
- * If the parent managed object could not be found.
- * @throws OperationRejectedException
- * If the managed object cannot be removed due to some
- * client-side or server-side constraint which cannot be
- * satisfied (for example, if it is referenced by another
- * managed object).
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject(
- ManagedObjectPath<?, ?> parent, SetRelationDefinition<C, S> rd, String name)
- throws ManagedObjectNotFoundException, OperationRejectedException, ErrorResultException {
- validateRelationDefinition(parent, rd);
- ManagedObjectPath<?, ?> child = parent.child(rd, name);
- return doDeleteManagedObject(child);
- }
-
- /**
- * Gets the named managed object. The path is guaranteed to be non-empty, so
- * implementations do not need to worry about handling this special case.
- *
- * @param <C>
- * The type of client managed object configuration that the path
- * definition refers to.
- * @param <S>
- * The type of server managed object configuration that the path
- * definition refers to.
- * @param path
- * The non-empty path of the managed object.
- * @return Returns the named managed object.
- * @throws DefinitionDecodingException
- * If the managed object was found but its type could not be
- * determined.
- * @throws ManagedObjectDecodingException
- * If the managed object was found but one or more of its
- * properties could not be decoded.
- * @throws ManagedObjectNotFoundException
- * If the requested managed object could not be found on the
- * server.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- // @Checkstyle:ignore
- public abstract <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getManagedObject(
- ManagedObjectPath<C, S> path) throws DefinitionDecodingException, ManagedObjectDecodingException,
- ManagedObjectNotFoundException, ErrorResultException;
-
- /**
- * Gets the effective values of a property in the named managed object.
- * <p>
- * Implementations MUST NOT not use
- * {@link #getManagedObject(ManagedObjectPath)} to read the referenced
- * managed object in its entirety. Specifically, implementations MUST only
- * attempt to resolve the default values for the requested property and its
- * dependencies (if it uses inherited defaults). This is to avoid infinite
- * recursion where a managed object contains a property which inherits
- * default values from another property in the same managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the path
- * definition refers to.
- * @param <S>
- * The type of server managed object configuration that the path
- * definition refers to.
- * @param <P>
- * The type of the property to be retrieved.
- * @param path
- * The path of the managed object containing the property.
- * @param pd
- * The property to be retrieved.
- * @return Returns the property's effective values, or an empty set if there
- * are no values defined.
- * @throws IllegalArgumentException
- * If the property definition is not associated with the
- * referenced managed object's definition.
- * @throws DefinitionDecodingException
- * If the managed object was found but its type could not be
- * determined.
- * @throws PropertyException
- * If the managed object was found but the requested property
- * could not be decoded.
- * @throws ManagedObjectNotFoundException
- * If the requested managed object could not be found on the
- * server.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public abstract <C extends ConfigurationClient, S extends Configuration, P> SortedSet<P> getPropertyValues(
- ManagedObjectPath<C, S> path, PropertyDefinition<P> pd) throws DefinitionDecodingException,
- ManagedObjectNotFoundException, ErrorResultException;
-
- /**
- * Gets the root configuration managed object associated with this
- * management context driver.
- *
- * @return Returns the root configuration managed object associated with
- * this management context driver.
- */
- public abstract ManagedObject<RootCfgClient> getRootConfigurationManagedObject();
-
- /**
- * Lists the child managed objects of the named parent managed object which
- * are a sub-type of the specified managed object definition.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param parent
- * The path of the parent managed object.
- * @param rd
- * The instantiable relation definition.
- * @param d
- * The managed object definition.
- * @return Returns the names of the child managed objects which are a
- * sub-type of the specified managed object definition.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with the parent
- * managed object's definition.
- * @throws ManagedObjectNotFoundException
- * If the parent managed object could not be found.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public abstract <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
- ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd,
- AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws ManagedObjectNotFoundException,
- ErrorResultException;
-
- /**
- * Lists the child managed objects of the named parent managed object which
- * are a sub-type of the specified managed object definition.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param parent
- * The path of the parent managed object.
- * @param rd
- * The set relation definition.
- * @param d
- * The managed object definition.
- * @return Returns the names of the child managed objects which are a
- * sub-type of the specified managed object definition.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with the parent
- * managed object's definition.
- * @throws ManagedObjectNotFoundException
- * If the parent managed object could not be found.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public abstract <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
- ManagedObjectPath<?, ?> parent, SetRelationDefinition<C, S> rd,
- AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws ManagedObjectNotFoundException,
- ErrorResultException;
-
- /**
- * Determines whether or not the named managed object exists.
- * <p>
- * Implementations should always return <code>true</code> when the provided
- * path is empty.
- *
- * @param path
- * The path of the named managed object.
- * @return Returns <code>true</code> if the named managed object exists,
- * <code>false</code> otherwise.
- * @throws ManagedObjectNotFoundException
- * If the parent managed object could not be found.
- * @throws ErrorResultException
- * If any other error occurs.
- */
- public abstract boolean managedObjectExists(ManagedObjectPath<?, ?> path) throws ManagedObjectNotFoundException,
- ErrorResultException;
-
- /**
- * Deletes the named managed object.
- * <p>
- * Implementations do not need check whether the named managed object
- * exists, nor do they need to enforce client constraints.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param path
- * The path of the managed object to be deleted.
- * @throws OperationRejectedException
- * If the managed object cannot be removed due to some
- * server-side constraint which cannot be satisfied (for
- * example, if it is referenced by another managed object).
- * @throws ErrorResultException
- * If any other error occurs.
- */
- protected abstract <C extends ConfigurationClient, S extends Configuration> void deleteManagedObject(
- ManagedObjectPath<C, S> path) throws OperationRejectedException, ErrorResultException;
-
- /**
- * Gets the default values for the specified property.
- *
- * @param <P>
- * The type of the property.
- * @param p
- * The managed object path of the current managed object.
- * @param pd
- * The property definition.
- * @param isCreate
- * Indicates whether the managed object has been created yet.
- * @return Returns the default values for the specified property.
- * @throws DefaultBehaviorException
- * If the default values could not be retrieved or decoded
- * properly.
- */
- protected final <P> Collection<P> findDefaultValues(ManagedObjectPath<?, ?> p, PropertyDefinition<P> pd,
- boolean isCreate) {
- DefaultValueFinder<P> v = new DefaultValueFinder<P>(p, isCreate);
- return v.find(p, pd);
- }
-
- /**
- * Gets the management context associated with this driver.
- *
- * @return Returns the management context associated with this driver.
- */
- protected abstract ManagementContext getManagementContext();
-
- /**
- * Validate that a relation definition belongs to the managed object
- * referenced by the provided path.
- *
- * @param path
- * The parent managed object path.
- * @param rd
- * The relation definition.
- * @throws IllegalArgumentException
- * If the relation definition does not belong to the managed
- * object definition.
- */
- protected final void validateRelationDefinition(ManagedObjectPath<?, ?> path, RelationDefinition<?, ?> rd) {
- AbstractManagedObjectDefinition<?, ?> d = path.getManagedObjectDefinition();
- RelationDefinition<?, ?> tmp = d.getRelationDefinition(rd.getName());
- if (tmp != rd) {
- throw new IllegalArgumentException("The relation " + rd.getName() + " is not associated with a "
- + d.getName());
- }
- }
-
- // Remove a managed object, first ensuring that the parent exists,
- // then ensuring that the child exists, before ensuring that any
- // constraints are satisfied.
- private <C extends ConfigurationClient, S extends Configuration> boolean doDeleteManagedObject(
- ManagedObjectPath<C, S> path) throws ManagedObjectNotFoundException, OperationRejectedException,
- ErrorResultException {
- // First make sure that the parent exists.
- if (!managedObjectExists(path.parent())) {
- throw new ManagedObjectNotFoundException();
- }
-
- // Make sure that the targeted managed object exists.
- if (!managedObjectExists(path)) {
- return false;
- }
-
- // The targeted managed object is guaranteed to exist, so enforce
- // any constraints.
- AbstractManagedObjectDefinition<?, ?> d = path.getManagedObjectDefinition();
- List<LocalizableMessage> messages = new LinkedList<LocalizableMessage>();
- boolean isAcceptable = true;
-
- for (Constraint constraint : d.getAllConstraints()) {
- for (ClientConstraintHandler handler : constraint.getClientConstraintHandlers()) {
- ManagementContext context = getManagementContext();
- if (!handler.isDeleteAcceptable(context, path, messages)) {
- isAcceptable = false;
- }
- }
- if (!isAcceptable) {
- break;
- }
- }
-
- if (!isAcceptable) {
- throw new OperationRejectedException(OperationType.DELETE, d.getUserFriendlyName(), messages);
- }
-
- deleteManagedObject(path);
- return true;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/spi/Property.java b/opendj-config/src/main/java/org/opends/server/admin/client/spi/Property.java
deleted file mode 100644
index 7d93746..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/spi/Property.java
+++ /dev/null
@@ -1,117 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin.client.spi;
-
-import java.util.SortedSet;
-
-import org.opends.server.admin.PropertyDefinition;
-
-/**
- * A managed object property comprising of the property's definition and its set
- * of values.
- * <p>
- * The property stores the values in a sorted set in which values are compared
- * using the comparator defined by the property definition.
- * <p>
- * The property keeps track of whether or not its pending set of values differs
- * from its active values.
- *
- * @param <T>
- * The type of the property.
- */
-public interface Property<T> {
-
- /**
- * Get an immutable set view of this property's active values.
- *
- * @return Returns an immutable set view of this property's active values.
- * An empty set indicates that there are no active values, and any
- * default values are applicable.
- */
- SortedSet<T> getActiveValues();
-
- /**
- * Get an immutable set view of this property's default values.
- *
- * @return Returns an immutable set view of this property's default values.
- * An empty set indicates that there are no default values.
- */
- SortedSet<T> getDefaultValues();
-
- /**
- * Get an immutable set view of this property's effective values.
- *
- * @return Returns an immutable set view of this property's effective
- * values.
- */
- SortedSet<T> getEffectiveValues();
-
- /**
- * Get an immutable set view of this property's pending values.
- * <p>
- * Immediately after construction, the pending values matches the active
- * values.
- *
- * @return Returns an immutable set view of this property's pending values.
- * An empty set indicates that there are no pending values, and any
- * default values are applicable.
- */
- SortedSet<T> getPendingValues();
-
- /**
- * Get the property definition associated with this property.
- *
- * @return Returns the property definition associated with this property.
- */
- PropertyDefinition<T> getPropertyDefinition();
-
- /**
- * Determines whether or not this property contains any pending values.
- *
- * @return Returns <code>true</code> if this property does not contain any
- * pending values.
- */
- boolean isEmpty();
-
- /**
- * Determines whether or not this property has been modified since it was
- * constructed. In other words, whether or not the set of pending values
- * differs from the set of active values.
- *
- * @return Returns <code>true</code> if this property has been modified
- * since it was constructed.
- */
- boolean isModified();
-
- /**
- * Determines whether or not this property contains any active values.
- *
- * @return Returns <code>true</code> if this property does not contain any
- * active values.
- */
- boolean wasEmpty();
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/spi/PropertySet.java b/opendj-config/src/main/java/org/opends/server/admin/client/spi/PropertySet.java
deleted file mode 100644
index cc506eb..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/spi/PropertySet.java
+++ /dev/null
@@ -1,327 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin.client.spi;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.opends.server.admin.IllegalPropertyValueException;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.PropertyIsMandatoryException;
-import org.opends.server.admin.PropertyIsSingleValuedException;
-import org.opends.server.admin.PropertyOption;
-
-/**
- * A set of properties. Instances of this class can be used as the core of a
- * managed object implementation.
- */
-public final class PropertySet {
-
- /**
- * Internal property implementation.
- *
- * @param <T>
- * The type of the property.
- */
- private static final class MyProperty<T> implements Property<T> {
-
- // The active set of values.
- private final SortedSet<T> activeValues;
-
- // The definition associated with this property.
- private final PropertyDefinition<T> d;
-
- // The default set of values (read-only).
- private final SortedSet<T> defaultValues;
-
- // The pending set of values.
- private final SortedSet<T> pendingValues;
-
- /**
- * Create a property with the provided sets of pre-validated default and
- * active values.
- *
- * @param pd
- * The property definition.
- * @param defaultValues
- * The set of default values for the property.
- * @param activeValues
- * The set of active values for the property.
- */
- public MyProperty(PropertyDefinition<T> pd, Collection<T> defaultValues, Collection<T> activeValues) {
- this.d = pd;
-
- SortedSet<T> sortedDefaultValues = new TreeSet<T>(pd);
- sortedDefaultValues.addAll(defaultValues);
- this.defaultValues = Collections.unmodifiableSortedSet(sortedDefaultValues);
-
- this.activeValues = new TreeSet<T>(pd);
- this.activeValues.addAll(activeValues);
-
- // Initially the pending values is the same as the active
- // values.
- this.pendingValues = new TreeSet<T>(this.activeValues);
- }
-
- /**
- * Makes the pending values active.
- */
- public void commit() {
- activeValues.clear();
- activeValues.addAll(pendingValues);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public SortedSet<T> getActiveValues() {
- return Collections.unmodifiableSortedSet(activeValues);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public SortedSet<T> getDefaultValues() {
- return defaultValues;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public SortedSet<T> getEffectiveValues() {
- SortedSet<T> values = getPendingValues();
-
- if (values.isEmpty()) {
- values = getDefaultValues();
- }
-
- return values;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public SortedSet<T> getPendingValues() {
- return Collections.unmodifiableSortedSet(pendingValues);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PropertyDefinition<T> getPropertyDefinition() {
- return d;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isEmpty() {
- return pendingValues.isEmpty();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isModified() {
- if (activeValues.size() == pendingValues.size() && activeValues.containsAll(pendingValues)) {
- return false;
- }
- return true;
- }
-
- /**
- * Replace all pending values of this property with the provided values.
- *
- * @param c
- * The new set of pending property values.
- */
- public void setPendingValues(Collection<T> c) {
- pendingValues.clear();
- pendingValues.addAll(c);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- return getEffectiveValues().toString();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean wasEmpty() {
- return activeValues.isEmpty();
- }
- }
-
- // The properties.
- private final Map<PropertyDefinition<?>, MyProperty<?>> properties;
-
- /**
- * Creates a new empty property set.
- */
- public PropertySet() {
- this.properties = new HashMap<PropertyDefinition<?>, MyProperty<?>>();
- }
-
- /**
- * Creates a property with the provided sets of pre-validated default and
- * active values.
- *
- * @param <T>
- * The type of the property.
- * @param pd
- * The property definition.
- * @param defaultValues
- * The set of default values for the property.
- * @param activeValues
- * The set of active values for the property.
- */
- public <T> void addProperty(PropertyDefinition<T> pd, Collection<T> defaultValues, Collection<T> activeValues) {
- MyProperty<T> p = new MyProperty<T>(pd, defaultValues, activeValues);
- properties.put(pd, p);
- }
-
- /**
- * Get the property associated with the specified property definition.
- *
- * @param <T>
- * The underlying type of the property.
- * @param d
- * The Property definition.
- * @return Returns the property associated with the specified property
- * definition.
- * @throws IllegalArgumentException
- * If this property provider does not recognise the requested
- * property definition.
- */
- @SuppressWarnings("unchecked")
- public <T> Property<T> getProperty(PropertyDefinition<T> d) {
- if (!properties.containsKey(d)) {
- throw new IllegalArgumentException("Unknown property " + d.getName());
- }
-
- return (Property<T>) properties.get(d);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- StringBuilder builder = new StringBuilder();
- builder.append('{');
- for (Map.Entry<PropertyDefinition<?>, MyProperty<?>> entry : properties.entrySet()) {
- builder.append(entry.getKey().getName());
- builder.append('=');
- builder.append(entry.getValue().toString());
- builder.append(' ');
- }
- builder.append('}');
- return builder.toString();
- }
-
- /**
- * Makes all pending values active.
- */
- void commit() {
- for (MyProperty<?> p : properties.values()) {
- p.commit();
- }
- }
-
- /**
- * Set a new pending values for the specified property.
- * <p>
- * See the class description for more information regarding pending values.
- *
- * @param <T>
- * The type of the property to be modified.
- * @param d
- * The property to be modified.
- * @param values
- * A non-<code>null</code> set of new pending values for the
- * property (an empty set indicates that the property should be
- * reset to its default behavior). The set will not be referenced
- * by this managed object.
- * @param options
- * Options to validate property definitions values.
- * @throws IllegalPropertyValueException
- * If a new pending value is deemed to be invalid according to
- * the property definition.
- * @throws PropertyIsSingleValuedException
- * If an attempt was made to add multiple pending values to a
- * single-valued property.
- * @throws PropertyIsMandatoryException
- * If an attempt was made to remove a mandatory property.
- * @throws IllegalArgumentException
- * If the specified property definition is not associated with
- * this managed object.
- */
- <T> void setPropertyValues(PropertyDefinition<T> d, Collection<T> values,
- PropertyDefinitionsOptions options) {
- MyProperty<T> property = (MyProperty<T>) getProperty(d);
-
- if (values.size() > 1 && !d.hasOption(PropertyOption.MULTI_VALUED)) {
- throw new PropertyIsSingleValuedException(d);
- }
-
- if (values.isEmpty() && d.hasOption(PropertyOption.MANDATORY)) {
- // But only if there are no default values.
- if (property.getDefaultValues().isEmpty()) {
- throw new PropertyIsMandatoryException(d);
- }
- }
-
- // Validate each value.
- for (T e : values) {
- if (e == null) {
- throw new NullPointerException();
- }
-
- d.validateValue(e, options);
- }
-
- // Update the property.
- property.setPendingValues(values);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/client/spi/package-info.java b/opendj-config/src/main/java/org/opends/server/admin/client/spi/package-info.java
deleted file mode 100644
index a4120e8..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/client/spi/package-info.java
+++ /dev/null
@@ -1,34 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-/**
- * Client side driver implementation interfaces.
- * <p>
- * This package contains classes which client-side driver
- * implementations are expected to use.
- */
-package org.opends.server.admin.client.spi;
-
diff --git a/opendj-config/src/main/java/org/opends/server/admin/condition/ANDCondition.java b/opendj-config/src/main/java/org/opends/server/admin/condition/ANDCondition.java
deleted file mode 100644
index 42559f1..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/condition/ANDCondition.java
+++ /dev/null
@@ -1,92 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.condition;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.spi.ConfigException;
-import org.forgerock.util.Reject;
-
-/**
- * A condition which evaluates to <code>true</code> if and only if all of its
- * sub-conditions are <code>true</code>.
- */
-public final class ANDCondition implements Condition {
-
- // The list of sub-conditions.
- private final List<Condition> conditions;
-
- /**
- * Creates a new logical AND condition with the provided sub-conditions.
- *
- * @param conditions
- * The sub-conditions which will be combined using a logical AND.
- */
- public ANDCondition(Condition... conditions) {
- Reject.ifNull(conditions);
- this.conditions = Arrays.asList(conditions);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
- for (Condition condition : conditions) {
- if (!condition.evaluate(context, managedObject)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
- for (Condition condition : conditions) {
- if (!condition.evaluate(managedObject)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
- for (Condition condition : conditions) {
- condition.initialize(d);
- }
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/condition/Condition.java b/opendj-config/src/main/java/org/opends/server/admin/condition/Condition.java
deleted file mode 100644
index 0f24d28..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/condition/Condition.java
+++ /dev/null
@@ -1,75 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.condition;
-
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.spi.ConfigException;
-
-/**
- * An interface for evaluating conditions.
- */
-public interface Condition {
-
- /**
- * Initializes this condition.
- *
- * @param d
- * The abstract managed object definition associated with this
- * condition.
- * @throws Exception
- * If this condition could not be initialized.
- */
- void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception;
-
- /**
- * Evaluates this condition against the provided client managed object.
- *
- * @param context
- * The client management context.
- * @param managedObject
- * The client managed object.
- * @return Returns <code>true</code> if this condition is satisfied.
- * @throws ErrorResultException
- * If the condition could not be evaluated.
- */
- boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException;
-
- /**
- * Evaluates this condition against the provided server managed object.
- *
- * @param managedObject
- * The server managed object.
- * @return Returns <code>true</code> if this condition is satisfied.
- * @throws ConfigException
- * If the condition could not be evaluated due to an unexpected
- * configuration exception.
- */
- boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException;
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/condition/Conditions.java b/opendj-config/src/main/java/org/opends/server/admin/condition/Conditions.java
deleted file mode 100644
index 811d390..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/condition/Conditions.java
+++ /dev/null
@@ -1,191 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.condition;
-
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.spi.ConfigException;
-
-/**
- * This class consists exclusively of static methods that operate on or return
- * conditions.
- */
-public final class Conditions {
-
- /**
- * A condition which always evaluates to <code>false</code>.
- */
- public static final Condition FALSE = new Condition() {
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
- // No implementation required.
- }
-
- };
-
- /**
- * A condition which always evaluates to <code>true</code>.
- */
- public static final Condition TRUE = new Condition() {
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
- // No implementation required.
- }
-
- };
-
- /**
- * Creates a condition which evaluates to <code>true</code> if and only if
- * all of its sub-conditions are <code>true</code>.
- *
- * @param conditions
- * The sub-conditions which be combined using a logical AND.
- * @return Returns a condition which evaluates to <code>true</code> if and
- * only if all of its sub-conditions are <code>true</code>.
- */
- public static Condition and(Condition... conditions) {
- return new ANDCondition(conditions);
- }
-
- /**
- * Creates a condition which evaluates to <code>true</code> if and only if a
- * property contains a particular value.
- *
- * @param propertyName
- * The property name.
- * @param propertyStringValue
- * The string representation of the required property value.
- * @return Returns a condition which evaluates to <code>true</code> if and
- * only if a property contains a particular value.
- */
- public static Condition contains(String propertyName, String propertyStringValue) {
- return new ContainsCondition(propertyName, propertyStringValue);
- }
-
- /**
- * Creates a condition which evaluates to <code>false</code> if and only if
- * the first sub-condition evaluates to <code>true</code> and the second
- * sub-condition evaluates to <code>false</code>. This can be used to
- * represent if-then relationships.
- *
- * @param premise
- * The sub-condition which, when <code>true</code> implies that
- * the implication sub-condition must also be <code>true</code>.
- * @param implication
- * The sub-condition which, must be <code>true</code> when the
- * premise is <code>true</code>.
- * @return Returns a condition which evaluates to <code>false</code> if and
- * only if the first sub-condition evaluates to <code>true</code>
- * and the second sub-condition evaluates to <code>false</code>.
- */
- public static Condition implies(Condition premise, Condition implication) {
- return or(not(premise), implication);
- }
-
- /**
- * Creates a condition which evaluates to <code>true</code> if and only if a
- * particular property has any values specified.
- *
- * @param propertyName
- * The property name.
- * @return Returns a condition which evaluates to <code>true</code> if and
- * only if a particular property has any values specified.
- */
- public static Condition isPresent(String propertyName) {
- return new IsPresentCondition(propertyName);
- }
-
- /**
- * Creates a condition which evaluates to <code>true</code> if the
- * sub-condition is <code>false</code>, or <code>false</code> if the
- * sub-condition is <code>true</code>.
- *
- * @param condition
- * The sub-condition which will be inverted.
- * @return Returns a condition which evaluates to <code>true</code> if the
- * sub-condition is <code>false</code>, or <code>false</code> if the
- * sub-condition is <code>true</code>.
- */
- public static Condition not(Condition condition) {
- return new NOTCondition(condition);
- }
-
- /**
- * Creates a condition which evaluates to <code>false</code> if and only if
- * all of its sub-conditions are <code>false</code>.
- *
- * @param conditions
- * The sub-conditions which be combined using a logical OR.
- * @return Returns a condition which evaluates to <code>false</code> if and
- * only if all of its sub-conditions are <code>false</code>.
- */
- public static Condition or(Condition... conditions) {
- return new ORCondition(conditions);
- }
-
- // Prevent instantiation.
- private Conditions() {
- // No implementation required.
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/condition/ContainsCondition.java b/opendj-config/src/main/java/org/opends/server/admin/condition/ContainsCondition.java
deleted file mode 100644
index a546de7..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/condition/ContainsCondition.java
+++ /dev/null
@@ -1,175 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.condition;
-
-import java.util.SortedSet;
-
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.util.Reject;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.spi.ConfigException;
-
-/**
- * A condition which evaluates to <code>true</code> if and only if a property
- * contains a particular value.
- */
-public final class ContainsCondition implements Condition {
-
- /**
- * The strongly typed underlying implementation.
- *
- * @param <T>
- * The type of the property value being tested.
- */
- private static final class Impl<T> implements Condition {
-
- // The property.
- final PropertyDefinition<T> pd;
-
- // The required property value.
- final T value;
-
- // Private constructor.
- private Impl(PropertyDefinition<T> pd, T value) {
- this.pd = pd;
- this.value = value;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
- SortedSet<T> values = managedObject.getPropertyValues(pd);
- return values.contains(value);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
- SortedSet<T> values = managedObject.getPropertyValues(pd);
- return values.contains(value);
- }
-
- /**
- * {@inheritDoc}
- */
- public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
- // Not used.
- }
-
- // Private implementation of fix() method.
- private void setPropertyValue(ManagedObject<?> managedObject) {
- managedObject.setPropertyValue(pd, value);
- }
-
- }
-
- // The strongly typed private implementation.
- private Impl<?> impl = null;
-
- // The property name.
- private final String propertyName;
-
- // The string representation of the required property value.
- private final String propertyStringValue;
-
- /**
- * Creates a new contains value condition.
- *
- * @param propertyName
- * The property name.
- * @param stringValue
- * The string representation of the required property value.
- */
- public ContainsCondition(String propertyName, String stringValue) {
- Reject.ifNull(propertyName, stringValue);
- this.propertyName = propertyName;
- this.propertyStringValue = stringValue;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
- return impl.evaluate(context, managedObject);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
- return impl.evaluate(managedObject);
- }
-
- /**
- * Modifies the provided managed object so that it has the property value
- * associated with this condition.
- *
- * @param managedObject
- * The managed object.
- */
- public void setPropertyValue(ManagedObject<?> managedObject) {
- impl.setPropertyValue(managedObject);
- }
-
- /**
- * {@inheritDoc}
- */
- public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
- // Decode the property.
- buildImpl(d.getPropertyDefinition(propertyName));
- }
-
- // Creates the new private implementation.
- private <T> void buildImpl(PropertyDefinition<T> pd) {
- T value = pd.decodeValue(propertyStringValue, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- this.impl = new Impl<T>(pd, value);
- }
-
- /**
- * Returns the property definition associated with this condition.
- *
- * @return the property definition associated with this condition.
- */
- public PropertyDefinition<?> getPropertyDefinition() {
- return impl.pd;
- }
-
- /**
- * Returns the value that must be set for this condition to be fulfilled.
- *
- * @return the value that must be set for this condition to be fulfilled.
- */
- public Object getValue() {
- return impl.value;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/condition/IsPresentCondition.java b/opendj-config/src/main/java/org/opends/server/admin/condition/IsPresentCondition.java
deleted file mode 100644
index d2a7156..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/condition/IsPresentCondition.java
+++ /dev/null
@@ -1,86 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.condition;
-
-import java.util.SortedSet;
-
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.spi.ConfigException;
-import org.forgerock.util.Reject;
-
-/**
- * A condition which evaluates to <code>true</code> if and only if a particular
- * property has any values specified.
- */
-public final class IsPresentCondition implements Condition {
-
- // The property name.
- private final String propertyName;
-
- // The property definition.
- private PropertyDefinition<?> pd;
-
- /**
- * Creates a new is present condition.
- *
- * @param propertyName
- * The property name.
- */
- public IsPresentCondition(String propertyName) {
- Reject.ifNull(propertyName);
- this.propertyName = propertyName;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
- SortedSet<?> values = managedObject.getPropertyValues(pd);
- return !values.isEmpty();
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
- SortedSet<?> values = managedObject.getPropertyValues(pd);
- return !values.isEmpty();
- }
-
- /**
- * {@inheritDoc}
- */
- public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
- // Decode the property.
- this.pd = d.getPropertyDefinition(propertyName);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/condition/NOTCondition.java b/opendj-config/src/main/java/org/opends/server/admin/condition/NOTCondition.java
deleted file mode 100644
index e89ff90..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/condition/NOTCondition.java
+++ /dev/null
@@ -1,78 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.condition;
-
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.spi.ConfigException;
-import org.forgerock.util.Reject;
-
-/**
- * A condition which evaluates to <code>true</code> if the sub-condition is
- * <code>false</code>, or <code>false</code> if the sub-condition is
- * <code>true</code>.
- */
-public final class NOTCondition implements Condition {
-
- // The single sub-condition.
- private final Condition condition;
-
- /**
- * Creates a new logical NOT condition with the provided sub-condition.
- *
- * @param condition
- * The sub-condition which will be inverted.
- */
- public NOTCondition(Condition condition) {
- Reject.ifNull(condition);
- this.condition = condition;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
- return !condition.evaluate(context, managedObject);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
- return !condition.evaluate(managedObject);
- }
-
- /**
- * {@inheritDoc}
- */
- public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
- condition.initialize(d);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/condition/ORCondition.java b/opendj-config/src/main/java/org/opends/server/admin/condition/ORCondition.java
deleted file mode 100644
index 7c6cd3f..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/condition/ORCondition.java
+++ /dev/null
@@ -1,92 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.condition;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.spi.ConfigException;
-import org.forgerock.util.Reject;
-
-/**
- * A condition which evaluates to <code>false</code> if and only if all of its
- * sub-conditions are <code>false</code>.
- */
-public final class ORCondition implements Condition {
-
- // The list of sub-conditions.
- private final List<Condition> conditions;
-
- /**
- * Creates a new logical OR condition with the provided sub-conditions.
- *
- * @param conditions
- * The sub-conditions which will be combined using a logical OR.
- */
- public ORCondition(Condition... conditions) {
- Reject.ifNull(conditions);
- this.conditions = Arrays.asList(conditions);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws ErrorResultException {
- for (Condition condition : conditions) {
- if (condition.evaluate(context, managedObject)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException {
- for (Condition condition : conditions) {
- if (condition.evaluate(managedObject)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception {
- for (Condition condition : conditions) {
- condition.initialize(d);
- }
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/condition/package-info.java b/opendj-config/src/main/java/org/opends/server/admin/condition/package-info.java
deleted file mode 100644
index d62355b..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/condition/package-info.java
+++ /dev/null
@@ -1,33 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-/**
- * Logical conditions for defining constraints.
- * <p>
- * This package contains interfaces for building and evaluating
- * arbitrary logical conditions which can be used with constraints.
- */
-package org.opends.server.admin.condition;
diff --git a/opendj-config/src/main/java/org/opends/server/admin/package-info.java b/opendj-config/src/main/java/org/opends/server/admin/package-info.java
deleted file mode 100644
index d4b946e..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/package-info.java
+++ /dev/null
@@ -1,34 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-/**
- * Common administration classes.
- * <p>
- * This package contains administration related classes and interfaces
- * common to both the client and server.
- */
-package org.opends.server.admin;
-
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/AbstractConfigListenerAdaptor.java b/opendj-config/src/main/java/org/opends/server/admin/server/AbstractConfigListenerAdaptor.java
deleted file mode 100644
index e1c7f7a..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/AbstractConfigListenerAdaptor.java
+++ /dev/null
@@ -1,65 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import java.util.Collection;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-
-/**
- * Common features of config listener adaptors.
- */
-abstract class AbstractConfigListenerAdaptor {
-
- /**
- * Create a new config listener adaptor.
- */
- protected AbstractConfigListenerAdaptor() {
- // No implementation required.
- }
-
- /**
- * Concatenate a list of messages into a single message.
- *
- * @param reasons
- * The list of messages to concatenate.
- * @param unacceptableReason
- * The single message to which messages should be appended.
- */
- protected final void generateUnacceptableReason(Collection<LocalizableMessage> reasons,
- LocalizableMessageBuilder unacceptableReason) {
- boolean isFirst = true;
- for (LocalizableMessage reason : reasons) {
- if (isFirst) {
- isFirst = false;
- } else {
- unacceptableReason.append(" ");
- }
- unacceptableReason.append(reason);
- }
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigAddListenerAdaptor.java b/opendj-config/src/main/java/org/opends/server/admin/server/ConfigAddListenerAdaptor.java
deleted file mode 100644
index fa9c33b..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigAddListenerAdaptor.java
+++ /dev/null
@@ -1,253 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2009 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.Constraint;
-import org.opends.server.admin.DecodingException;
-import org.opends.server.admin.DefinitionDecodingException;
-import org.opends.server.admin.InstantiableRelationDefinition;
-import org.opends.server.admin.ManagedObjectDefinition;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.OptionalRelationDefinition;
-import org.opends.server.admin.SetRelationDefinition;
-import org.opends.server.admin.DefinitionDecodingException.Reason;
-import org.opends.server.config.spi.ConfigAddListener;
-import org.opends.server.config.spi.ConfigException;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.Entry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.forgerock.opendj.ldap.ResultCode;
-
-/**
- * An adaptor class which converts {@link ConfigAddListener} callbacks to
- * {@link ServerManagedObjectAddListener} callbacks.
- *
- * @param <S>
- * The type of server configuration handled by the add listener.
- */
-final class ConfigAddListenerAdaptor<S extends Configuration> extends AbstractConfigListenerAdaptor implements
- ConfigAddListener {
-
- private static final Logger debugLogger = LoggerFactory.getLogger(ConfigAddListenerAdaptor.class);
-
- // Cached managed object between accept/apply callbacks.
- private ServerManagedObject<? extends S> cachedManagedObject;
-
- // The instantiable relation.
- private final InstantiableRelationDefinition<?, S> instantiableRelation;
-
- // The set relation.
- private final SetRelationDefinition<?, S> setRelation;
-
- // The underlying add listener.
- private final ServerManagedObjectAddListener<S> listener;
-
- // The optional relation.
- private final OptionalRelationDefinition<?, S> optionalRelation;
-
- // The managed object path of the parent.
- private final ManagedObjectPath<?, ?> path;
-
- private final ServerManagementContext serverContext;
-
- /**
- * Create a new configuration add listener adaptor for an instantiable
- * relation.
- *
- * @param context
- * The server context.
- * @param path
- * The managed object path of the parent.
- * @param relation
- * The instantiable relation.
- * @param listener
- * The underlying add listener.
- */
- public ConfigAddListenerAdaptor(ServerManagementContext context, ManagedObjectPath<?, ?> path,
- InstantiableRelationDefinition<?, S> relation, ServerManagedObjectAddListener<S> listener) {
- this.serverContext = context;
- this.path = path;
- this.instantiableRelation = relation;
- this.optionalRelation = null;
- this.setRelation = null;
- this.listener = listener;
- this.cachedManagedObject = null;
- }
-
- /**
- * Create a new configuration add listener adaptor for an optional relation.
- *
- * @param context
- * The server context.
- * @param path
- * The managed object path of the parent.
- * @param relation
- * The optional relation.
- * @param listener
- * The underlying add listener.
- */
- public ConfigAddListenerAdaptor(ServerManagementContext context, ManagedObjectPath<?, ?> path,
- OptionalRelationDefinition<?, S> relation, ServerManagedObjectAddListener<S> listener) {
- this.serverContext = context;
- this.path = path;
- this.optionalRelation = relation;
- this.instantiableRelation = null;
- this.setRelation = null;
- this.listener = listener;
- this.cachedManagedObject = null;
- }
-
- /**
- * Create a new configuration add listener adaptor for a set relation.
- *
- * @param context
- * The server context.
- * @param path
- * The managed object path of the parent.
- * @param relation
- * The set relation.
- * @param listener
- * The underlying add listener.
- */
- public ConfigAddListenerAdaptor(ServerManagementContext context, ManagedObjectPath<?, ?> path,
- SetRelationDefinition<?, S> relation, ServerManagedObjectAddListener<S> listener) {
- this.serverContext = context;
- this.path = path;
- this.instantiableRelation = null;
- this.optionalRelation = null;
- this.setRelation = relation;
- this.listener = listener;
- this.cachedManagedObject = null;
- }
-
- /**
- * {@inheritDoc}
- */
- public ConfigChangeResult applyConfigurationAdd(Entry configEntry) {
- if (optionalRelation != null) {
- // Optional managed objects are located directly beneath the
- // parent and have a well-defined name. We need to make sure
- // that we are handling the correct entry.
- ManagedObjectPath<?, ?> childPath = path.child(optionalRelation);
- DN expectedDN = DNBuilder.create(childPath);
- if (!configEntry.getName().equals(expectedDN)) {
- // Doesn't apply to us.
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
- }
-
- // Cached objects are guaranteed to be from previous acceptable
- // callback.
- ConfigChangeResult result = listener.applyConfigurationAdd(cachedManagedObject);
-
- // Now apply post constraint call-backs.
- if (result.getResultCode() == ResultCode.SUCCESS) {
- ManagedObjectDefinition<?, ?> d = cachedManagedObject.getManagedObjectDefinition();
- for (Constraint constraint : d.getAllConstraints()) {
- for (ServerConstraintHandler handler : constraint.getServerConstraintHandlers()) {
- try {
- handler.performPostAdd(cachedManagedObject);
- } catch (ConfigException e) {
- debugLogger.trace("Unable to perform post add", e);
- }
- }
- }
- }
-
- return result;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean configAddIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason) {
- DN dn = configEntry.getName();
- String name = dn.rdn().getFirstAVA().getAttributeValue().toString().trim();
-
- try {
- ManagedObjectPath<?, ? extends S> childPath;
- if (instantiableRelation != null) {
- childPath = path.child(instantiableRelation, name);
- } else if (setRelation != null) {
- try {
- childPath = path.child(setRelation, name);
- } catch (IllegalArgumentException e) {
- throw new DefinitionDecodingException(setRelation.getChildDefinition(),
- Reason.WRONG_TYPE_INFORMATION);
- }
- } else {
- // Optional managed objects are located directly beneath the
- // parent and have a well-defined name. We need to make sure
- // that we are handling the correct entry.
- childPath = path.child(optionalRelation);
- DN expectedDN = DNBuilder.create(childPath);
- if (!dn.equals(expectedDN)) {
- // Doesn't apply to us.
- return true;
- }
- }
-
- cachedManagedObject = serverContext.decode(childPath, configEntry, configEntry);
- } catch (DecodingException e) {
- unacceptableReason.append(e.getMessageObject());
- return false;
- }
-
- // Give up immediately if a constraint violation occurs.
- try {
- cachedManagedObject.ensureIsUsable();
- } catch (ConstraintViolationException e) {
- generateUnacceptableReason(e.getMessages(), unacceptableReason);
- return false;
- }
-
- // Let the add listener decide.
- List<LocalizableMessage> reasons = new LinkedList<LocalizableMessage>();
- if (listener.isConfigurationAddAcceptable(cachedManagedObject, reasons)) {
- return true;
- } else {
- generateUnacceptableReason(reasons, unacceptableReason);
- return false;
- }
- }
-
- /**
- * Get the server managed object add listener associated with this adaptor.
- *
- * @return Returns the server managed object add listener associated with
- * this adaptor.
- */
- ServerManagedObjectAddListener<S> getServerManagedObjectAddListener() {
- return listener;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigChangeListenerAdaptor.java b/opendj-config/src/main/java/org/opends/server/admin/server/ConfigChangeListenerAdaptor.java
deleted file mode 100644
index 208d573..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigChangeListenerAdaptor.java
+++ /dev/null
@@ -1,429 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import com.forgerock.opendj.util.StaticUtils;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.AliasDefaultBehaviorProvider;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.Constraint;
-import org.opends.server.admin.DecodingException;
-import org.opends.server.admin.DefaultBehaviorProvider;
-import org.opends.server.admin.DefaultBehaviorProviderVisitor;
-import org.opends.server.admin.DefinedDefaultBehaviorProvider;
-import org.opends.server.admin.ManagedObjectDefinition;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.RelativeInheritedDefaultBehaviorProvider;
-import org.opends.server.admin.UndefinedDefaultBehaviorProvider;
-import org.opends.server.config.spi.ConfigChangeListener;
-import org.opends.server.config.spi.ConfigDeleteListener;
-import org.opends.server.config.spi.ConfigException;
-import org.opends.server.config.spi.ConfigurationRepository;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.Entry;
-import org.forgerock.opendj.ldap.ResultCode;
-
-/**
- * An adaptor class which converts {@link ConfigChangeListener} call-backs to
- * {@link ServerManagedObjectChangeListener} call-backs.
- *
- * @param <S>
- * The type of server configuration handled by the change listener.
- */
-final class ConfigChangeListenerAdaptor<S extends Configuration> extends AbstractConfigListenerAdaptor implements
- ConfigChangeListener {
-
- private static final Logger debugLogger = LoggerFactory.getLogger(ConfigChangeListenerAdaptor.class);
- private static final LocalizedLogger adminLogger = LocalizedLogger
- .getLocalizedLogger(ERR_ADMIN_MANAGED_OBJECT_DOES_NOT_EXIST.get("").resourceName());
-
- /**
- * A default behavior visitor used for determining the set of dependencies.
- *
- * @param <T>
- * The type of property.
- */
- private static final class Visitor<T> implements DefaultBehaviorProviderVisitor<T, Void, ManagedObjectPath<?, ?>> {
-
- /**
- * Finds the dependencies associated with the provided property
- * definition.
- *
- * @param <T> The type of property definition.
- * @param path
- * The current base path used for relative name resolution.
- * @param pd
- * The property definition.
- * @param dependencies
- * Add dependencies names to this collection.
- */
- public static <T> void find(ManagedObjectPath<?, ?> path, PropertyDefinition<T> pd,
- Collection<DN> dependencies) {
- Visitor<T> v = new Visitor<T>(dependencies);
- DefaultBehaviorProvider<T> db = pd.getDefaultBehaviorProvider();
- db.accept(v, path);
- }
-
- // The names of entries that this change listener depends on.
- private final Collection<DN> dependencies;
-
- // Prevent instantiation.
- private Visitor(Collection<DN> dependencies) {
- this.dependencies = dependencies;
- }
-
- /**
- * {@inheritDoc}
- */
- public Void visitAbsoluteInherited(AbsoluteInheritedDefaultBehaviorProvider<T> d, ManagedObjectPath<?, ?> p) {
- ManagedObjectPath<?, ?> next = d.getManagedObjectPath();
- dependencies.add(DNBuilder.create(next));
-
- // If the dependent property uses inherited defaults then
- // recursively get those as well.
- String propertyName = d.getPropertyName();
- AbstractManagedObjectDefinition<?, ?> mod = d.getManagedObjectDefinition();
- PropertyDefinition<?> pd = mod.getPropertyDefinition(propertyName);
- find(next, pd, dependencies);
-
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public Void visitAlias(AliasDefaultBehaviorProvider<T> d, ManagedObjectPath<?, ?> p) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public Void visitDefined(DefinedDefaultBehaviorProvider<T> d, ManagedObjectPath<?, ?> p) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public Void visitRelativeInherited(RelativeInheritedDefaultBehaviorProvider<T> d, ManagedObjectPath<?, ?> p) {
- ManagedObjectPath<?, ?> next = d.getManagedObjectPath(p);
- dependencies.add(DNBuilder.create(next));
-
- // If the dependent property uses inherited defaults then
- // recursively get those as well.
- String propertyName = d.getPropertyName();
- AbstractManagedObjectDefinition<?, ?> mod = d.getManagedObjectDefinition();
- PropertyDefinition<?> pd = mod.getPropertyDefinition(propertyName);
- find(next, pd, dependencies);
-
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public Void visitUndefined(UndefinedDefaultBehaviorProvider<T> d, ManagedObjectPath<?, ?> p) {
- return null;
- }
- }
-
- /** Cached managed object between accept/apply call-backs. */
- private ServerManagedObject<? extends S> cachedManagedObject;
-
- /**
- * The delete listener which is used to remove this listener and any
- * dependencies.
- */
- private final ConfigDeleteListener cleanerListener;
-
- /** The names of entries that this change listener depends on. */
- private final Set<DN> dependencies;
-
- /**
- * The listener used to notify this listener when dependency entries are
- * modified.
- */
- private final ConfigChangeListener dependencyListener;
-
- /** The DN associated with this listener. */
- private final DN dn;
-
- /** The underlying change listener. */
- private final ServerManagedObjectChangeListener<? super S> listener;
-
- /** The managed object path. */
- private final ManagedObjectPath<?, S> path;
-
- /** Repository of configuration entries. */
- private final ConfigurationRepository configRepository;
-
- private final ServerManagementContext serverContext;
-
- /**
- * Create a new configuration change listener adaptor.
- *
- * @param serverContext
- * The server context.
- * @param path
- * The managed object path.
- * @param listener
- * The underlying change listener.
- */
- public ConfigChangeListenerAdaptor(final ServerManagementContext serverContext,
- final ManagedObjectPath<?, S> path, final ServerManagedObjectChangeListener<? super S> listener) {
- this.serverContext = serverContext;
- configRepository = serverContext.getConfigRepository();
- this.path = path;
- this.dn = DNBuilder.create(path);
- this.listener = listener;
- this.cachedManagedObject = null;
-
- // This change listener should be notified when dependent entries
- // are modified. Determine the dependencies and register change
- // listeners against them.
- this.dependencies = new HashSet<DN>();
- this.dependencyListener = new ConfigChangeListener() {
-
- public ConfigChangeResult applyConfigurationChange(Entry configEntry) {
- Entry dependentConfigEntry = getConfigEntry(dn);
- if (dependentConfigEntry != null) {
- return ConfigChangeListenerAdaptor.this.applyConfigurationChange(dependentConfigEntry);
- } else {
- // The dependent entry was not found.
- configRepository.deregisterChangeListener(configEntry.getName(), this);
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
- }
-
- public boolean configChangeIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason) {
- Entry dependentConfigEntry = getConfigEntry(dn);
- if (dependentConfigEntry != null) {
- return ConfigChangeListenerAdaptor.this.configChangeIsAcceptable(dependentConfigEntry,
- unacceptableReason, configEntry);
- } else {
- // The dependent entry was not found.
- configRepository.deregisterChangeListener(configEntry.getName(), this);
- return true;
- }
- }
-
- };
-
- AbstractManagedObjectDefinition<?, ?> d = path.getManagedObjectDefinition();
- for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) {
- Visitor.find(path, pd, dependencies);
- }
-
- for (DN entryDN : dependencies) {
- // Be careful not to register listeners against the dependent
- // entry itself.
- if (!entryDN.equals(dn)) {
- Entry configEntry = getConfigEntry(entryDN);
- if (configEntry != null) {
- configRepository.registerChangeListener(configEntry.getName(), dependencyListener);
- }
- }
- }
-
- // Register a delete listener against the parent which will
- // finalize this change listener when the monitored configuration
- // entry is removed.
- this.cleanerListener = new ConfigDeleteListener() {
-
- public ConfigChangeResult applyConfigurationDelete(Entry configEntry) {
- // Perform finalization if the deleted entry is the monitored
- // entry.
- if (configEntry.getName().equals(dn)) {
- finalizeChangeListener();
- }
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
-
- public boolean configDeleteIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason) {
- // Always acceptable.
- return true;
- }
-
- };
-
- DN parent = dn.parent();
- if (parent != null) {
- Entry configEntry = getConfigEntry(dn.parent());
- if (configEntry != null) {
- configRepository.registerDeleteListener(configEntry.getName(), cleanerListener);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public ConfigChangeResult applyConfigurationChange(Entry configEntry) {
- // Looking at the ConfigFileHandler implementation reveals
- // that this ConfigEntry will actually be a different object to
- // the one passed in the previous call-back (it will have the same
- // content though). This configuration entry has the correct
- // listener lists.
- cachedManagedObject.setConfigDN(configEntry.getName());
-
- ConfigChangeResult result = listener.applyConfigurationChange(cachedManagedObject);
-
- // Now apply post constraint call-backs.
- if (result.getResultCode() == ResultCode.SUCCESS) {
- ManagedObjectDefinition<?, ?> d = cachedManagedObject.getManagedObjectDefinition();
- for (Constraint constraint : d.getAllConstraints()) {
- for (ServerConstraintHandler handler : constraint.getServerConstraintHandlers()) {
- try {
- handler.performPostModify(cachedManagedObject);
- } catch (ConfigException e) {
- debugLogger.trace("Unable to perform post modify", e);
- }
- }
- }
- }
-
- return result;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean configChangeIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason) {
- return configChangeIsAcceptable(configEntry, unacceptableReason, configEntry);
- }
-
- /**
- * 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 unacceptableReason
- * A buffer to which this method can append a human-readable
- * message explaining why the proposed change is not acceptable.
- * @param newConfigEntry
- * The configuration entry that caused the notification (will be
- * different from <code>configEntry</code> if a dependency was
- * modified).
- * @return <CODE>true</CODE> if the proposed entry contains an acceptable
- * configuration, or <CODE>false</CODE> if it does not.
- */
- public boolean configChangeIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason,
- Entry newConfigEntry) {
- try {
- cachedManagedObject = serverContext.decode(path, configEntry, newConfigEntry);
- } catch (DecodingException e) {
- unacceptableReason.append(e.getMessageObject());
- return false;
- }
-
- // Give up immediately if a constraint violation occurs.
- try {
- cachedManagedObject.ensureIsUsable();
- } catch (ConstraintViolationException e) {
- generateUnacceptableReason(e.getMessages(), unacceptableReason);
- return false;
- }
-
- // Let the change listener decide.
- List<LocalizableMessage> reasons = new LinkedList<LocalizableMessage>();
- if (listener.isConfigurationChangeAcceptable(cachedManagedObject, reasons)) {
- return true;
- } else {
- generateUnacceptableReason(reasons, unacceptableReason);
- return false;
- }
- }
-
- /**
- * Finalizes this configuration change listener adaptor. This method must be
- * called before this change listener is removed.
- */
- public void finalizeChangeListener() {
- // Remove the dependency listeners.
- for (DN dependency : dependencies) {
- Entry listenerConfigEntry = getConfigEntry(dependency);
- if (listenerConfigEntry != null) {
- configRepository.deregisterChangeListener(listenerConfigEntry.getName(), dependencyListener);
- }
- }
-
- // Now remove the cleaner listener as it will no longer be
- // needed.
- Entry parentConfigEntry = getConfigEntry(dn.parent());
- if (parentConfigEntry != null) {
- configRepository.deregisterDeleteListener(parentConfigEntry.getName(), cleanerListener);
- }
-
- }
-
- /**
- * Get the server managed object change listener associated with this
- * adaptor.
- *
- * @return Returns the server managed object change listener associated with
- * this adaptor.
- */
- ServerManagedObjectChangeListener<? super S> getServerManagedObjectChangeListener() {
- return listener;
- }
-
- // Returns the named configuration entry or null if it could not be
- // retrieved.
- private Entry getConfigEntry(DN dn) {
- try {
- if (configRepository.hasEntry(dn)) {
- return configRepository.getEntry(dn);
- } else {
- adminLogger.error(ERR_ADMIN_MANAGED_OBJECT_DOES_NOT_EXIST, String.valueOf(dn));
- }
- } catch (ConfigException e) {
- debugLogger.trace("The dependent entry could not be retrieved", e);
- adminLogger.error(ERR_ADMIN_CANNOT_GET_MANAGED_OBJECT, String.valueOf(dn),
- StaticUtils.getExceptionMessage(e));
- }
- return null;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigChangeResult.java b/opendj-config/src/main/java/org/opends/server/admin/server/ConfigChangeResult.java
deleted file mode 100644
index 542861a..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigChangeResult.java
+++ /dev/null
@@ -1,191 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2006-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.opendj.ldap.ResultCode;
-
-/**
- * This class defines a data structure that can be used to hold information
- * about the result of processing a configuration change.
- */
-public final class ConfigChangeResult {
- // A set of messages describing the changes that were made, any
- // action that may be required, or any problems that were
- // encountered.
- private List<LocalizableMessage> messages;
-
- // Indicates whether one or more of the changes requires
- // administrative action in order to take effect.
- private boolean adminActionRequired;
-
- // The result code to return to the client from this configuration
- // change.
- private ResultCode resultCode;
-
- /**
- * Creates a new config change result object with the provided information.
- *
- * @param resultCode
- * The result code for this config change result.
- * @param adminActionRequired
- * Indicates whether administrative action is required for one or
- * more of the changes to take effect.
- */
- public ConfigChangeResult(ResultCode resultCode, boolean adminActionRequired) {
- this.resultCode = resultCode;
- this.adminActionRequired = adminActionRequired;
- this.messages = new ArrayList<LocalizableMessage>();
- }
-
- /**
- * Creates a new config change result object with the provided information.
- *
- * @param resultCode
- * The result code for this config change result.
- * @param adminActionRequired
- * Indicates whether administrative action is required for one or
- * more of the changes to take effect.
- * @param messages
- * A set of messages that provide additional information about
- * the change processing.
- */
- public ConfigChangeResult(ResultCode resultCode, boolean adminActionRequired, List<LocalizableMessage> messages) {
- this.resultCode = resultCode;
- this.adminActionRequired = adminActionRequired;
- this.messages = messages;
- }
-
- /**
- * Retrieves the result code for this config change result.
- *
- * @return The result code for this config change result.
- */
- public ResultCode getResultCode() {
- return resultCode;
- }
-
- /**
- * Specifies the result code for this config change result.
- *
- * @param resultCode
- * The result code for this config change result.
- */
- public void setResultCode(ResultCode resultCode) {
- this.resultCode = resultCode;
- }
-
- /**
- * Indicates whether administrative action is required before one or more of
- * the changes will take effect.
- *
- * @return <CODE>true</CODE> if one or more of the configuration changes
- * require administrative action to take effect, or
- * <CODE>false</CODE> if not.
- */
- public boolean adminActionRequired() {
- return adminActionRequired;
- }
-
- /**
- * Specifies whether administrative action is required before one or more of
- * the changes will take effect.
- *
- * @param adminActionRequired
- * Specifies whether administrative action is required before one
- * or more of the changes will take effect.
- */
- public void setAdminActionRequired(boolean adminActionRequired) {
- this.adminActionRequired = adminActionRequired;
- }
-
- /**
- * Retrieves the set of messages that provide explanation for the processing
- * of the configuration changes. This list may be modified by the caller.
- *
- * @return The set of messages that provide explanation for the processing
- * of the configuration changes.
- */
- public List<LocalizableMessage> getMessages() {
- return messages;
- }
-
- /**
- * Adds the provided message to the set of messages for this config change
- * result.
- *
- * @param message
- * The message to add to the set of messages for this config
- * change result.
- */
- public void addMessage(LocalizableMessage message) {
- messages.add(message);
- }
-
- /**
- * Retrieves a string representation of this config change result.
- *
- * @return A string representation of this config change result.
- */
- public String toString() {
- StringBuilder buffer = new StringBuilder();
- toString(buffer);
- return buffer.toString();
- }
-
- /**
- * Appends a string representation of this config change result to the
- * provided buffer.
- *
- * @param buffer
- * The buffer to which the information should be appended.
- */
- public void toString(StringBuilder buffer) {
- buffer.append("ConfigChangeResult(result=");
- buffer.append(resultCode.toString());
- buffer.append(", adminActionRequired=");
- buffer.append(adminActionRequired);
- buffer.append(", messages={");
-
- if (!messages.isEmpty()) {
- Iterator<LocalizableMessage> iterator = messages.iterator();
-
- LocalizableMessage firstMessage = iterator.next();
- buffer.append(firstMessage);
-
- while (iterator.hasNext()) {
- buffer.append(",");
- buffer.append(iterator.next());
- }
- }
-
- buffer.append("})");
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigDeleteListenerAdaptor.java b/opendj-config/src/main/java/org/opends/server/admin/server/ConfigDeleteListenerAdaptor.java
deleted file mode 100644
index 6a9a77b..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigDeleteListenerAdaptor.java
+++ /dev/null
@@ -1,270 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2009 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.Constraint;
-import org.opends.server.admin.DecodingException;
-import org.opends.server.admin.DefinitionDecodingException;
-import org.opends.server.admin.InstantiableRelationDefinition;
-import org.opends.server.admin.ManagedObjectDefinition;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.OptionalRelationDefinition;
-import org.opends.server.admin.SetRelationDefinition;
-import org.opends.server.admin.DefinitionDecodingException.Reason;
-import org.opends.server.config.spi.ConfigDeleteListener;
-import org.opends.server.config.spi.ConfigException;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.Entry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.forgerock.opendj.ldap.ResultCode;
-
-/**
- * An adaptor class which converts {@link ConfigDeleteListener} callbacks to
- * {@link ServerManagedObjectDeleteListener} callbacks.
- *
- * @param <S>
- * The type of server configuration handled by the delete listener.
- */
-final class ConfigDeleteListenerAdaptor<S extends Configuration> extends AbstractConfigListenerAdaptor implements
- ConfigDeleteListener {
-
- private static final Logger debugLogger = LoggerFactory.getLogger(ConfigDeleteListenerAdaptor.class);
-
- // Cached managed object between accept/apply callbacks.
- private ServerManagedObject<? extends S> cachedManagedObject;
-
- // The instantiable relation.
- private final InstantiableRelationDefinition<?, S> instantiableRelation;
-
- // The set relation.
- private final SetRelationDefinition<?, S> setRelation;
-
- // The underlying delete listener.
- private final ServerManagedObjectDeleteListener<S> listener;
-
- // The optional relation.
- private final OptionalRelationDefinition<?, S> optionalRelation;
-
- // The managed object path of the parent.
- private final ManagedObjectPath<?, ?> path;
-
- private final ServerManagementContext serverContext;
-
- /**
- * Create a new configuration delete listener adaptor for an instantiable
- * relation.
- *
- * @param serverContext
- * The server context.
- * @param path
- * The managed object path of the parent.
- * @param relation
- * The instantiable relation.
- * @param listener
- * The underlying delete listener.
- */
- public ConfigDeleteListenerAdaptor(ServerManagementContext serverContext, ManagedObjectPath<?, ?> path,
- InstantiableRelationDefinition<?, S> relation, ServerManagedObjectDeleteListener<S> listener) {
- this.serverContext = serverContext;
- this.path = path;
- this.optionalRelation = null;
- this.instantiableRelation = relation;
- this.setRelation = null;
- this.listener = listener;
- this.cachedManagedObject = null;
- }
-
- /**
- * Create a new configuration delete listener adaptor for an optional
- * relation.
- * @param serverContext TODO
- * @param path
- * The managed object path of the parent.
- * @param relation
- * The optional relation.
- * @param listener
- * The underlying delete listener.
- */
- public ConfigDeleteListenerAdaptor(ServerManagementContext serverContext, ManagedObjectPath<?, ?> path,
- OptionalRelationDefinition<?, S> relation, ServerManagedObjectDeleteListener<S> listener) {
- this.serverContext = serverContext;
- this.path = path;
- this.optionalRelation = relation;
- this.instantiableRelation = null;
- this.setRelation = null;
- this.listener = listener;
- this.cachedManagedObject = null;
- }
-
- /**
- * Create a new configuration delete listener adaptor for an set relation.
- * @param serverContext TODO
- * @param path
- * The managed object path of the parent.
- * @param relation
- * The set relation.
- * @param listener
- * The underlying delete listener.
- */
- public ConfigDeleteListenerAdaptor(ServerManagementContext serverContext, ManagedObjectPath<?, ?> path,
- SetRelationDefinition<?, S> relation, ServerManagedObjectDeleteListener<S> listener) {
- this.serverContext = serverContext;
- this.path = path;
- this.optionalRelation = null;
- this.instantiableRelation = null;
- this.setRelation = relation;
- this.listener = listener;
- this.cachedManagedObject = null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public ConfigChangeResult applyConfigurationDelete(Entry configEntry) {
- if (optionalRelation != null) {
- // Optional managed objects are located directly beneath the
- // parent and have a well-defined name. We need to make sure
- // that we are handling the correct entry.
- ManagedObjectPath<?, ?> childPath = path.child(optionalRelation);
- DN expectedDN = DNBuilder.create(childPath);
- if (!configEntry.getName().equals(expectedDN)) {
- // Doesn't apply to us.
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
- }
-
- // Cached objects are guaranteed to be from previous acceptable
- // callback.
- ConfigChangeResult result = listener.applyConfigurationDelete(cachedManagedObject);
-
- // Now apply post constraint call-backs.
- if (result.getResultCode() == ResultCode.SUCCESS) {
- ManagedObjectDefinition<?, ?> d = cachedManagedObject.getManagedObjectDefinition();
- for (Constraint constraint : d.getAllConstraints()) {
- for (ServerConstraintHandler handler : constraint.getServerConstraintHandlers()) {
- try {
- handler.performPostDelete(cachedManagedObject);
- } catch (ConfigException e) {
- debugLogger.trace("Unable to perform post delete", e);
- }
- }
- }
- }
-
- return result;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean configDeleteIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason) {
- DN dn = configEntry.getName();
- String name = dn.rdn().getFirstAVA().getAttributeValue().toString().trim();
-
- try {
- ManagedObjectPath<?, ? extends S> childPath;
- if (instantiableRelation != null) {
- childPath = path.child(instantiableRelation, name);
- } else if (setRelation != null) {
- try {
- childPath = path.child(setRelation, name);
- } catch (IllegalArgumentException e) {
- throw new DefinitionDecodingException(setRelation.getChildDefinition(),
- Reason.WRONG_TYPE_INFORMATION);
- }
- } else {
- // Optional managed objects are located directly beneath the
- // parent and have a well-defined name. We need to make sure
- // that we are handling the correct entry.
- childPath = path.child(optionalRelation);
- DN expectedDN = DNBuilder.create(childPath);
- if (!dn.equals(expectedDN)) {
- // Doesn't apply to us.
- return true;
- }
- }
-
- cachedManagedObject = serverContext.decode(childPath, configEntry);
- } catch (DecodingException e) {
- unacceptableReason.append(e.getMessageObject());
- return false;
- }
-
- List<LocalizableMessage> reasons = new LinkedList<LocalizableMessage>();
-
- // Enforce any constraints.
- boolean isDeleteAllowed = true;
- ManagedObjectDefinition<?, ?> d = cachedManagedObject.getManagedObjectDefinition();
- for (Constraint constraint : d.getAllConstraints()) {
- for (ServerConstraintHandler handler : constraint.getServerConstraintHandlers()) {
- try {
- if (!handler.isDeleteAllowed(cachedManagedObject, reasons)) {
- isDeleteAllowed = false;
- }
- } catch (ConfigException e) {
- LocalizableMessage message = ERR_SERVER_CONSTRAINT_EXCEPTION.get(e.getMessageObject());
- reasons.add(message);
- isDeleteAllowed = false;
- }
- }
- }
-
- // Give up immediately if a constraint violation occurs.
- if (!isDeleteAllowed) {
- generateUnacceptableReason(reasons, unacceptableReason);
- return false;
- }
-
- // Let the delete listener decide.
- if (listener.isConfigurationDeleteAcceptable(cachedManagedObject, reasons)) {
- return true;
- } else {
- generateUnacceptableReason(reasons, unacceptableReason);
- return false;
- }
- }
-
- /**
- * Get the server managed object delete listener associated with this
- * adaptor.
- *
- * @return Returns the server managed object delete listener associated with
- * this adaptor.
- */
- ServerManagedObjectDeleteListener<S> getServerManagedObjectDeleteListener() {
- return listener;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigExceptionFactory.java b/opendj-config/src/main/java/org/opends/server/admin/server/ConfigExceptionFactory.java
deleted file mode 100644
index a103d0b..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigExceptionFactory.java
+++ /dev/null
@@ -1,127 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-import static com.forgerock.opendj.util.StaticUtils.*;
-
-import org.opends.server.admin.DefinitionDecodingException;
-import org.opends.server.config.spi.ConfigException;
-import org.opends.server.util.DynamicConstants;
-
-import com.forgerock.opendj.ldap.AdminMessages;
-
-import org.forgerock.opendj.ldap.DN;
-
-/**
- * A utility class for converting admin exceptions to config exceptions.
- */
-final class ConfigExceptionFactory {
-
- // The singleton instance.
- private static final ConfigExceptionFactory INSTANCE = new ConfigExceptionFactory();
-
- // Prevent instantiation.
- private ConfigExceptionFactory() {
- // Do nothing.
- }
-
- /**
- * Get the configuration exception factory instance.
- *
- * @return Returns the configuration exception factory instance.
- */
- public static ConfigExceptionFactory getInstance() {
- return INSTANCE;
- }
-
- /**
- * Create a configuration exception from a definition decoding exception.
- *
- * @param dn
- * The dn of the configuration entry that could not be decoded.
- * @param e
- * The definition decoding exception
- * @return Returns the configuration exception.
- */
- public ConfigException createDecodingExceptionAdaptor(DN dn, DefinitionDecodingException e) {
- LocalizableMessage message = AdminMessages.ERR_ADMIN_MANAGED_OBJECT_DECODING_PROBLEM.get(String.valueOf(dn),
- stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
- return new ConfigException(message, e);
- }
-
- /**
- * Create a configuration exception from a server managed object decoding
- * exception.
- *
- * @param e
- * The server managed object decoding exception.
- * @return Returns the configuration exception.
- */
-
- public ConfigException createDecodingExceptionAdaptor(ServerManagedObjectDecodingException e) {
- DN dn = e.getPartialManagedObject().getDN();
- LocalizableMessage message = AdminMessages.ERR_ADMIN_MANAGED_OBJECT_DECODING_PROBLEM.get(String.valueOf(dn),
- stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
- return new ConfigException(message, e);
- }
-
- /**
- * Create a configuration exception from a constraints violation decoding
- * exception.
- *
- * @param e
- * The constraints violation decoding exception.
- * @return Returns the configuration exception.
- */
- public ConfigException createDecodingExceptionAdaptor(ConstraintViolationException e) {
- DN dn = e.getManagedObject().getDN();
- LocalizableMessage message = AdminMessages.ERR_ADMIN_MANAGED_OBJECT_DECODING_PROBLEM.get(String.valueOf(dn),
- stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
- return new ConfigException(message, e);
- }
-
- /**
- * Create an exception that describes a problem that occurred when
- * attempting to load and instantiate a class.
- *
- * @param dn
- * The dn of the configuration entry was being processed.
- * @param className
- * The name of the class that could not be loaded or
- * instantiated.
- * @param e
- * The exception that occurred.
- * @return Returns the configuration exception.
- */
-
- public ConfigException createClassLoadingExceptionAdaptor(DN dn, String className, Exception e) {
- LocalizableMessage message = AdminMessages.ERR_ADMIN_CANNOT_INSTANTIATE_CLASS.get(String.valueOf(className),
- String.valueOf(dn), stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
- return new ConfigException(message, e);
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigurationAddListener.java b/opendj-config/src/main/java/org/opends/server/admin/server/ConfigurationAddListener.java
deleted file mode 100644
index bf512c0..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigurationAddListener.java
+++ /dev/null
@@ -1,67 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-import java.util.List;
-
-import org.opends.server.admin.Configuration;
-
-/**
- * This interface defines the methods that a Directory Server configurable
- * component should implement if it wishes to be able to receive notifications
- * when a new configuration is added.
- *
- * @param <T>
- * The type of configuration that this listener should be notified
- * about.
- */
-public interface ConfigurationAddListener<T extends Configuration> {
-
- /**
- * Indicates whether the proposed addition of a new configuration is
- * acceptable to this add listener.
- *
- * @param configuration
- * The configuration that will be added.
- * @param unacceptableReasons
- * A list that can be used to hold messages about why the
- * provided configuration is not acceptable.
- * @return Returns <code>true</code> if the proposed addition is acceptable,
- * or <code>false</code> if it is not.
- */
- public boolean isConfigurationAddAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons);
-
- /**
- * Adds a new configuration to this add listener.
- *
- * @param configuration
- * The configuration that will be added.
- * @return Returns information about the result of adding the configuration.
- */
- public ConfigChangeResult applyConfigurationAdd(T configuration);
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigurationChangeListener.java b/opendj-config/src/main/java/org/opends/server/admin/server/ConfigurationChangeListener.java
deleted file mode 100644
index 51f3f27..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigurationChangeListener.java
+++ /dev/null
@@ -1,68 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-import java.util.List;
-
-import org.opends.server.admin.Configuration;
-
-/**
- * This interface defines the methods that a Directory Server configurable
- * component should implement if it wishes to be able to receive notifications
- * when a its associated configuration is changed.
- *
- * @param <T>
- * The type of configuration that this listener should be notified
- * about.
- */
-public interface ConfigurationChangeListener<T extends Configuration> {
-
- /**
- * Indicates whether the proposed change to the configuration is acceptable
- * to this change listener.
- *
- * @param configuration
- * The new configuration containing the changes.
- * @param unacceptableReasons
- * A list that can be used to hold messages about why the
- * provided configuration is not acceptable.
- * @return Returns <code>true</code> if the proposed change is acceptable,
- * or <code>false</code> if it is not.
- */
- public boolean isConfigurationChangeAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons);
-
- /**
- * Applies the configuration changes to this change listener.
- *
- * @param configuration
- * The new configuration containing the changes.
- * @return Returns information about the result of changing the
- * configuration.
- */
- public ConfigChangeResult applyConfigurationChange(T configuration);
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigurationDeleteListener.java b/opendj-config/src/main/java/org/opends/server/admin/server/ConfigurationDeleteListener.java
deleted file mode 100644
index 3519977..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ConfigurationDeleteListener.java
+++ /dev/null
@@ -1,68 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-import java.util.List;
-
-import org.opends.server.admin.Configuration;
-
-/**
- * This interface defines the methods that a Directory Server configurable
- * component should implement if it wishes to be able to receive notifications
- * when an existing configuration is deleted.
- *
- * @param <T>
- * The type of configuration that this listener should be notified
- * about.
- */
-public interface ConfigurationDeleteListener<T extends Configuration> {
-
- /**
- * Indicates whether the proposed deletion of an existing configuration is
- * acceptable to this delete listener.
- *
- * @param configuration
- * The configuration that will be deleted.
- * @param unacceptableReasons
- * A list that can be used to hold messages about why the
- * provided configuration is not acceptable.
- * @return Returns <code>true</code> if the proposed deletion is acceptable,
- * or <code>false</code> if it is not.
- */
- public boolean isConfigurationDeleteAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons);
-
- /**
- * Deletes an existing configuration from this delete listener.
- *
- * @param configuration
- * The existing configuration that will be deleted.
- * @return Returns information about the result of deleting the
- * configuration.
- */
- public ConfigChangeResult applyConfigurationDelete(T configuration);
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ConstraintViolationException.java b/opendj-config/src/main/java/org/opends/server/admin/server/ConstraintViolationException.java
deleted file mode 100644
index 04a4c19..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ConstraintViolationException.java
+++ /dev/null
@@ -1,149 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-import org.forgerock.util.Reject;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.opends.server.admin.DecodingException;
-
-/**
- * This exception is thrown when the server refuses to use or delete a managed
- * object due to one or more constraints that cannot be satisfied.
- */
-public class ConstraintViolationException extends DecodingException {
-
- /**
- * Serialization ID.
- */
- private static final long serialVersionUID = -4902443848460011875L;
-
- // The server managed object.
- private final ServerManagedObject<?> managedObject;
-
- // Gets the default message.
- private static LocalizableMessage getDefaultMessage(Collection<LocalizableMessage> messages) {
- Reject.ifNull(messages);
- Reject.ifFalse(!messages.isEmpty(), "messages should not be empty");
-
- if (messages.size() == 1) {
- return ERR_CONSTRAINT_VIOLATION_EXCEPTION_SINGLE.get(messages.iterator().next());
- } else {
- return ERR_CONSTRAINT_VIOLATION_EXCEPTION_PLURAL.get(getSingleMessage(messages));
- }
- }
-
- // Merge the messages into a single message.
- private static LocalizableMessage getSingleMessage(Collection<LocalizableMessage> messages) {
- if (messages.size() == 1) {
- return messages.iterator().next();
- } else {
- LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
-
- boolean isFirst = true;
- for (LocalizableMessage m : messages) {
- if (!isFirst) {
- builder.append("; ");
- }
- builder.append(m);
- isFirst = false;
- }
-
- return builder.toMessage();
- }
- }
-
- // The messages describing the constraint violations that occurred.
- private final Collection<LocalizableMessage> messages;
-
- /**
- * Creates a new constraint violation exception with the provided messages.
- *
- * @param managedObject
- * The server managed object which caused the constraint
- * violations.
- * @param messages
- * The messages describing the constraint violations that
- * occurred (must be non-<code>null</code> and non-empty).
- */
- public ConstraintViolationException(ServerManagedObject<?> managedObject, Collection<LocalizableMessage> messages) {
- super(getDefaultMessage(messages));
-
- this.managedObject = managedObject;
- this.messages = new ArrayList<LocalizableMessage>(messages);
- }
-
- /**
- * Creates a new constraint violation exception with the provided message.
- *
- * @param managedObject
- * The server managed object which caused the constraint
- * violations.
- * @param message
- * The message describing the constraint violation that occurred.
- */
- public ConstraintViolationException(ServerManagedObject<?> managedObject, LocalizableMessage message) {
- this(managedObject, Collections.singleton(message));
- }
-
- /**
- * Gets an unmodifiable collection view of the messages describing the
- * constraint violations that occurred.
- *
- * @return Returns an unmodifiable collection view of the messages
- * describing the constraint violations that occurred.
- */
- public Collection<LocalizableMessage> getMessages() {
- return Collections.unmodifiableCollection(messages);
- }
-
- /**
- * Creates a single message listing all the messages combined into a single
- * list separated by semi-colons.
- *
- * @return Returns a single message listing all the messages combined into a
- * single list separated by semi-colons.
- */
- public LocalizableMessage getMessagesAsSingleMessage() {
- return getSingleMessage(messages);
- }
-
- /**
- * Gets the server managed object which caused the constraint violations.
- *
- * @return Returns the server managed object which caused the constraint
- * violations.
- */
- public ServerManagedObject<?> getManagedObject() {
- return managedObject;
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/DNBuilder.java b/opendj-config/src/main/java/org/opends/server/admin/server/DNBuilder.java
deleted file mode 100644
index 8587da4..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/DNBuilder.java
+++ /dev/null
@@ -1,72 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin.server;
-
-import org.forgerock.opendj.ldap.DN;
-import org.opends.server.admin.LDAPProfile;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.RelationDefinition;
-
-/**
- * A factory class for creating <code>DN</code>s from managed object paths.
- */
-final class DNBuilder {
-
- /**
- * Creates a new DN representing the specified managed object path.
- *
- * @param path
- * The managed object path.
- * @return Returns a new DN representing the specified managed object path.
- */
- public static DN create(ManagedObjectPath<?, ?> path) {
- return path.toDN();
- }
-
- /**
- * Creates a new DN representing the specified managed object path and
- * relation.
- *
- * @param path
- * The managed object path.
- * @param relation
- * The child relation.
- * @return Returns a new DN representing the specified managed object path
- * and relation.
- */
- public static DN create(ManagedObjectPath<?, ?> path, RelationDefinition<?, ?> relation) {
- DN dn = path.toDN();
- LDAPProfile profile = LDAPProfile.getInstance();
- DN localName = DN.valueOf(profile.getRelationRDNSequence(relation));
- return dn.child(localName);
- }
-
- // Prevent instantiation.
- private DNBuilder() {
- // No implementation required.
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/DelayedConfigAddListener.java b/opendj-config/src/main/java/org/opends/server/admin/server/DelayedConfigAddListener.java
deleted file mode 100644
index 5b76645..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/DelayedConfigAddListener.java
+++ /dev/null
@@ -1,173 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import org.opends.server.config.spi.ConfigAddListener;
-import org.opends.server.config.spi.ConfigDeleteListener;
-import org.opends.server.config.spi.ConfigException;
-import org.opends.server.config.spi.ConfigurationRepository;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.Entry;
-import org.forgerock.opendj.ldap.ResultCode;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-
-/**
- * A configuration add listener which will monitor a parent entry to see when a
- * specified child entry has been added. When the child entry is added the add
- * listener will automatically register its "delayed" add or delete listener.
- */
-final class DelayedConfigAddListener implements ConfigAddListener {
-
- private static final Logger debugLogger = LoggerFactory.getLogger(DelayedConfigAddListener.class);
-
- // The name of the parent entry.
- private final DN parent;
-
- // The name of the subordinate entry which should have an add or
- // delete listener registered with it when it is created.
- private final DN child;
-
- // The add listener to be registered with the subordinate entry when
- // it is added (or null if a delete listener should be registered).
- private final ConfigAddListener delayedAddListener;
-
- // The delete listener to be registered with the subordinate entry
- // when it is added (or null if an add listener should be
- // registered).
- private final ConfigDeleteListener delayedDeleteListener;
-
- private final ConfigurationRepository configRepository;
-
- /**
- * Create a new delayed add listener which will register an add listener
- * with the specified entry when it is added.
- *
- * @param child
- * The name of the subordinate entry which should have an add
- * listener registered with it when it is created.
- * @param addListener
- * The add listener to be added to the subordinate entry when it
- * is added.
- * @param configRepository
- * Repository of config entries.
- */
- public DelayedConfigAddListener(DN child, ConfigAddListener addListener, ConfigurationRepository configRepository) {
- this.parent = child.parent();
- this.child = child;
- this.delayedAddListener = addListener;
- this.delayedDeleteListener = null;
- this.configRepository = configRepository;
- }
-
- /**
- * Create a new delayed add listener which will register a delete listener
- * with the specified entry when it is added.
- *
- * @param child
- * The name of the subordinate entry which should have a delete
- * listener registered with it when it is created.
- * @param deleteListener
- * The delete listener to be added to the subordinate entry when
- * it is added.
- * @param configRepository
- * Repository of config entries.
- */
- public DelayedConfigAddListener(DN child, ConfigDeleteListener deleteListener,
- ConfigurationRepository configRepository) {
- this.parent = child.parent();
- this.child = child;
- this.delayedAddListener = null;
- this.configRepository = configRepository;
- this.delayedDeleteListener = deleteListener;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public ConfigChangeResult applyConfigurationAdd(Entry configEntry) {
- if (configEntry.getName().equals(child)) {
- // The subordinate entry matched our criteria so register the
- // listener(s).
- if (delayedAddListener != null) {
- configRepository.registerAddListener(configEntry.getName(), delayedAddListener);
- }
-
- if (delayedDeleteListener != null) {
- configRepository.registerDeleteListener(configEntry.getName(), delayedDeleteListener);
- }
-
- try {
- // We are no longer needed.
- if (configRepository.hasEntry(parent)) {
- configRepository.deregisterAddListener(parent, this);
- }
- } catch (ConfigException e) {
- debugLogger.trace("Unable to deregister add listener", e);
- // Ignore this error as it implies that this listener has
- // already been deregistered.
- }
- }
-
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean configAddIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason) {
- // Always acceptable.
- return true;
- }
-
- /**
- * Gets the delayed add listener.
- * <p>
- * This method is provided for unit-testing.
- *
- * @return Returns the delayed add listener, or <code>null</code> if this
- * listener is delaying a delete listener.
- */
- ConfigAddListener getDelayedAddListener() {
- return delayedAddListener;
- }
-
- /**
- * Gets the delayed delete listener.
- * <p>
- * This method is provided for unit-testing.
- *
- * @return Returns the delayed delete listener, or <code>null</code> if this
- * listener is delaying a add listener.
- */
- ConfigDeleteListener getDelayedDeleteListener() {
- return delayedDeleteListener;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ServerConstraintHandler.java b/opendj-config/src/main/java/org/opends/server/admin/server/ServerConstraintHandler.java
deleted file mode 100644
index 63b4a8f..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ServerConstraintHandler.java
+++ /dev/null
@@ -1,170 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import java.util.Collection;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.config.spi.ConfigException;
-
-/**
- * An interface for performing server-side constraint validation.
- * <p>
- * Constraints are evaluated immediately before and after write operations are
- * performed. Server-side constraints are evaluated in two phases: the first
- * phase determines if the proposed add, delete, or modification is acceptable
- * according to the constraint. If one or more constraints fails, the write
- * write operation is refused, and the client will receive an
- * <code>OperationRejectedException</code> exception. The second phase is
- * invoked once the add, delete, or modification request has been allowed and
- * any changes applied. The second phase gives the constraint handler a chance
- * to register listener call-backs if required.
- * <p>
- * A server constraint handler must override at least one of the provided
- * methods.
- *
- * @see org.opends.server.admin.Constraint
- */
-public abstract class ServerConstraintHandler {
-
- /**
- * Creates a new server constraint handler.
- */
- protected ServerConstraintHandler() {
- // No implementation required.
- }
-
- /**
- * Determines whether or not the existing managed object can be deleted from
- * the server's configuration. For example, an implementation might enforce
- * referential integrity by preventing referenced managed objects from being
- * deleted.
- * <p>
- * If the constraint is not satisfied, the implementation must return
- * <code>false</code> and add a message describing why the managed object
- * cannot be deleted.
- * <p>
- * The default implementation is to return <code>true</code>.
- *
- * @param managedObject
- * The managed object which is about to be deleted.
- * @param unacceptableReasons
- * A list of messages to which error messages should be added.
- * @return Returns <code>true</code> if this constraint is satisfied, or
- * <code>false</code> if it is not and the managed object cannot be
- * deleted.
- * @throws ConfigException
- * If an configuration exception prevented this constraint from
- * being evaluated.
- */
- public boolean isDeleteAllowed(ServerManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ConfigException {
- return true;
- }
-
- /**
- * Determines whether or not the provided managed object can be used by the
- * server. This method is invoked each time a managed object is decoded by
- * the administration framework: when an attempt is made to add a new
- * configuration, modify an existing configuration, or during server
- * initialization. If the constraint is not satisfied the managed object
- * will be rejected.
- * <p>
- * If the constraint is not satisfied, the implementation must return
- * <code>false</code> and add a message describing why the managed object is
- * not usable.
- * <p>
- * The default implementation is to return <code>true</code>.
- *
- * @param managedObject
- * The new managed object.
- * @param unacceptableReasons
- * A list of messages to which error messages should be added.
- * @return Returns <code>true</code> if this constraint is satisfied, or
- * <code>false</code> if it is not and the managed object cannot be
- * used.
- * @throws ConfigException
- * If an configuration exception prevented this constraint from
- * being evaluated.
- */
- public boolean isUsable(ServerManagedObject<?> managedObject, Collection<LocalizableMessage> unacceptableReasons)
- throws ConfigException {
- return true;
- }
-
- /**
- * Performs any post-add processing required by this constraint. This method
- * is invoked after a new managed object has been accepted for use by the
- * administration framework. This might occur during initialization or when
- * a managed object is added at run-time.
- * <p>
- * The default implementation is to do nothing.
- *
- * @param managedObject
- * The managed object which has just been added to the server's
- * configuration.
- * @throws ConfigException
- * If the post-add processing fails due to a configuration
- * exception.
- */
- public void performPostAdd(ServerManagedObject<?> managedObject) throws ConfigException {
- // Do nothing.
- }
-
- /**
- * Performs any post-delete processing required by this constraint. This
- * method is invoked after a managed object has been accepted for deletion
- * from the server's configuration.
- * <p>
- * The default implementation is to do nothing.
- *
- * @param managedObject
- * The managed object which was deleted.
- * @throws ConfigException
- * If the post-delete processing fails due to a configuration
- * exception.
- */
- public void performPostDelete(ServerManagedObject<?> managedObject) throws ConfigException {
- // Do nothing.
- }
-
- /**
- * Performs any post-modify processing required by this constraint. This
- * method is invoked after changes to an existing managed object have been
- * accepted.
- * <p>
- * The default implementation is to do nothing.
- *
- * @param managedObject
- * The managed object which was modified.
- * @throws ConfigException
- * If the post-modify processing fails due to a configuration
- * exception.
- */
- public void performPostModify(ServerManagedObject<?> managedObject) throws ConfigException {
- // Do nothing.
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObject.java b/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObject.java
deleted file mode 100644
index 5e76a6a..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObject.java
+++ /dev/null
@@ -1,1441 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2006-2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin.server;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedSet;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.opendj.ldap.DN;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.Constraint;
-import org.opends.server.admin.InstantiableRelationDefinition;
-import org.opends.server.admin.ManagedObjectDefinition;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.OptionalRelationDefinition;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.PropertyProvider;
-import org.opends.server.admin.RelationDefinition;
-import org.opends.server.admin.SetRelationDefinition;
-import org.opends.server.admin.SingletonRelationDefinition;
-import org.opends.server.config.spi.ConfigAddListener;
-import org.opends.server.config.spi.ConfigChangeListener;
-import org.opends.server.config.spi.ConfigDeleteListener;
-import org.opends.server.config.spi.ConfigException;
-import org.opends.server.config.spi.ConfigurationRepository;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.forgerock.opendj.util.Pair;
-
-
-/**
- * A server-side managed object.
- *
- * @param <S>
- * The type of server configuration represented by the server managed
- * object.
- */
-public final class ServerManagedObject<S extends Configuration> implements PropertyProvider {
-
- private static final Logger logger = LoggerFactory.getLogger(ServerManagedObject.class);
-
- /**
- * The DN of configuration entry associated with this server managed object,
- * which is {@code null} for root.
- */
- private DN configDN;
-
- private final ServerManagementContext serverContext;
-
- private final ConfigurationRepository configRepository;
-
- private final ManagedObjectDefinition<?, S> definition;
-
- /** The managed object path identifying this managed object's location. */
- private final ManagedObjectPath<?, S> path;
-
- private final Map<PropertyDefinition<?>, SortedSet<?>> properties;
-
- /**
- * Creates an new server side managed object.
- *
- * @param path
- * The managed object path.
- * @param definition
- * The managed object definition.
- * @param properties
- * The managed object's properties.
- * @param configDN
- * The configuration entry associated with the managed object.
- * @param context
- * The server management context.
- */
- ServerManagedObject(final ManagedObjectPath<?, S> path, final ManagedObjectDefinition<?, S> definition,
- final Map<PropertyDefinition<?>, SortedSet<?>> properties, final DN configDN,
- final ServerManagementContext context) {
- this.definition = definition;
- this.path = path;
- this.properties = properties;
- this.configDN = configDN;
- this.serverContext = context;
- this.configRepository = context.getConfigRepository();
- }
-
- /**
- * Deregisters an existing configuration add listener.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The instantiable relation definition.
- * @param listener
- * The configuration add listener.
- * @throws IllegalArgumentException
- * If the instantiable relation definition is not associated
- * with this managed object's definition.
- */
- public <M extends Configuration> void deregisterAddListener(InstantiableRelationDefinition<?, M> d,
- ConfigurationAddListener<M> listener) {
- validateRelationDefinition(d);
- DN baseDN = DNBuilder.create(path, d);
- deregisterAddListener(baseDN, listener);
- }
-
- /**
- * Deregisters an existing server managed object add listener.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The instantiable relation definition.
- * @param listener
- * The server managed object add listener.
- * @throws IllegalArgumentException
- * If the instantiable relation definition is not associated
- * with this managed object's definition.
- */
- public <M extends Configuration> void deregisterAddListener(InstantiableRelationDefinition<?, M> d,
- ServerManagedObjectAddListener<M> listener) {
- validateRelationDefinition(d);
- DN baseDN = DNBuilder.create(path, d);
- deregisterAddListener(baseDN, listener);
- }
-
- /**
- * Deregisters an existing configuration add listener.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The optional relation definition.
- * @param listener
- * The configuration add listener.
- * @throws IllegalArgumentException
- * If the optional relation definition is not associated with
- * this managed object's definition.
- */
- public <M extends Configuration> void deregisterAddListener(OptionalRelationDefinition<?, M> d,
- ConfigurationAddListener<M> listener) {
- validateRelationDefinition(d);
- DN baseDN = DNBuilder.create(path, d).parent();
- deregisterAddListener(baseDN, listener);
- }
-
- /**
- * Deregisters an existing server managed object add listener.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The optional relation definition.
- * @param listener
- * The server managed object add listener.
- * @throws IllegalArgumentException
- * If the optional relation definition is not associated with
- * this managed object's definition.
- */
- public <M extends Configuration> void deregisterAddListener(OptionalRelationDefinition<?, M> d,
- ServerManagedObjectAddListener<M> listener) {
- validateRelationDefinition(d);
- DN baseDN = DNBuilder.create(path, d).parent();
- deregisterAddListener(baseDN, listener);
- }
-
- /**
- * Deregisters an existing configuration add listener.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The set relation definition.
- * @param listener
- * The configuration add listener.
- * @throws IllegalArgumentException
- * If the set relation definition is not associated with this
- * managed object's definition.
- */
- public <M extends Configuration> void deregisterAddListener(SetRelationDefinition<?, M> d,
- ConfigurationAddListener<M> listener) {
- validateRelationDefinition(d);
- DN baseDN = DNBuilder.create(path, d);
- deregisterAddListener(baseDN, listener);
- }
-
- /**
- * Deregisters an existing server managed object add listener.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The set relation definition.
- * @param listener
- * The server managed object add listener.
- * @throws IllegalArgumentException
- * If the set relation definition is not associated with this
- * managed object's definition.
- */
- public <M extends Configuration> void deregisterAddListener(SetRelationDefinition<?, M> d,
- ServerManagedObjectAddListener<M> listener) {
- validateRelationDefinition(d);
- DN baseDN = DNBuilder.create(path, d);
- deregisterAddListener(baseDN, listener);
- }
-
- /**
- * Deregisters an existing configuration change listener.
- *
- * @param listener
- * The configuration change listener.
- */
- public void deregisterChangeListener(ConfigurationChangeListener<? super S> listener) {
- for (ConfigChangeListener l : configRepository.getChangeListeners(configDN)) {
- if (l instanceof ConfigChangeListenerAdaptor) {
- ConfigChangeListenerAdaptor<?> adaptor = (ConfigChangeListenerAdaptor<?>) l;
- ServerManagedObjectChangeListener<?> l2 = adaptor.getServerManagedObjectChangeListener();
- if (l2 instanceof ServerManagedObjectChangeListenerAdaptor<?>) {
- ServerManagedObjectChangeListenerAdaptor<?> adaptor2 =
- (ServerManagedObjectChangeListenerAdaptor<?>) l2;
- if (adaptor2.getConfigurationChangeListener() == listener) {
- adaptor.finalizeChangeListener();
- configRepository.deregisterChangeListener(configDN, adaptor);
- }
- }
- }
- }
- }
-
- /**
- * Deregisters an existing server managed object change listener.
- *
- * @param listener
- * The server managed object change listener.
- */
- public void deregisterChangeListener(ServerManagedObjectChangeListener<? super S> listener) {
- for (ConfigChangeListener l : configRepository.getChangeListeners(configDN)) {
- if (l instanceof ConfigChangeListenerAdaptor) {
- ConfigChangeListenerAdaptor<?> adaptor = (ConfigChangeListenerAdaptor<?>) l;
- if (adaptor.getServerManagedObjectChangeListener() == listener) {
- adaptor.finalizeChangeListener();
- configRepository.deregisterChangeListener(configDN, adaptor);
- }
- }
- }
- }
-
- /**
- * Deregisters an existing configuration delete listener.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The instantiable relation definition.
- * @param listener
- * The configuration delete listener.
- * @throws IllegalArgumentException
- * If the instantiable relation definition is not associated
- * with this managed object's definition.
- */
- public <M extends Configuration> void deregisterDeleteListener(InstantiableRelationDefinition<?, M> d,
- ConfigurationDeleteListener<M> listener) {
- validateRelationDefinition(d);
-
- DN baseDN = DNBuilder.create(path, d);
- deregisterDeleteListener(baseDN, listener);
- }
-
- /**
- * Deregisters an existing server managed object delete listener.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The instantiable relation definition.
- * @param listener
- * The server managed object delete listener.
- * @throws IllegalArgumentException
- * If the instantiable relation definition is not associated
- * with this managed object's definition.
- */
- public <M extends Configuration> void deregisterDeleteListener(InstantiableRelationDefinition<?, M> d,
- ServerManagedObjectDeleteListener<M> listener) {
- validateRelationDefinition(d);
-
- DN baseDN = DNBuilder.create(path, d);
- deregisterDeleteListener(baseDN, listener);
- }
-
- /**
- * Deregisters an existing configuration delete listener.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The optional relation definition.
- * @param listener
- * The configuration delete listener.
- * @throws IllegalArgumentException
- * If the optional relation definition is not associated with
- * this managed object's definition.
- */
- public <M extends Configuration> void deregisterDeleteListener(OptionalRelationDefinition<?, M> d,
- ConfigurationDeleteListener<M> listener) {
- validateRelationDefinition(d);
-
- DN baseDN = DNBuilder.create(path, d).parent();
- deregisterDeleteListener(baseDN, listener);
- }
-
- /**
- * Deregisters an existing server managed object delete listener.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The optional relation definition.
- * @param listener
- * The server managed object delete listener.
- * @throws IllegalArgumentException
- * If the optional relation definition is not associated with
- * this managed object's definition.
- */
- public <M extends Configuration> void deregisterDeleteListener(OptionalRelationDefinition<?, M> d,
- ServerManagedObjectDeleteListener<M> listener) {
- validateRelationDefinition(d);
-
- DN baseDN = DNBuilder.create(path, d).parent();
- deregisterDeleteListener(baseDN, listener);
- }
-
- /**
- * Deregisters an existing configuration delete listener.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The set relation definition.
- * @param listener
- * The configuration delete listener.
- * @throws IllegalArgumentException
- * If the set relation definition is not associated with this
- * managed object's definition.
- */
- public <M extends Configuration> void deregisterDeleteListener(SetRelationDefinition<?, M> d,
- ConfigurationDeleteListener<M> listener) {
- validateRelationDefinition(d);
-
- DN baseDN = DNBuilder.create(path, d);
- deregisterDeleteListener(baseDN, listener);
- }
-
- /**
- * Deregisters an existing server managed object delete listener.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The set relation definition.
- * @param listener
- * The server managed object delete listener.
- * @throws IllegalArgumentException
- * If the set relation definition is not associated with this
- * managed object's definition.
- */
- public <M extends Configuration> void deregisterDeleteListener(SetRelationDefinition<?, M> d,
- ServerManagedObjectDeleteListener<M> listener) {
- validateRelationDefinition(d);
-
- DN baseDN = DNBuilder.create(path, d);
- deregisterDeleteListener(baseDN, listener);
- }
-
- /**
- * Retrieve an instantiable child managed object.
- *
- * @param <M>
- * The requested type of the child server managed object
- * configuration.
- * @param d
- * The instantiable relation definition.
- * @param name
- * The name of the child managed object.
- * @return Returns the instantiable child managed object.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- * @throws ConfigException
- * If the child managed object could not be found or if it could
- * not be decoded.
- */
- public <M extends Configuration> ServerManagedObject<? extends M> getChild(InstantiableRelationDefinition<?, M> d,
- String name) throws ConfigException {
- validateRelationDefinition(d);
- return serverContext.getManagedObject(path.child(d, name));
- }
-
- /**
- * Retrieve an optional child managed object.
- *
- * @param <M>
- * The requested type of the child server managed object
- * configuration.
- * @param d
- * The optional relation definition.
- * @return Returns the optional child managed object.
- * @throws IllegalArgumentException
- * If the optional relation definition is not associated with
- * this managed object's definition.
- * @throws ConfigException
- * If the child managed object could not be found or if it could
- * not be decoded.
- */
- public <M extends Configuration> ServerManagedObject<? extends M> getChild(OptionalRelationDefinition<?, M> d)
- throws ConfigException {
- validateRelationDefinition(d);
- return serverContext.getManagedObject(path.child(d));
- }
-
- /**
- * Retrieve a set child managed object.
- *
- * @param <M>
- * The requested type of the child server managed object
- * configuration.
- * @param d
- * The set relation definition.
- * @param name
- * The name of the child managed object.
- * @return Returns the set child managed object.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition or if {@code name} specifies a
- * managed object definition which is not a sub-type of the
- * relation's child definition.
- * @throws ConfigException
- * If the child managed object could not be found or if it could
- * not be decoded.
- */
- public <M extends Configuration> ServerManagedObject<? extends M> getChild(SetRelationDefinition<?, M> d,
- String name) throws ConfigException {
- validateRelationDefinition(d);
-
- return serverContext.getManagedObject(path.child(d, name));
- }
-
- /**
- * Retrieve a singleton child managed object.
- *
- * @param <M>
- * The requested type of the child server managed object
- * configuration.
- * @param d
- * The singleton relation definition.
- * @return Returns the singleton child managed object.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- * @throws ConfigException
- * If the child managed object could not be found or if it could
- * not be decoded.
- */
- public <M extends Configuration> ServerManagedObject<? extends M> getChild(SingletonRelationDefinition<?, M> d)
- throws ConfigException {
- validateRelationDefinition(d);
- return serverContext.getManagedObject(path.child(d));
- }
-
- /**
- * Returns the server management context used by this object.
- *
- * @return the context
- */
- public ServerManagementContext getServerContext() {
- return serverContext;
- }
-
- /**
- * Creates a server configuration view of this managed object.
- *
- * @return Returns the server configuration view of this managed object.
- */
- public S getConfiguration() {
- return definition.createServerConfiguration(this);
- }
-
- /**
- * Get the DN of the LDAP entry associated with this server managed object.
- *
- * @return Returns the DN of the LDAP entry associated with this server
- * managed object, or an null DN if this is the root managed object.
- */
- public DN getDN() {
- if (configDN != null) {
- return configDN;
- } else {
- return DN.rootDN();
- }
- }
-
- /**
- * Get the definition associated with this server managed object.
- *
- * @return Returns the definition associated with this server managed
- * object.
- */
- public ManagedObjectDefinition<?, S> getManagedObjectDefinition() {
- return definition;
- }
-
- /**
- * Get the path of this server managed object.
- *
- * @return Returns the path of this server managed object.
- */
- public ManagedObjectPath<?, S> getManagedObjectPath() {
- return path;
- }
-
- /**
- * Get the effective value of the specified property. If the property is
- * multi-valued then just the first value is returned. If the property does
- * not have a value then its default value is returned if it has one, or
- * <code>null</code> indicating that any default behavior is applicable.
- *
- * @param <T>
- * The type of the property to be retrieved.
- * @param d
- * The property to be retrieved.
- * @return Returns the property's effective value, or <code>null</code>
- * indicating that any default behavior is applicable.
- * @throws IllegalArgumentException
- * If the property definition is not associated with this
- * managed object's definition.
- */
- public <T> T getPropertyValue(PropertyDefinition<T> d) {
- Set<T> values = getPropertyValues(d);
- if (values.isEmpty()) {
- return null;
- } else {
- return values.iterator().next();
- }
- }
-
- /**
- * Get the effective values of the specified property. If the property does
- * not have any values then its default values are returned if it has any,
- * or an empty set indicating that any default behavior is applicable.
- *
- * @param <T>
- * The type of the property to be retrieved.
- * @param d
- * The property to be retrieved.
- * @return Returns an unmodifiable set containing the property's effective
- * values. An empty set indicates that the property has no default
- * values defined and any default behavior is applicable.
- * @throws IllegalArgumentException
- * If the property definition is not associated with this
- * managed object's definition.
- */
- @SuppressWarnings("unchecked")
- public <T> SortedSet<T> getPropertyValues(PropertyDefinition<T> d) {
- if (!properties.containsKey(d)) {
- throw new IllegalArgumentException("Unknown property " + d.getName());
- }
- return Collections.unmodifiableSortedSet((SortedSet<T>) properties.get(d));
- }
-
- /**
- * Determines whether or not the optional managed object associated with the
- * specified optional relations exists.
- *
- * @param d
- * The optional relation definition.
- * @return Returns <code>true</code> if the optional managed object exists,
- * <code>false</code> otherwise.
- * @throws IllegalArgumentException
- * If the optional relation definition is not associated with
- * this managed object's definition.
- */
- public boolean hasChild(OptionalRelationDefinition<?, ?> d) {
- validateRelationDefinition(d);
- return serverContext.managedObjectExists(path.child(d));
- }
-
- /**
- * Lists the child managed objects associated with the specified
- * instantiable relation.
- *
- * @param d
- * The instantiable relation definition.
- * @return Returns the names of the child managed objects.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- */
- public String[] listChildren(InstantiableRelationDefinition<?, ?> d) {
- validateRelationDefinition(d);
- return serverContext.listManagedObjects(path, d);
- }
-
- /**
- * Lists the child managed objects associated with the specified set
- * relation.
- *
- * @param d
- * The set relation definition.
- * @return Returns the names of the child managed objects.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with this
- * managed object's definition.
- */
- public String[] listChildren(SetRelationDefinition<?, ?> d) {
- validateRelationDefinition(d);
- return serverContext.listManagedObjects(path, d);
- }
-
- /**
- * Register to be notified when new child configurations are added beneath
- * an instantiable relation.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The instantiable relation definition.
- * @param listener
- * The configuration add listener.
- * @throws IllegalArgumentException
- * If the instantiable relation definition is not associated
- * with this managed object's definition.
- * @throws ConfigException
- * If the configuration entry associated with the instantiable
- * relation could not be retrieved.
- */
- public <M extends Configuration> void registerAddListener(InstantiableRelationDefinition<?, M> d,
- ConfigurationAddListener<M> listener) throws ConfigException {
- registerAddListener(d, new ServerManagedObjectAddListenerAdaptor<M>(listener));
- }
-
- /**
- * Register to be notified when new child server managed object are added
- * beneath an instantiable relation.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The instantiable relation definition.
- * @param listener
- * The server managed object add listener.
- * @throws IllegalArgumentException
- * If the instantiable relation definition is not associated
- * with this managed object's definition.
- * @throws ConfigException
- * If the configuration entry associated with the instantiable
- * relation could not be retrieved.
- */
- public <M extends Configuration> void registerAddListener(InstantiableRelationDefinition<?, M> d,
- ServerManagedObjectAddListener<M> listener) throws ConfigException {
- validateRelationDefinition(d);
- DN baseDN = DNBuilder.create(path, d);
- ConfigAddListener adaptor = new ConfigAddListenerAdaptor<M>(serverContext, path, d, listener);
- registerAddListener(baseDN, adaptor);
- }
-
- /**
- * Register to be notified when a new child configurations is added beneath
- * an optional relation.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The optional relation definition.
- * @param listener
- * The configuration add listener.
- * @throws IllegalArgumentException
- * If the optional relation definition is not associated with
- * this managed object's definition.
- * @throws ConfigException
- * If the configuration entry associated with the optional
- * relation could not be retrieved.
- */
- public <M extends Configuration> void registerAddListener(OptionalRelationDefinition<?, M> d,
- ConfigurationAddListener<M> listener) throws ConfigException {
- registerAddListener(d, new ServerManagedObjectAddListenerAdaptor<M>(listener));
- }
-
- /**
- * Register to be notified when a new child server managed object is added
- * beneath an optional relation.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The optional relation definition.
- * @param listener
- * The server managed object add listener.
- * @throws IllegalArgumentException
- * If the optional relation definition is not associated with
- * this managed object's definition.
- * @throws ConfigException
- * If the configuration entry associated with the optional
- * relation could not be retrieved.
- */
- public <M extends Configuration> void registerAddListener(OptionalRelationDefinition<?, M> d,
- ServerManagedObjectAddListener<M> listener) throws ConfigException {
- validateRelationDefinition(d);
- DN baseDN = DNBuilder.create(path, d).parent();
- ConfigAddListener adaptor = new ConfigAddListenerAdaptor<M>(serverContext, path, d, listener);
- registerAddListener(baseDN, adaptor);
- }
-
- /**
- * Register to be notified when new child configurations are added beneath a
- * set relation.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The set relation definition.
- * @param listener
- * The configuration add listener.
- * @throws IllegalArgumentException
- * If the set relation definition is not associated with this
- * managed object's definition.
- * @throws ConfigException
- * If the configuration entry associated with the set relation
- * could not be retrieved.
- */
- public <M extends Configuration> void registerAddListener(SetRelationDefinition<?, M> d,
- ConfigurationAddListener<M> listener) throws ConfigException {
- registerAddListener(d, new ServerManagedObjectAddListenerAdaptor<M>(listener));
- }
-
- /**
- * Register to be notified when new child server managed object are added
- * beneath a set relation.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The set relation definition.
- * @param listener
- * The server managed object add listener.
- * @throws IllegalArgumentException
- * If the set relation definition is not associated with this
- * managed object's definition.
- * @throws ConfigException
- * If the configuration entry associated with the set relation
- * could not be retrieved.
- */
- public <M extends Configuration> void registerAddListener(SetRelationDefinition<?, M> d,
- ServerManagedObjectAddListener<M> listener) throws ConfigException {
- validateRelationDefinition(d);
- DN baseDN = DNBuilder.create(path, d);
- ConfigAddListener adaptor = new ConfigAddListenerAdaptor<M>(serverContext, path, d, listener);
- registerAddListener(baseDN, adaptor);
- }
-
- /**
- * Register to be notified when this server managed object is changed.
- *
- * @param listener
- * The configuration change listener.
- */
- public void registerChangeListener(ConfigurationChangeListener<? super S> listener) {
- registerChangeListener(new ServerManagedObjectChangeListenerAdaptor<S>(listener));
- }
-
- /**
- * Register to be notified when this server managed object is changed.
- *
- * @param listener
- * The server managed object change listener.
- */
- public void registerChangeListener(ServerManagedObjectChangeListener<? super S> listener) {
-
- ConfigChangeListener adaptor = new ConfigChangeListenerAdaptor<S>(serverContext, path, listener);
- configRepository.registerChangeListener(configDN, adaptor);
-
- // TODO : go toward this
- // Entry entry;
- // configBackend.registerChangeListener(entry.getName(), adapter));
-
- // Change listener registration usually signifies that a managed
- // object has been accepted and added to the server configuration
- // during initialization post-add.
-
- // FIXME: we should prevent multiple invocations in the case where
- // multiple change listeners are registered for the same object.
- for (Constraint constraint : definition.getAllConstraints()) {
- for (ServerConstraintHandler handler : constraint.getServerConstraintHandlers()) {
- try {
- handler.performPostAdd(this);
- } catch (ConfigException e) {
- logger.trace("Unable to perform post add", e);
- }
- }
- }
- }
-
- /**
- * Register to be notified when existing child configurations are deleted
- * beneath an instantiable relation.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The instantiable relation definition.
- * @param listener
- * The configuration delete listener.
- * @throws IllegalArgumentException
- * If the instantiable relation definition is not associated
- * with this managed object's definition.
- * @throws ConfigException
- * If the configuration entry associated with the instantiable
- * relation could not be retrieved.
- */
- public <M extends Configuration> void registerDeleteListener(InstantiableRelationDefinition<?, M> d,
- ConfigurationDeleteListener<M> listener) throws ConfigException {
- registerDeleteListener(d, new ServerManagedObjectDeleteListenerAdaptor<M>(listener));
- }
-
- /**
- * Register to be notified when existing child server managed objects are
- * deleted beneath an instantiable relation.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The instantiable relation definition.
- * @param listener
- * The server managed objects delete listener.
- * @throws IllegalArgumentException
- * If the instantiable relation definition is not associated
- * with this managed object's definition.
- * @throws ConfigException
- * If the configuration entry associated with the instantiable
- * relation could not be retrieved.
- */
- public <M extends Configuration> void registerDeleteListener(InstantiableRelationDefinition<?, M> d,
- ServerManagedObjectDeleteListener<M> listener) throws ConfigException {
- validateRelationDefinition(d);
- DN baseDN = DNBuilder.create(path, d);
- ConfigDeleteListener adaptor = new ConfigDeleteListenerAdaptor<M>(serverContext, path, d, listener);
- registerDeleteListener(baseDN, adaptor);
- }
-
- /**
- * Register to be notified when an existing child configuration is deleted
- * beneath an optional relation.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The optional relation definition.
- * @param listener
- * The configuration delete listener.
- * @throws IllegalArgumentException
- * If the optional relation definition is not associated with
- * this managed object's definition.
- * @throws ConfigException
- * If the configuration entry associated with the optional
- * relation could not be retrieved.
- */
- public <M extends Configuration> void registerDeleteListener(OptionalRelationDefinition<?, M> d,
- ConfigurationDeleteListener<M> listener) throws ConfigException {
- registerDeleteListener(d, new ServerManagedObjectDeleteListenerAdaptor<M>(listener));
- }
-
- /**
- * Register to be notified when an existing child server managed object is
- * deleted beneath an optional relation.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The optional relation definition.
- * @param listener
- * The server managed object delete listener.
- * @throws IllegalArgumentException
- * If the optional relation definition is not associated with
- * this managed object's definition.
- * @throws ConfigException
- * If the configuration entry associated with the optional
- * relation could not be retrieved.
- */
- public <M extends Configuration> void registerDeleteListener(OptionalRelationDefinition<?, M> d,
- ServerManagedObjectDeleteListener<M> listener) throws ConfigException {
- validateRelationDefinition(d);
- DN baseDN = DNBuilder.create(path, d).parent();
- ConfigDeleteListener adaptor = new ConfigDeleteListenerAdaptor<M>(serverContext, path, d, listener);
- registerDeleteListener(baseDN, adaptor);
- }
-
- /**
- * Register to be notified when existing child configurations are deleted
- * beneath a set relation.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The set relation definition.
- * @param listener
- * The configuration delete listener.
- * @throws IllegalArgumentException
- * If the set relation definition is not associated with this
- * managed object's definition.
- * @throws ConfigException
- * If the configuration entry associated with the set relation
- * could not be retrieved.
- */
- public <M extends Configuration> void registerDeleteListener(SetRelationDefinition<?, M> d,
- ConfigurationDeleteListener<M> listener) throws ConfigException {
- registerDeleteListener(d, new ServerManagedObjectDeleteListenerAdaptor<M>(listener));
- }
-
- /**
- * Register to be notified when existing child server managed objects are
- * deleted beneath a set relation.
- *
- * @param <M>
- * The type of the child server configuration object.
- * @param d
- * The set relation definition.
- * @param listener
- * The server managed objects delete listener.
- * @throws IllegalArgumentException
- * If the set relation definition is not associated with this
- * managed object's definition.
- * @throws ConfigException
- * If the configuration entry associated with the set relation
- * could not be retrieved.
- */
- public <M extends Configuration> void registerDeleteListener(SetRelationDefinition<?, M> d,
- ServerManagedObjectDeleteListener<M> listener) throws ConfigException {
- validateRelationDefinition(d);
- DN baseDN = DNBuilder.create(path, d);
- ConfigDeleteListener adaptor = new ConfigDeleteListenerAdaptor<M>(serverContext, path, d, listener);
- registerDeleteListener(baseDN, adaptor);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String toString() {
- StringBuilder builder = new StringBuilder();
-
- builder.append("{ TYPE=");
- builder.append(definition.getName());
- builder.append(", DN=\"");
- builder.append(getDN());
- builder.append('\"');
- for (Map.Entry<PropertyDefinition<?>, SortedSet<?>> value : properties.entrySet()) {
- builder.append(", ");
- builder.append(value.getKey().getName());
- builder.append('=');
- builder.append(value.getValue());
- }
- builder.append(" }");
-
- return builder.toString();
- }
-
- /**
- * Determines whether or not this managed object can be used by the server.
- *
- * @throws ConstraintViolationException
- * If one or more constraints determined that this managed
- * object cannot be used by the server.
- */
- void ensureIsUsable() throws ConstraintViolationException {
- // Enforce any constraints.
- boolean isUsable = true;
- List<LocalizableMessage> reasons = new LinkedList<LocalizableMessage>();
- for (Constraint constraint : definition.getAllConstraints()) {
- for (ServerConstraintHandler handler : constraint.getServerConstraintHandlers()) {
- try {
- if (!handler.isUsable(this, reasons)) {
- isUsable = false;
- }
- } catch (ConfigException e) {
- LocalizableMessage message = ERR_SERVER_CONSTRAINT_EXCEPTION.get(e.getMessageObject());
- reasons.add(message);
- isUsable = false;
- }
- }
- }
-
- if (!isUsable) {
- throw new ConstraintViolationException(this, reasons);
- }
- }
-
- /**
- * Update the config DN associated with this server managed object. This
- * is only intended to be used by change listener call backs in order to
- * update the managed object with the correct config DN.
- *
- * @param configDN
- * The DN of the underlying configuration entry.
- */
- void setConfigDN(DN configDN) {
- this.configDN = configDN;
- }
-
- // Deregister an add listener.
- private <M extends Configuration> void deregisterAddListener(DN baseDN, ConfigurationAddListener<M> listener) {
- try {
- if (configRepository.hasEntry(baseDN)) {
- for (ConfigAddListener configListener : configRepository.getAddListeners(baseDN)) {
- if (configListener instanceof ConfigAddListenerAdaptor) {
- ConfigAddListenerAdaptor<?> adaptor = (ConfigAddListenerAdaptor<?>) configListener;
- ServerManagedObjectAddListener<?> smoListener = adaptor.getServerManagedObjectAddListener();
- if (smoListener instanceof ServerManagedObjectAddListenerAdaptor<?>) {
- ServerManagedObjectAddListenerAdaptor<?> adaptor2 =
- (ServerManagedObjectAddListenerAdaptor<?>) smoListener;
- if (adaptor2.getConfigurationAddListener() == listener) {
- configRepository.deregisterAddListener(baseDN, adaptor);
- }
- }
- }
- }
- } else {
- // The relation entry does not exist so check for and deregister
- // delayed add listener.
- deregisterDelayedAddListener(baseDN, listener);
- }
- } catch (ConfigException e) {
- // Ignore the exception since this implies deregistration.
- logger.trace("Unable to deregister add listener", e);
- }
- }
-
- // Deregister an add listener.
- private <M extends Configuration> void deregisterAddListener(DN baseDN,
- ServerManagedObjectAddListener<M> listener) {
- try {
- if (configRepository.hasEntry(baseDN)) {
- for (ConfigAddListener configListener : configRepository.getAddListeners(baseDN)) {
- if (configListener instanceof ConfigAddListenerAdaptor) {
- ConfigAddListenerAdaptor<?> adaptor = (ConfigAddListenerAdaptor<?>) configListener;
- if (adaptor.getServerManagedObjectAddListener() == listener) {
- configRepository.deregisterAddListener(baseDN, adaptor);
- }
- }
- }
- } else {
- // The relation entry does not exist so check for and deregister
- // delayed add listener.
- deregisterDelayedAddListener(baseDN, listener);
- }
- } catch (ConfigException e) {
- // Ignore the exception since this implies deregistration.
- logger.trace("Unable to deregister add listener", e);
- }
- }
-
- /**
- * Convenience method to retrieve the initial listener and its intermediate
- * adaptor from the provided configListener.
- *
- * @param <T>
- * Type of the configuration.
- * @param configListener
- * Listener from wich to extract the initial listener.
- * @return a pair of (intermediate adaptor, intermediate listener) or
- * {@code Pair.EMPTY} if listener can't be extracted
- */
- // @Checkstyle:off
- static <T extends Configuration> Pair<ConfigAddListenerAdaptor<T>, ConfigurationAddListener<T>>
- extractInitialListener(ConfigAddListener configListener) {
- // @Checkstyle:on
- Pair<ConfigAddListenerAdaptor<T>, ServerManagedObjectAddListener<T>> pair =
- extractIntermediateListener(configListener);
- if (!pair.equals(Pair.EMPTY) && pair.getSecond() instanceof ServerManagedObjectAddListenerAdaptor) {
- ServerManagedObjectAddListenerAdaptor<T> adaptor2 = (ServerManagedObjectAddListenerAdaptor<T>)
- pair.getSecond();
- return Pair.of(pair.getFirst(), adaptor2.getConfigurationAddListener());
- }
- return Pair.empty();
- }
-
- /**
- * Convenience method to retrieve the intermediate listener and its
- * intermediate adaptor from the provided configListener.
- *
- * @param <T>
- * Type of the configuration.
- * @param configListener
- * Listener from wich to extract the initial listener.
- * @return a pair of (intermediate adaptor, initial listener) or
- * {@code Pair.EMPTY} if listener can't be extracted
- */
- @SuppressWarnings("unchecked")
- // @Checkstyle:off
- static <T extends Configuration> Pair<ConfigAddListenerAdaptor<T>, ServerManagedObjectAddListener<T>>
- extractIntermediateListener(ConfigAddListener configListener) {
- // @Checkstyle:on
- if (configListener instanceof ConfigAddListenerAdaptor) {
- ConfigAddListenerAdaptor<T> adaptor = ((ConfigAddListenerAdaptor<T>) configListener);
- return Pair.of(adaptor, adaptor.getServerManagedObjectAddListener());
- }
- return Pair.empty();
- }
-
- // Deregister a delete listener.
- private <M extends Configuration> void deregisterDeleteListener(DN baseDN,
- ConfigurationDeleteListener<M> listener) {
- try {
- if (configRepository.hasEntry(baseDN)) {
- for (ConfigDeleteListener l : configRepository.getDeleteListeners(baseDN)) {
- if (l instanceof ConfigDeleteListenerAdaptor) {
- ConfigDeleteListenerAdaptor<?> adaptor = (ConfigDeleteListenerAdaptor<?>) l;
- ServerManagedObjectDeleteListener<?> l2 = adaptor.getServerManagedObjectDeleteListener();
- if (l2 instanceof ServerManagedObjectDeleteListenerAdaptor<?>) {
- ServerManagedObjectDeleteListenerAdaptor<?> adaptor2 =
- (ServerManagedObjectDeleteListenerAdaptor<?>) l2;
- if (adaptor2.getConfigurationDeleteListener() == listener) {
- configRepository.deregisterDeleteListener(baseDN, adaptor);
- }
- }
- }
- }
- } else {
- // The relation entry does not exist so check for and deregister
- // delayed add listener.
- deregisterDelayedDeleteListener(baseDN, listener);
- }
- } catch (ConfigException e) {
- // Ignore the exception since this implies deregistration.
- logger.trace("Unable to deregister delete listener", e);
- }
- }
-
- // Deregister a delete listener.
- private <M extends Configuration> void deregisterDeleteListener(DN baseDN,
- ServerManagedObjectDeleteListener<M> listener) {
- try {
- if (configRepository.hasEntry(baseDN)) {
- for (ConfigDeleteListener l : configRepository.getDeleteListeners(baseDN)) {
- if (l instanceof ConfigDeleteListenerAdaptor) {
- ConfigDeleteListenerAdaptor<?> adaptor = (ConfigDeleteListenerAdaptor<?>) l;
- if (adaptor.getServerManagedObjectDeleteListener() == listener) {
- configRepository.deregisterDeleteListener(baseDN, adaptor);
- }
- }
- }
- } else {
- // The relation entry does not exist so check for and deregister
- // delayed add listener.
- deregisterDelayedDeleteListener(baseDN, listener);
- }
- } catch (ConfigException e) {
- // Ignore the exception since this implies deregistration.
- logger.trace("Unable to deregister delete listener", e);
- }
- }
-
- // Register an instantiable or optional relation add listener.
- private void registerAddListener(DN baseDN, ConfigAddListener adaptor) throws
- ConfigException {
- if (configRepository.hasEntry(baseDN)) {
- configRepository.registerAddListener(baseDN, adaptor);
- } else {
- // The relation entry does not exist yet
- // so register a delayed add listener.
- ConfigAddListener delayedListener = new DelayedConfigAddListener(baseDN, adaptor, configRepository);
- registerDelayedListener(baseDN, delayedListener);
- }
- }
-
- // Register a delayed listener with the nearest existing parent
- // entry to the provided base DN.
- private void registerDelayedListener(DN baseDN, ConfigAddListener delayedListener) throws ConfigException {
- DN currentDN = baseDN.parent();
- DN previousDN = currentDN;
- while (currentDN != null) {
- if (!configRepository.hasEntry(currentDN)) {
- delayedListener = new DelayedConfigAddListener(currentDN, delayedListener, configRepository);
- previousDN = currentDN;
- currentDN = currentDN.parent();
- } else {
- configRepository.registerAddListener(previousDN, delayedListener);
- return;
- }
- }
-
- // No parent entry could be found.
- LocalizableMessage message = ERR_ADMIN_UNABLE_TO_REGISTER_LISTENER.get(String.valueOf(baseDN));
- throw new ConfigException(message);
- }
-
- // Deregister a delayed listener with the nearest existing parent
- // entry to the provided base DN.
- private <M extends Configuration> void deregisterDelayedAddListener(DN baseDN,
- ConfigurationAddListener<M> listener) throws ConfigException {
- DN parentDN = baseDN.parent();
- int delayWrappers = 0;
- while (parentDN != null) {
- if (!configRepository.hasEntry(parentDN)) {
- parentDN = parentDN.parent();
- delayWrappers++;
- } else {
- for (ConfigAddListener configListener : configRepository.getAddListeners(parentDN)) {
- if (configListener instanceof DelayedConfigAddListener) {
- DelayedConfigAddListener delayListener = (DelayedConfigAddListener) configListener;
- ConfigAddListener wrappedListener;
-
- int i = delayWrappers;
- for (; i > 0; i--) {
- wrappedListener = delayListener.getDelayedAddListener();
- if (wrappedListener != null && wrappedListener instanceof DelayedConfigAddListener) {
- delayListener = (DelayedConfigAddListener) configListener;
- } else {
- break;
- }
- }
-
- if (i > 0) {
- // There are not enough level of wrapping
- // so this can't be the listener we are looking for.
- continue;
- }
-
- ConfigAddListener delayedListener = delayListener.getDelayedAddListener();
-
- if (delayedListener != null && delayedListener instanceof ConfigAddListenerAdaptor) {
- ConfigAddListenerAdaptor<?> adaptor = (ConfigAddListenerAdaptor<?>) delayedListener;
- ServerManagedObjectAddListener<?> l2 = adaptor.getServerManagedObjectAddListener();
- if (l2 instanceof ServerManagedObjectAddListenerAdaptor<?>) {
- ServerManagedObjectAddListenerAdaptor<?> adaptor2 =
- (ServerManagedObjectAddListenerAdaptor<?>) l2;
- if (adaptor2.getConfigurationAddListener() == listener) {
- configRepository.deregisterAddListener(parentDN, configListener);
- }
- }
- }
- }
- }
- return;
- }
- }
- }
-
- // Deregister a delayed listener with the nearest existing parent
- // entry to the provided base DN.
- private <M extends Configuration> void deregisterDelayedDeleteListener(DN baseDN,
- ConfigurationDeleteListener<M> listener) throws ConfigException {
- DN parentDN = baseDN.parent();
- int delayWrappers = 0;
- while (parentDN != null) {
- if (!configRepository.hasEntry(parentDN)) {
- parentDN = parentDN.parent();
- delayWrappers++;
- } else {
- for (ConfigAddListener l : configRepository.getAddListeners(parentDN)) {
- if (l instanceof DelayedConfigAddListener) {
- DelayedConfigAddListener delayListener = (DelayedConfigAddListener) l;
- ConfigAddListener wrappedListener;
-
- int i = delayWrappers;
- for (; i > 0; i--) {
- wrappedListener = delayListener.getDelayedAddListener();
- if (wrappedListener != null && wrappedListener instanceof DelayedConfigAddListener) {
- delayListener = (DelayedConfigAddListener) l;
- } else {
- break;
- }
- }
-
- if (i > 0) {
- // There are not enough level of wrapping
- // so this can't be the listener we are looking for.
- continue;
- }
-
- ConfigDeleteListener delayedListener = delayListener.getDelayedDeleteListener();
-
- if (delayedListener != null && delayedListener instanceof ConfigDeleteListenerAdaptor) {
- ConfigDeleteListenerAdaptor<?> adaptor = (ConfigDeleteListenerAdaptor<?>) delayedListener;
- ServerManagedObjectDeleteListener<?> l2 = adaptor.getServerManagedObjectDeleteListener();
- if (l2 instanceof ServerManagedObjectDeleteListenerAdaptor<?>) {
- ServerManagedObjectDeleteListenerAdaptor<?> adaptor2 =
- (ServerManagedObjectDeleteListenerAdaptor<?>) l2;
- if (adaptor2.getConfigurationDeleteListener() == listener) {
- configRepository.deregisterAddListener(parentDN, l);
- }
- }
- }
- }
- }
- return;
- }
- }
- }
-
- // Deregister a delayed listener with the nearest existing parent
- // entry to the provided base DN.
- private <M extends Configuration> void deregisterDelayedAddListener(DN baseDN,
- ServerManagedObjectAddListener<M> listener) throws ConfigException {
- DN parentDN = baseDN.parent();
- int delayWrappers = 0;
- while (parentDN != null) {
- if (!configRepository.hasEntry(parentDN)) {
- parentDN = parentDN.parent();
- delayWrappers++;
- } else {
- for (ConfigAddListener configListener : configRepository.getAddListeners(parentDN)) {
- if (configListener instanceof DelayedConfigAddListener) {
- DelayedConfigAddListener delayListener = (DelayedConfigAddListener) configListener;
- ConfigAddListener wrappedListener;
-
- int i = delayWrappers;
- for (; i > 0; i--) {
- wrappedListener = delayListener.getDelayedAddListener();
- if (wrappedListener != null && wrappedListener instanceof DelayedConfigAddListener) {
- delayListener = (DelayedConfigAddListener) configListener;
- } else {
- break;
- }
- }
-
- if (i > 0) {
- // There are not enough level of wrapping
- // so this can't be the listener we are looking for.
- continue;
- }
-
- ConfigAddListener delayedListener = delayListener.getDelayedAddListener();
-
- if (delayedListener != null && delayedListener instanceof ConfigAddListenerAdaptor) {
- ConfigAddListenerAdaptor<?> adaptor = (ConfigAddListenerAdaptor<?>) delayedListener;
- if (adaptor.getServerManagedObjectAddListener() == listener) {
- configRepository.deregisterAddListener(parentDN, configListener);
- }
- }
- }
- }
- return;
- }
- }
- }
-
- // Deregister a delayed listener with the nearest existing parent
- // entry to the provided base DN.
- private <M extends Configuration> void deregisterDelayedDeleteListener(DN baseDN,
- ServerManagedObjectDeleteListener<M> listener) throws ConfigException {
- DN parentDN = baseDN.parent();
- int delayWrappers = 0;
- while (parentDN != null) {
- if (!configRepository.hasEntry(parentDN)) {
- parentDN = parentDN.parent();
- delayWrappers++;
- } else {
- for (ConfigAddListener configListener : configRepository.getAddListeners(parentDN)) {
- if (configListener instanceof DelayedConfigAddListener) {
- DelayedConfigAddListener delayListener = (DelayedConfigAddListener) configListener;
- ConfigAddListener wrappedListener;
-
- int i = delayWrappers;
- for (; i > 0; i--) {
- wrappedListener = delayListener.getDelayedAddListener();
- if (wrappedListener != null && wrappedListener instanceof DelayedConfigAddListener) {
- delayListener = (DelayedConfigAddListener) configListener;
- } else {
- break;
- }
- }
-
- if (i > 0) {
- // There are not enough level of wrapping
- // so this can't be the listener we are looking for.
- continue;
- }
-
- ConfigDeleteListener delayedListener = delayListener.getDelayedDeleteListener();
-
- if (delayedListener != null && delayedListener instanceof ConfigDeleteListenerAdaptor) {
- ConfigDeleteListenerAdaptor<?> adaptor = (ConfigDeleteListenerAdaptor<?>) delayedListener;
- if (adaptor.getServerManagedObjectDeleteListener() == listener) {
- configRepository.deregisterAddListener(parentDN, configListener);
- }
- }
- }
- }
- return;
- }
- }
- }
-
- // Register an instantiable or optional relation delete listener.
- private void registerDeleteListener(DN baseDN, ConfigDeleteListener adaptor) throws ConfigException {
- if (configRepository.hasEntry(baseDN)) {
- configRepository.registerDeleteListener(baseDN, adaptor);
- } else {
- // The relation entry does not exist yet
- // so register a delayed add listener.
- ConfigAddListener delayedListener = new DelayedConfigAddListener(baseDN, adaptor, configRepository);
- registerDelayedListener(baseDN, delayedListener);
- }
- }
-
- // Validate that a relation definition belongs to this managed
- // object.
- private void validateRelationDefinition(RelationDefinition<?, ?> rd) {
- RelationDefinition<?, ?> tmp = definition.getRelationDefinition(rd.getName());
- if (tmp != rd) {
- throw new IllegalArgumentException("The relation " + rd.getName() + " is not associated with a "
- + definition.getName());
- }
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListener.java b/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListener.java
deleted file mode 100644
index 7946502..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListener.java
+++ /dev/null
@@ -1,69 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-import java.util.List;
-
-import org.opends.server.admin.Configuration;
-
-/**
- * This interface defines the methods that a Directory Server configurable
- * component should implement if it wishes to be able to receive notifications
- * when a new server managed object is added.
- *
- * @param <T>
- * The type of server managed object that this listener should be
- * notified about.
- */
-public interface ServerManagedObjectAddListener<T extends Configuration> {
-
- /**
- * Indicates whether the proposed addition of a new server managed object is
- * acceptable to this add listener.
- *
- * @param mo
- * The server managed object that will be added.
- * @param unacceptableReasons
- * A list that can be used to hold messages about why the
- * provided server managed object is not acceptable.
- * @return Returns <code>true</code> if the proposed addition is acceptable,
- * or <code>false</code> if it is not.
- */
- public boolean isConfigurationAddAcceptable(ServerManagedObject<? extends T> mo,
- List<LocalizableMessage> unacceptableReasons);
-
- /**
- * Adds a new server managed object to this add listener.
- *
- * @param mo
- * The server managed object that will be added.
- * @return Returns information about the result of adding the server managed
- * object.
- */
- public ConfigChangeResult applyConfigurationAdd(ServerManagedObject<? extends T> mo);
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListenerAdaptor.java b/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListenerAdaptor.java
deleted file mode 100644
index a53a8d7..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListenerAdaptor.java
+++ /dev/null
@@ -1,82 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import java.util.List;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.admin.Configuration;
-
-/**
- * An adaptor class which converts {@link ServerManagedObjectAddListener}
- * callbacks to {@link ConfigurationAddListener} callbacks.
- *
- * @param <T>
- * The type of server managed object that this listener should be
- * notified about.
- */
-final class ServerManagedObjectAddListenerAdaptor<T extends Configuration> implements
- ServerManagedObjectAddListener<T> {
-
- // The underlying add listener.
- private final ConfigurationAddListener<T> listener;
-
- /**
- * Creates a new server managed object add listener adaptor.
- *
- * @param listener
- * The underlying add listener.
- */
- public ServerManagedObjectAddListenerAdaptor(ConfigurationAddListener<T> listener) {
- this.listener = listener;
- }
-
- /**
- * {@inheritDoc}
- */
- public ConfigChangeResult applyConfigurationAdd(ServerManagedObject<? extends T> mo) {
- return listener.applyConfigurationAdd(mo.getConfiguration());
- }
-
- /**
- * Gets the configuration add listener associated with this adaptor.
- *
- * @return Returns the configuration add listener associated with this
- * adaptor.
- */
- public ConfigurationAddListener<T> getConfigurationAddListener() {
- return listener;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isConfigurationAddAcceptable(ServerManagedObject<? extends T> mo,
- List<LocalizableMessage> unacceptableReasons) {
- return listener.isConfigurationAddAcceptable(mo.getConfiguration(), unacceptableReasons);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListener.java b/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListener.java
deleted file mode 100644
index 3150907..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListener.java
+++ /dev/null
@@ -1,69 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-import java.util.List;
-
-import org.opends.server.admin.Configuration;
-
-/**
- * This interface defines the methods that a Directory Server configurable
- * component should implement if it wishes to be able to receive notifications
- * when a its associated server managed object is changed.
- *
- * @param <T>
- * The type of server managed object that this listener should be
- * notified about.
- */
-public interface ServerManagedObjectChangeListener<T extends Configuration> {
-
- /**
- * Indicates whether the proposed change to the server managed object is
- * acceptable to this change listener.
- *
- * @param mo
- * The new server managed object containing the changes.
- * @param unacceptableReasons
- * A list that can be used to hold messages about why the
- * provided server managed object is not acceptable.
- * @return Returns <code>true</code> if the proposed change is acceptable,
- * or <code>false</code> if it is not.
- */
- public boolean isConfigurationChangeAcceptable(ServerManagedObject<? extends T> mo,
- List<LocalizableMessage> unacceptableReasons);
-
- /**
- * Applies the server managed object changes to this change listener.
- *
- * @param mo
- * The new server managed object containing the changes.
- * @return Returns information about the result of changing the server
- * managed object.
- */
- public ConfigChangeResult applyConfigurationChange(ServerManagedObject<? extends T> mo);
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListenerAdaptor.java b/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListenerAdaptor.java
deleted file mode 100644
index 6e9b962..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListenerAdaptor.java
+++ /dev/null
@@ -1,84 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import java.util.List;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.admin.Configuration;
-
-/**
- * An adaptor class which converts {@link ServerManagedObjectChangeListener}
- * callbacks to {@link ConfigurationChangeListener} callbacks.
- *
- * @param <T>
- * The type of server managed object that this listener should be
- * notified about.
- */
-final class ServerManagedObjectChangeListenerAdaptor<T extends Configuration> implements
- ServerManagedObjectChangeListener<T> {
-
- // The underlying change listener.
- private final ConfigurationChangeListener<? super T> listener;
-
- /**
- * Creates a new server managed object change listener adaptor.
- *
- * @param listener
- * The underlying change listener.
- */
- public ServerManagedObjectChangeListenerAdaptor(ConfigurationChangeListener<? super T> listener) {
- this.listener = listener;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public ConfigChangeResult applyConfigurationChange(ServerManagedObject<? extends T> mo) {
- return listener.applyConfigurationChange(mo.getConfiguration());
- }
-
- /**
- * Gets the configuration change listener associated with this adaptor.
- *
- * @return Returns the configuration change listener associated with this
- * adaptor.
- */
- public ConfigurationChangeListener<? super T> getConfigurationChangeListener() {
- return listener;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isConfigurationChangeAcceptable(ServerManagedObject<? extends T> mo,
- List<LocalizableMessage> unacceptableReasons) {
- return listener.isConfigurationChangeAcceptable(mo.getConfiguration(), unacceptableReasons);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectDecodingException.java b/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectDecodingException.java
deleted file mode 100644
index 66f4dd3..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectDecodingException.java
+++ /dev/null
@@ -1,128 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin.server;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedList;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.util.Reject;
-import org.opends.server.admin.DecodingException;
-import org.opends.server.admin.ManagedObjectDefinition;
-import org.opends.server.admin.PropertyException;
-
-/**
- * The requested server managed object was found but one or more of its
- * properties could not be decoded successfully.
- */
-public class ServerManagedObjectDecodingException extends DecodingException {
-
- /**
- * Version ID required by serializable classes.
- */
- private static final long serialVersionUID = 1598401431084729853L;
-
- // Create the message.
- private static LocalizableMessage createMessage(ServerManagedObject<?> partialManagedObject,
- Collection<PropertyException> causes) {
- Reject.ifNull(causes);
- Reject.ifFalse(!causes.isEmpty(), "causes should nnot be empty");
-
- ManagedObjectDefinition<?, ?> d = partialManagedObject.getManagedObjectDefinition();
- if (causes.size() == 1) {
- return ERR_MANAGED_OBJECT_DECODING_EXCEPTION_SINGLE.get(d.getUserFriendlyName(), causes.iterator().next()
- .getLocalizableMessageObject());
- } else {
- LocalizableMessageBuilder builder = new LocalizableMessageBuilder();
-
- boolean isFirst = true;
- for (PropertyException cause : causes) {
- if (!isFirst) {
- builder.append("; ");
- }
- builder.append(cause.getLocalizableMessageObject());
- isFirst = false;
- }
-
- return ERR_MANAGED_OBJECT_DECODING_EXCEPTION_PLURAL.get(d.getUserFriendlyName(), builder.toMessage());
- }
- }
-
- // The exception(s) that caused this decoding exception.
- private final Collection<PropertyException> causes;
-
- // The partially created server managed object.
- private final ServerManagedObject<?> partialManagedObject;
-
- /**
- * Create a new property decoding exception.
- *
- * @param partialManagedObject
- * The partially created server managed object containing
- * properties which were successfully decoded and empty
- * properties for those which were not (this may include empty
- * mandatory properties).
- * @param causes
- * The exception(s) that caused this decoding exception.
- */
- public ServerManagedObjectDecodingException(ServerManagedObject<?> partialManagedObject,
- Collection<PropertyException> causes) {
- super(createMessage(partialManagedObject, causes));
-
- this.partialManagedObject = partialManagedObject;
- this.causes = Collections.unmodifiableList(new LinkedList<PropertyException>(causes));
- }
-
- /**
- * Get an unmodifiable collection view of the causes of this exception.
- *
- * @return Returns an unmodifiable collection view of the causes of this
- * exception.
- */
- public Collection<PropertyException> getCauses() {
- return causes;
- }
-
- /**
- * Get the partially created server managed object containing properties
- * which were successfully decoded and empty properties for those which were
- * not (this may include empty mandatory properties).
- *
- * @return Returns the partially created server managed object containing
- * properties which were successfully decoded and empty properties
- * for those which were not (this may include empty mandatory
- * properties).
- */
- public ServerManagedObject<?> getPartialManagedObject() {
- return partialManagedObject;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListener.java b/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListener.java
deleted file mode 100644
index 9ce7c52..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListener.java
+++ /dev/null
@@ -1,69 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import org.forgerock.i18n.LocalizableMessage;
-
-import java.util.List;
-
-import org.opends.server.admin.Configuration;
-
-/**
- * This interface defines the methods that a Directory Server configurable
- * component should implement if it wishes to be able to receive notifications
- * when an existing server managed object is deleted.
- *
- * @param <T>
- * The type of server managed object that this listener should be
- * notified about.
- */
-public interface ServerManagedObjectDeleteListener<T extends Configuration> {
-
- /**
- * Indicates whether the proposed deletion of an existing server managed
- * object is acceptable to this delete listener.
- *
- * @param mo
- * The server managed object that will be deleted.
- * @param unacceptableReasons
- * A list that can be used to hold messages about why the
- * provided server managed object is not acceptable.
- * @return Returns <code>true</code> if the proposed deletion is acceptable,
- * or <code>false</code> if it is not.
- */
- public boolean isConfigurationDeleteAcceptable(ServerManagedObject<? extends T> mo,
- List<LocalizableMessage> unacceptableReasons);
-
- /**
- * Deletes an existing server managed object from this delete listener.
- *
- * @param mo
- * The existing server managed object that will be deleted.
- * @return Returns information about the result of deleting the server
- * managed object.
- */
- public ConfigChangeResult applyConfigurationDelete(ServerManagedObject<? extends T> mo);
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListenerAdaptor.java b/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListenerAdaptor.java
deleted file mode 100644
index 3f66381..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListenerAdaptor.java
+++ /dev/null
@@ -1,82 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import java.util.List;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.admin.Configuration;
-
-/**
- * An adaptor class which converts {@link ServerManagedObjectDeleteListener}
- * callbacks to {@link ConfigurationDeleteListener} callbacks.
- *
- * @param <T>
- * The type of server managed object that this listener should be
- * notified about.
- */
-final class ServerManagedObjectDeleteListenerAdaptor<T extends Configuration> implements
- ServerManagedObjectDeleteListener<T> {
-
- // The underlying delete listener.
- private final ConfigurationDeleteListener<T> listener;
-
- /**
- * Creates a new server managed object delete listener adaptor.
- *
- * @param listener
- * The underlying delete listener.
- */
- public ServerManagedObjectDeleteListenerAdaptor(ConfigurationDeleteListener<T> listener) {
- this.listener = listener;
- }
-
- /**
- * {@inheritDoc}
- */
- public ConfigChangeResult applyConfigurationDelete(ServerManagedObject<? extends T> mo) {
- return listener.applyConfigurationDelete(mo.getConfiguration());
- }
-
- /**
- * Gets the configuration delete listener associated with this adaptor.
- *
- * @return Returns the configuration delete listener associated with this
- * adaptor.
- */
- public ConfigurationDeleteListener<T> getConfigurationDeleteListener() {
- return listener;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isConfigurationDeleteAcceptable(ServerManagedObject<? extends T> mo,
- List<LocalizableMessage> unacceptableReasons) {
- return listener.isConfigurationDeleteAcceptable(mo.getConfiguration(), unacceptableReasons);
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagementContext.java b/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagementContext.java
deleted file mode 100644
index 793d472..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/ServerManagementContext.java
+++ /dev/null
@@ -1,846 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin.server;
-
-import static com.forgerock.opendj.ldap.AdminMessages.*;
-import static com.forgerock.opendj.util.StaticUtils.*;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.AggregationPropertyDefinition;
-import org.opends.server.admin.AliasDefaultBehaviorProvider;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.ConfigurationClient;
-import org.opends.server.admin.DefaultBehaviorException;
-import org.opends.server.admin.DefaultBehaviorProviderVisitor;
-import org.opends.server.admin.DefinedDefaultBehaviorProvider;
-import org.opends.server.admin.DefinitionDecodingException;
-import org.opends.server.admin.DefinitionResolver;
-import org.opends.server.admin.IllegalPropertyValueException;
-import org.opends.server.admin.IllegalPropertyValueStringException;
-import org.opends.server.admin.LDAPProfile;
-import org.opends.server.admin.ManagedObjectDefinition;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.PropertyDefinitionVisitor;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.PropertyException;
-import org.opends.server.admin.PropertyIsMandatoryException;
-import org.opends.server.admin.PropertyIsSingleValuedException;
-import org.opends.server.admin.PropertyNotFoundException;
-import org.opends.server.admin.PropertyOption;
-import org.opends.server.admin.Reference;
-import org.opends.server.admin.RelationDefinition;
-import org.opends.server.admin.RelativeInheritedDefaultBehaviorProvider;
-import org.opends.server.admin.UndefinedDefaultBehaviorProvider;
-import org.opends.server.admin.DefinitionDecodingException.Reason;
-import org.opends.server.config.spi.ConfigException;
-import org.opends.server.config.spi.ConfigurationRepository;
-import org.opends.server.core.DirectoryServer;
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.admin.server.RootCfg;
-import org.forgerock.opendj.ldap.Attribute;
-import org.forgerock.opendj.ldap.AttributeDescription;
-import org.forgerock.opendj.ldap.ByteString;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.Entry;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.opends.server.util.DynamicConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Server management connection context.
- */
-public final class ServerManagementContext {
-
- /**
- * A default behavior visitor used for retrieving the default values of a
- * property.
- *
- * @param <T>
- * The type of the property.
- */
- private final class DefaultValueFinder<T> implements DefaultBehaviorProviderVisitor<T, Collection<T>, Void> {
-
- // Any exception that occurred whilst retrieving inherited default
- // values.
- private DefaultBehaviorException exception = null;
-
- // Optional new configuration entry which does not yet exist in
- // the configuration back-end.
- private final Entry newConfigEntry;
-
- // The path of the managed object containing the next property.
- private ManagedObjectPath<?, ?> nextPath = null;
-
- // The next property whose default values were required.
- private PropertyDefinition<T> nextProperty = null;
-
- // Private constructor.
- private DefaultValueFinder(Entry newConfigEntry) {
- this.newConfigEntry = newConfigEntry;
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<T> visitAbsoluteInherited(AbsoluteInheritedDefaultBehaviorProvider<T> d, Void p) {
- try {
- return getInheritedProperty(d.getManagedObjectPath(), d.getManagedObjectDefinition(),
- d.getPropertyName());
- } catch (DefaultBehaviorException e) {
- exception = e;
- return Collections.emptySet();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<T> visitAlias(AliasDefaultBehaviorProvider<T> d, Void p) {
- return Collections.emptySet();
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<T> visitDefined(DefinedDefaultBehaviorProvider<T> d, Void p) {
- Collection<String> stringValues = d.getDefaultValues();
- List<T> values = new ArrayList<T>(stringValues.size());
-
- for (String stringValue : stringValues) {
- try {
- values.add(nextProperty.decodeValue(stringValue, propertyDefOptions));
- } catch (IllegalPropertyValueStringException e) {
- exception = new DefaultBehaviorException(nextProperty, e);
- break;
- }
- }
-
- return values;
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<T> visitRelativeInherited(RelativeInheritedDefaultBehaviorProvider<T> d, Void p) {
- try {
- return getInheritedProperty(d.getManagedObjectPath(nextPath), d.getManagedObjectDefinition(),
- d.getPropertyName());
- } catch (DefaultBehaviorException e) {
- exception = e;
- return Collections.emptySet();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<T> visitUndefined(UndefinedDefaultBehaviorProvider<T> d, Void p) {
- return Collections.emptySet();
- }
-
- // Find the default values for the next path/property.
- private Collection<T> find(ManagedObjectPath<?, ?> path, PropertyDefinition<T> propertyDef) {
- nextPath = path;
- nextProperty = propertyDef;
-
- Collection<T> values = nextProperty.getDefaultBehaviorProvider().accept(this, null);
-
- if (exception != null) {
- throw exception;
- }
-
- if (values.size() > 1 && !propertyDef.hasOption(PropertyOption.MULTI_VALUED)) {
- throw new DefaultBehaviorException(propertyDef, new PropertyIsSingleValuedException(propertyDef));
- }
-
- return values;
- }
-
- // Get an inherited property value.
- @SuppressWarnings("unchecked")
- private Collection<T> getInheritedProperty(ManagedObjectPath<?, ?> target,
- AbstractManagedObjectDefinition<?, ?> definition, String propertyName) {
- // First check that the requested type of managed object
- // corresponds to the path.
- AbstractManagedObjectDefinition<?, ?> supr = target.getManagedObjectDefinition();
- if (!supr.isParentOf(definition)) {
- throw new DefaultBehaviorException(nextProperty, new DefinitionDecodingException(supr,
- Reason.WRONG_TYPE_INFORMATION));
- }
-
- // Save the current property in case of recursion.
- PropertyDefinition<T> propDef1 = nextProperty;
-
- try {
- // Get the actual managed object definition.
- DN dn = DNBuilder.create(target);
- Entry configEntry;
- if (newConfigEntry != null && newConfigEntry.getName().equals(dn)) {
- configEntry = newConfigEntry;
- } else {
- configEntry = getManagedObjectConfigEntry(dn);
- }
-
- DefinitionResolver resolver = new MyDefinitionResolver(configEntry);
- ManagedObjectDefinition<?, ?> mod = definition.resolveManagedObjectDefinition(resolver);
-
- PropertyDefinition<T> propDef2;
- try {
- PropertyDefinition<?> propDefTmp = mod.getPropertyDefinition(propertyName);
- propDef2 = propDef1.getClass().cast(propDefTmp);
- } catch (IllegalArgumentException e) {
- throw new PropertyNotFoundException(propertyName);
- } catch (ClassCastException e) {
- // FIXME: would be nice to throw a better exception here.
- throw new PropertyNotFoundException(propertyName);
- }
-
- List<String> attributeValues = getAttributeValues(mod, propDef2, configEntry);
- if (attributeValues.size() > 0) {
- Collection<T> pvalues = new ArrayList<T>();
- for (String value : attributeValues) {
- pvalues.add(ValueDecoder.decode(propDef1, value, propertyDefOptions));
- }
- return pvalues;
- } else {
- // Recursively retrieve this property's default values.
- Collection<T> tmp = find(target, propDef2);
- Collection<T> pvalues = new ArrayList<T>(tmp.size());
- for (T value : tmp) {
- propDef1.validateValue(value, propertyDefOptions);
- pvalues.add(value);
- }
- return pvalues;
- }
- } catch (DefinitionDecodingException e) {
- throw new DefaultBehaviorException(propDef1, e);
- } catch (PropertyNotFoundException e) {
- throw new DefaultBehaviorException(propDef1, e);
- } catch (IllegalPropertyValueException e) {
- throw new DefaultBehaviorException(propDef1, e);
- } catch (IllegalPropertyValueStringException e) {
- throw new DefaultBehaviorException(propDef1, e);
- } catch (ConfigException e) {
- throw new DefaultBehaviorException(propDef1, e);
- }
- }
- }
-
- /**
- * A definition resolver that determines the managed object definition from
- * the object classes of a ConfigEntry.
- */
- private final class MyDefinitionResolver implements DefinitionResolver {
-
- // The config entry.
- private final Entry entry;
-
- // Private constructor.
- private MyDefinitionResolver(Entry entry) {
- this.entry = entry;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean matches(AbstractManagedObjectDefinition<?, ?> d) {
- String oc = LDAPProfile.getInstance().getObjectClass(d);
- // TODO : use the schema to get object class and check it in the entry
- // Commented because reject any config entry without proper schema loading
- // Previous code was
-// ObjectClass oc = DirectoryServer.getObjectClass(name.toLowerCase());
-// if (oc == null) {
-// oc = DirectoryServer.getDefaultObjectClass(name);
-// }
-// return Entries.containsObjectClass(entry, oc);
- return entry.containsAttribute("objectClass", oc);
- }
- }
-
- /**
- * A visitor which is used to decode property LDAP values.
- */
- private static final class ValueDecoder extends PropertyDefinitionVisitor<Object, String> {
-
- private final PropertyDefinitionsOptions options;
-
- /**
- * Decodes the provided property LDAP value.
- *
- * @param <P>
- * The type of the property.
- * @param propertyDef
- * The property definition.
- * @param value
- * The LDAP string representation.
- * @param options
- * Options to decode property definitions values.
- * @return Returns the decoded LDAP value.
- * @throws IllegalPropertyValueStringException
- * If the property value could not be decoded because it was
- * invalid.
- */
- public static <P> P decode(PropertyDefinition<P> propertyDef, String value,
- PropertyDefinitionsOptions options) {
- return propertyDef.castValue(propertyDef.accept(new ValueDecoder(options), value));
- }
-
- // Prevent instantiation.
- private ValueDecoder(PropertyDefinitionsOptions options) {
- this.options = options;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <C extends ConfigurationClient, S extends Configuration> Object visitAggregation(
- AggregationPropertyDefinition<C, S> d, String p) {
- // Aggregations values are stored as full DNs in LDAP, but
- // just their common name is exposed in the admin framework.
- try {
- Reference<C, S> reference = Reference.parseDN(d.getParentPath(), d.getRelationDefinition(), p);
- return reference.getName();
- } catch (IllegalArgumentException e) {
- throw new IllegalPropertyValueStringException(d, p);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <T> Object visitUnknown(PropertyDefinition<T> d, String p) {
- // By default the property definition's decoder will do.
- return d.decodeValue(p, options);
- }
- }
-
- private static final Logger debugLogger = LoggerFactory.getLogger(ServerManagementContext.class);
-
- /**
- * The root server managed object, lazily initialized.
- */
- private volatile ServerManagedObject<RootCfg> root;
-
- /** Repository of configuration entries. */
- private final ConfigurationRepository configRepository;
-
- /**
- * Options to use when decoding and validating values of property
- * definitions.
- */
- private final PropertyDefinitionsOptions propertyDefOptions;
-
- /**
- * Creates a context from the provided configuration repository.
- *
- * @param repository
- * The repository of configuration entries.
- * @param propertyDefOptions
- * Options to use when decoding and validating values
- * of property definitions.
- */
- ServerManagementContext(ConfigurationRepository repository, PropertyDefinitionsOptions propertyDefOptions) {
- configRepository = repository;
- this.propertyDefOptions = propertyDefOptions;
- }
-
- /**
- * Gets the named managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the path
- * definition refers to.
- * @param <S>
- * The type of server managed object configuration that the path
- * definition refers to.
- * @param path
- * The path of the managed object.
- * @return Returns the named managed object.
- * @throws ConfigException
- * If the named managed object could not be found or if it could
- * not be decoded.
- */
- @SuppressWarnings("unchecked")
- public <C extends ConfigurationClient, S extends Configuration> ServerManagedObject<? extends S> getManagedObject(
- ManagedObjectPath<C, S> path) throws ConfigException {
- // Be careful to handle the root configuration.
- if (path.isEmpty()) {
- return (ServerManagedObject<S>) getRootConfigurationManagedObject();
- }
-
- // Get the configuration entry.
- DN targetDN = DNBuilder.create(path);
- Entry configEntry = getManagedObjectConfigEntry(targetDN);
- try {
- ServerManagedObject<? extends S> managedObject;
- managedObject = decode(path, configEntry);
-
- // Enforce any constraints.
- managedObject.ensureIsUsable();
-
- return managedObject;
- } catch (DefinitionDecodingException e) {
- throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(targetDN, e);
- } catch (ServerManagedObjectDecodingException e) {
- throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(e);
- } catch (ConstraintViolationException e) {
- throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(e);
- }
- }
-
- /**
- * Gets the effective value of a property in the named managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the path
- * definition refers to.
- * @param <S>
- * The type of server managed object configuration that the path
- * definition refers to.
- * @param <P>
- * The type of the property to be retrieved.
- * @param path
- * The path of the managed object containing the property.
- * @param pd
- * The property to be retrieved.
- * @return Returns the property's effective value, or <code>null</code> if
- * there are no values defined.
- * @throws IllegalArgumentException
- * If the property definition is not associated with the
- * referenced managed object's definition.
- * @throws PropertyException
- * If the managed object was found but the requested property
- * could not be decoded.
- * @throws ConfigException
- * If the named managed object could not be found or if it could
- * not be decoded.
- */
- public <C extends ConfigurationClient, S extends Configuration, P> P getPropertyValue(
- ManagedObjectPath<C, S> path, PropertyDefinition<P> pd) throws ConfigException {
- SortedSet<P> values = getPropertyValues(path, pd);
- if (values.isEmpty()) {
- return null;
- } else {
- return values.first();
- }
- }
-
- /**
- * Gets the effective values of a property in the named managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the path
- * definition refers to.
- * @param <S>
- * The type of server managed object configuration that the path
- * definition refers to.
- * @param <P>
- * The type of the property to be retrieved.
- * @param path
- * The path of the managed object containing the property.
- * @param propertyDef
- * The property to be retrieved.
- * @return Returns the property's effective values, or an empty set if there
- * are no values defined.
- * @throws IllegalArgumentException
- * If the property definition is not associated with the
- * referenced managed object's definition.
- * @throws PropertyException
- * If the managed object was found but the requested property
- * could not be decoded.
- * @throws ConfigException
- * If the named managed object could not be found or if it could
- * not be decoded.
- */
- @SuppressWarnings("unchecked")
- public <C extends ConfigurationClient, S extends Configuration, P> SortedSet<P> getPropertyValues(
- ManagedObjectPath<C, S> path, PropertyDefinition<P> propertyDef) throws ConfigException {
- // Check that the requested property is from the definition
- // associated with the path.
- AbstractManagedObjectDefinition<C, S> definition = path.getManagedObjectDefinition();
- PropertyDefinition<?> tmpPropertyDef = definition.getPropertyDefinition(propertyDef.getName());
- if (tmpPropertyDef != propertyDef) {
- throw new IllegalArgumentException("The property " + propertyDef.getName() + " is not associated with a "
- + definition.getName());
- }
-
- // Determine the exact type of managed object referenced by the
- // path.
- DN dn = DNBuilder.create(path);
- Entry configEntry = getManagedObjectConfigEntry(dn);
-
- DefinitionResolver resolver = new MyDefinitionResolver(configEntry);
- ManagedObjectDefinition<? extends C, ? extends S> managedObjDef;
-
- try {
- managedObjDef = definition.resolveManagedObjectDefinition(resolver);
- } catch (DefinitionDecodingException e) {
- throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(dn, e);
- }
-
- // Make sure we use the correct property definition, the
- // provided one might have been overridden in the resolved
- // definition.
- propertyDef = (PropertyDefinition<P>) managedObjDef.getPropertyDefinition(propertyDef.getName());
-
- List<String> attributeValues = getAttributeValues(managedObjDef, propertyDef, configEntry);
- return decodeProperty(path.asSubType(managedObjDef), propertyDef, attributeValues, null);
- }
-
- /**
- * Get the root configuration manager associated with this management
- * context.
- *
- * @return the root configuration manager associated with this
- * management context.
- */
- public RootCfg getRootConfiguration() {
- return getRootConfigurationManagedObject().getConfiguration();
- }
-
- /**
- * Get the root configuration server managed object associated with this
- * management context.
- *
- * @return the root configuration server managed object
- */
- public ServerManagedObject<RootCfg> getRootConfigurationManagedObject() {
- // Use lazy initialisation
- // because it needs a reference to this server context.
- ServerManagedObject<RootCfg> rootObject = root;
- if (rootObject == null) {
- synchronized (this) {
- rootObject = root;
- if (rootObject == null) {
- root = rootObject =
- new ServerManagedObject<RootCfg>(ManagedObjectPath.emptyPath(),
- RootCfgDefn.getInstance(), Collections.<PropertyDefinition<?>,
- SortedSet<?>> emptyMap(), null, this);
- }
- }
- }
- return rootObject;
- }
-
- /**
- * Lists the child managed objects of the named parent managed object.
- *
- * @param <C>
- * The type of client managed object configuration that the
- * relation definition refers to.
- * @param <S>
- * The type of server managed object configuration that the
- * relation definition refers to.
- * @param parent
- * The path of the parent managed object.
- * @param relationDef
- * The relation definition.
- * @return Returns the names of the child managed objects.
- * @throws IllegalArgumentException
- * If the relation definition is not associated with the parent
- * managed object's definition.
- */
- public <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects(
- ManagedObjectPath<?, ?> parent, RelationDefinition<C, S> relationDef) {
- validateRelationDefinition(parent, relationDef);
-
- // Get the target entry.
- DN targetDN = DNBuilder.create(parent, relationDef);
- Set<DN> children;
- try {
- children = configRepository.getChildren(targetDN);
- } catch (ConfigException e) {
- return new String[0];
- }
- List<String> names = new ArrayList<String>(children.size());
- for (DN child : children) {
- // Assume that RDNs are single-valued and can be trimmed.
- String name = child.rdn().getFirstAVA().getAttributeValue().toString().trim();
- names.add(name);
- }
-
- return names.toArray(new String[names.size()]);
- }
-
- /**
- * Determines whether or not the named managed object exists.
- *
- * @param path
- * The path of the named managed object.
- * @return Returns <code>true</code> if the named managed object exists,
- * <code>false</code> otherwise.
- */
- public boolean managedObjectExists(ManagedObjectPath<?, ?> path) {
- // Get the configuration entry.
- DN targetDN = DNBuilder.create(path);
- try {
- return (getManagedObjectConfigEntry(targetDN) != null);
- } catch (ConfigException e) {
- // Assume it doesn't exist.
- return false;
- }
- }
-
- /**
- * Decodes a configuration entry into the required type of server managed
- * object.
- *
- * @param <C>
- * The type of client managed object configuration that the path
- * definition refers to.
- * @param <S>
- * The type of server managed object configuration that the path
- * definition refers to.
- * @param path
- * The location of the server managed object.
- * @param configEntry
- * The configuration entry that should be decoded.
- * @return Returns the new server-side managed object from the provided
- * definition and configuration entry.
- * @throws DefinitionDecodingException
- * If the managed object's type could not be determined.
- * @throws ServerManagedObjectDecodingException
- * If one or more of the managed object's properties could not
- * be decoded.
- */
- <C extends ConfigurationClient, S extends Configuration> ServerManagedObject<? extends S> decode(
- ManagedObjectPath<C, S> path, Entry configEntry) throws DefinitionDecodingException,
- ServerManagedObjectDecodingException {
- return decode(path, configEntry, null);
- }
-
- /**
- * Decodes a configuration entry into the required type of server managed
- * object.
- *
- * @param <C>
- * The type of client managed object configuration that the path
- * definition refers to.
- * @param <S>
- * The type of server managed object configuration that the path
- * definition refers to.
- * @param path
- * The location of the server managed object.
- * @param configEntry
- * The configuration entry that should be decoded.
- * @param newConfigEntry
- * Optional new configuration that does not exist yet in the
- * configuration back-end. This will be used for resolving
- * inherited default values.
- * @return Returns the new server-side managed object from the provided
- * definition and configuration entry.
- * @throws DefinitionDecodingException
- * If the managed object's type could not be determined.
- * @throws ServerManagedObjectDecodingException
- * If one or more of the managed object's properties could not
- * be decoded.
- */
- <C extends ConfigurationClient, S extends Configuration> ServerManagedObject<? extends S> decode(
- ManagedObjectPath<C, S> path, Entry configEntry, Entry newConfigEntry)
- throws DefinitionDecodingException, ServerManagedObjectDecodingException {
- // First determine the correct definition to use for the entry.
- // This could either be the provided definition, or one of its
- // sub-definitions.
- DefinitionResolver resolver = new MyDefinitionResolver(configEntry);
- AbstractManagedObjectDefinition<C, S> d = path.getManagedObjectDefinition();
- ManagedObjectDefinition<? extends C, ? extends S> mod = d.resolveManagedObjectDefinition(resolver);
-
- // Build the managed object's properties.
- List<PropertyException> exceptions = new LinkedList<PropertyException>();
- Map<PropertyDefinition<?>, SortedSet<?>> properties = new HashMap<PropertyDefinition<?>, SortedSet<?>>();
- for (PropertyDefinition<?> propertyDef : mod.getAllPropertyDefinitions()) {
- List<String> attributeValues = getAttributeValues(mod, propertyDef, configEntry);
- try {
- SortedSet<?> pvalues = decodeProperty(path, propertyDef, attributeValues, newConfigEntry);
- properties.put(propertyDef, pvalues);
- } catch (PropertyException e) {
- exceptions.add(e);
- }
- }
-
- // If there were no decoding problems then return the managed
- // object, otherwise throw an operations exception.
- ServerManagedObject<? extends S> managedObject = decodeAux(path, mod, properties, configEntry.getName());
- if (exceptions.isEmpty()) {
- return managedObject;
- } else {
- throw new ServerManagedObjectDecodingException(managedObject, exceptions);
- }
- }
-
- // Decode helper method required to avoid generics warning.
- private <C extends ConfigurationClient, S extends Configuration> ServerManagedObject<S> decodeAux(
- ManagedObjectPath<? super C, ? super S> path, ManagedObjectDefinition<C, S> d,
- Map<PropertyDefinition<?>, SortedSet<?>> properties, DN configDN) {
- ManagedObjectPath<C, S> newPath = path.asSubType(d);
- return new ServerManagedObject<S>(newPath, d, properties, configDN, this);
- }
-
- /** Decode a property using the provided attribute values. */
- private <T> SortedSet<T> decodeProperty(ManagedObjectPath<?, ?> path, PropertyDefinition<T> propertyDef,
- List<String> attributeValues, Entry newConfigEntry) {
- PropertyException exception = null;
- SortedSet<T> pvalues = new TreeSet<T>(propertyDef);
-
- if (attributeValues.size() > 0) {
- // The property has values defined for it.
- for (String value : attributeValues) {
- try {
- pvalues.add(ValueDecoder.decode(propertyDef, value, propertyDefOptions));
- } catch (IllegalPropertyValueStringException e) {
- exception = e;
- }
- }
- } else {
- // No values defined so get the defaults.
- try {
- pvalues.addAll(getDefaultValues(path, propertyDef, newConfigEntry));
- } catch (DefaultBehaviorException e) {
- exception = e;
- }
- }
-
- if (pvalues.size() > 1 && !propertyDef.hasOption(PropertyOption.MULTI_VALUED)) {
- // This exception takes precedence over previous exceptions.
- exception = new PropertyIsSingleValuedException(propertyDef);
- T value = pvalues.first();
- pvalues.clear();
- pvalues.add(value);
- }
-
- if (pvalues.isEmpty() && propertyDef.hasOption(PropertyOption.MANDATORY)) {
- // The values maybe empty because of a previous exception.
- if (exception == null) {
- exception = new PropertyIsMandatoryException(propertyDef);
- }
- }
-
- if (exception != null) {
- throw exception;
- } else {
- return pvalues;
- }
- }
-
- /** Gets the attribute values associated with a property from a ConfigEntry. */
- private List<String> getAttributeValues(ManagedObjectDefinition<?, ?> d, PropertyDefinition<?> pd,
- Entry configEntry) {
- // TODO: we create a default attribute type if it is undefined.
- // We should log a warning here if this is the case
- // since the attribute should have been defined.
- String attrID = LDAPProfile.getInstance().getAttributeName(d, pd);
- AttributeType type = DirectoryServer.getAttributeType(attrID, true);
- Iterable<Attribute> attributes = configEntry.getAllAttributes(AttributeDescription.create(type));
- List<String> values = new ArrayList<String>();
- for (Attribute attribute : attributes) {
- for (ByteString byteValue : attribute) {
- values.add(byteValue.toString());
- }
- }
- return values;
- }
-
- // Get the default values for the specified property.
- private <T> Collection<T> getDefaultValues(ManagedObjectPath<?, ?> p, PropertyDefinition<T> pd,
- Entry newConfigEntry) {
- DefaultValueFinder<T> v = new DefaultValueFinder<T>(newConfigEntry);
- return v.find(p, pd);
- }
-
- /**
- * Retrieves a configuration entry corresponding to the provided DN.
- *
- * @param dn
- * DN of the configuration entry.
- * @return the configuration entry
- * @throws ConfigException
- * If a problem occurs.
- */
- public Entry getConfigEntry(DN dn) throws ConfigException {
- return configRepository.getEntry(dn);
- }
-
- /**
- * Returns the repository containing all configuration entries.
- *
- * @return the repository
- */
- public ConfigurationRepository getConfigRepository() {
- return configRepository;
- }
-
- // Gets a config entry required for a managed object and throws a
- // config exception on failure.
- private Entry getManagedObjectConfigEntry(DN dn) throws ConfigException {
- Entry configEntry;
- try {
- configEntry = configRepository.getEntry(dn);
- } catch (ConfigException e) {
- debugLogger.trace("Unable to perform post add", e);
-
- LocalizableMessage message = ERR_ADMIN_CANNOT_GET_MANAGED_OBJECT.get(String.valueOf(dn),
- stackTraceToSingleLineString(e, DynamicConstants.DEBUG_BUILD));
- throw new ConfigException(message, e);
- }
-
- // The configuration handler is free to return null indicating
- // that the entry does not exist.
- if (configEntry == null) {
- LocalizableMessage message = ERR_ADMIN_MANAGED_OBJECT_DOES_NOT_EXIST.get(String.valueOf(dn));
- throw new ConfigException(message);
- }
-
- return configEntry;
- }
-
- // Validate that a relation definition belongs to the path.
- private void validateRelationDefinition(ManagedObjectPath<?, ?> path, RelationDefinition<?, ?> rd) {
- AbstractManagedObjectDefinition<?, ?> d = path.getManagedObjectDefinition();
- RelationDefinition<?, ?> tmp = d.getRelationDefinition(rd.getName());
- if (tmp != rd) {
- throw new IllegalArgumentException("The relation " + rd.getName() + " is not associated with a "
- + d.getName());
- }
- }
-}
diff --git a/opendj-config/src/main/java/org/opends/server/admin/server/package-info.java b/opendj-config/src/main/java/org/opends/server/admin/server/package-info.java
deleted file mode 100644
index 47acbbd..0000000
--- a/opendj-config/src/main/java/org/opends/server/admin/server/package-info.java
+++ /dev/null
@@ -1,38 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-
-
-/**
- * Server-side administration interface.
- * <p>
- * This package contains classes and interfaces which internal
- * directory server components are expected to use in order to
- * access the server's current configuration and register
- * to be notified when the configuration changes.
- */
-package org.opends.server.admin.server;
-
diff --git a/opendj-config/src/main/java/org/opends/server/config/spi/ConfigAddListener.java b/opendj-config/src/main/java/org/opends/server/config/spi/ConfigAddListener.java
deleted file mode 100644
index 92cabc7..0000000
--- a/opendj-config/src/main/java/org/opends/server/config/spi/ConfigAddListener.java
+++ /dev/null
@@ -1,63 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2006-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.config.spi;
-
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.Entry;
-import org.opends.server.admin.server.ConfigChangeResult;
-
-/**
- * This interface defines the methods that a Directory Server component should
- * implement if it wishes to be able to receive notification of new entries
- * added below a configuration entry.
- */
-public interface ConfigAddListener {
- /**
- * Indicates whether the configuration entry that will result from a
- * proposed add is acceptable to this add listener.
- *
- * @param configEntry
- * The configuration entry that will result from the requested
- * add.
- * @param unacceptableReason
- * A buffer to which this method can append a human-readable
- * message explaining why the proposed entry is not acceptable.
- * @return {@code true} if the proposed entry contains an acceptable
- * configuration, or {@code false} if it does not.
- */
- public boolean configAddIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason);
-
- /**
- * Attempts to apply a new configuration based on the provided added entry.
- *
- * @param configEntry
- * The new configuration entry that contains the configuration to
- * apply.
- * @return Information about the result of processing the configuration
- * change.
- */
- public ConfigChangeResult applyConfigurationAdd(Entry configEntry);
-}
diff --git a/opendj-config/src/main/java/org/opends/server/config/spi/ConfigChangeListener.java b/opendj-config/src/main/java/org/opends/server/config/spi/ConfigChangeListener.java
deleted file mode 100644
index 08ddf30..0000000
--- a/opendj-config/src/main/java/org/opends/server/config/spi/ConfigChangeListener.java
+++ /dev/null
@@ -1,64 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2006-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.config.spi;
-
-import org.opends.server.admin.server.ConfigChangeResult;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.Entry;
-
-/**
- * This interface defines the methods that a Directory Server component should
- * implement if it wishes to be able to receive notification of changes to a
- * configuration entry.
- */
-public interface ConfigChangeListener {
- /**
- * 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 unacceptableReason
- * A buffer to which this method can append a human-readable
- * message explaining why the proposed change is not acceptable.
- * @return {@code true} if the proposed entry contains an acceptable
- * configuration, or {@code false} if it does not.
- */
- public boolean configChangeIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason);
-
- /**
- * 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.
- * @return Information about the result of processing the configuration
- * change.
- */
- public ConfigChangeResult applyConfigurationChange(Entry configEntry);
-}
diff --git a/opendj-config/src/main/java/org/opends/server/config/spi/ConfigDeleteListener.java b/opendj-config/src/main/java/org/opends/server/config/spi/ConfigDeleteListener.java
deleted file mode 100644
index 5a22d47..0000000
--- a/opendj-config/src/main/java/org/opends/server/config/spi/ConfigDeleteListener.java
+++ /dev/null
@@ -1,63 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2006-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.config.spi;
-
-import org.opends.server.admin.server.ConfigChangeResult;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.Entry;
-
-/**
- * This interface defines the methods that a Directory Server component should
- * implement if it wishes to be able to receive notification if entries below a
- * configuration entry are removed.
- */
-public interface ConfigDeleteListener {
- /**
- * Indicates whether it is acceptable to remove the provided configuration
- * entry.
- *
- * @param configEntry
- * The configuration entry that will be removed from the
- * configuration.
- * @param unacceptableReason
- * A buffer to which this method can append a human-readable
- * message explaining why the proposed delete is not acceptable.
- * @return {@code true} if the proposed entry may be removed from the
- * configuration, or {@code false} if not.
- */
- public boolean configDeleteIsAcceptable(Entry configEntry, LocalizableMessageBuilder unacceptableReason);
-
- /**
- * Attempts to apply a new configuration based on the provided deleted
- * entry.
- *
- * @param configEntry
- * The new configuration entry that has been deleted.
- * @return Information about the result of processing the configuration
- * change.
- */
- public ConfigChangeResult applyConfigurationDelete(Entry configEntry);
-}
diff --git a/opendj-config/src/main/java/org/opends/server/config/spi/ConfigException.java b/opendj-config/src/main/java/org/opends/server/config/spi/ConfigException.java
deleted file mode 100644
index 332c916..0000000
--- a/opendj-config/src/main/java/org/opends/server/config/spi/ConfigException.java
+++ /dev/null
@@ -1,76 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2006-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.config.spi;
-
-import org.forgerock.i18n.LocalizableException;
-import org.forgerock.i18n.LocalizableMessage;
-
-/**
- * Thrown during the course of interactions with the Directory Server
- * configuration.
- */
-public final class ConfigException extends Exception implements LocalizableException {
-
- private static final long serialVersionUID = -540463620272921157L;
-
- private final LocalizableMessage message;
-
- /**
- * Returns the message that explains the problem that occurred.
- *
- * @return LocalizableMessage of the problem
- */
- public LocalizableMessage getMessageObject() {
- return message;
- }
-
- /**
- * Creates a new configuration exception with the provided message.
- *
- * @param message
- * The message to use for this configuration exception.
- */
- public ConfigException(LocalizableMessage message) {
- super(message.toString());
- this.message = message;
- }
-
- /**
- * Creates a new configuration exception with the provided message and
- * underlying cause.
- *
- * @param message
- * The message to use for this configuration exception.
- * @param cause
- * The underlying cause that triggered this configuration
- * exception.
- */
- public ConfigException(LocalizableMessage message, Throwable cause) {
- super(message.toString(), cause);
- this.message = message;
- }
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/config/spi/ConfigurationRepository.java b/opendj-config/src/main/java/org/opends/server/config/spi/ConfigurationRepository.java
deleted file mode 100644
index 36f9f5c..0000000
--- a/opendj-config/src/main/java/org/opends/server/config/spi/ConfigurationRepository.java
+++ /dev/null
@@ -1,177 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2013 ForgeRock AS.
- */
-package org.opends.server.config.spi;
-
-import java.util.List;
-import java.util.Set;
-
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.Entry;
-
-/**
- * Provides configuration entries and listener registration on the entries.
- */
-public interface ConfigurationRepository {
-
- /**
- * Returns the set of DNs of children of the entry corresponding to the
- * provided DN. .
- *
- * @param dn
- * DN of a configuration entry.
- * @return the set of DN of children of the corresponding entry
- * @throws ConfigException
- * If a problem occurs during retrieval.
- */
- Set<DN> getChildren(DN dn) throws ConfigException;
-
- /**
- * Returns the configuration entry for the provided DN.
- *
- * @param dn
- * DN of the configuration entry
- * @return the config entry
- * @throws ConfigException
- * If a problem occurs while trying to retrieve the requested
- * entry.
- */
- Entry getEntry(DN dn) throws ConfigException;
-
- /**
- * Checks if the provided DN corresponds to a configuration entry.
- *
- * @param dn
- * DN of the configuration entry
- * @return {@code true} if and only if there is a configuration entry with
- * this DN
- * @throws ConfigException
- * If a problem occurs.
- */
- boolean hasEntry(DN dn) throws ConfigException;
-
- /**
- * Registers the provided add listener so that it will be notified if any
- * new entries are added immediately below the entry corresponding to the
- * provided DN.
- *
- * @param dn
- * The DN of the configuration entry.
- * @param listener
- * The add listener that should be registered.
- */
- public void registerAddListener(DN dn, ConfigAddListener listener);
-
- /**
- * Registers the provided delete listener so that it will be notified if any
- * entries are deleted immediately below the entry corresponding to the
- * provided DN.
- *
- * @param dn
- * The DN of the configuration entry.
- * @param listener
- * The delete listener that should be registered.
- */
- public void registerDeleteListener(DN dn, ConfigDeleteListener listener);
-
- /**
- * Registers the provided change listener so that it will be notified of any
- * changes to the entry corrresponding to provided DN. No check will be made
- * to determine whether the provided listener is already registered.
- *
- * @param dn
- * The DN of the configuration entry.
- * @param listener
- * The change listener that should be registered.
- */
- public void registerChangeListener(DN dn, ConfigChangeListener listener);
-
- /**
- * Deregisters the provided add listener so that it will no longer be
- * notified if any new entries are added immediately below the entry
- * corresponding to the provided DN.
- *
- * @param dn
- * The DN of the configuration entry.
- * @param listener
- * The add listener that should be deregistered.
- */
- public void deregisterAddListener(DN dn, ConfigAddListener listener);
-
- /**
- * Deregisters the provided delete listener so that it will no longer be
- * notified if any entries are deleted immediately below the entry
- * corresponding to the provided DN.
- *
- * @param dn
- * The DN of the configuration entry.
- * @param listener
- * The delete listener that should be deregistered.
- */
- public void deregisterDeleteListener(DN dn, ConfigDeleteListener listener);
-
- /**
- * Attempts to deregister the provided change listener with the provided DN.
- *
- * @param dn
- * The DN of the configuration entry.
- * @param listener
- * The change listener to deregister with this DN.
- * @return <CODE>true</CODE> if the specified listener was deregistered, or
- * <CODE>false</CODE> if it was not.
- */
- public boolean deregisterChangeListener(DN dn, ConfigChangeListener listener);
-
- /**
- * Retrieves the add listeners that have been registered with the provided
- * DN.
- *
- * @param dn
- * The DN of the configuration entry.
- * @return The list of add listeners.
- */
- public List<ConfigAddListener> getAddListeners(DN dn);
-
- /**
- * Retrieves the delete listeners that have been registered with the
- * provided DN.
- *
- * @param dn
- * The DN of the configuration entry.
- * @return The list of delete listeners.
- */
- public List<ConfigDeleteListener> getDeleteListeners(DN dn);
-
- /**
- * Retrieves the change listeners that have been registered with the
- * provided DN.
- *
- * @param dn
- * The DN of the configuration entry.
- * @return The list of change listeners.
- */
- public List<ConfigChangeListener> getChangeListeners(DN dn);
-
-}
diff --git a/opendj-config/src/main/java/org/opends/server/config/spi/package-info.java b/opendj-config/src/main/java/org/opends/server/config/spi/package-info.java
deleted file mode 100644
index 9f1d67f..0000000
--- a/opendj-config/src/main/java/org/opends/server/config/spi/package-info.java
+++ /dev/null
@@ -1,44 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2006-2008 Sun Microsystems, Inc.
- */
-
-/**
- * Contains a number of API declarations for use throughout the
- * Directory Server. Whenever possible, these APIs should be declared
- * using abstract classes rather than interfaces so that they can be
- * altered in future versions without impacting backward
- * compatibility.
- * <BR><BR>
- * Note that the mere existence of a class or interface in this
- * package does not in itself imply that it is intended for use by
- * third party code. Please refer to the official product
- * documentation to indicate which APIs may be safely used by anyone
- * other than the core Directory Server developers. Failure to heed
- * this warning may result in code that could have unintended side
- * effects or that does not work properly across different Directory
- * Server versions.
- */
-package org.opends.server.config.spi;
-
diff --git a/opendj-config/src/main/java/org/opends/server/types/AddressMask.java b/opendj-config/src/main/java/org/opends/server/types/AddressMask.java
index 01a942b..8cd2fc3 100644
--- a/opendj-config/src/main/java/org/opends/server/types/AddressMask.java
+++ b/opendj-config/src/main/java/org/opends/server/types/AddressMask.java
@@ -35,7 +35,7 @@
import java.util.Collection;
import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.config.spi.ConfigException;
+import org.forgerock.opendj.config.server.ConfigException;
/**
* This class defines an address mask, which can be used to perform efficient
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AESPasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AESPasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index 580505b..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AESPasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="aes-password-storage-scheme"
- plural-name="aes-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords using the AES
- reversible encryption mechanism.
- </adm:synopsis>
- <adm:description>
- This scheme contains only an implementation for the user password
- syntax, with a storage scheme name of "AES".
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-aes-password-storage-scheme</ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.AESPasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AccessControlHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AccessControlHandlerConfiguration.xml
deleted file mode 100644
index fc81fde..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AccessControlHandlerConfiguration.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="access-control-handler"
- plural-name="access-control-handlers"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- manage the application-wide access control. The <adm:product-name /> access control
- handler is defined through an extensible interface, so that alternate
- implementations can be created. Only one access control handler may be
- active in the server at any given time.
- </adm:synopsis>
- <adm:description>
- Note that <adm:product-name /> also has a privilege subsystem, which may have an impact
- on what clients may be allowed to do in the server. For example, any user
- with the bypass-acl privilege is not subject to access control
- checking regardless of whether the access control implementation is
- enabled.
- </adm:description>
- <adm:tag name="security" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-access-control-handler</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled. If set to FALSE, then no access control is enforced, and any
- client (including unauthenticated or anonymous clients) could be allowed to perform any
- operation if not subject to other restrictions, such as those enforced by the privilege
- subsystem.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.AccessControlHandler
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AccessLogFilteringCriteriaConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AccessLogFilteringCriteriaConfiguration.xml
deleted file mode 100644
index b151e10..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AccessLogFilteringCriteriaConfiguration.xml
+++ /dev/null
@@ -1,475 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2011 ForgeRock AS.
- ! -->
-<adm:managed-object name="access-log-filtering-criteria"
- plural-name="access-log-filtering-criteria"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- A set of rules which together determine whether a log record should be
- logged or not.
- </adm:synopsis>
- <adm:tag name="logging" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-access-log-filtering-criteria</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="log-record-type" multi-valued="true">
- <adm:synopsis>
- Filters log records based on their type.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="abandon">
- <adm:synopsis>Abandon operations</adm:synopsis>
- </adm:value>
- <adm:value name="add">
- <adm:synopsis>Add operations</adm:synopsis>
- </adm:value>
- <adm:value name="bind">
- <adm:synopsis>Bind operations</adm:synopsis>
- </adm:value>
- <adm:value name="compare">
- <adm:synopsis>Compare operations</adm:synopsis>
- </adm:value>
- <adm:value name="delete">
- <adm:synopsis>Delete operations</adm:synopsis>
- </adm:value>
- <adm:value name="extended">
- <adm:synopsis>Extended operations</adm:synopsis>
- </adm:value>
- <adm:value name="modify">
- <adm:synopsis>Modify operations</adm:synopsis>
- </adm:value>
- <adm:value name="rename">
- <adm:synopsis>Rename operations</adm:synopsis>
- </adm:value>
- <adm:value name="search">
- <adm:synopsis>Search operations</adm:synopsis>
- </adm:value>
- <adm:value name="unbind">
- <adm:synopsis>Unbind operations</adm:synopsis>
- </adm:value>
- <adm:value name="connect">
- <adm:synopsis>Client connections</adm:synopsis>
- </adm:value>
- <adm:value name="disconnect">
- <adm:synopsis>Client disconnections</adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-record-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="connection-client-address-equal-to" multi-valued="true">
- <adm:synopsis>
- Filters log records associated with connections which match at least one
- of the specified client host names or address masks.
- </adm:synopsis>
- <adm:description>
- Valid values include a host name, a fully qualified domain name, a
- domain name, an IP address, or a subnetwork with subnetwork mask.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:ip-address-mask />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-connection-client-address-equal-to</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="connection-client-address-not-equal-to" multi-valued="true">
- <adm:synopsis>
- Filters log records associated with connections which do not match any
- of the specified client host names or address masks.
- </adm:synopsis>
- <adm:description>
- Valid values include a host name, a fully qualified domain name, a
- domain name, an IP address, or a subnetwork with subnetwork mask.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:ip-address-mask />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-connection-client-address-not-equal-to</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="connection-protocol-equal-to" multi-valued="true">
- <adm:synopsis>
- Filters log records associated with connections which match any
- of the specified protocols.
- </adm:synopsis>
- <adm:description>
- Typical values include "ldap", "ldaps", or "jmx".
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>[a-zA-Z0-9]+</adm:regex>
- <adm:usage>NAME</adm:usage>
- <adm:synopsis>
- The protocol name as reported in the access log.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-connection-protocol-equal-to</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="connection-port-equal-to" multi-valued="true">
- <adm:synopsis>
- Filters log records associated with connections to any of the specified
- listener port numbers.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="65535" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-connection-port-equal-to</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="user-dn-equal-to" multi-valued="true">
- <adm:synopsis>
- Filters log records associated with users matching at least one of the
- specified DN patterns.
- </adm:synopsis>
- <adm:description>
- Valid DN filters are strings composed of zero or more wildcards. A double
- wildcard ** replaces one or more RDN components (as in
- uid=dmiller,**,dc=example,dc=com). A simple wildcard * replaces either a
- whole RDN, or a whole type, or a value substring (as in
- uid=bj*,ou=people,dc=example,dc=com).
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-user-dn-equal-to</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="user-dn-not-equal-to" multi-valued="true">
- <adm:synopsis>
- Filters log records associated with users which do not match any of the
- specified DN patterns.
- </adm:synopsis>
- <adm:description>
- Valid DN filters are strings composed of zero or more wildcards. A double
- wildcard ** replaces one or more RDN components (as in
- uid=dmiller,**,dc=example,dc=com). A simple wildcard * replaces either a
- whole RDN, or a whole type, or a value substring (as in
- uid=bj*,ou=people,dc=example,dc=com).
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-user-dn-not-equal-to</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="user-is-member-of" multi-valued="true">
- <adm:synopsis>
- Filters log records associated with users which are members of at least
- one of the specified groups.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-user-is-member-of</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="user-is-not-member-of" multi-valued="true">
- <adm:synopsis>
- Filters log records associated with users which are not members of any
- of the specified groups.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-user-is-not-member-of</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="request-target-dn-equal-to" multi-valued="true">
- <adm:synopsis>
- Filters operation log records associated with operations which target
- entries matching at least one of the specified DN patterns.
- </adm:synopsis>
- <adm:description>
- Valid DN filters are strings composed of zero or more wildcards. A double
- wildcard ** replaces one or more RDN components (as in
- uid=dmiller,**,dc=example,dc=com). A simple wildcard * replaces either a
- whole RDN, or a whole type, or a value substring (as in
- uid=bj*,ou=people,dc=example,dc=com).
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-request-target-dn-equal-to</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="request-target-dn-not-equal-to" multi-valued="true">
- <adm:synopsis>
- Filters operation log records associated with operations which target
- entries matching none of the specified DN patterns.
- </adm:synopsis>
- <adm:description>
- Valid DN filters are strings composed of zero or more wildcards. A double
- wildcard ** replaces one or more RDN components (as in
- uid=dmiller,**,dc=example,dc=com). A simple wildcard * replaces either a
- whole RDN, or a whole type, or a value substring (as in
- uid=bj*,ou=people,dc=example,dc=com).
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-request-target-dn-not-equal-to</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="response-result-code-equal-to" multi-valued="true">
- <adm:synopsis>
- Filters operation response log records associated with operations which
- include any of the specified result codes.
- </adm:synopsis>
- <adm:description>
- It is recommended to only use this criteria in conjunction with the
- "combined" output mode of the access logger, since this filter criteria
- is only applied to response log messages.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-response-result-code-equal-to</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="response-result-code-not-equal-to" multi-valued="true">
- <adm:synopsis>
- Filters operation response log records associated with operations which
- do not include any of the specified result codes.
- </adm:synopsis>
- <adm:description>
- It is recommended to only use this criteria in conjunction with the
- "combined" output mode of the access logger, since this filter criteria
- is only applied to response log messages.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-response-result-code-not-equal-to</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="response-etime-greater-than">
- <adm:synopsis>
- Filters operation response log records associated with operations which
- took longer than the specified number of milli-seconds to complete.
- </adm:synopsis>
- <adm:description>
- It is recommended to only use this criteria in conjunction with the
- "combined" output mode of the access logger, since this filter criteria
- is only applied to response log messages.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer>
- <adm:unit-synopsis>milli-seconds</adm:unit-synopsis>
- </adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-response-etime-greater-than</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="response-etime-less-than">
- <adm:synopsis>
- Filters operation response log records associated with operations which
- took less than the specified number of milli-seconds to complete.
- </adm:synopsis>
- <adm:description>
- It is recommended to only use this criteria in conjunction with the
- "combined" output mode of the access logger, since this filter criteria
- is only applied to response log messages.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer>
- <adm:unit-synopsis>milli-seconds</adm:unit-synopsis>
- </adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-response-etime-less-than</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="search-response-nentries-greater-than">
- <adm:synopsis>
- Filters search operation response log records associated with searches
- which returned more than the specified number of entries.
- </adm:synopsis>
- <adm:description>
- It is recommended to only use this criteria in conjunction with the
- "combined" output mode of the access logger, since this filter criteria
- is only applied to response log messages.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer>
- <adm:unit-synopsis>entries</adm:unit-synopsis>
- </adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-search-response-nentries-greater-than</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="search-response-nentries-less-than">
- <adm:synopsis>
- Filters search operation response log records associated with searches
- which returned less than the specified number of entries.
- </adm:synopsis>
- <adm:description>
- It is recommended to only use this criteria in conjunction with the
- "combined" output mode of the access logger, since this filter criteria
- is only applied to response log messages.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer>
- <adm:unit-synopsis>entries</adm:unit-synopsis>
- </adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-search-response-nentries-less-than</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="search-response-is-indexed">
- <adm:synopsis>
- Filters search operation response log records associated with searches
- which were either indexed or unindexed.
- </adm:synopsis>
- <adm:description>
- It is recommended to only use this criteria in conjunction with the
- "combined" output mode of the access logger, since this filter criteria
- is only applied to response log messages.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-search-response-is-indexed</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AccessLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AccessLogPublisherConfiguration.xml
deleted file mode 100644
index 067b208..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AccessLogPublisherConfiguration.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions copyright 2011-2013 ForgeRock AS
- ! -->
-<adm:managed-object name="access-log-publisher"
- plural-name="access-log-publishers"
- package="org.forgerock.opendj.admin" extends="log-publisher"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for distributing access log messages from the access
- logger to a destination.
- </adm:synopsis>
- <adm:description>
- Access log messages provide information about the types of operations
- processed by the server.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-access-log-publisher</ldap:name>
- <ldap:superior>ds-cfg-log-publisher</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:relation name="access-log-filtering-criteria">
- <adm:synopsis>
- The set of criteria which will be used to filter log records.
- </adm:synopsis>
- <adm:one-to-many/>
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Filtering Criteria</ldap:rdn-sequence>
- </adm:profile>
- </adm:relation>
- <adm:property-override name="java-class">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.api.AccessLogPublisher</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="filtering-policy">
- <adm:synopsis>
- Specifies how filtering criteria should be applied to log records.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>no-filtering</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="no-filtering">
- <adm:synopsis>
- No filtering will be performed, and all records will be logged.
- </adm:synopsis>
- </adm:value>
- <adm:value name="inclusive">
- <adm:synopsis>
- Records must match at least one of the filtering criteria in order
- to be logged.
- </adm:synopsis>
- </adm:value>
- <adm:value name="exclusive">
- <adm:synopsis>
- Records must not match any of the filtering criteria in order to be
- logged.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-filtering-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="suppress-internal-operations" advanced="true">
- <adm:synopsis>
- Indicates whether internal operations (for example, operations
- that are initiated by plugins) should be logged along with the
- operations that are requested by users.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-suppress-internal-operations</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="suppress-synchronization-operations"
- advanced="true">
- <adm:synopsis>
- Indicates whether access messages that are generated by
- synchronization operations should be suppressed.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-suppress-synchronization-operations
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AccountStatusNotificationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AccountStatusNotificationHandlerConfiguration.xml
deleted file mode 100644
index 6b684db..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AccountStatusNotificationHandlerConfiguration.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="account-status-notification-handler"
- plural-name="account-status-notification-handlers"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are invoked to provide notification to users in some form (for example,
- by an email message) when the status of a user's account has changed
- in some way. The
- <adm:user-friendly-name />
- can be used to notify the user and/or administrators of the change.
- </adm:synopsis>
- <adm:tag name="user-management" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-account-status-notification-handler</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled. Only enabled handlers are invoked whenever
- a related event occurs in the server.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.AccountStatusNotificationHandler
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AdministrationConnectorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AdministrationConnectorConfiguration.xml
deleted file mode 100644
index 51ae000..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AdministrationConnectorConfiguration.xml
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2012 ForgeRock, AS.
- ! -->
-<adm:managed-object name="administration-connector"
- plural-name="administration-connectors"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is used to interact with administration tools using LDAP.
- </adm:synopsis>
- <adm:description>
- It is a dedicated entry point for administration.
- </adm:description>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-administration-connector</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-reference name="listen-port" />
- <adm:property name="listen-address" multi-valued="true">
- <adm:synopsis>
- Specifies the address or set of addresses on which this
- <adm:user-friendly-name />
- should listen for connections from LDAP clients.
- </adm:synopsis>
- <adm:description>
- Multiple addresses may be provided as separate values for this
- attribute. If no values are provided, then the
- <adm:user-friendly-name />
- listens on all interfaces.
- </adm:description>
- <adm:requires-admin-action>
- <adm:server-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0.0.0.0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:ip-address />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-listen-address</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="key-manager-provider" mandatory="true">
- <adm:synopsis>
- Specifies the name of the key manager that is used with
- the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:server-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="key-manager-provider"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced key manager provider must be enabled.
- </adm:synopsis>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-key-manager-provider</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="trust-manager-provider" mandatory="true">
- <adm:synopsis>
- Specifies the name of the trust manager that is used with
- the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:server-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="trust-manager-provider"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced trust manager provider must be enabled.
- </adm:synopsis>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-trust-manager-provider</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ssl-cert-nickname" mandatory="true">
- <adm:synopsis>
- Specifies the nickname (also called the alias) of the certificate
- that the
- <adm:user-friendly-name />
- will use when performing SSL communication.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:server-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>Let the server decide.</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string></adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-cert-nickname</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ssl-protocol" multi-valued="true">
- <adm:synopsis>
- Specifies the names of the SSL protocols that are allowed for
- use in SSL or StartTLS communication.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but only
- impact new SSL/TLS-based sessions created after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Uses the default set of SSL protocols provided by the server's
- JVM.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-protocol</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ssl-cipher-suite" multi-valued="true">
- <adm:synopsis>
- Specifies the names of the SSL cipher suites that are allowed
- for use in SSL communication.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but will
- only impact new SSL/TLS-based sessions created after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Uses the default set of SSL cipher suites provided by the
- server's JVM.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-cipher-suite</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AlertHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AlertHandlerConfiguration.xml
deleted file mode 100644
index 0b4c976..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AlertHandlerConfiguration.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="alert-handler" plural-name="alert-handlers"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are used to notify administrators of significant problems or notable
- events that occur in the <adm:product-name /> directory server.
- </adm:synopsis>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-alert-handler</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.AlertHandler
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="enabled-alert-type" multi-valued="true">
- <adm:synopsis>
- Specifies the names of the alert types that are enabled for this
- alert handler.
- </adm:synopsis>
- <adm:description>
- If there are any values for this attribute, then only alerts with
- one of the specified types are allowed (unless they are also
- included in the disabled alert types). If there are no values for
- this attribute, then any alert with a type not included in the
- list of disabled alert types is allowed.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- All alerts with types not included in the set of disabled
- alert types are allowed.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled-alert-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="disabled-alert-type" multi-valued="true">
- <adm:synopsis>
- Specifies the names of the alert types that are disabled for this
- alert handler.
- </adm:synopsis>
- <adm:description>
- If there are any values for this attribute, then no alerts with
- any of the specified types are allowed. If there are no values
- for this attribute, then only alerts with a type included in the
- set of enabled alert types are allowed, or if there are no
- values for the enabled alert types option, then all alert types
- are allowed.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- If there is a set of enabled alert types, then only alerts
- with one of those types are allowed. Otherwise, all alerts
- are allowed.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-disabled-alert-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AnonymousSASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AnonymousSASLMechanismHandlerConfiguration.xml
deleted file mode 100644
index 6ba859d..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AnonymousSASLMechanismHandlerConfiguration.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="anonymous-sasl-mechanism-handler"
- plural-name="anonymous-sasl-mechanism-handlers"
- package="org.forgerock.opendj.admin" extends="sasl-mechanism-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The ANONYMOUS SASL mechanism provides the ability for clients to
- perform an anonymous bind using a SASL mechanism.
- </adm:synopsis>
- <adm:description>
- The only real
- benefit that this provides over a normal anonymous bind (that is,
- using simple authentication with no password) is that the ANONYMOUS
- SASL mechanism also allows the client to include a trace string in
- the request. This trace string can help identify the application that
- performed the bind (although since there is no authentication,
- there is no assurance that some other client did not spoof that
- trace string).
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-anonymous-sasl-mechanism-handler</ldap:name>
- <ldap:superior>ds-cfg-sasl-mechanism-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.AnonymousSASLMechanismHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AttributeCleanupPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AttributeCleanupPluginConfiguration.xml
deleted file mode 100644
index 61df2bd..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AttributeCleanupPluginConfiguration.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2011 profiq s.r.o.
- ! Portions copyright 2011 ForgeRock AS.
- ! -->
-<adm:managed-object name="attribute-cleanup-plugin"
- plural-name="attribute-cleanup-plugins" package="org.forgerock.opendj.admin"
- extends="plugin" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
-
- <adm:synopsis>
- A pre-parse plugin which can be used to remove and rename
- attributes in ADD and MODIFY requests before being processed.
- </adm:synopsis>
-
- <adm:description>
- This plugin should be used in order maintain interoperability with client
- applications which attempt to update attributes in a way which is
- incompatible with LDAPv3 or <adm:product-name />. For example, this plugin may be used
- in order to remove changes to operational attributes such as modifiersName,
- creatorsName, modifyTimestamp, and createTimestamp (Sun DSEE chaining does
- this).
- </adm:description>
-
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-attribute-cleanup-plugin</ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
-
- <adm:property-override name="java-class">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.plugins.AttributeCleanupPlugin</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-
- <adm:property-override name="invoke-for-internal-operations">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-
- <adm:property-override name="plugin-type" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>preparseadd</adm:value>
- <adm:value>preparsemodify</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-
- <adm:property name="remove-inbound-attributes" multi-valued="true">
- <adm:synopsis>
- A list of attributes which should be removed from incoming add
- or modify requests.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>No attributes will be removed</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <!-- Use string syntax because we may be removing invalid attributes -->
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-remove-inbound-attributes</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="rename-inbound-attributes" multi-valued="true">
- <adm:synopsis>
- A list of attributes which should be renamed in incoming add
- or modify requests.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>No attributes will be renamed</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^[^:]+:[^:]+$</adm:regex>
- <adm:usage>FROM:TO</adm:usage>
- <adm:synopsis>An attribute name mapping.</adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-rename-inbound-attributes</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AttributeSyntaxConfiguration.xml
deleted file mode 100644
index e1e8f4c..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AttributeSyntaxConfiguration.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="attribute-syntax"
- plural-name="attribute-syntaxes" package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- define the type of data that may be stored in an attribute with that
- syntax. A syntax is generally associated with a set of matching
- rules that indicate how to perform matching operations against
- values of that syntax.
- </adm:synopsis>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-attribute-syntax</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true" read-only="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.AttributeSyntax
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AttributeTypeDescriptionAttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AttributeTypeDescriptionAttributeSyntaxConfiguration.xml
deleted file mode 100644
index 6eb7e9d..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AttributeTypeDescriptionAttributeSyntaxConfiguration.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="attribute-type-description-attribute-syntax"
- plural-name="attribute-type-description-attribute-syntaxes"
- extends="attribute-syntax" package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- describe the format of the directory schema attribute type
- definitions.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-attribute-type-description-attribute-syntax
- </ldap:name>
- <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.schema.AttributeTypeSyntax
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="strip-syntax-min-upper-bound" advanced="true">
- <adm:synopsis>
- Indicates whether the suggested minimum upper bound appended to an
- attribute's syntax OID in it's schema definition Attribute Type
- Description is stripped off.
- </adm:synopsis>
- <adm:description>
- When retrieving the server's schema, some APIs (JNDI) fail in
- their syntax lookup methods, because they do not parse this value
- correctly. This configuration option allows the server to be
- configured to provide schema definitions these APIs can parse
- correctly.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-strip-syntax-min-upper-bound</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AttributeValuePasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AttributeValuePasswordValidatorConfiguration.xml
deleted file mode 100644
index 73c0159..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AttributeValuePasswordValidatorConfiguration.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2012 ForgeRock, AS.
- ! -->
-<adm:managed-object name="attribute-value-password-validator"
- plural-name="attribute-value-password-validators"
- package="org.forgerock.opendj.admin" extends="password-validator"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- attempts to determine whether a proposed password is acceptable
- for use by determining whether that password is contained in any
- attribute within the user's entry.
- </adm:synopsis>
- <adm:description>
- It can be configured to look
- in all attributes or in a specified subset of attributes.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-attribute-value-password-validator</ldap:name>
- <ldap:superior>ds-cfg-password-validator</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.AttributeValuePasswordValidator
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="match-attribute" multi-valued="true" >
- <adm:synopsis>
- Specifies the name(s) of the attribute(s) whose values should be
- checked to determine whether they match the provided password.
- If no values are provided, then the server checks if the proposed
- password matches the value of any attribute in the user's entry.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- All attributes in the user entry will be checked.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-match-attribute</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="check-substrings" mandatory="false">
- <adm:synopsis>
- Indicates whether this password validator is to match portions of
- the password string against attribute values.
- </adm:synopsis>
- <adm:description>
- If "false" then only match the entire password against attribute values
- otherwise ("true") check whether the password contains attribute values.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-check-substrings</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="min-substring-length" mandatory="false">
- <adm:synopsis>
- Indicates the minimal length of the substring within the password
- in case substring checking is enabled.
- </adm:synopsis>
- <adm:description>
- If "check-substrings" option is set to true, then this parameter
- defines the length of the smallest word which should be used for
- substring matching. Use with caution because values below 3 might
- disqualify valid passwords.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-min-substring-length</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="test-reversed-password" mandatory="true">
- <adm:synopsis>
- Indicates whether this password validator should test the reversed
- value of the provided password as well as the order in which it
- was given.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-test-reversed-password</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AuthenticationPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AuthenticationPolicyConfiguration.xml
deleted file mode 100644
index 1901706..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/AuthenticationPolicyConfiguration.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="authentication-policy"
- plural-name="authentication-policies" abstract="true"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- define the policies which should be used for authenticating users and
- managing the password and other account related state.
- </adm:synopsis>
- <adm:tag name="user-management" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-authentication-policy</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class which provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.AuthenticationPolicyFactory
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/BackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/BackendConfiguration.xml
deleted file mode 100644
index 2aa1716..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/BackendConfiguration.xml
+++ /dev/null
@@ -1,171 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="backend" plural-name="backends"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for providing access to the underlying data
- presented by the server.
- </adm:synopsis>
- <adm:description>
- The data may be stored locally in an embedded database,
- remotely in an external system, or generated on the fly
- (for example, calculated from other information that is available).
- </adm:description>
- <adm:tag name="database" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-backend</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the backend is enabled in the server.
- </adm:synopsis>
- <adm:description>
- If a backend is not enabled, then its contents are not
- accessible when processing operations.
- </adm:description>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- backend implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>org.opends.server.api.Backend</adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="backend-id" mandatory="true" read-only="true">
- <adm:synopsis>
- Specifies a name to identify the associated backend.
- </adm:synopsis>
- <adm:description>
- The name must be unique among all backends in the server. The backend ID may
- not be altered after the backend is created in the server.
- </adm:description>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-backend-id</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="writability-mode" mandatory="true">
- <adm:synopsis>
- Specifies the behavior that the backend should use when processing
- write operations.
- </adm:synopsis>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="enabled">
- <adm:synopsis>
- Allows write operations to be performed in that backend (if
- the requested operation is valid, the user has permission to
- perform the operation, the backend supports that type of
- write operation, and the global writability-mode property is
- also enabled).
- </adm:synopsis>
- </adm:value>
- <adm:value name="disabled">
- <adm:synopsis>
- Causes all write attempts to fail.
- </adm:synopsis>
- </adm:value>
- <adm:value name="internal-only">
- <adm:synopsis>
- Causes external write attempts to fail but allows writes by
- replication and internal operations.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-writability-mode</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="base-dn" mandatory="true" multi-valued="true">
- <adm:synopsis>
- Specifies the base DN(s) for the data that the backend handles.
- </adm:synopsis>
- <adm:description>
- A single backend may be responsible for one or more base DNs. Note
- that no two backends may have the same base DN although one
- backend may have a base DN that is below a base DN provided by
- another backend (similar to the use of sub-suffixes in the Sun
- Java System Directory Server). If any of the base DNs is
- subordinate to a base DN for another backend, then all base DNs
- for that backend must be subordinate to that same base DN.
- </adm:description>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- No administrative action is required by default although some
- action may be required on a per-backend basis before the new
- base DN may be used.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/BackupBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/BackupBackendConfiguration.xml
deleted file mode 100644
index 8836301..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/BackupBackendConfiguration.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="backup-backend" plural-name="backup-backends"
- package="org.forgerock.opendj.admin" extends="backend"
- advanced="true" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides read-only access to the set of backups
- that are available for <adm:product-name />.
- </adm:synopsis>
- <adm:description>
- It is provided as a convenience feature that makes it easier to determine what
- backups are available to be restored if necessary.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-backup-backend</ldap:name>
- <ldap:superior>ds-cfg-backend</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.backends.BackupBackend</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="writability-mode" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>disabled</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="backup-directory" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies the path to a backup directory containing one or more
- backups for a particular backend.
- </adm:synopsis>
- <adm:description>
- This is a multivalued property. Each value may specify a
- different backup directory if desired (one for each backend
- for which backups are taken). Values may be either absolute paths
- or paths that are relative to the base of the <adm:product-name /> directory
- server installation.
- </adm:description>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-backup-directory</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/Base64PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/Base64PasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index ac1a50c..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/Base64PasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="base64-password-storage-scheme"
- plural-name="base64-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords using the BASE64
- encoding mechanism.
- </adm:synopsis>
- <adm:description>
- This scheme contains only an implementation for the user password
- syntax, with a storage scheme name of "BASE64". The
- <adm:user-friendly-name />
- merely obscures the password so that the clear-text password
- is not available to casual observers. However, it offers no real
- protection and should only be used if there are client applications
- that specifically require this capability.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-base64-password-storage-scheme</ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.Base64PasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/BlindTrustManagerProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/BlindTrustManagerProviderConfiguration.xml
deleted file mode 100644
index 56355e4..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/BlindTrustManagerProviderConfiguration.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="blind-trust-manager-provider"
- plural-name="blind-trust-manager-providers"
- package="org.forgerock.opendj.admin" extends="trust-manager-provider"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The blind trust manager provider always trusts any certificate that
- is presented to it, regardless of its issuer, subject, and validity
- dates.
- </adm:synopsis>
- <adm:description>
- Use the blind trust manager provider only for testing
- purposes, because it allows clients to use forged certificates
- and authenticate as virtually any user in the server.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-blind-trust-manager-provider</ldap:name>
- <ldap:superior>ds-cfg-trust-manager-provider</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.BlindTrustManagerProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/BlowfishPasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/BlowfishPasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index 64dcadb..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/BlowfishPasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="blowfish-password-storage-scheme"
- plural-name="blowfish-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords using the Blowfish
- reversible encryption mechanism.
- </adm:synopsis>
- <adm:description>
- This scheme contains only an implementation for the user password
- syntax, with a storage scheme name of "BLOWFISH".
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-blowfish-password-storage-scheme</ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.BlowfishPasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CancelExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CancelExtendedOperationHandlerConfiguration.xml
deleted file mode 100644
index f8c7855..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CancelExtendedOperationHandlerConfiguration.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="cancel-extended-operation-handler"
- plural-name="cancel-extended-operation-handlers"
- package="org.forgerock.opendj.admin"
- extends="extended-operation-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides support for the LDAP cancel extended operation as defined
- in RFC 3909.
- </adm:synopsis>
- <adm:description>
- It allows clients to cancel operations initiated from earlier
- requests. The property ensures that both the cancel request and the
- operation being canceled receives response messages.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-cancel-extended-operation-handler</ldap:name>
- <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.CancelExtendedOperation
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CertificateAttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CertificateAttributeSyntaxConfiguration.xml
deleted file mode 100644
index 6786200..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CertificateAttributeSyntaxConfiguration.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2012 ForgeRock AS.
- ! -->
-<adm:managed-object name="certificate-attribute-syntax"
- plural-name="certificate-attribute-syntaxes"
- extends="attribute-syntax" package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- define an attribute syntax for storing X.509 Certificates.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-certificate-attribute-syntax</ldap:name>
- <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.schema.CertificateSyntax
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="strict-format" advanced="true">
- <adm:synopsis>
- Indicates whether or not X.509 Certificate values are required to
- strictly comply with the standard definition for this syntax.
- </adm:synopsis>
- <adm:description>
- When set to false, certificates will not be validated and, as a result
- any sequence of bytes will be acceptable.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-strict-format</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CertificateMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CertificateMapperConfiguration.xml
deleted file mode 100644
index f449622..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CertificateMapperConfiguration.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="certificate-mapper"
- plural-name="certificate-mappers"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for establishing a mapping between a client
- certificate and the entry for the user that corresponds to that
- certificate.
- </adm:synopsis>
- <adm:tag name="security" />
- <adm:tag name="user-management" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-certificate-mapper</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.CertificateMapper
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ChangeNumberControlPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ChangeNumberControlPluginConfiguration.xml
deleted file mode 100644
index baba10f..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ChangeNumberControlPluginConfiguration.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2012 ForgeRock AS
- ! -->
-<adm:managed-object name="change-number-control-plugin"
- plural-name="change-number-control-plugins" package="org.forgerock.opendj.admin"
- extends="plugin" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- returns the change number generated by the replication subsystem.
- </adm:synopsis>
- <adm:description>
- The <adm:user-friendly-name /> returns the change number generated
- by the Multi-Master Replication subsystem when :
- - the Multi-Master Replication is configured and enabled
- - the request is a write operation (add, delete, modify, moddn)
- - the control is part of a request.
- If all of the above are true, the response contains a control response
- with a string representing the change number.
- The implementation for the chnage number control plug-in is contained
- in the org.opends.server.plugins.ChangeNumberControlPlugin class. It must be
- configured with the postOperationAdd, postOperationDelete,
- postOperationModify and postOperationModifyDN plug-in types,
- but it does not have any other custom configuration.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-change-number-control-plugin</ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.plugins.ChangeNumberControlPlugin</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="plugin-type" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>postOperationAdd</adm:value>
- <adm:value>postOperationDelete</adm:value>
- <adm:value>postOperationModify</adm:value>
- <adm:value>postOperationModifyDN</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CharacterSetPasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CharacterSetPasswordValidatorConfiguration.xml
deleted file mode 100644
index 1e5cd76..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CharacterSetPasswordValidatorConfiguration.xml
+++ /dev/null
@@ -1,198 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011-2012 ForgeRock AS
- ! -->
-<adm:managed-object name="character-set-password-validator"
- plural-name="character-set-password-validators"
- package="org.forgerock.opendj.admin" extends="password-validator"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- determines whether a proposed password is acceptable by
- checking whether it contains a sufficient number of characters
- from one or more user-defined character sets and ranges.
- </adm:synopsis>
- <adm:description>
- For example,
- the validator can ensure that passwords must
- have at least one lowercase letter, one uppercase letter, one digit,
- and one symbol.
- </adm:description>
- <adm:constraint>
- <adm:synopsis>
- The <adm:user-friendly-name/> must have at least one character set
- or range specified.
- </adm:synopsis>
- <adm:condition>
- <adm:or>
- <adm:is-present property="character-set" />
- <adm:is-present property="character-set-ranges" />
- </adm:or>
- </adm:condition>
- </adm:constraint>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-character-set-password-validator</ldap:name>
- <ldap:superior>ds-cfg-password-validator</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.CharacterSetPasswordValidator
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="character-set" mandatory="false"
- multi-valued="true">
- <adm:synopsis>
- Specifies a character set containing characters that a password
- may contain and a value indicating the minimum number of
- characters required from that set.
- </adm:synopsis>
- <adm:description>
- Each value must be an integer (indicating the minimum required
- characters from the set which may be zero, indicating that the
- character set is optional) followed by a colon and the characters to
- include in that set (for example, "3:abcdefghijklmnopqrstuvwxyz"
- indicates that a user password must contain at least three
- characters from the set of lowercase ASCII letters). Multiple
- character sets can be defined in separate values, although no
- character can appear in more than one character set.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- If no sets are specified, the validator only uses the
- defined character ranges.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string case-insensitive="false" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-character-set</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="character-set-ranges" mandatory="false"
- multi-valued="true">
- <adm:synopsis>
- Specifies a character range containing characters that a password
- may contain and a value indicating the minimum number of
- characters required from that range.
- </adm:synopsis>
- <adm:description>
- Each value must be an integer (indicating the minimum required
- characters from the range which may be zero, indicating that the
- character range is optional) followed by a colon and one or more
- range specifications. A range specification is 3 characters: the
- first character allowed, a minus, and the last character allowed.
- For example, "3:A-Za-z0-9". The ranges in each value should not
- overlap, and the characters in each range specification should be
- ordered.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- If no ranges are specified, the validator only uses the
- defined character sets.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string case-insensitive="false" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-character-set-ranges</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allow-unclassified-characters" mandatory="true">
- <adm:synopsis>
- Indicates whether this password validator allows passwords to
- contain characters outside of any of the user-defined character
- sets and ranges.
- </adm:synopsis>
- <adm:description>
- If this is "false", then only those characters in the user-defined
- character sets and ranges may be used in passwords. Any password
- containing a character not included in any character set or range
- will be rejected.
- </adm:description>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allow-unclassified-characters</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="min-character-sets" mandatory="false">
- <adm:synopsis>
- Specifies the minimum number of character sets and ranges that a
- password must contain.
- </adm:synopsis>
- <adm:description>
- This property should only be used in conjunction with optional character
- sets and ranges (those requiring zero characters). Its value must
- include any mandatory character sets and ranges (those requiring greater
- than zero characters). This is useful in situations where a password
- must contain characters from mandatory character sets and ranges, and
- characters from at least N optional character sets and ranges. For
- example, it is quite common to require that a password contains at
- least one non-alphanumeric character as well as characters from two
- alphanumeric character sets (lower-case, upper-case, digits). In this
- case, this property should be set to 3.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The password must contain characters from each of the mandatory
- character sets and ranges and, if there are optional character sets
- and ranges, at least one character from one of the optional character
- sets and ranges.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-min-character-sets</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ClearPasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ClearPasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index cf61ad4..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ClearPasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="clear-password-storage-scheme"
- plural-name="clear-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for storing user passwords in clear text,
- without any form of obfuscation.
- </adm:synopsis>
- <adm:description>
- This scheme contains only an implementation for the user password
- syntax, with a storage scheme name of "CLEAR". The
- <adm:user-friendly-name />
- should only be used if there are client applications that specifically
- require this capability.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-clear-password-storage-scheme</ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.ClearPasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ClientConnectionMonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ClientConnectionMonitorProviderConfiguration.xml
deleted file mode 100644
index 4f6291b..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ClientConnectionMonitorProviderConfiguration.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="client-connection-monitor-provider"
- plural-name="client-connection-monitor-providers"
- package="org.forgerock.opendj.admin" extends="monitor-provider"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- exposes monitor information about the set of client connections that
- are established to the <adm:product-name /> directory server.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-client-connection-monitor-provider</ldap:name>
- <ldap:superior>ds-cfg-monitor-provider</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.monitors.ClientConnectionMonitorProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CollationMatchingRuleConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CollationMatchingRuleConfiguration.xml
deleted file mode 100644
index 9083179..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CollationMatchingRuleConfiguration.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="collation-matching-rule"
- plural-name="collation-matching-rules"
- package="org.forgerock.opendj.admin" extends="matching-rule"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- provide support for locale-specific filtering and indexing.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-collation-matching-rule</ldap:name>
- <ldap:superior>ds-cfg-matching-rule</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="matching-rule-type" multi-valued="true" mandatory="true">
- <adm:synopsis>
- the types of matching rules that should be supported for each locale
- </adm:synopsis>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="equality">
- <adm:synopsis>
- Specifies if equality type collation matching rule needs to
- be created for each locale.
- </adm:synopsis>
- </adm:value>
- <adm:value name="less-than">
- <adm:synopsis>
- Specifies if less-than type collation matching rule needs to
- be created for each locale.
- </adm:synopsis>
- </adm:value>
- <adm:value name="less-than-or-equal-to">
- <adm:synopsis>
- Specifies if less-than-or-equal-to type collation matching rule
- needs to be created for each locale.
- </adm:synopsis>
- </adm:value>
- <adm:value name="greater-than">
- <adm:synopsis>
- Specifies if greater-than type collation matching rule needs
- to be created for each locale.
- </adm:synopsis>
- </adm:value>
- <adm:value name="greater-than-or-equal-to">
- <adm:synopsis>
- Specifies if greater-than-or-equal-to type collation matching rule
- needs to be created for each locale.
- </adm:synopsis>
- </adm:value>
- <adm:value name="substring">
- <adm:synopsis>
- Specifies if substring type collation matching rule needs to be
- created for each locale.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-matching-rule-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="collation" multi-valued="true" mandatory="true">
- <adm:synopsis>
- the set of supported locales
- </adm:synopsis>
- <adm:description>
- Collation must be specified using the syntax: LOCALE:OID
- </adm:description>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^[a-z-A-Z]+:[0-9.]+\\d$</adm:regex>
- <adm:usage>LOCALE:OID</adm:usage>
- <adm:synopsis>
- A Locale followed by a ":" and an OID.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-collation</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.schema.CollationMatchingRuleFactory
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
\ No newline at end of file
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CollectiveAttributeSubentriesVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CollectiveAttributeSubentriesVirtualAttributeConfiguration.xml
deleted file mode 100644
index 3f3042a..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CollectiveAttributeSubentriesVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2009 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="collective-attribute-subentries-virtual-attribute"
- plural-name="collective-attribute-subentries-virtual-attributes"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- generates a virtual attribute that specifies all collective
- attribute subentries that affect the entry.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-collective-attribute-subentries-virtual-attribute
- </ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.CollectiveAttributeSubentriesVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="conflict-behavior" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>virtual-overrides-real</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="attribute-type">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>collectiveAttributeSubentries</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ConfigFileHandlerBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ConfigFileHandlerBackendConfiguration.xml
deleted file mode 100644
index ca5dd82..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ConfigFileHandlerBackendConfiguration.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="config-file-handler-backend"
- plural-name="config-file-handler-backends"
- package="org.forgerock.opendj.admin" extends="backend"
- advanced="true" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- allows clients to access the server configuration over protocol, and
- allow both read and write operations. Note: Modify DN operations are not
- supported for entries in the server configuration.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-config-file-handler-backend</ldap:name>
- <ldap:superior>ds-cfg-backend</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.ConfigFileHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="writability-mode" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>enabled</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ConnectionHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ConnectionHandlerConfiguration.xml
deleted file mode 100644
index 257bf51..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ConnectionHandlerConfiguration.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2009 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="connection-handler"
- plural-name="connection-handlers"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for handling all interaction with the clients,
- including accepting the connections, reading requests, and sending
- responses.
- </adm:synopsis>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-connection-handler</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.ConnectionHandler
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property-reference name="allowed-client" />
- <adm:property-reference name="denied-client" />
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CountryStringAttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CountryStringAttributeSyntaxConfiguration.xml
deleted file mode 100644
index 89ef3f4..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CountryStringAttributeSyntaxConfiguration.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2012 ForgeRock AS.
- ! Portions Copyright 2012 Manuel Gaupp
- ! -->
-<adm:managed-object name="country-string-attribute-syntax"
- plural-name="country-string-attribute-syntaxes"
- extends="attribute-syntax" package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- define an attribute syntax for storing country codes.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-country-string-attribute-syntax</ldap:name>
- <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.schema.CountryStringSyntax
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="strict-format" advanced="true">
- <adm:synopsis>
- Indicates whether or not country code values are required to
- strictly comply with the standard definition for this syntax.
- </adm:synopsis>
- <adm:description>
- When set to false, country codes will not be validated and, as
- a result any string containing 2 characters will be acceptable.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-strict-format</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CramMD5SASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CramMD5SASLMechanismHandlerConfiguration.xml
deleted file mode 100644
index bb1f096..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CramMD5SASLMechanismHandlerConfiguration.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="cram-md5-sasl-mechanism-handler"
- plural-name="cram-md5-sasl-mechanism-handlers"
- package="org.forgerock.opendj.admin" extends="sasl-mechanism-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The CRAM-MD5 SASL mechanism provides the ability for clients to
- perform password-based authentication in a manner that does not
- expose their password in the clear.
- </adm:synopsis>
- <adm:description>
- Rather than including the
- password in the bind request, the CRAM-MD5 mechanism uses a
- two-step process in which the client needs only to prove that it
- knows the password. The server sends randomly-generated data to
- the client that is to be used in the process, which makes it
- resistant to replay attacks. The one-way message digest
- algorithm ensures that the original clear-text password is not
- exposed. Note that the algorithm used by the CRAM-MD5 mechanism
- requires that both the client and the server have access to the
- clear-text password (or potentially a value that is derived from
- the clear-text password). In order to authenticate to the server
- using CRAM-MD5, the password for a user's account must be encoded
- using a reversible password storage scheme that allows the server
- to have access to the clear-text value.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-cram-md5-sasl-mechanism-handler</ldap:name>
- <ldap:superior>ds-cfg-sasl-mechanism-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.CRAMMD5SASLMechanismHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="identity-mapper" mandatory="true">
- <adm:synopsis>
- Specifies the name of the identity mapper used
- with this SASL mechanism handler to match the authentication
- ID included in the SASL bind request to the corresponding
- user in the directory.
- </adm:synopsis>
- <adm:syntax>
- <adm:aggregation relation-name="identity-mapper"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced identity mapper must be enabled when the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-identity-mapper</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CryptPasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CryptPasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index 883e58b..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CryptPasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2010-2013 ForgeRock AS
- ! Portions Copyright 2012 Dariusz Janny <dariusz.janny@gmail.com>
- ! -->
-<adm:managed-object name="crypt-password-storage-scheme"
- plural-name="crypt-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords like Unix crypt does.
- Like on most Unix systems, the password may be encrypted using different
- algorithms, either Unix crypt, md5, sha256 or sha512.
- </adm:synopsis>
- <adm:description>
- This implementation contains an implementation for the user
- password syntax, with a storage scheme name of "CRYPT". Like on most
- Unixes, the "CRYPT" storage scheme has different algorithms, the default
- being the Unix crypt.
-
- Even though the Unix crypt is a one-way digest, it
- is relatively weak by today's standards. Because it supports
- only a 12-bit salt (meaning that there are only 4096 possible ways to
- encode a given password), it is also vulnerable to dictionary attacks.
- You should therefore use this storage scheme only in cases where an
- external application expects to retrieve the password and verify it
- outside of the directory, rather than by performing an LDAP bind.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-crypt-password-storage-scheme</ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.CryptPasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="crypt-password-storage-encryption-algorithm" mandatory="true">
- <adm:synopsis>
- Specifies the algorithm to use to encrypt new passwords.
- </adm:synopsis>
- <adm:description>
- Select the crypt algorithm to use to encrypt new passwords.
- The value can either be "unix", which means the password is encrypted
- with the Unix crypt algorithm, or md5 which means the password is
- encrypted with the BSD MD5 algorithm and has a $1$ prefix,
- or sha256 which means the password is encrypted with the SHA256 algorithm
- and has a $5$ prefix, or sha512 which means the password is encrypted with
- the SHA512 algorithm and has a $6$ prefix.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>unix</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="unix">
- <adm:synopsis>
- New passwords are encrypted with the Unix crypt algorithm.
- </adm:synopsis>
- </adm:value>
- <adm:value name="md5">
- <adm:synopsis>
- New passwords are encrypted with the BSD MD5 algorithm.
- </adm:synopsis>
- </adm:value>
- <adm:value name="sha256">
- <adm:synopsis>
- New passwords are encrypted with the Unix crypt SHA256 algorithm.
- </adm:synopsis>
- </adm:value>
- <adm:value name="sha512">
- <adm:synopsis>
- New passwords are encrypted with the Unix crypt SHA512 algorithm.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-crypt-password-storage-encryption-algorithm</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CryptoManagerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CryptoManagerConfiguration.xml
deleted file mode 100644
index 184d39a..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/CryptoManagerConfiguration.xml
+++ /dev/null
@@ -1,311 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="crypto-manager" plural-name="crypto-managers"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a common interface for performing compression,
- decompression, hashing, encryption and other kinds of cryptographic
- operations.
- </adm:synopsis>
- <adm:tag name="security" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-crypto-manager</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="digest-algorithm" advanced="true">
- <adm:synopsis>
- Specifies the preferred message digest algorithm for the directory server.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately and
- only affect cryptographic operations performed after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>SHA-1</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-digest-algorithm</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="mac-algorithm" advanced="true">
- <adm:synopsis>
- Specifies the preferred MAC algorithm for the directory server.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but only
- affect cryptographic operations performed after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>HmacSHA1</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-mac-algorithm</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="mac-key-length" advanced="true">
- <adm:synopsis>
- Specifies the key length in bits for the preferred MAC algorithm.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but only
- affect cryptographic operations performed after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>128</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-mac-key-length</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="cipher-transformation" advanced="true">
- <adm:synopsis>
- Specifies the cipher for the directory server
- using the syntax algorithm/mode/padding.
- </adm:synopsis>
- <adm:description>
- The full transformation is required: specifying only an algorithm
- and allowing the cipher provider to supply the default mode and
- padding is not supported, because there is no guarantee these
- default values are the same among different implementations.
- Some cipher algorithms, including RC4 and ARCFOUR, do not have a
- mode or padding, and hence must be specified using NONE for the
- mode field and NoPadding for the padding field. For example,
- RC4/NONE/NoPadding.
- </adm:description>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but
- only affect cryptographic operations performed after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>AES/CBC/PKCS5Padding</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-cipher-transformation</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="cipher-key-length" advanced="true">
- <adm:synopsis>
- Specifies the key length in bits for the preferred cipher.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but
- only affect cryptographic operations performed after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>128</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-cipher-key-length</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="key-wrapping-transformation" multi-valued="false" advanced="false">
- <adm:synopsis>
- The preferred key wrapping transformation for the directory server. This value must
- be the same for all server instances in a replication topology.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property will take effect immediately but will
- only affect cryptographic operations performed after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>RSA/ECB/OAEPWITHSHA-1ANDMGF1PADDING</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-key-wrapping-transformation</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ssl-protocol" multi-valued="true">
- <adm:synopsis>
- Specifies the names of the SSL protocols that are allowed for
- use in SSL or TLS communication.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but
- only impact new SSL/TLS-based sessions created after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Uses the default set of SSL protocols provided by the server's
- JVM.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-protocol</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ssl-cipher-suite" multi-valued="true">
- <adm:synopsis>
- Specifies the names of the SSL cipher suites that are allowed
- for use in SSL or TLS communication.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but
- only impact new SSL/TLS-based sessions created after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Uses the default set of SSL cipher suites provided by the
- server's JVM.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-cipher-suite</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ssl-encryption">
- <adm:synopsis>
- Specifies whether SSL/TLS is used to provide encrypted
- communication between two <adm:product-name /> server components.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but
- only impact new SSL/TLS-based sessions created after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-encryption</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property-reference name="ssl-cert-nickname" />
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DebugLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DebugLogPublisherConfiguration.xml
deleted file mode 100644
index 509568b..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DebugLogPublisherConfiguration.xml
+++ /dev/null
@@ -1,252 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions copyright 2013 ForgeRock AS
- ! -->
-<adm:managed-object name="debug-log-publisher"
- plural-name="debug-log-publishers"
- package="org.forgerock.opendj.admin" extends="log-publisher"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for distributing debug log messages from the debug
- logger to a destination.
- </adm:synopsis>
- <adm:description>
- Debug log messages provide information that can be used for debugging
- or troubleshooting problems in the server, or for providing more
- detailed information about the processing that the server performs.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-debug-log-publisher</ldap:name>
- <ldap:superior>ds-cfg-log-publisher</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:relation name="debug-target">
- <adm:one-to-many naming-property="debug-scope" />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Debug Targets</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="debug-level" />
- <cli:default-property name="debug-category" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:property-override name="java-class">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.api.DebugLogPublisher</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="default-debug-level" mandatory="true">
- <adm:synopsis>
- The lowest severity level of debug messages to log when none of
- the defined targets match the message.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>error</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="disabled">
- <adm:synopsis>No messages will be logged.</adm:synopsis>
- </adm:value>
- <adm:value name="error">
- <adm:synopsis>
- Messages with severity level of ERROR or higher will be
- logged.
- </adm:synopsis>
- </adm:value>
- <adm:value name="warning">
- <adm:synopsis>
- Messages with severity level of WARNING or higher will be
- logged.
- </adm:synopsis>
- </adm:value>
- <adm:value name="info">
- <adm:synopsis>
- Messages with severity level of INFO or higher will be
- logged.
- </adm:synopsis>
- </adm:value>
- <adm:value name="verbose">
- <adm:synopsis>
- Messages with severity level of VERBOSE or higher will be
- logged.
- </adm:synopsis>
- </adm:value>
- <adm:value name="all">
- <adm:synopsis>
- Messages with any severity level will be logged.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-default-debug-level</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="default-debug-category" multi-valued="true">
- <adm:synopsis>
- The debug message categories to be logged when none of the defined
- targets match the message.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Messages with any category will be logged if they have a
- sufficient debug level.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="caught">
- <adm:synopsis>Exception caught.</adm:synopsis>
- </adm:value>
- <adm:value name="constructor">
- <adm:synopsis>Constructor entry.</adm:synopsis>
- </adm:value>
- <adm:value name="data">
- <adm:synopsis>Raw data dump.</adm:synopsis>
- </adm:value>
- <adm:value name="database-access">
- <adm:synopsis>Access to a backend database.</adm:synopsis>
- </adm:value>
- <adm:value name="enter">
- <adm:synopsis>Method entry.</adm:synopsis>
- </adm:value>
- <adm:value name="exit">
- <adm:synopsis>Method exit.</adm:synopsis>
- </adm:value>
- <adm:value name="message">
- <adm:synopsis>Arbitrary debug message.</adm:synopsis>
- </adm:value>
- <adm:value name="protocol">
- <adm:synopsis>Protocol element dump.</adm:synopsis>
- </adm:value>
- <adm:value name="thrown">
- <adm:synopsis>Exception throw from method.</adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-default-debug-category</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="default-omit-method-entry-arguments">
- <adm:synopsis>
- Indicates whether to include method arguments in debug
- messages logged by default.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-default-omit-method-entry-arguments
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="default-omit-method-return-value">
- <adm:synopsis>
- Indicates whether to include the return value in debug
- messages logged by default.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-default-omit-method-return-value</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="default-include-throwable-cause">
- <adm:synopsis>
- Indicates whether to include the cause of exceptions in
- exception thrown and caught messages logged by default.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-default-include-throwable-cause</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="default-throwable-stack-frames">
- <adm:synopsis>
- Indicates the number of stack frames to include in the
- stack trace for method entry and exception thrown messages.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>2147483647</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" upper-limit="2147483647" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-default-throwable-stack-frames</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DebugTargetConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DebugTargetConfiguration.xml
deleted file mode 100644
index eaa79c1..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DebugTargetConfiguration.xml
+++ /dev/null
@@ -1,248 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="debug-target" plural-name="debug-targets"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- define the types of messages logged by the debug logPublisher.
- </adm:synopsis>
- <adm:description>
- Debug targets allow for fine-grain control of which messages are logged
- based on the package, class, or method that generated the message. Each
- debug target configuration entry resides below the entry with RDN of
- "cn=Debug Target" immediately below the parent ds-cfg-debug-log-publisher
- entry.
- </adm:description>
- <adm:tag name="logging" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-debug-target</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="debug-scope" mandatory="true" read-only="true">
- <adm:synopsis>
- Specifies the fully-qualified <adm:product-name /> Java package, class, or method affected
- by the settings in this target definition. Use the number
- character (#) to separate the class name and the method name
- (that is, org.opends.server.core.DirectoryServer#startUp).
- </adm:synopsis>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>
- ^([A-Za-z][A-Za-z0-9_]*\\.)*[A-Za-z][A-Za-z0-9_]*(#[A-Za-z][A-Za-z0-9_]*)?$
- </adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- The fully-qualified <adm:product-name /> Java package, class, or method
- name.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-debug-scope</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="debug-level" mandatory="true">
- <adm:synopsis>
- Specifies the lowest severity level of debug messages to log.
- </adm:synopsis>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="disabled">
- <adm:synopsis>No messages are logged.</adm:synopsis>
- </adm:value>
- <adm:value name="error">
- <adm:synopsis>
- Messages with severity level of ERROR or higher are
- logged.
- </adm:synopsis>
- </adm:value>
- <adm:value name="warning">
- <adm:synopsis>
- Messages with severity level of WARNING or higher are
- logged.
- </adm:synopsis>
- </adm:value>
- <adm:value name="info">
- <adm:synopsis>
- Messages with severity level of INFO or higher are
- logged.
- </adm:synopsis>
- </adm:value>
- <adm:value name="verbose">
- <adm:synopsis>
- Messages with severity level of VERBOSE or higher are
- logged.
- </adm:synopsis>
- </adm:value>
- <adm:value name="all">
- <adm:synopsis>
- Messages with any severity level are logged.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-debug-level</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="debug-category" multi-valued="true">
- <adm:synopsis>
- Specifies the debug message categories to be logged.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Messages with any category are logged if they have a
- sufficient debug level.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="caught">
- <adm:synopsis>Exception caught</adm:synopsis>
- </adm:value>
- <adm:value name="constructor">
- <adm:synopsis>Constructor entry</adm:synopsis>
- </adm:value>
- <adm:value name="data">
- <adm:synopsis>Raw data dump</adm:synopsis>
- </adm:value>
- <adm:value name="database-access">
- <adm:synopsis>Access to a backend database.</adm:synopsis>
- </adm:value>
- <adm:value name="enter">
- <adm:synopsis>Method entry</adm:synopsis>
- </adm:value>
- <adm:value name="exit">
- <adm:synopsis>Method exit</adm:synopsis>
- </adm:value>
- <adm:value name="message">
- <adm:synopsis>Arbitrary debug message</adm:synopsis>
- </adm:value>
- <adm:value name="protocol">
- <adm:synopsis>Protocol element dump</adm:synopsis>
- </adm:value>
- <adm:value name="thrown">
- <adm:synopsis>Exception thrown from method</adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-debug-category</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="omit-method-entry-arguments">
- <adm:synopsis>
- Specifies the property to indicate whether to include method arguments in debug
- messages.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-omit-method-entry-arguments</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="omit-method-return-value">
- <adm:synopsis>
- Specifies the property to indicate whether to include the return value in debug
- messages.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-omit-method-return-value</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="include-throwable-cause">
- <adm:synopsis>
- Specifies the property to indicate whether to include the cause of exceptions in
- exception thrown and caught messages.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-include-throwable-cause</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="throwable-stack-frames">
- <adm:synopsis>
- Specifies the property to indicate the number of stack frames to include in the
- stack trace for method entry and exception thrown messages.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-throwable-stack-frames</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DictionaryPasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DictionaryPasswordValidatorConfiguration.xml
deleted file mode 100644
index c13b6a5..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DictionaryPasswordValidatorConfiguration.xml
+++ /dev/null
@@ -1,197 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 profiq, s.r.o.
- ! Portions copyright 2012 ForgeRock AS.
- ! -->
-<adm:managed-object name="dictionary-password-validator"
- plural-name="dictionary-password-validators"
- package="org.forgerock.opendj.admin" extends="password-validator"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- determines whether a proposed password is acceptable based
- on whether the given password value appears in a provided dictionary
- file.
- </adm:synopsis>
- <adm:description>
- A large dictionary file is provided with the server, but the
- administrator can supply an alternate dictionary. In this case,
- then the dictionary must be a plain-text file with
- one word per line.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-dictionary-password-validator</ldap:name>
- <ldap:superior>ds-cfg-password-validator</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.DictionaryPasswordValidator
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="dictionary-file" mandatory="true">
- <adm:synopsis>
- Specifies the path to the file containing a list of words that
- cannot be used as passwords.
- </adm:synopsis>
- <adm:description>
- It should be formatted with one word per line. The value can be an
- absolute path or a path that is relative to the
- <adm:product-name />
- instance root.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- For Unix and Linux systems: config/wordlist.txt.
- For Windows systems: config\\wordlist.txt
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>FILE</adm:usage>
- <adm:synopsis>
- The path to any text file contained on the system that is
- readable by the server.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-dictionary-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="case-sensitive-validation" mandatory="true">
- <adm:synopsis>
- Indicates whether this password validator is to treat password
- characters in a case-sensitive manner.
- </adm:synopsis>
- <adm:description>
- If it is set to true, then the validator rejects a password only
- if it appears in the dictionary with exactly the
- same capitalization as provided by the user.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-case-sensitive-validation</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="test-reversed-password" mandatory="true">
- <adm:synopsis>
- Indicates whether this password validator is to test the reversed
- value of the provided password as well as the order in which it
- was given.
- </adm:synopsis>
- <adm:description>
- For example, if the user provides a new password of
- "password" and this configuration attribute is set to true, then
- the value "drowssap" is also tested against attribute values
- in the user's entry.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-test-reversed-password</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="check-substrings" mandatory="false">
- <adm:synopsis>
- Indicates whether this password validator is to match portions of
- the password string against dictionary words.
- </adm:synopsis>
- <adm:description>
- If "false" then only match the entire password against words
- otherwise ("true") check whether the password contains words.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-check-substrings</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="min-substring-length" mandatory="false">
- <adm:synopsis>
- Indicates the minimal length of the substring within the password
- in case substring checking is enabled.
- </adm:synopsis>
- <adm:description>
- If "check-substrings" option is set to true, then this parameter
- defines the length of the smallest word which should be used for
- substring matching. Use with caution because values below 3 might
- disqualify valid passwords.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-min-substring-length</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DigestMD5SASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DigestMD5SASLMechanismHandlerConfiguration.xml
deleted file mode 100644
index d4d197c..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DigestMD5SASLMechanismHandlerConfiguration.xml
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="digest-md5-sasl-mechanism-handler"
- plural-name="digest-md5-sasl-mechanism-handlers"
- package="org.forgerock.opendj.admin" extends="sasl-mechanism-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The DIGEST-MD5 SASL mechanism
- is used to perform all processing related to SASL DIGEST-MD5
- authentication.
- </adm:synopsis>
- <adm:description>
- The DIGEST-MD5 SASL mechanism is very similar
- to the CRAM-MD5 mechanism in that it allows for password-based
- authentication without exposing the password in the clear
- (although it does require that both the client and the server
- have access to the clear-text password). Like the CRAM-MD5
- mechanism, it uses data that is randomly generated by the server
- to make it resistant to replay attacks, but it also includes
- randomly-generated data from the client, which makes it also
- resistant to problems resulting from weak server-side random
- number generation.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-digest-md5-sasl-mechanism-handler</ldap:name>
- <ldap:superior>ds-cfg-sasl-mechanism-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.DigestMD5SASLMechanismHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="realm">
- <adm:synopsis>
- Specifies the realms that is to be used by the server for
- DIGEST-MD5 authentication.
- </adm:synopsis>
- <adm:description>
- If this value is not provided, then the server defaults to use the fully
- qualified hostname of the machine.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- If this value is not provided, then the server defaults to use the fully
- qualified hostname of the machine.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- Any realm string that does not contain a comma.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-realm</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="quality-of-protection">
- <adm:synopsis>
- The name of a property that specifies the quality of protection
- the server will support.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>none</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="none">
- <adm:synopsis>
- QOP equals authentication only.
- </adm:synopsis>
- </adm:value>
- <adm:value name="integrity">
- <adm:synopsis>
- Quality of protection equals authentication with integrity
- protection.
- </adm:synopsis>
- </adm:value>
- <adm:value name="confidentiality">
- <adm:synopsis>
- Quality of protection equals authentication with integrity and
- confidentiality protection.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-quality-of-protection</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="identity-mapper" mandatory="true">
- <adm:synopsis>
- Specifies the name of the identity mapper that is to be used
- with this SASL mechanism handler to match the authentication
- or authorization
- ID included in the SASL bind request to the corresponding
- user in the directory.
- </adm:synopsis>
- <adm:syntax>
- <adm:aggregation relation-name="identity-mapper"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced identity mapper must be enabled when the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-identity-mapper</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="server-fqdn">
- <adm:synopsis>
- Specifies the DNS-resolvable fully-qualified domain name for the
- server that is used when validating the digest-uri parameter during
- the authentication process.
- </adm:synopsis>
- <adm:description>
- If this configuration attribute is
- present, then the server expects that clients use a digest-uri equal
- to "ldap/" followed by the value of this attribute. For example, if
- the attribute has a value of "directory.example.com", then the
- server expects clients to use a digest-uri of
- "ldap/directory.example.com". If no value is provided, then the
- server does not attempt to validate the digest-uri provided by the
- client and accepts any value.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The server attempts to determine the
- fully-qualified domain name dynamically.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- The fully-qualified address that is expected for clients to use
- when connecting to the server and authenticating via DIGEST-MD5.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-server-fqdn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DirectoryStringAttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DirectoryStringAttributeSyntaxConfiguration.xml
deleted file mode 100644
index 3d775f8..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DirectoryStringAttributeSyntaxConfiguration.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="directory-string-attribute-syntax"
- plural-name="directory-string-attribute-syntaxes"
- extends="attribute-syntax" package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- defines an attribute syntax for storing arbitrary string (and
- sometimes binary) data.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-directory-string-attribute-syntax</ldap:name>
- <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.schema.DirectoryStringSyntax
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="allow-zero-length-values" advanced="true">
- <adm:synopsis>
- Indicates whether zero-length (that is, an empty string) values are
- allowed.
- </adm:synopsis>
- <adm:description>
- This is technically not allowed by the revised LDAPv3
- specification, but some environments may require it for backward
- compatibility with servers that do allow it.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allow-zero-length-values</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DseeCompatAccessControlHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DseeCompatAccessControlHandlerConfiguration.xml
deleted file mode 100644
index cbbaedd..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DseeCompatAccessControlHandlerConfiguration.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2009 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="dsee-compat-access-control-handler"
- plural-name="dseecompat-access-control-handlers"
- package="org.forgerock.opendj.admin" extends="access-control-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides an implementation that uses syntax compatible with the
- Sun Java System Directory Server Enterprise Edition
- access control handlers.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-dsee-compat-access-control-handler</ldap:name>
- <ldap:superior>ds-cfg-access-control-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.authorization.dseecompat.AciHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="global-aci" multi-valued="true">
- <adm:synopsis>Defines global access control rules.</adm:synopsis>
- <adm:description>
- Global access control rules apply to all entries anywhere in the
- data managed by the <adm:product-name /> directory server. The global access control
- rules may be overridden by more specific access control rules
- placed in the data.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- No global access control rules are defined, which means
- that no access is allowed for any data in the server
- unless specifically granted by access control rules in the
- data.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aci />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-global-aci</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DynamicGroupImplementationConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DynamicGroupImplementationConfiguration.xml
deleted file mode 100644
index ee06e2d..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/DynamicGroupImplementationConfiguration.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="dynamic-group-implementation"
- plural-name="dynamic-group-implementations"
- package="org.forgerock.opendj.admin" extends="group-implementation"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a grouping mechanism in which the group membership is
- determined based on criteria defined in one or more LDAP URLs.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-dynamic-group-implementation</ldap:name>
- <ldap:superior>ds-cfg-group-implementation</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.extensions.DynamicGroup</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntityTagVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntityTagVirtualAttributeConfiguration.xml
deleted file mode 100644
index 97a37f3..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntityTagVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2012 ForgeRock AS
- ! -->
-<adm:managed-object name="entity-tag-virtual-attribute"
- plural-name="entity-tag-virtual-attributes"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The <adm:user-friendly-name /> ensures that all entries contain an
- "entity tag" or "Etag" as defined in section 3.11 of RFC 2616.
- </adm:synopsis>
- <adm:description>
- The entity tag may be used by clients, in conjunction with the assertion
- control, for optimistic concurrency control, as a way to help prevent
- simultaneous updates of an entry from conflicting with each other.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-entity-tag-virtual-attribute</ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.EntityTagVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="conflict-behavior" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>real-overrides-virtual</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="attribute-type">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>etag</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="checksum-algorithm">
- <adm:synopsis>
- The algorithm which should be used for calculating the entity tag
- checksum value.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>adler-32</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="adler-32">
- <adm:synopsis>
- The Adler-32 checksum algorithm which is almost as reliable as
- a CRC-32 but can be computed much faster.
- </adm:synopsis>
- </adm:value>
- <adm:value name="crc-32">
- <adm:synopsis>
- The CRC-32 checksum algorithm.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-checksum-algorithm</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="excluded-attribute" multi-valued="true">
- <adm:synopsis>
- The list of attributes which should be ignored when calculating the
- entity tag checksum value.
- </adm:synopsis>
- <adm:description>
- Certain attributes like "ds-sync-hist" may vary between replicas due to
- different purging schedules and should not be included in the checksum.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>ds-sync-hist</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-excluded-attribute</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryCacheConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryCacheConfiguration.xml
deleted file mode 100644
index 32904b6..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryCacheConfiguration.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="entry-cache" plural-name="entry-caches"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for caching entries which are likely to be accessed
- by client applications in order to improve <adm:product-name /> directory server
- performance.
- </adm:synopsis>
- <adm:tag name="database" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-entry-cache</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.EntryCache
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="cache-level" mandatory="true">
- <adm:synopsis>
- Specifies the cache level in the cache order if more than
- one instance of the cache is configured.
- </adm:synopsis>
- <adm:syntax>
- <adm:integer lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-cache-level</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryCacheMonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryCacheMonitorProviderConfiguration.xml
deleted file mode 100644
index b59ce28..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryCacheMonitorProviderConfiguration.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="entry-cache-monitor-provider"
- plural-name="entry-cache-monitor-providers"
- package="org.forgerock.opendj.admin" extends="monitor-provider"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- exposes monitor information about the state of <adm:product-name /> directory server
- entry caches.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-entry-cache-monitor-provider</ldap:name>
- <ldap:superior>ds-cfg-monitor-provider</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.monitors.EntryCacheMonitorProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryDNVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryDNVirtualAttributeConfiguration.xml
deleted file mode 100644
index d929556..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryDNVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="entry-dn-virtual-attribute"
- plural-name="entry-dn-virtual-attributes"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- generates the entryDN operational attribute in directory entries,
- which contains a normalized form of the entry's DN.
- </adm:synopsis>
- <adm:description>
- This attribute is defined in the draft-zeilenga-ldap-entrydn
- Internet Draft and contains the DN of the entry in which it is
- contained.
- This component provides the ability to use search filters containing the
- entry's DN.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-entry-dn-virtual-attribute</ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.EntryDNVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="conflict-behavior" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>virtual-overrides-real</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="attribute-type">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>entryDN</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryUUIDPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryUUIDPluginConfiguration.xml
deleted file mode 100644
index d7016f0..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryUUIDPluginConfiguration.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="entry-uuid-plugin"
- plural-name="entry-uuid-plugins" package="org.forgerock.opendj.admin"
- extends="plugin" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- generates values for the entryUUID operational attribute
- whenever an entry is added via protocol or imported from LDIF.
- </adm:synopsis>
- <adm:description>
- The entryUUID plug-in ensures that all entries
- added to the server, whether through an LDAP add operation or via
- an LDIF import, are assigned an entryUUID operational attribute if
- they do not already have one. The entryUUID attribute contains a
- universally unique identifier that can be used to identify an entry
- in a manner that does not change (even in the event of a modify DN
- operation). This plug-in generates a random UUID for entries created
- by an add operation, but the UUID is constructed from the DN of the
- entry during an LDIF import (which means that the same LDIF file
- can be imported on different systems but still get the same value
- for the entryUUID attribute). This behavior is based on the
- specification contained in RFC 4530. The implementation for the
- entry UUID plug-in is contained in the
- org.opends.server.plugins.EntryUUIDPlugin class. It must be
- configured with the preOperationAdd and ldifImport plug-in types,
- but it does not have any other custom configuration. This
- plug-in must be enabled in any directory that is intended to be used
- in a synchronization environment.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-entry-uuid-plugin</ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.plugins.EntryUUIDPlugin</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="plugin-type" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>ldifimport</adm:value>
- <adm:value>preoperationadd</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryUUIDVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryUUIDVirtualAttributeConfiguration.xml
deleted file mode 100644
index 63e801e..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/EntryUUIDVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="entry-uuid-virtual-attribute"
- plural-name="entry-uuid-virtual-attributes"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- ensures that all entries contained in private backends
- have values for the entryUUID operational attribute.
- </adm:synopsis>
- <adm:description>
- The entryUUID values are generated based on a normalized
- representation of the entry's DN, which does not cause a
- consistency problem because <adm:product-name /> does not allow modify DN
- operations to be performed in private backends.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-entry-uuid-virtual-attribute</ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.EntryUUIDVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="conflict-behavior" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>real-overrides-virtual</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="attribute-type">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>entryUUID</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ErrorLogAccountStatusNotificationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ErrorLogAccountStatusNotificationHandlerConfiguration.xml
deleted file mode 100644
index 940e029..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ErrorLogAccountStatusNotificationHandlerConfiguration.xml
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="error-log-account-status-notification-handler"
- plural-name="error-log-account-status-notification-handlers"
- extends="account-status-notification-handler"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is a notification handler that writes information
- to the server error log whenever an appropriate account status event
- occurs.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-error-log-account-status-notification-handler
- </ldap:name>
- <ldap:superior>
- ds-cfg-account-status-notification-handler
- </ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.ErrorLogAccountStatusNotificationHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="account-status-notification-type" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Indicates which types of event can trigger an account status notification.
- </adm:synopsis>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="account-temporarily-locked">
- <adm:synopsis>
- Generate a notification whenever a user account has been temporarily
- locked after too many failed attempts.
- </adm:synopsis>
- </adm:value>
- <adm:value name="account-permanently-locked">
- <adm:synopsis>
- Generate a notification whenever a user account has been permanently
- locked after too many failed attempts.
- </adm:synopsis>
- </adm:value>
- <adm:value name="account-unlocked">
- <adm:synopsis>
- Generate a notification whenever a user account has been unlocked by an
- administrator.
- </adm:synopsis>
- </adm:value>
- <adm:value name="account-idle-locked">
- <adm:synopsis>
- Generate a notification whenever a user account has been locked
- because it was idle for too long.
- </adm:synopsis>
- </adm:value>
- <adm:value name="account-reset-locked">
- <adm:synopsis>
- Generate a notification whenever a user account has been locked,
- because the password had been reset by an administrator but not changed
- by the user within the required interval.
- </adm:synopsis>
- </adm:value>
- <adm:value name="account-disabled">
- <adm:synopsis>
- Generate a notification whenever a user account has been disabled by an
- administrator.
- </adm:synopsis>
- </adm:value>
- <adm:value name="account-enabled">
- <adm:synopsis>
- Generate a notification whenever a user account has been enabled by an
- administrator.
- </adm:synopsis>
- </adm:value>
- <adm:value name="account-expired">
- <adm:synopsis>
- Generate a notification whenever a user authentication has failed
- because the account has expired.
- </adm:synopsis>
- </adm:value>
- <adm:value name="password-expired">
- <adm:synopsis>
- Generate a notification whenever a user authentication has failed
- because the password has expired.
- </adm:synopsis>
- </adm:value>
- <adm:value name="password-expiring">
- <adm:synopsis>
- Generate a notification whenever a password expiration
- warning is encountered for a user password for the first time.
- </adm:synopsis>
- </adm:value>
- <adm:value name="password-reset">
- <adm:synopsis>
- Generate a notification whenever a user's password is reset by an
- administrator.
- </adm:synopsis>
- </adm:value>
- <adm:value name="password-changed">
- <adm:synopsis>
- Generate a notification whenever a user changes his/her own
- password.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-account-status-notification-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ErrorLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ErrorLogPublisherConfiguration.xml
deleted file mode 100644
index e1e3984..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ErrorLogPublisherConfiguration.xml
+++ /dev/null
@@ -1,194 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions copyright 2013 ForgeRock AS
- ! -->
-<adm:managed-object name="error-log-publisher"
- plural-name="error-log-publishers"
- package="org.forgerock.opendj.admin" extends="log-publisher"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for distributing error log messages from the error
- logger to a destination.
- </adm:synopsis>
- <adm:description>
- Error log messages provide information about any warnings, errors,
- or significant events that are encountered during server processing.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-error-log-publisher</ldap:name>
- <ldap:superior>ds-cfg-log-publisher</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property-override name="java-class">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.api.ErrorLogPublisher</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="default-severity" multi-valued="true">
- <adm:synopsis>
- Specifies the default severity levels for the logger.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>fatal-error</adm:value>
- <adm:value>severe-warning</adm:value>
- <adm:value>severe-error</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="all">
- <adm:synopsis>
- Messages of all severity levels are logged.
- </adm:synopsis>
- </adm:value>
- <adm:value name="none">
- <adm:synopsis>
- No messages of any severity are logged by default. This
- value is intended to be used in conjunction with the
- override-severity property to define an error logger that
- will publish no error message beside the errors of a given
- category.
- </adm:synopsis>
- </adm:value>
- <adm:value name="fatal-error">
- <adm:synopsis>
- The error log severity that is used for messages that
- provide information about fatal errors which may force the
- server to shut down or operate in a significantly degraded
- state.
- </adm:synopsis>
- </adm:value>
- <adm:value name="info">
- <adm:synopsis>
- The error log severity that is used for messages that
- provide information about significant events within the
- server that are not warnings or errors.
- </adm:synopsis>
- </adm:value>
- <adm:value name="mild-error">
- <adm:synopsis>
- The error log severity that is used for messages that
- provide information about mild (recoverable) errors
- encountered during processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="mild-warning">
- <adm:synopsis>
- The error log severity that is used for messages that
- provide information about mild warnings triggered during
- processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="notice">
- <adm:synopsis>
- The error log severity that is used for the most
- important informational messages (i.e., information that
- should almost always be logged but is not associated with a
- warning or error condition).
- </adm:synopsis>
- </adm:value>
- <adm:value name="severe-error">
- <adm:synopsis>
- The error log severity that is used for messages that
- provide information about severe errors encountered during
- processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="severe-warning">
- <adm:synopsis>
- The error log severity that is used for messages that
- provide information about severe warnings triggered during
- processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="debug">
- <adm:synopsis>
- The error log severity that is used for messages that
- provide debugging information triggered during processing.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-default-severity</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="override-severity" multi-valued="true">
- <adm:TODO>
- This should be split into per-category properties whose value
- defaults to the default-severity. See issue 2503.
- </adm:TODO>
- <adm:synopsis>
- Specifies the override severity levels for the logger
- based on the category of the messages.
- </adm:synopsis>
- <adm:description>
- Each override severity level should include the category and the
- severity levels to log for that category, for example,
- core=mild-error,info,mild-warning. Valid categories are: core,
- extensions, protocol, config, log, util, schema, plugin, jeb,
- backend, tools, task, access-control, admin, sync, version,
- quicksetup, admin-tool, dsconfig, user-defined. Valid severities
- are: all, fatal-error, info, mild-error, mild-warning, notice,
- severe-error, severe-warning, debug.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- All messages with the default severity levels are logged.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- A string in the form category=severity1,severity2...
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-override-severity</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExactMatchIdentityMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExactMatchIdentityMapperConfiguration.xml
deleted file mode 100644
index 0e68c1e..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExactMatchIdentityMapperConfiguration.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="exact-match-identity-mapper"
- plural-name="exact-match-identity-mappers"
- package="org.forgerock.opendj.admin" extends="identity-mapper"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- maps an identifier string to user entries by searching for the entry
- containing a specified attribute whose value is the provided
- identifier. For example, the username provided by the client for DIGEST-MD5
- authentication must match the value of the uid attribute
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-exact-match-identity-mapper</ldap:name>
- <ldap:superior>ds-cfg-identity-mapper</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.ExactMatchIdentityMapper
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="match-attribute" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies the attribute whose value should exactly match the ID
- string provided to this identity mapper.
- </adm:synopsis>
- <adm:description>
- At least one value must be provided. All values must refer to the
- name or OID of an attribute type defined in the directory server
- schema. If multiple attributes or OIDs are provided, at least one of
- those attributes must contain the provided ID string value in exactly
- one entry. The internal search performed includes a logical OR across
- all of these values.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- uid
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-match-attribute</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="match-base-dn" mandatory="false" multi-valued="true">
- <adm:synopsis>
- Specifies the set of base DNs below which to search for users.
- </adm:synopsis>
- <adm:description>
- The base DNs will be used when performing searches to map the
- provided ID string to a user entry. If multiple values are given, searches
- are performed below all specified base DNs.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The server searches below all public naming contexts.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-match-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExtendedOperationHandlerConfiguration.xml
deleted file mode 100644
index 8e23722..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExtendedOperationHandlerConfiguration.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="extended-operation-handler"
- plural-name="extended-operation-handlers"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- processes the different types of extended operations in the server.
- </adm:synopsis>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-extended-operation-handler</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled (that is, whether the types of extended operations
- are allowed in the server).
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.ExtendedOperationHandler
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExtensionConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExtensionConfiguration.xml
deleted file mode 100644
index 3324004..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExtensionConfiguration.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="extension"
- plural-name="extensions"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- allows to extend the configuration with new type of objects.
- </adm:synopsis>
- <adm:description>
- It is an entry point for extensions that requires configuration objects
- that does not inherit from an existing top-level object.
- </adm:description>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-extension</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.Extension
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExternalChangelogDomainConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExternalChangelogDomainConfiguration.xml
deleted file mode 100644
index e3c45c5..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExternalChangelogDomainConfiguration.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2009 Sun Microsystems, Inc.
- ! Portions copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="external-changelog-domain"
- plural-name="external-changelog-domains"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides configuration of the external changelog for the replication domain.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-external-changelog-domain</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ecl-include" multi-valued="true" mandatory="false">
- <adm:synopsis>
- Specifies a list of attributes which should be published with every
- change log entry, regardless of whether or not the attribute itself
- has changed.
- </adm:synopsis>
- <adm:description>
- The list of attributes may include wild cards such as "*" and "+" as
- well as object class references prefixed with an ampersand, for
- example "@person".
- The included attributes will be published using the "includedAttributes"
- operational attribute as a single LDIF value rather like the
- "changes" attribute. For modify and modifyDN operations the included
- attributes will be taken from the entry before any changes were applied.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <!-- FIXME: can we constrain this with a regex? -->
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ecl-include</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ecl-include-for-deletes" multi-valued="true" mandatory="false">
- <adm:synopsis>
- Specifies a list of attributes which should be published with every
- delete operation change log entry, in addition to those specified by the
- "ecl-include" property.
- </adm:synopsis>
- <adm:description>
- This property provides a means for applications to archive entries after
- they have been deleted. See the description of the "ecl-include" property
- for further information about how the included attributes are published.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <!-- FIXME: can we constrain this with a regex? -->
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ecl-include-for-deletes</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExternalSASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExternalSASLMechanismHandlerConfiguration.xml
deleted file mode 100644
index 2a01348..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ExternalSASLMechanismHandlerConfiguration.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="external-sasl-mechanism-handler"
- plural-name="external-sasl-mechanism-handlers"
- package="org.forgerock.opendj.admin" extends="sasl-mechanism-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- performs all processing related to SASL EXTERNAL
- authentication.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-external-sasl-mechanism-handler</ldap:name>
- <ldap:superior>ds-cfg-sasl-mechanism-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.ExternalSASLMechanismHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="certificate-validation-policy" mandatory="true">
- <adm:synopsis>
- Indicates whether to attempt to validate the peer certificate
- against a certificate held in the user's entry.
- </adm:synopsis>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="always">
- <adm:synopsis>
- Always require the peer certificate to be present in the
- user's entry.
- </adm:synopsis>
- </adm:value>
- <adm:value name="ifpresent">
- <adm:synopsis>
- If the user's entry contains one or more certificates,
- require that one of them match the peer certificate.
- </adm:synopsis>
- </adm:value>
- <adm:value name="never">
- <adm:synopsis>
- Do not look for the peer certificate to be present in the
- user's entry.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-certificate-validation-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="certificate-attribute">
- <adm:synopsis>
- Specifies the name of the attribute to hold user
- certificates.
- </adm:synopsis>
- <adm:description>
- This property must specify the name of a valid attribute type defined in
- the server schema.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>userCertificate</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-certificate-attribute</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="certificate-mapper" mandatory="true">
- <adm:synopsis>
- Specifies the name of the certificate mapper that should be used
- to match client certificates to user entries.
- </adm:synopsis>
- <adm:syntax>
- <adm:aggregation relation-name="certificate-mapper"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced certificate mapper must be enabled when the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-certificate-mapper</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FIFOEntryCacheConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FIFOEntryCacheConfiguration.xml
deleted file mode 100644
index 2aee5f6..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FIFOEntryCacheConfiguration.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="fifo-entry-cache"
- plural-name="fifo-entry-caches" package="org.forgerock.opendj.admin"
- extends="entry-cache" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- use a FIFO queue to keep track of the cached entries.
- </adm:synopsis>
- <adm:description>
- Entries that have been in the cache the longest are the most likely
- candidates for purging if space is needed. In contrast to other
- cache structures, the selection of entries to purge is not based on
- how frequently or recently the entries have been accessed. This
- requires significantly less locking (it will only be required when
- an entry is added or removed from the cache, rather than each time
- an entry is accessed). Cache sizing is based on the percentage of
- free memory within the JVM, such that if enough memory is free, then
- adding an entry to the cache will not require purging, but if more
- than a specified percentage of the available memory within the JVM
- is already consumed, then one or more entries will need to be
- removed in order to make room for a new entry. It is also possible
- to configure a maximum number of entries for the cache. If this is
- specified, then the number of entries will not be allowed to exceed
- this value, but it may not be possible to hold this many entries if
- the available memory fills up first. Other configurable parameters
- for this cache include the maximum length of time to block while
- waiting to acquire a lock, and a set of filters that may be used to
- define criteria for determining which entries are stored in the
- cache. If a filter list is provided, then only entries matching at
- least one of the given filters will be stored in the cache.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-fifo-entry-cache</ldap:name>
- <ldap:superior>ds-cfg-entry-cache</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.FIFOEntryCache
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="lock-timeout" advanced="true">
- <adm:synopsis>
- Specifies the length of time to wait while attempting to acquire a read or
- write lock.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>2000.0ms</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="0"
- allow-unlimited="true" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-lock-timeout</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-memory-percent">
- <adm:synopsis>
- Specifies the maximum memory usage for the entry cache as a percentage of
- the total JVM memory.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>90</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="100" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-memory-percent</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-entries">
- <adm:synopsis>
- Specifies the maximum number of entries that we will allow in the cache.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>2147483647</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-entries</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property-reference name="include-filter" />
- <adm:property-reference name="exclude-filter" />
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedAccessLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedAccessLogPublisherConfiguration.xml
deleted file mode 100644
index b6240e9..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedAccessLogPublisherConfiguration.xml
+++ /dev/null
@@ -1,365 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2009 Sun Microsystems, Inc.
- ! Portions copyright 2011 ForgeRock AS.
- ! -->
-<adm:managed-object name="file-based-access-log-publisher"
- plural-name="file-based-access-log-publishers"
- package="org.forgerock.opendj.admin" extends="access-log-publisher"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- publish access messages to the file system.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-file-based-access-log-publisher</ldap:name>
- <ldap:superior>ds-cfg-access-log-publisher</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.loggers.TextAccessLogPublisher
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="asynchronous" mandatory="true" advanced="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- will publish records asynchronously.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-asynchronous</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="queue-size" advanced="true">
- <adm:synopsis>
- The maximum number of log records that can be stored in the
- asynchronous queue.
- </adm:synopsis>
- <adm:description>
- Setting the queue size to zero activates parallel log writer
- implementation which has no queue size limit and as such the
- parallel log writer should only be used on a very well tuned
- server configuration to avoid potential out of memory errors.
- </adm:description>
- <adm:requires-admin-action>
- <adm:other>
- <adm:synopsis>
- The <adm:user-friendly-name /> must be restarted if this property
- is changed and the asynchronous property is set to true.
- </adm:synopsis>
- </adm:other>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-queue-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-file" mandatory="true">
- <adm:synopsis>
- The file name to use for the log files generated by the
- <adm:user-friendly-name />.
- The path to the file is relative to the server root.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>FILE</adm:usage>
- <adm:synopsis>
- A path to an existing file that is readable by the server.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-file-permissions" mandatory="true">
- <adm:synopsis>
- The UNIX permissions of the log files created by this
- <adm:user-friendly-name />.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>640</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^([0-7][0-7][0-7])$</adm:regex>
- <adm:usage>MODE</adm:usage>
- <adm:synopsis>
- A valid UNIX mode string. The mode string must contain
- three digits between zero and seven.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-file-permissions</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="time-interval" advanced="true">
- <adm:synopsis>
- Specifies the interval at which to check whether the log files
- need to be rotated.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5s</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-time-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="buffer-size" advanced="true">
- <adm:synopsis>Specifies the log file buffer size.</adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>64kb</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-buffer-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="auto-flush" advanced="true">
- <adm:synopsis>
- Specifies whether to flush the writer after every log record.
- </adm:synopsis>
- <adm:description>
- If the asynchronous writes option is used, the writer is
- flushed after all the log records in the queue are written.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-auto-flush</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="append">
- <adm:synopsis>
- Specifies whether to append to existing log files.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-append</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="rotation-policy" multi-valued="true">
- <adm:synopsis>
- The rotation policy to use for the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:description>
- When multiple policies are used, rotation will occur if any
- policy's conditions are met.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- No rotation policy is used and log rotation will not occur.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation parent-path="/"
- relation-name="log-rotation-policy" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-rotation-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="retention-policy" multi-valued="true">
- <adm:synopsis>
- The retention policy to use for the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:description>
- When multiple policies are used, log files are cleaned when
- any of the policy's conditions are met.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- No retention policy is used and log files are never cleaned.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation parent-path="/"
- relation-name="log-retention-policy" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-retention-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-format">
- <adm:synopsis>
- Specifies how log records should be formatted and written to the access log.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>multi-line</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="combined">
- <adm:synopsis>
- Combine log records for operation requests and responses into a
- single record. This format should be used when log records are to
- be filtered based on response criteria (e.g. result code).
- </adm:synopsis>
- </adm:value>
- <adm:value name="multi-line">
- <adm:synopsis>
- Outputs separate log records for operation requests and responses.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-format</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-record-time-format">
- <adm:synopsis>
- Specifies the format string that is used to generate log record
- timestamps.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>dd/MMM/yyyy:HH:mm:ss Z</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- Any valid format string that can be used with the
- java.text.SimpleDateFormat class.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-record-time-format</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-control-oids">
- <adm:synopsis>
- Specifies whether control OIDs will be included in operation log records.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-control-oids</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedAuditLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedAuditLogPublisherConfiguration.xml
deleted file mode 100644
index 5a314b4..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedAuditLogPublisherConfiguration.xml
+++ /dev/null
@@ -1,287 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2011 ForgeRock AS.
- ! -->
-<adm:managed-object name="file-based-audit-log-publisher"
- plural-name="file-based-audit-log-publishers"
- package="org.forgerock.opendj.admin" extends="access-log-publisher"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- publish access messages to the file system.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-file-based-audit-log-publisher</ldap:name>
- <ldap:superior>ds-cfg-access-log-publisher</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.loggers.TextAuditLogPublisher
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="asynchronous" mandatory="true" advanced="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- will publish records asynchronously.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-asynchronous</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="queue-size" advanced="true">
- <adm:synopsis>
- The maximum number of log records that can be stored in the
- asynchronous queue.
- </adm:synopsis>
- <adm:description>
- Setting the queue size to zero activates parallel log writer
- implementation which has no queue size limit and as such the
- parallel log writer should only be used on a very well tuned
- server configuration to avoid potential out of memory errors.
- </adm:description>
- <adm:requires-admin-action>
- <adm:other>
- <adm:synopsis>
- The <adm:user-friendly-name /> must be restarted if this property
- is changed and the asynchronous property is set to true.
- </adm:synopsis>
- </adm:other>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-queue-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-file" mandatory="true">
- <adm:synopsis>
- The file name to use for the log files generated by the
- <adm:user-friendly-name />.
- The path to the file is relative to the server root.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>FILE</adm:usage>
- <adm:synopsis>
- A path to an existing file that is readable by the server.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-file-permissions" mandatory="true">
- <adm:synopsis>
- The UNIX permissions of the log files created by this
- <adm:user-friendly-name />.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>640</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^([0-7][0-7][0-7])$</adm:regex>
- <adm:usage>MODE</adm:usage>
- <adm:synopsis>
- A valid UNIX mode string. The mode string must contain
- three digits between zero and seven.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-file-permissions</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="time-interval" advanced="true">
- <adm:synopsis>
- Specifies the interval at which to check whether the log files
- need to be rotated.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5s</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-time-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="buffer-size" advanced="true">
- <adm:synopsis>Specifies the log file buffer size.</adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>64kb</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-buffer-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="auto-flush" advanced="true">
- <adm:synopsis>
- Specifies whether to flush the writer after every log record.
- </adm:synopsis>
- <adm:description>
- If the asynchronous writes option is used, the writer is
- flushed after all the log records in the queue are written.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-auto-flush</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="append">
- <adm:synopsis>
- Specifies whether to append to existing log files.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-append</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="rotation-policy" multi-valued="true">
- <adm:synopsis>
- The rotation policy to use for the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:description>
- When multiple policies are used, rotation will occur if any
- policy's conditions are met.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- No rotation policy is used and log rotation will not occur.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation parent-path="/"
- relation-name="log-rotation-policy" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-rotation-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="retention-policy" multi-valued="true">
- <adm:synopsis>
- The retention policy to use for the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:description>
- When multiple policies are used, log files are cleaned when
- any of the policy's conditions are met.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- No retention policy is used and log files are never cleaned.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation parent-path="/"
- relation-name="log-retention-policy" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-retention-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedDebugLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedDebugLogPublisherConfiguration.xml
deleted file mode 100644
index 7eea88a..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedDebugLogPublisherConfiguration.xml
+++ /dev/null
@@ -1,270 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="file-based-debug-log-publisher"
- plural-name="file-based-debug-log-publishers"
- package="org.forgerock.opendj.admin" extends="debug-log-publisher"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- publish debug messages to the file system.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-file-based-debug-log-publisher</ldap:name>
- <ldap:superior>ds-cfg-debug-log-publisher</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.loggers.debug.TextDebugLogPublisher
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="asynchronous" mandatory="true" advanced="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- will publish records asynchronously.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-asynchronous</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="queue-size" advanced="true">
- <adm:synopsis>
- The maximum number of log records that can be stored in the
- asynchronous queue.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-queue-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-file" mandatory="true">
- <adm:synopsis>
- The file name to use for the log files generated by the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:description>
- The path to the file is relative to the server root.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-file-permissions" mandatory="true">
- <adm:synopsis>
- The UNIX permissions of the log files created by this
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>640</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^([0-7][0-7][0-7])$</adm:regex>
- <adm:usage>MODE</adm:usage>
- <adm:synopsis>
- A valid UNIX mode string. The mode string must contain
- three digits between zero and seven.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-file-permissions</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="time-interval" advanced="true">
- <adm:synopsis>
- Specifies the interval at which to check whether the log files
- need to be rotated.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5s</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-time-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="buffer-size" advanced="true">
- <adm:synopsis>Specifies the log file buffer size.</adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>64kb</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-buffer-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="auto-flush" advanced="true">
- <adm:synopsis>
- Specifies whether to flush the writer after every log record.
- </adm:synopsis>
- <adm:description>
- If the asynchronous writes option is used, the writer is
- flushed after all the log records in the queue are written.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-auto-flush</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="append">
- <adm:synopsis>
- Specifies whether to append to existing log files.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-append</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="rotation-policy" multi-valued="true">
- <adm:synopsis>
- The rotation policy to use for the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:description>
- When multiple policies are used, rotation will occur if any
- policy's conditions are met.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- No rotation policy is used and log rotation will not occur.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation parent-path="/"
- relation-name="log-rotation-policy" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-rotation-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="retention-policy" multi-valued="true">
- <adm:synopsis>
- The retention policy to use for the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:description>
- When multiple policies are used, log files are cleaned when
- any of the policy's conditions are met.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- No retention policy is used and log files are never
- cleaned.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation parent-path="/"
- relation-name="log-retention-policy" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-retention-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedErrorLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedErrorLogPublisherConfiguration.xml
deleted file mode 100644
index 56226bf..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedErrorLogPublisherConfiguration.xml
+++ /dev/null
@@ -1,270 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="file-based-error-log-publisher"
- plural-name="file-based-error-log-publishers"
- package="org.forgerock.opendj.admin" extends="error-log-publisher"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- publish error messages to the file system.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-file-based-error-log-publisher</ldap:name>
- <ldap:superior>ds-cfg-error-log-publisher</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.loggers.TextErrorLogPublisher
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="asynchronous" mandatory="true" advanced="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- will publish records asynchronously.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-asynchronous</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="queue-size" advanced="true">
- <adm:synopsis>
- The maximum number of log records that can be stored in the
- asynchronous queue.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-queue-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-file" mandatory="true">
- <adm:synopsis>
- The file name to use for the log files generated by the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:description>
- The path to the file is relative to the server root.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-file-permissions" mandatory="true">
- <adm:synopsis>
- The UNIX permissions of the log files created by this
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>640</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^([0-7][0-7][0-7])$</adm:regex>
- <adm:usage>MODE</adm:usage>
- <adm:synopsis>
- A valid UNIX mode string. The mode string must contain
- three digits between zero and seven.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-file-permissions</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="time-interval" advanced="true">
- <adm:synopsis>
- Specifies the interval at which to check whether the log files
- need to be rotated.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5s</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-time-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="buffer-size" advanced="true">
- <adm:synopsis>Specifies the log file buffer size.</adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>64kb</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-buffer-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="auto-flush" advanced="true">
- <adm:synopsis>
- Specifies whether to flush the writer after every log record.
- </adm:synopsis>
- <adm:description>
- If the asynchronous writes option is used, the writer will be
- flushed after all the log records in the queue are written.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-auto-flush</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="append">
- <adm:synopsis>
- Specifies whether to append to existing log files.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-append</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="rotation-policy" multi-valued="true">
- <adm:synopsis>
- The rotation policy to use for the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:description>
- When multiple policies are used, rotation will occur if any
- policy's conditions are met.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- No rotation policy is used and log rotation will not occur.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation parent-path="/"
- relation-name="log-rotation-policy" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-rotation-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="retention-policy" multi-valued="true">
- <adm:synopsis>
- The retention policy to use for the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:description>
- When multiple policies are used, log files will be cleaned when
- any of the policy's conditions are met.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- No retention policy is used and log files will never be
- cleaned.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation parent-path="/"
- relation-name="log-retention-policy" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-retention-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedHTTPAccessLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedHTTPAccessLogPublisherConfiguration.xml
deleted file mode 100644
index 83e4d86..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedHTTPAccessLogPublisherConfiguration.xml
+++ /dev/null
@@ -1,360 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2013 ForgeRock AS
- ! -->
-<adm:managed-object name="file-based-http-access-log-publisher"
- plural-name="file-based-http-access-log-publishers"
- package="org.forgerock.opendj.admin" extends="http-access-log-publisher"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- publish HTTP access messages to the file system.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-file-based-http-access-log-publisher</ldap:name>
- <ldap:superior>ds-cfg-http-access-log-publisher</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.loggers.TextHTTPAccessLogPublisher
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="asynchronous" mandatory="true" advanced="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- will publish records asynchronously.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-asynchronous</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="queue-size" advanced="true">
- <adm:synopsis>
- The maximum number of log records that can be stored in the
- asynchronous queue.
- </adm:synopsis>
- <adm:description>
- Setting the queue size to zero activates parallel log writer
- implementation which has no queue size limit and as such the
- parallel log writer should only be used on a very well tuned
- server configuration to avoid potential out of memory errors.
- </adm:description>
- <adm:requires-admin-action>
- <adm:other>
- <adm:synopsis>
- The <adm:user-friendly-name /> must be restarted if this property
- is changed and the asynchronous property is set to true.
- </adm:synopsis>
- </adm:other>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-queue-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-file" mandatory="true">
- <adm:synopsis>
- The file name to use for the log files generated by the
- <adm:user-friendly-name />.
- The path to the file is relative to the server root.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>FILE</adm:usage>
- <adm:synopsis>
- A path to an existing file that is readable by the server.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-file-permissions" mandatory="true">
- <adm:synopsis>
- The UNIX permissions of the log files created by this
- <adm:user-friendly-name />.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>640</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^([0-7][0-7][0-7])$</adm:regex>
- <adm:usage>MODE</adm:usage>
- <adm:synopsis>
- A valid UNIX mode string. The mode string must contain
- three digits between zero and seven.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-file-permissions</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="time-interval" advanced="true">
- <adm:synopsis>
- Specifies the interval at which to check whether the log files
- need to be rotated.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5s</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-time-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="buffer-size" advanced="true">
- <adm:synopsis>Specifies the log file buffer size.</adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>64kb</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-buffer-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="auto-flush" advanced="true">
- <adm:synopsis>
- Specifies whether to flush the writer after every log record.
- </adm:synopsis>
- <adm:description>
- If the asynchronous writes option is used, the writer is
- flushed after all the log records in the queue are written.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-auto-flush</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="append">
- <adm:synopsis>
- Specifies whether to append to existing log files.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-append</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="rotation-policy" multi-valued="true">
- <adm:synopsis>
- The rotation policy to use for the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:description>
- When multiple policies are used, rotation will occur if any
- policy's conditions are met.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- No rotation policy is used and log rotation will not occur.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation parent-path="/"
- relation-name="log-rotation-policy" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-rotation-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="retention-policy" multi-valued="true">
- <adm:synopsis>
- The retention policy to use for the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:description>
- When multiple policies are used, log files are cleaned when
- any of the policy's conditions are met.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- No retention policy is used and log files are never cleaned.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation parent-path="/"
- relation-name="log-retention-policy" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-retention-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-format">
- <adm:synopsis>
- Specifies how log records should be formatted and written to the HTTP
- access log.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>cs-host c-ip cs-username x-datetime cs-method cs-uri-query
- cs-version sc-status cs(User-Agent) x-connection-id x-etime</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>[a-zA-Z0-9-()]+( [a-zA-Z0-9-()]+)*</adm:regex>
- <adm:usage>FORMAT</adm:usage>
- <adm:synopsis>
- A space separated list of fields describing the extended log format
- to be used for logging HTTP accesses. Available values are listed on
- the W3C working draft http://www.w3.org/TR/WD-logfile.html
- and Microsoft website
- http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/676400bc-8969-4aa7-851a-9319490a9bbb.mspx?mfr=true
-
- OpenDJ supports the following standard fields: "c-ip", "c-port",
- "cs-host", "cs-method", "cs-uri-query", "cs(User-Agent)",
- "cs-username", "cs-version", "s-computername", "s-ip", "s-port",
- "sc-status".
-
- OpenDJ supports the following application specific field extensions:
- "x-connection-id" displays the internal connection ID assigned to
- the HTTP client connection, "x-datetime" displays the completion
- date and time for the logged HTTP request and its ouput is
- controlled by the "ds-cfg-log-record-time-format" property,
- "x-etime" displays the total execution time for the logged HTTP
- request.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-format</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-record-time-format">
- <adm:synopsis>
- Specifies the format string that is used to generate log record
- timestamps.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>dd/MMM/yyyy:HH:mm:ss Z</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- Any valid format string that can be used with the
- java.text.SimpleDateFormat class.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-record-time-format</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedKeyManagerProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedKeyManagerProviderConfiguration.xml
deleted file mode 100644
index b27fd67..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedKeyManagerProviderConfiguration.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2013 ForgeRock AS
- ! -->
-<adm:managed-object name="file-based-key-manager-provider"
- plural-name="file-based-key-manager-providers"
- package="org.forgerock.opendj.admin" extends="key-manager-provider"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- can be used to obtain the server certificate from a key store file on
- the local file system.
- </adm:synopsis>
- <adm:description>
- Multiple file formats may be supported, depending on the providers
- supported by the underlying Java runtime environment.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-file-based-key-manager-provider</ldap:name>
- <ldap:superior>ds-cfg-key-manager-provider</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.FileBasedKeyManagerProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="key-store-file" mandatory="true">
- <adm:TODO>Should use a file-based property definition?</adm:TODO>
- <adm:synopsis>
- Specifies the path to the file that contains the private key
- information. This may be an absolute path, or a path that is
- relative to the
- <adm:product-name />
- instance root.
- </adm:synopsis>
- <adm:description>
- Changes to this property will take effect the next
- time that the key manager is accessed.
- </adm:description>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>FILE</adm:usage>
- <adm:synopsis>
- A path to an existing file that is readable by the server.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-key-store-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="key-store-type">
- <adm:TODO>
- Can we restrict this to an enumeration? How can the client guess
- which values are possible? What is the default value?
- </adm:TODO>
- <adm:synopsis>
- Specifies the format for the data in the key store file.
- </adm:synopsis>
- <adm:description>
- Valid values should always include 'JKS' and 'PKCS12', but
- different implementations may allow other values as well. If no
- value is provided, the JVM-default value is used.
- Changes to this configuration attribute will take effect the next
- time that the key manager is accessed.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- Any key store format supported by the Java runtime environment.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-key-store-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property-reference name="key-store-pin" />
- <adm:property-reference name="key-store-pin-property" />
- <adm:property-reference name="key-store-pin-environment-variable" />
- <adm:property-reference name="key-store-pin-file" />
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedTrustManagerProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedTrustManagerProviderConfiguration.xml
deleted file mode 100644
index befb5bd..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileBasedTrustManagerProviderConfiguration.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="file-based-trust-manager-provider"
- plural-name="file-based-trust-manager-providers"
- package="org.forgerock.opendj.admin" extends="trust-manager-provider"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The file-based trust manager provider determines whether to trust a
- presented certificate based on whether that certificate exists in a
- server trust store file.
- </adm:synopsis>
- <adm:description>
- The trust store file can be in either JKS
- (the default Java key store format) or PKCS#12 (a standard
- certificate format) form.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-file-based-trust-manager-provider</ldap:name>
- <ldap:superior>ds-cfg-trust-manager-provider</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.FileBasedTrustManagerProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="trust-store-file" mandatory="true">
- <adm:TODO>Should use a file-based property definition?</adm:TODO>
- <adm:synopsis>
- Specifies the path to the file containing the trust information.
- It can be an absolute path or a path that is relative to the
- <adm:product-name />
- instance root.
- </adm:synopsis>
- <adm:description>
- Changes to this configuration attribute take effect the next
- time that the trust manager is accessed.
- </adm:description>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- An absolute path or a path that is relative to the <adm:product-name /> directory server instance root.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-trust-store-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="trust-store-type">
- <adm:TODO>
- Can we restrict this to an enumeration? How can the client guess
- which values are possible? What is the default value?
- </adm:TODO>
- <adm:synopsis>
- Specifies the format for the data in the trust store file.
- </adm:synopsis>
- <adm:description>
- Valid values always include 'JKS' and 'PKCS12', but different
- implementations can allow other values as well. If no value is
- provided, then the JVM default value is used. Changes to this
- configuration attribute take effect the next time that the
- trust manager is accessed.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- Any key store format supported by the Java runtime environment. The "JKS" and "PKCS12" formats are typically available in Java environments.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-trust-store-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property-reference name="trust-store-pin" />
- <adm:property-reference name="trust-store-pin-property" />
- <adm:property-reference name="trust-store-pin-environment-variable" />
- <adm:property-reference name="trust-store-pin-file" />
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileCountLogRetentionPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileCountLogRetentionPolicyConfiguration.xml
deleted file mode 100644
index 850b188..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileCountLogRetentionPolicyConfiguration.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="file-count-log-retention-policy"
- plural-name="file-count-log-retention-policies"
- package="org.forgerock.opendj.admin" extends="log-retention-policy"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- Retention policy based on the number of rotated log files on disk.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-file-count-log-retention-policy</ldap:name>
- <ldap:superior>ds-cfg-log-retention-policy</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.loggers.FileNumberRetentionPolicy
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="number-of-files" mandatory="true">
- <adm:synopsis>
- Specifies the number of archived log files to retain before the
- oldest ones are cleaned.
- </adm:synopsis>
- <adm:syntax>
- <adm:integer lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-number-of-files</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileSystemEntryCacheConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileSystemEntryCacheConfiguration.xml
deleted file mode 100644
index 98e7ec9..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FileSystemEntryCacheConfiguration.xml
+++ /dev/null
@@ -1,303 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="file-system-entry-cache"
- plural-name="file-system-entry-caches"
- package="org.forgerock.opendj.admin" extends="entry-cache"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is an entry cache implementation which uses a JE database to keep
- track of the entries.
- </adm:synopsis>
- <adm:description>
- For best performance, the JE database should reside in a memory
- based file system although any file system will do for this cache
- to function. Entries are maintained either by FIFO (default) or LRU-based
- (configurable) list implementation. Cache sizing is based on
- the size of free space available in the file system, such that if
- enough memory is free, then adding an entry to the cache will not
- require purging. If more than the specified size of the file
- system available space is already consumed, then one or more entries
- need to be removed in order to make room for a new entry. It is
- also possible to configure a maximum number of entries for the cache.
- If this is specified, then the number of entries are not allowed
- to exceed this value, but it may not be possible to hold this many
- entries if the available memory fills up first. Other configurable
- parameters for this cache include the maximum length of time to block
- while waiting to acquire a lock, and a set of filters that may be
- used to define criteria for determining which entries are stored in
- the cache. If a set of filters are provided then an entry must match
- at least one of them in order to be stored in the cache.
- JE environment cache size can also be configured either as a percentage
- of the free memory available in the JVM, or as an absolute size in
- bytes. This cache has a persistence property which, if enabled,
- allows for the contents of the cache to persist across server or
- cache restarts.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-file-system-entry-cache</ldap:name>
- <ldap:superior>ds-cfg-entry-cache</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="lock-timeout" advanced="true">
- <adm:synopsis>
- The length of time to wait while attempting to acquire a read or
- write lock.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>2000.0ms</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" allow-unlimited="true" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-lock-timeout</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-memory-size">
- <adm:synopsis>
- The maximum size of the entry cache in bytes.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0b</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-memory-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-entries">
- <adm:synopsis>
- The maximum number of entries allowed in the cache.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>2147483647</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-entries</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="cache-type">
- <adm:synopsis>
- Specifies the policy which should be used for purging entries from
- the cache.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>fifo</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="fifo">
- <adm:synopsis>FIFO based entry cache.</adm:synopsis>
- </adm:value>
- <adm:value name="lru">
- <adm:synopsis>LRU based entry cache.</adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-cache-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="cache-directory">
- <adm:synopsis>
- Specifies the directory in which the JE environment should store
- the cache.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>/tmp/OpenDJ.FSCache</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-cache-directory</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="persistent-cache">
- <adm:synopsis>
- Specifies whether the cache should persist across restarts.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-persistent-cache</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="compact-encoding">
- <adm:synopsis>
- Indicates whether the cache should use a compact form when
- encoding cache entries by compressing the attribute descriptions
- and object class sets.
- </adm:synopsis>
- <adm:description>
- Note that compression does not preserve user-supplied
- capitalization in the object class and attribute type names.
- </adm:description>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changing this property only affects the encoding of the
- cache entries put in the cache after the change is made. It
- will not be retroactively applied to existing cache entries.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-compact-encoding</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-cache-percent">
- <adm:synopsis>
- Specifies the maximum memory usage for the internal JE cache as a percentage
- of the total JVM memory.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>1</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" upper-limit="90" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-cache-percent</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-cache-size">
- <adm:synopsis>
- Specifies the maximum JVM memory usage in bytes for the internal JE cache.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0b</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-cache-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="je-property" multi-valued="true"
- advanced="true">
- <adm:synopsis>
- Specifies the environment properties for the Berkeley DB Java
- Edition database providing the backend for this entry cache.
- </adm:synopsis>
- <adm:description>
- Any Berkeley DB Java Edition property can be specified using the
- following form: property-name=property-value. Refer to the
- <adm:product-name /> documentation for further information on related
- properties, their implications and range values. The definitive
- identification of all the property parameters available in the
- example.properties file in the Berkeley DB Java Edition distribution.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>je.env.isLocking=false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-je-property</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property-reference name="include-filter" />
- <adm:property-reference name="exclude-filter" />
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.FileSystemEntryCache
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FingerprintCertificateMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FingerprintCertificateMapperConfiguration.xml
deleted file mode 100644
index 6855f96..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FingerprintCertificateMapperConfiguration.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="fingerprint-certificate-mapper"
- plural-name="fingerprint-certificate-mappers"
- package="org.forgerock.opendj.admin" extends="certificate-mapper"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- maps client certificates to user entries by looking for the MD5 or
- SHA1 fingerprint in a specified attribute of user entries.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-fingerprint-certificate-mapper</ldap:name>
- <ldap:superior>ds-cfg-certificate-mapper</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.FingerprintCertificateMapper
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="fingerprint-attribute" mandatory="true">
- <adm:synopsis>
- Specifies the attribute in which to look for the fingerprint.
- </adm:synopsis>
- <adm:description>
- Values of the fingerprint attribute should exactly match the MD5
- or SHA1 representation of the certificate fingerprint.
- </adm:description>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-fingerprint-attribute</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="fingerprint-algorithm" mandatory="true">
- <adm:synopsis>
- Specifies the name of the digest algorithm to
- compute the fingerprint of client certificates.
- </adm:synopsis>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="md5">
- <adm:synopsis>
- Use the MD5 digest algorithm to compute certificate
- fingerprints.
- </adm:synopsis>
- </adm:value>
- <adm:value name="sha1">
- <adm:synopsis>
- Use the SHA-1 digest algorithm to compute certificate
- fingerprints.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-fingerprint-algorithm</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="user-base-dn" multi-valued="true">
- <adm:synopsis>
- Specifies the set of base DNs below which to search for users.
- </adm:synopsis>
- <adm:description>
- The base DNs are used when performing searches to map the
- client certificates to a user entry.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The server performs the search in all public naming
- contexts.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-user-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FixedTimeLogRotationPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FixedTimeLogRotationPolicyConfiguration.xml
deleted file mode 100644
index 44ad4e4..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FixedTimeLogRotationPolicyConfiguration.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="fixed-time-log-rotation-policy"
- plural-name="fixed-time-log-rotation-policies"
- package="org.forgerock.opendj.admin" extends="log-rotation-policy"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- Rotation policy based on a fixed time of day.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-fixed-time-log-rotation-policy</ldap:name>
- <ldap:superior>ds-cfg-log-rotation-policy</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.loggers.FixedTimeRotationPolicy
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="time-of-day" multi-valued="true"
- mandatory="true">
- <adm:synopsis>
- Specifies the time of day at which log rotation should occur.
- </adm:synopsis>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^(([0-1][0-9])|([2][0-3]))([0-5][0-9])$</adm:regex>
- <adm:usage>HHmm</adm:usage>
- <adm:synopsis>
- 24 hour time of day in HHmm format.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-time-of-day</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FractionalLDIFImportPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FractionalLDIFImportPluginConfiguration.xml
deleted file mode 100644
index bb3f466..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FractionalLDIFImportPluginConfiguration.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2009 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="fractional-ldif-import-plugin"
- plural-name="fractional-ldif-import-plugins"
- package="org.forgerock.opendj.admin" extends="plugin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is used internally by the replication plugin to support fractional
- replication.
- </adm:synopsis>
- <adm:description>
- It is used to check fractional configuration consistency with local domain
- one as well as to filter attributes when performing an online import from a
- remote backend to a local backend.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-fractional-ldif-import-plugin</ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FreeDiskSpaceLogRetentionPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FreeDiskSpaceLogRetentionPolicyConfiguration.xml
deleted file mode 100644
index 8ec1953..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/FreeDiskSpaceLogRetentionPolicyConfiguration.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="free-disk-space-log-retention-policy"
- plural-name="free-disk-space-log-retention-policies"
- package="org.forgerock.opendj.admin" extends="log-retention-policy"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- Retention policy based on the free disk space available.
- </adm:synopsis>
- <adm:description>
- This policy is only available on Java 6.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-free-disk-space-log-retention-policy</ldap:name>
- <ldap:superior>ds-cfg-log-retention-policy</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.loggers.FreeDiskSpaceRetentionPolicy
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="free-disk-space" mandatory="true">
- <adm:synopsis>Specifies the minimum amount of free disk space that
- should be available on the file system on which the archived
- log files are stored.
- </adm:synopsis>
- <adm:syntax>
- <adm:size lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-free-disk-space</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GSSAPISASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GSSAPISASLMechanismHandlerConfiguration.xml
deleted file mode 100644
index af07e96..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GSSAPISASLMechanismHandlerConfiguration.xml
+++ /dev/null
@@ -1,251 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="gssapi-sasl-mechanism-handler"
- plural-name="gssapi-sasl-mechanism-handlers"
- package="org.forgerock.opendj.admin" extends="sasl-mechanism-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The GSSAPI SASL mechanism
- performs all processing related to SASL GSSAPI
- authentication using Kerberos V5.
- </adm:synopsis>
- <adm:description>
- The GSSAPI SASL mechanism provides the ability for clients
- to authenticate themselves to the server using existing
- authentication in a Kerberos environment. This mechanism
- provides the ability to achieve single sign-on for
- Kerberos-based clients.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-gssapi-sasl-mechanism-handler</ldap:name>
- <ldap:superior>ds-cfg-sasl-mechanism-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.GSSAPISASLMechanismHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="realm">
- <adm:synopsis>
- Specifies the realm to be used for GSSAPI authentication.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The server attempts to determine the realm from the
- underlying system configuration.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-realm</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="kdc-address">
- <adm:synopsis>
- Specifies the address of the KDC that is to be used for Kerberos
- processing.
- </adm:synopsis>
- <adm:description>
- If provided, this property must be a fully-qualified DNS-resolvable name.
- If this property is not provided, then the server attempts to determine it
- from the system-wide Kerberos configuration.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The server attempts to determine the KDC address from the
- underlying system configuration.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-kdc-address</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="quality-of-protection">
- <adm:synopsis>
- The name of a property that specifies the quality of protection
- the server will support.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>none</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="none">
- <adm:synopsis>
- QOP equals authentication only.
- </adm:synopsis>
- </adm:value>
- <adm:value name="integrity">
- <adm:synopsis>
- Quality of protection equals authentication with integrity
- protection.
- </adm:synopsis>
- </adm:value>
- <adm:value name="confidentiality">
- <adm:synopsis>
- Quality of protection equals authentication with integrity and
- confidentiality protection.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-quality-of-protection</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="principal-name">
- <adm:synopsis>
- Specifies the principal name.
- </adm:synopsis>
- <adm:description>
- It can either be a simple user name or a
- service name such as host/example.com.
- If this property is not provided, then the server attempts to build the
- principal name by appending the fully qualified domain name to the string
- "ldap/".
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The server attempts to determine the principal name from the
- underlying system configuration.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-principal-name</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="keytab">
- <adm:synopsis>
- Specifies the path to the keytab file that should be used for
- Kerberos processing.
- </adm:synopsis>
- <adm:description>
- If provided, this is either an absolute path or one that is
- relative to the server instance root.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The server attempts to use the system-wide default keytab.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-keytab</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="server-fqdn">
- <adm:synopsis>
- Specifies the DNS-resolvable fully-qualified domain name for the
- system.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The server attempts to determine the
- fully-qualified domain name dynamically .
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-server-fqdn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="identity-mapper" mandatory="true">
- <adm:synopsis>
- Specifies the name of the identity mapper that is to be used
- with this SASL mechanism handler
- to match the Kerberos principal
- included in the SASL bind request to the corresponding
- user in the directory.
- </adm:synopsis>
- <adm:syntax>
- <adm:aggregation relation-name="identity-mapper"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced identity mapper must be enabled when the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-identity-mapper</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GetConnectionIdExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GetConnectionIdExtendedOperationHandlerConfiguration.xml
deleted file mode 100644
index bfea4c1..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GetConnectionIdExtendedOperationHandlerConfiguration.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="get-connection-id-extended-operation-handler"
- plural-name="get-connection-id-extended-operation-handlers"
- package="org.forgerock.opendj.admin"
- extends="extended-operation-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for clients to obtain the internal connection
- ID that the server uses to reference their client connection.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-get-connection-id-extended-operation-handler
- </ldap:name>
- <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.GetConnectionIDExtendedOperation
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GetSymmetricKeyExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GetSymmetricKeyExtendedOperationHandlerConfiguration.xml
deleted file mode 100644
index 501bbbc..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GetSymmetricKeyExtendedOperationHandlerConfiguration.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="get-symmetric-key-extended-operation-handler"
- plural-name="get-symmetric-key-extended-operation-handlers"
- package="org.forgerock.opendj.admin"
- extends="extended-operation-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is used by the <adm:product-name /> cryptographic framework for creating and
- obtaining symmetric encryption keys.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-get-symmetric-key-extended-operation-handler
- </ldap:name>
- <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.crypto.GetSymmetricKeyExtendedOperation
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GlobalConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GlobalConfiguration.xml
deleted file mode 100644
index 06050d9..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GlobalConfiguration.xml
+++ /dev/null
@@ -1,925 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! Portions Copyright 2011-2012 ForgeRock AS
- ! -->
-<adm:managed-object name="global" plural-name="globals"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:user-friendly-name>Global Configuration</adm:user-friendly-name>
- <adm:user-friendly-plural-name>
- Global Configurations
- </adm:user-friendly-plural-name>
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- contains properties that affect the overall
- operation of the <adm:product-name />.
- </adm:synopsis>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-root-config</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="check-schema" advanced="true">
- <adm:synopsis>
- Indicates whether schema enforcement is active.
- </adm:synopsis>
- <adm:description>
- When schema enforcement is activated, the directory server
- ensures that all operations result in entries are valid
- according to the defined server schema. It is strongly recommended
- that this option be left enabled to prevent the inadvertent
- addition of invalid data into the server.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-check-schema</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="default-password-policy" mandatory="true">
- <adm:synopsis>
- Specifies the name of the password policy that is in effect
- for users whose entries do not specify an alternate password
- policy (either via a real or virtual attribute).
- </adm:synopsis>
- <adm:description>
- In addition, the default password policy will be used for providing
- default parameters for sub-entry based password policies when not
- provided or supported by the sub-entry itself.
- This property must reference a password policy and no other type of
- authentication policy.
- </adm:description>
- <adm:syntax>
- <adm:aggregation relation-name="password-policy" parent-path="/" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-default-password-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="add-missing-rdn-attributes" advanced="true">
- <adm:synopsis>
- Indicates whether the directory server should automatically add
- any attribute values contained in the entry's RDN into that entry
- when processing an add request.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-add-missing-rdn-attributes</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allow-attribute-name-exceptions"
- advanced="true">
- <adm:synopsis>
- Indicates whether the directory server should allow underscores
- in attribute names and allow attribute names
- to begin with numeric digits (both of which are violations of the
- LDAP standards).
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allow-attribute-name-exceptions</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="invalid-attribute-syntax-behavior"
- advanced="true">
- <adm:synopsis>
- Specifies how the directory server should handle operations whenever
- an attribute value violates the associated attribute syntax.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>reject</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="accept">
- <adm:synopsis>
- The directory server silently accepts attribute values
- that are invalid according to their associated syntax.
- Matching operations targeting those values may not behave as
- expected.
- </adm:synopsis>
- </adm:value>
- <adm:value name="reject">
- <adm:synopsis>
- The directory server rejects attribute values that are
- invalid according to their associated syntax.
- </adm:synopsis>
- </adm:value>
- <adm:value name="warn">
- <adm:synopsis>
- The directory server accepts attribute values that are
- invalid according to their associated syntax, but also
- logs a warning message to the error log. Matching operations
- targeting those values may not behave as expected.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-invalid-attribute-syntax-behavior</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="server-error-result-code" advanced="true">
- <adm:synopsis>
- Specifies the numeric value of the result code when request
- processing fails due to an internal server error.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>80</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-server-error-result-code</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="single-structural-objectclass-behavior"
- advanced="true">
- <adm:synopsis>
- Specifies how the directory server should handle operations an entry does
- not contain a structural object class or contains multiple structural
- classes.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>reject</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="accept">
- <adm:synopsis>
- The directory server silently accepts entries that do
- not contain exactly one structural object class. Certain
- schema features that depend on the entry's structural class
- may not behave as expected.
- </adm:synopsis>
- </adm:value>
- <adm:value name="reject">
- <adm:synopsis>
- The directory server rejects entries that do not contain
- exactly one structural object class.
- </adm:synopsis>
- </adm:value>
- <adm:value name="warn">
- <adm:synopsis>
- The directory server accepts entries that do not contain
- exactly one structural object class, but also logs a
- warning message to the error log. Certain schema features
- that depend on the entry's structural class may not behave
- as expected.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-single-structural-objectclass-behavior
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="notify-abandoned-operations" advanced="true">
- <adm:synopsis>
- Indicates whether the directory server should send a response to
- any operation that is interrupted via an abandon request.
- </adm:synopsis>
- <adm:description>
- The LDAP specification states that abandoned operations should not
- receive any response, but this may cause problems with client
- applications that always expect to receive a response to each
- request.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-notify-abandoned-operations</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="size-limit">
- <adm:synopsis>
- Specifies the maximum number of entries that can be returned
- to the client during a single search operation.
- </adm:synopsis>
- <adm:description>
- A value of 0 indicates that no size limit is enforced. Note
- that this is the default server-wide limit, but it may be
- overridden on a per-user basis using the ds-rlim-size-limit
- operational attribute.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>1000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-size-limit</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="time-limit">
- <adm:synopsis>
- Specifies the maximum length of time that should be spent processing
- a single search operation.
- </adm:synopsis>
- <adm:description>
- A value of 0 seconds indicates that no time limit is
- enforced. Note that this is the default server-wide time limit,
- but it may be overridden on a per-user basis using the
- ds-rlim-time-limit operational attribute.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>60 seconds</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="s" lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-time-limit</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="proxied-authorization-identity-mapper"
- mandatory="true">
- <adm:synopsis>
- Specifies the name of the identity mapper to map
- authorization ID values (using the "u:" form) provided in the
- proxied authorization control to the corresponding user entry.
- </adm:synopsis>
- <adm:syntax>
- <adm:aggregation relation-name="identity-mapper"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced identity mapper must be enabled.
- </adm:synopsis>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-proxied-authorization-identity-mapper
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="writability-mode">
- <adm:synopsis>
- Specifies the kinds of write operations the directory server
- can process.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>enabled</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="enabled">
- <adm:synopsis>
- The directory server attempts to process all write
- operations that are requested of it, regardless of their
- origin.
- </adm:synopsis>
- </adm:value>
- <adm:value name="disabled">
- <adm:synopsis>
- The directory server rejects all write operations that
- are requested of it, regardless of their origin.
- </adm:synopsis>
- </adm:value>
- <adm:value name="internal-only">
- <adm:synopsis>
- The directory server attempts to process write
- operations requested as internal operations or through
- synchronization, but rejects any such operations
- requested from external clients.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-writability-mode</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="reject-unauthenticated-requests">
- <adm:synopsis>
- Indicates whether the directory server should reject any request
- (other than bind or StartTLS requests) received from a client that
- has not yet been authenticated, whose last authentication attempt was
- unsuccessful, or whose last authentication attempt used anonymous
- authentication.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-reject-unauthenticated-requests</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="bind-with-dn-requires-password">
- <adm:synopsis>
- Indicates whether the directory server should reject any simple
- bind request that contains a DN but no password.
- </adm:synopsis>
- <adm:description>
- Although such bind requests are technically allowed by the LDAPv3
- specification (and should be treated as anonymous simple
- authentication), they may introduce security problems in
- applications that do not verify that the client actually provided
- a password.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-bind-with-dn-requires-password</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="lookthrough-limit">
- <adm:synopsis>
- Specifies the maximum number of entries that the directory server
- should "look through" in the course of processing a search
- request.
- </adm:synopsis>
- <adm:description>
- This includes any entry that the server must examine in the course
- of processing the request, regardless of whether it actually
- matches the search criteria. A value of 0 indicates that no
- lookthrough limit is enforced. Note that this is the default
- server-wide limit, but it may be overridden on a per-user basis
- using the ds-rlim-lookthrough-limit operational attribute.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-lookthrough-limit</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="smtp-server" multi-valued="true">
- <adm:synopsis>
- Specifies the address (and optional port number) for a mail server
- that can be used to send email messages via SMTP.
- </adm:synopsis>
- <adm:description>
- It may be an IP address or resolvable hostname, optionally
- followed by a colon and a port number.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- If no values are defined, then the server cannot send email via SMTP.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^.+(:[0-9]+)?$</adm:regex>
- <adm:usage>HOST[:PORT]</adm:usage>
- <adm:synopsis>
- A hostname, optionally followed by a ":" followed by a port
- number.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-smtp-server</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allowed-task" advanced="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies the fully-qualified name of a Java class that may be
- invoked in the server.
- </adm:synopsis>
- <adm:description>
- Any attempt to invoke a task not included in the list of allowed
- tasks is rejected.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- If no values are defined, then the server does not allow any
- tasks to be invoked.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allowed-task</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="disabled-privilege" multi-valued="true">
- <adm:synopsis>
- Specifies the name of a privilege that should not be evaluated by
- the server.
- </adm:synopsis>
- <adm:description>
- If a privilege is disabled, then it is assumed that all
- clients (including unauthenticated clients) have that
- privilege.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- If no values are defined, then the server enforces all
- privileges.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="bypass-lockdown">
- <adm:synopsis>
- Allows the associated user to bypass server lockdown mode.
- </adm:synopsis>
- </adm:value>
- <adm:value name="bypass-acl">
- <adm:synopsis>
- Allows the associated user to bypass access control checks
- performed by the server.
- </adm:synopsis>
- </adm:value>
- <adm:value name="modify-acl">
- <adm:synopsis>
- Allows the associated user to modify the server's access
- control configuration.
- </adm:synopsis>
- </adm:value>
- <adm:value name="config-read">
- <adm:synopsis>
- Allows the associated user to read the server configuration.
- </adm:synopsis>
- </adm:value>
- <adm:value name="config-write">
- <adm:synopsis>
- Allows the associated user to update the server
- configuration. The config-read privilege is also required.
- </adm:synopsis>
- </adm:value>
- <adm:value name="jmx-read">
- <adm:synopsis>
- Allows the associated user to perform JMX read operations.
- </adm:synopsis>
- </adm:value>
- <adm:value name="jmx-write">
- <adm:synopsis>
- Allows the associated user to perform JMX write operations.
- </adm:synopsis>
- </adm:value>
- <adm:value name="jmx-notify">
- <adm:synopsis>
- Allows the associated user to subscribe to receive JMX
- notifications.
- </adm:synopsis>
- </adm:value>
- <adm:value name="ldif-import">
- <adm:synopsis>
- Allows the user to request that the server process LDIF
- import tasks.
- </adm:synopsis>
- </adm:value>
- <adm:value name="ldif-export">
- <adm:synopsis>
- Allows the user to request that the server process LDIF
- export tasks.
- </adm:synopsis>
- </adm:value>
- <adm:value name="backend-backup">
- <adm:synopsis>
- Allows the user to request that the server process backup
- tasks.
- </adm:synopsis>
- </adm:value>
- <adm:value name="backend-restore">
- <adm:synopsis>
- Allows the user to request that the server process restore
- tasks.
- </adm:synopsis>
- </adm:value>
- <adm:value name="server-lockdown">
- <adm:synopsis>
- Allows the user to place and bring the server of lockdown mode.
- </adm:synopsis>
- </adm:value>
- <adm:value name="server-shutdown">
- <adm:synopsis>
- Allows the user to request that the server shut down.
- </adm:synopsis>
- </adm:value>
- <adm:value name="server-restart">
- <adm:synopsis>
- Allows the user to request that the server perform an
- in-core restart.
- </adm:synopsis>
- </adm:value>
- <adm:value name="proxied-auth">
- <adm:synopsis>
- Allows the user to use the proxied authorization control, or
- to perform a bind that specifies an alternate authorization
- identity.
- </adm:synopsis>
- </adm:value>
- <adm:value name="disconnect-client">
- <adm:synopsis>
- Allows the user to terminate other client connections.
- </adm:synopsis>
- </adm:value>
- <adm:value name="cancel-request">
- <adm:synopsis>
- Allows the user to cancel operations in progress on other
- client connections.
- </adm:synopsis>
- </adm:value>
- <adm:value name="password-reset">
- <adm:synopsis>
- Allows the user to reset user passwords.
- </adm:synopsis>
- </adm:value>
- <adm:value name="data-sync">
- <adm:synopsis>
- Allows the user to participate in data synchronization.
- </adm:synopsis>
- </adm:value>
- <adm:value name="update-schema">
- <adm:synopsis>
- Allows the user to make changes to the server schema.
- </adm:synopsis>
- </adm:value>
- <adm:value name="privilege-change">
- <adm:synopsis>
- Allows the user to make changes to the set of defined root
- privileges, as well as to grant and revoke privileges for
- users.
- </adm:synopsis>
- </adm:value>
- <adm:value name="unindexed-search">
- <adm:synopsis>
- Allows the user to request that the server process a search
- that cannot be optimized using server indexes.
- </adm:synopsis>
- </adm:value>
- <adm:value name="subentry-write">
- <adm:synopsis>
- Allows the associated user to perform LDAP subentry write
- operations.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-disabled-privilege</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="return-bind-error-messages">
- <adm:synopsis>
- Indicates whether responses for failed bind operations should
- include a message string providing the reason for the
- authentication failure.
- </adm:synopsis>
- <adm:description>
- Note that these messages may include information that could
- potentially be used by an attacker. If this option is disabled,
- then these messages appears only in the server's access log.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-return-bind-error-messages</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="idle-time-limit">
- <adm:synopsis>
- Specifies the maximum length of time that a client connection may
- remain established since its last completed operation.
- </adm:synopsis>
- <adm:description>
- A value of "0 seconds" indicates that no idle time limit is enforced.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0 seconds</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-idle-time-limit</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="save-config-on-successful-startup">
- <adm:synopsis>
- Indicates whether the directory server should save a copy of its
- configuration whenever the startup process completes successfully.
- </adm:synopsis>
- <adm:description>
- This ensures that the server provides a "last known good"
- configuration, which can be used as a reference (or copied into
- the active config) if the server fails to start with the current
- "active" configuration.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-save-config-on-successful-startup</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="workflow-configuration-mode" hidden="true">
- <adm:synopsis>
- Specifies the workflow configuration mode (auto vs. manual).
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>auto</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="auto">
- <adm:synopsis>
- In the "auto" configuration mode, there is no workflow
- configuration. The workflows are created automatically based
- on the backend configuration. There is one workflow per
- backend base DN.
- </adm:synopsis>
- </adm:value>
- <adm:value name="manual">
- <adm:synopsis>
- In the "manual" configuration mode, each workflow is created
- according to its description in the configuration.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-workflow-configuration-mode</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="etime-resolution" mandatory="false">
- <adm:synopsis>
- Specifies the resolution to use for operation elapsed processing time (etime)
- measurements.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- milliseconds
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="milliseconds">
- <adm:synopsis>
- Use millisecond resolution.
- </adm:synopsis>
- </adm:value>
- <adm:value name="nanoseconds">
- <adm:synopsis>
- Use nanosecond resolution.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-etime-resolution</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="entry-cache-preload" mandatory="false">
- <adm:synopsis>
- Indicates whether or not to preload the entry cache on startup.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:server-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-entry-cache-preload</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-allowed-client-connections">
- <adm:synopsis>
- Specifies the maximum number of client connections that may be
- established at any given time
- </adm:synopsis>
- <adm:description>
- A value of 0 indicates that unlimited client connection is allowed.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-allowed-client-connections</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-psearches">
- <adm:synopsis>
- Defines the maximum number of concurrent persistent searches that
- can be performed on directory server
- </adm:synopsis>
- <adm:description>
- The persistent search mechanism provides an active channel through which entries that change,
- and information about the changes that occur, can be communicated. Because each persistent search
- operation consumes resources, limiting the number of simultaneous persistent searches keeps the
- performance impact minimal. A value of -1 indicates that there is no limit on the persistent searches.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>-1</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" allow-unlimited="true" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-psearches</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-internal-buffer-size" advanced="true">
- <adm:synopsis>
- The threshold capacity beyond which internal cached buffers used for
- encoding and decoding entries and protocol messages will be trimmed
- after use.
- </adm:synopsis>
- <adm:description>
- Individual buffers may grow very large when encoding and decoding
- large entries and protocol messages and should be reduced in size when
- they are no longer needed. This setting specifies the threshold at which
- a buffer is determined to have grown too big and should be trimmed down
- after use.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>32 KB</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <!-- Upper limit to force 32-bit value -->
- <adm:size lower-limit="512 B" upper-limit="1 GB"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-internal-buffer-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GoverningStructureRuleVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GoverningStructureRuleVirtualAttributeConfiguration.xml
deleted file mode 100644
index bae6c27..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GoverningStructureRuleVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2009 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="governing-structure-rule-virtual-attribute"
- plural-name="governing-structure-rule-virtual-attributes"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- generates a virtual attribute that specifies the DIT structure rule
- with the schema definitions in effect for the
- entry. This attribute is defined in RFC 4512.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-governing-structure-rule-virtual-attribute</ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.GoverningSturctureRuleVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="conflict-behavior" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>virtual-overrides-real</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="attribute-type">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>governingStructureRule</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GroupImplementationConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GroupImplementationConfiguration.xml
deleted file mode 100644
index c53741c..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/GroupImplementationConfiguration.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="group-implementation"
- plural-name="group-implementations"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- define named collections of users.
- </adm:synopsis>
- <adm:description>
- Different group implementations may have different ways of
- determining membership. For example, some groups may explicitly list the members,
- and/or they may dynamically determine membership.
- </adm:description>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-group-implementation</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>org.opends.server.api.Group</adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/HTTPAccessLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/HTTPAccessLogPublisherConfiguration.xml
deleted file mode 100644
index 9f3029c..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/HTTPAccessLogPublisherConfiguration.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2013 ForgeRock AS
- ! -->
-<adm:managed-object name="http-access-log-publisher"
- plural-name="http-access-log-publishers"
- package="org.forgerock.opendj.admin" extends="log-publisher"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for distributing HTTP access log messages from the HTTP
- access logger to a destination.
- </adm:synopsis>
- <adm:description>
- HTTP access log messages provide information about the types of HTTP
- requests processed by the server.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-http-access-log-publisher</ldap:name>
- <ldap:superior>ds-cfg-log-publisher</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property-override name="java-class">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.api.HTTPAccessLogPublisher</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/HTTPConnectionHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/HTTPConnectionHandlerConfiguration.xml
deleted file mode 100644
index 1ad8738..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/HTTPConnectionHandlerConfiguration.xml
+++ /dev/null
@@ -1,573 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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 2013 ForgeRock AS
- ! -->
-<adm:managed-object name="http-connection-handler"
- plural-name="http-connection-handlers"
- package="org.forgerock.opendj.admin" extends="connection-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is used to interact with clients using HTTP.
- </adm:synopsis>
- <adm:description>
- It provides full support for Rest2LDAP.
- </adm:description>
- <adm:constraint>
- <adm:synopsis>
- A Key Manager Provider must be specified when this
- <adm:user-friendly-name />
- is enabled and it is configured to use SSL.
- </adm:synopsis>
- <adm:condition>
- <adm:implies>
- <adm:contains property="enabled" value="true" />
- <adm:implies>
- <adm:contains property="use-ssl" value="true" />
- <adm:is-present property="key-manager-provider" />
- </adm:implies>
- </adm:implies>
- </adm:condition>
- </adm:constraint>
- <adm:constraint>
- <adm:synopsis>
- A Trust Manager Provider must be specified when this
- <adm:user-friendly-name />
- is enabled and it is configured to use SSL.
- </adm:synopsis>
- <adm:condition>
- <adm:implies>
- <adm:contains property="enabled" value="true" />
- <adm:implies>
- <adm:contains property="use-ssl" value="true" />
- <adm:is-present property="trust-manager-provider" />
- </adm:implies>
- </adm:implies>
- </adm:condition>
- </adm:constraint>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-http-connection-handler</ldap:name>
- <ldap:superior>ds-cfg-connection-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.protocols.http.HTTPConnectionHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-reference name="listen-port" />
- <adm:property-reference name="use-ssl" />
- <adm:property-reference name="ssl-cert-nickname" />
- <adm:property-reference name="use-tcp-keep-alive" />
- <adm:property-reference name="use-tcp-no-delay" />
- <adm:property-reference name="allow-tcp-reuse-address" />
- <adm:property name="key-manager-provider">
- <adm:synopsis>
- Specifies the name of the key manager that should be used with
- this
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately, but
- only for subsequent attempts to access the key manager
- provider for associated client connections.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="key-manager-provider"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced key manager provider must be enabled when
- the
- <adm:user-friendly-name />
- is enabled and configured to use SSL.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:and>
- <adm:contains property="enabled" value="true" />
- <adm:contains property="use-ssl" value="true" />
- </adm:and>
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-key-manager-provider</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="trust-manager-provider">
- <adm:synopsis>
- Specifies the name of the trust manager that should be used with
- the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately, but
- only for subsequent attempts to access the trust manager
- provider for associated client connections.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="trust-manager-provider"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced trust manager provider must be enabled when
- the
- <adm:user-friendly-name />
- is enabled and configured to use SSL.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:and>
- <adm:contains property="enabled" value="true" />
- <adm:contains property="use-ssl" value="true" />
- </adm:and>
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-trust-manager-provider</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="listen-address" multi-valued="true">
- <adm:synopsis>
- Specifies the address or set of addresses on which this
- <adm:user-friendly-name />
- should listen for connections from HTTP clients.
- </adm:synopsis>
- <adm:description>
- Multiple addresses may be provided as separate values for this
- attribute. If no values are provided, then the
- <adm:user-friendly-name />
- listens on all interfaces.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0.0.0.0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:ip-address />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-listen-address</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="keep-stats">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- should keep statistics.
- </adm:synopsis>
- <adm:description>
- If enabled, the
- <adm:user-friendly-name />
- maintains statistics about the number and types of operations
- requested over HTTP and the amount of data sent and received.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-keep-stats</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-request-size" advanced="true">
- <adm:synopsis>
- Specifies the size in bytes of the largest HTTP request message that will
- be allowed by the <adm:user-friendly-name />.
- </adm:synopsis>
- <adm:description>
- This can help prevent denial-of-service attacks by clients that indicate
- they send extremely large requests to the server causing it to
- attempt to allocate large amounts of memory.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5 megabytes</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size upper-limit="2147483647b"></adm:size>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-request-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="buffer-size" advanced="true">
- <adm:synopsis>
- Specifies the size in bytes of the HTTP response message write buffer.
- </adm:synopsis>
- <adm:description>
- This property specifies write buffer size allocated by the server for
- each client connection and used to buffer HTTP response messages data
- when writing.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>4096 bytes</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size lower-limit="1b" upper-limit="2147483647b"></adm:size>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-buffer-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="num-request-handlers" advanced="true">
- <adm:synopsis>
- Specifies the number of request handlers that are used to read
- requests from clients.
- </adm:synopsis>
- <adm:description>
- The
- <adm:user-friendly-name />
- uses one thread to accept new connections from clients, but uses
- one or more additional threads to read requests from existing
- client connections. This ensures that new requests are
- read efficiently and that the connection handler itself does not
- become a bottleneck when the server is under heavy load from many
- clients at the same time.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Let the server decide.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-num-request-handlers</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ssl-client-auth-policy">
- <adm:synopsis>
- Specifies the policy that the
- <adm:user-friendly-name />
- should use regarding client SSL certificates.
- Clients can use the SASL EXTERNAL mechanism only if the
- policy is set to "optional" or "required".
- </adm:synopsis>
- <adm:description>
- This is only applicable if clients are allowed to use SSL.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>optional</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="disabled">
- <adm:synopsis>
- Clients must not provide their own
- certificates when performing SSL negotiation.
- </adm:synopsis>
- </adm:value>
- <adm:value name="optional">
- <adm:synopsis>
- Clients are requested to provide their own certificates
- when performing SSL negotiation, but still accept the
- connection even if the client does not provide a
- certificate.
- </adm:synopsis>
- </adm:value>
- <adm:value name="required">
- <adm:synopsis>
- Clients are requested to provide their own certificates
- when performing SSL negotiation. The connection is
- nevertheless accepted if the client does not provide a
- certificate.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-client-auth-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="accept-backlog" advanced="true">
- <adm:synopsis>
- Specifies the maximum number of pending connection attempts that
- are allowed to queue up in the accept backlog before the
- server starts rejecting new connection attempts.
- </adm:synopsis>
- <adm:description>
- This is primarily an issue for cases in which a large number of
- connections are established to the server in a very short period
- of time (for example, a benchmark utility that creates a large number of
- client threads that each have their own connection to the server)
- and the connection handler is unable to keep up with the rate at
- which the new connections are established.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>128</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1">
- <adm:unit-synopsis>connections</adm:unit-synopsis>
- </adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-accept-backlog</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ssl-protocol" multi-valued="true">
- <adm:synopsis>
- Specifies the names of the SSL protocols that are allowed for
- use in SSL communication.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but only
- impact new SSL/TLS-based sessions created after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Uses the default set of SSL protocols provided by the server's
- JVM.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-protocol</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ssl-cipher-suite" multi-valued="true">
- <adm:synopsis>
- Specifies the names of the SSL cipher suites that are allowed
- for use in SSL communication.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but will
- only impact new SSL/TLS-based sessions created after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Uses the default set of SSL cipher suites provided by the
- server's JVM.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-cipher-suite</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-blocked-write-time-limit" advanced="true">
- <adm:synopsis>
- Specifies the maximum length of time that attempts to write data
- to HTTP clients should be allowed to block.
- </adm:synopsis>
- <adm:description>
- If an attempt to write data to a client takes longer than this
- length of time, then the client connection is terminated.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>2 minutes</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-blocked-write-time-limit</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="config-file" mandatory="true">
- <adm:synopsis>
- Specifies the name of the configuration file for the <adm:user-friendly-name />.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>config/http-config.json</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>FILE</adm:usage>
- <adm:synopsis>
- A path to an existing file that is readable by the server.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-config-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="authentication-required" mandatory="true">
- <adm:synopsis>
- Specifies whether only authenticated requests can be processed by the
- <adm:user-friendly-name />.
- </adm:synopsis>
- <adm:description>
- If true, only authenticated requests will be processed by the
- <adm:user-friendly-name />. If false, both authenticated requests and
- unauthenticated requests will be processed. All requests are subject
- to ACI limitations and unauthenticated requests are subject to server
- limits like maximum number of entries returned. Note that setting
- ds-cfg-reject-unauthenticated-requests to true will override the current
- setting.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-authentication-required</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-concurrent-ops-per-connection">
- <adm:synopsis>
- Specifies the maximum number of internal operations that each
- HTTP client connection can execute concurrently.
- </adm:synopsis>
- <adm:description>
- This property allow to limit the impact that each HTTP request can have on
- the whole server by limiting the number of internal operations that each
- HTTP request can execute concurrently.
- A value of 0 means that no limit is enforced.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Let the server decide.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-concurrent-ops-per-connection</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/HasSubordinatesVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/HasSubordinatesVirtualAttributeConfiguration.xml
deleted file mode 100644
index f6d6c32..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/HasSubordinatesVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="has-subordinates-virtual-attribute"
- plural-name="has-subordinates-virtual-attributes"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- generates a virtual attribute that indicates whether
- the entry has any subordinate entries.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-has-subordinates-virtual-attribute</ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.HasSubordinatesVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="conflict-behavior" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>virtual-overrides-real</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="attribute-type">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>hasSubordinates</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/IdentityMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/IdentityMapperConfiguration.xml
deleted file mode 100644
index 7c11a97..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/IdentityMapperConfiguration.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="identity-mapper"
- plural-name="identity-mappers" package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for establishing a mapping between an identifier
- string provided by a client, and the entry for the user that
- corresponds to that identifier. <adm:user-friendly-plural-name />
- are used to process several SASL mechanisms to map an authorization ID
- (e.g., a Kerberos principal when using GSSAPI) to a directory user. They
- are also used when processing requests with the proxied authorization control.
- </adm:synopsis>
- <adm:tag name="security" />
- <adm:tag name="user-management" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-identity-mapper</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled for use.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.IdentityMapper
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/IsMemberOfVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/IsMemberOfVirtualAttributeConfiguration.xml
deleted file mode 100644
index f837402..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/IsMemberOfVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="is-member-of-virtual-attribute"
- plural-name="is-member-of-virtual-attributes"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- generates the isMemberOf operational attribute,
- which contains the DNs of
- the groups in which the user is a member.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-is-member-of-virtual-attribute</ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.IsMemberOfVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="conflict-behavior" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>virtual-overrides-real</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="attribute-type">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>isMemberOf</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/JMXAlertHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/JMXAlertHandlerConfiguration.xml
deleted file mode 100644
index 1475feb..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/JMXAlertHandlerConfiguration.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="jmx-alert-handler"
- plural-name="jmx-alert-handlers" package="org.forgerock.opendj.admin"
- extends="alert-handler" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is used to generate JMX notifications to alert administrators of
- significant events that occur within the server.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-jmx-alert-handler</ldap:name>
- <ldap:superior>ds-cfg-alert-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.JMXAlertHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/JMXConnectionHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/JMXConnectionHandlerConfiguration.xml
deleted file mode 100644
index 04c84d3..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/JMXConnectionHandlerConfiguration.xml
+++ /dev/null
@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2009 Sun Microsystems, Inc.
- ! Portions Copyright 2013 ForgeRock AS.
- ! -->
-<adm:managed-object name="jmx-connection-handler"
- plural-name="jmx-connection-handlers"
- package="org.forgerock.opendj.admin" extends="connection-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is used to interact with clients using the Java Management
- Extensions (JMX) protocol.
- </adm:synopsis>
- <adm:constraint>
- <adm:synopsis>
- A Key Manager Provider must be specified when this
- <adm:user-friendly-name />
- is enabled and it is configured to use SSL.
- </adm:synopsis>
- <adm:condition>
- <adm:implies>
- <adm:contains property="enabled" value="true" />
- <adm:implies>
- <adm:contains property="use-ssl" value="true" />
- <adm:is-present property="key-manager-provider" />
- </adm:implies>
- </adm:implies>
- </adm:condition>
- </adm:constraint>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-jmx-connection-handler</ldap:name>
- <ldap:superior>ds-cfg-connection-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.protocols.jmx.JmxConnectionHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="listen-address" multi-valued="true" read-only="true">
- <adm:synopsis>
- Specifies the address or set of addresses on which this
- <adm:user-friendly-name />
- should listen for connections from JMX clients. However JMX/RMI
- doesn't allow this, and this property cannot be set.
- </adm:synopsis>
- <adm:description>
- Multiple addresses may be provided as separate values for this
- attribute. If no values are provided, then the
- <adm:user-friendly-name />
- listens on all interfaces.
- </adm:description>
- <adm:requires-admin-action>
- <adm:server-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0.0.0.0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:ip-address />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-listen-address</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property-reference name="listen-port" />
- <adm:property-reference name="use-ssl" />
- <adm:property-reference name="ssl-cert-nickname" />
- <adm:property name="key-manager-provider">
- <adm:synopsis>
- Specifies the name of the key manager that should be used with
- this
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately, but
- only for subsequent attempts to access the key manager
- provider for associated client connections.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="key-manager-provider"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced key manager provider must be enabled when
- the
- <adm:user-friendly-name />
- is enabled and configured to use SSL.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:and>
- <adm:contains property="enabled" value="true" />
- <adm:contains property="use-ssl" value="true" />
- </adm:and>
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-key-manager-provider</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="rmi-port">
- <adm:synopsis>
- Specifies the port number on which the JMX RMI service
- will listen for connections from clients. A value of 0
- indicates the service to choose a port of its own.
- </adm:synopsis>
- <adm:description>
- If the value provided is different than 0, the value
- will be used as the RMI port. Otherwise, the RMI service
- will choose a port of its own.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" upper-limit="65535" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-rmi-port</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/JPEGAttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/JPEGAttributeSyntaxConfiguration.xml
deleted file mode 100644
index 6c1f18a..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/JPEGAttributeSyntaxConfiguration.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2012 ForgeRock AS
- ! -->
-<adm:managed-object name="jpeg-attribute-syntax"
- plural-name="jpeg-attribute-syntaxes"
- extends="attribute-syntax" package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- define an attribute syntax for storing JPEG information.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-jpeg-attribute-syntax</ldap:name>
- <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.schema.JPEGSyntax
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="strict-format" advanced="true">
- <adm:synopsis>
- Indicates whether to require JPEG values to strictly
- comply with the standard definition for this syntax.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-strict-format</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/KeyManagerProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/KeyManagerProviderConfiguration.xml
deleted file mode 100644
index 20c4a8e..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/KeyManagerProviderConfiguration.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="key-manager-provider"
- plural-name="key-manager-providers"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for managing the key material that is used to
- authenticate an SSL connection to its peer.
- </adm:synopsis>
- <adm:description>
- <adm:user-friendly-plural-name />
- essentially provide access to the certificate that is used by the
- server when performing SSL or StartTLS negotiation.
- </adm:description>
- <adm:tag name="security" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-key-manager-provider</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled for use.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- The fully-qualified name of the Java class that provides
- the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.KeyManagerProvider
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDAPAttributeDescriptionListPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDAPAttributeDescriptionListPluginConfiguration.xml
deleted file mode 100644
index 1ef4aee..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDAPAttributeDescriptionListPluginConfiguration.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="ldap-attribute-description-list-plugin"
- plural-name="ldap-attribute-description-list-plugins"
- package="org.forgerock.opendj.admin" extends="plugin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides the ability for clients to include an attribute list in
- a search request that names object classes instead of (or in
- addition to) attributes.
- </adm:synopsis>
- <adm:description>
- For example, if a client wishes to
- retrieve all of the attributes in the inetOrgPerson object class,
- then that client can include "@inetOrgPerson" in the attribute
- list rather than naming all of those attributes individually.
- This behavior is based on the specification contained in RFC 4529.
- The implementation for the LDAP attribute description list plugin
- is contained in the
- org.opends.server.plugins.LDAPADListPlugin class. It must be
- configured with the preParseSearch plugin type, but does not have
- any other custom configuration.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-ldap-attribute-description-list-plugin
- </ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.plugins.LDAPADListPlugin
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="plugin-type" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>preparsesearch</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDAPConnectionHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDAPConnectionHandlerConfiguration.xml
deleted file mode 100644
index ab47b17..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDAPConnectionHandlerConfiguration.xml
+++ /dev/null
@@ -1,606 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2009 Sun Microsystems, Inc.
- ! Portions copyright 2011-2013 ForgeRock AS
- ! -->
-<adm:managed-object name="ldap-connection-handler"
- plural-name="ldap-connection-handlers"
- package="org.forgerock.opendj.admin" extends="connection-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is used to interact with clients using LDAP.
- </adm:synopsis>
- <adm:description>
- It provides full support for LDAPv3 and limited
- support for LDAPv2.
- </adm:description>
- <adm:constraint>
- <adm:synopsis>
- A Key Manager Provider must be specified when this
- <adm:user-friendly-name />
- is enabled and it is configured to use SSL or StartTLS.
- </adm:synopsis>
- <adm:condition>
- <adm:implies>
- <adm:contains property="enabled" value="true" />
- <adm:implies>
- <adm:or>
- <adm:contains property="use-ssl" value="true" />
- <adm:contains property="allow-start-tls" value="true" />
- </adm:or>
- <adm:is-present property="key-manager-provider" />
- </adm:implies>
- </adm:implies>
- </adm:condition>
- </adm:constraint>
- <adm:constraint>
- <adm:synopsis>
- A Trust Manager Provider must be specified when this
- <adm:user-friendly-name />
- is enabled and it is configured to use SSL or StartTLS.
- </adm:synopsis>
- <adm:condition>
- <adm:implies>
- <adm:contains property="enabled" value="true" />
- <adm:implies>
- <adm:or>
- <adm:contains property="use-ssl" value="true" />
- <adm:contains property="allow-start-tls" value="true" />
- </adm:or>
- <adm:is-present property="trust-manager-provider" />
- </adm:implies>
- </adm:implies>
- </adm:condition>
- </adm:constraint>
- <adm:constraint>
- <adm:synopsis>
- A
- <adm:user-friendly-name />
- cannot be configured to support SSL and StartTLS at the same time.
- Either SSL or StartTLS must be disabled in order for this
- <adm:user-friendly-name />
- to be used.
- </adm:synopsis>
- <adm:condition>
- <adm:implies>
- <adm:contains property="enabled" value="true" />
- <adm:not>
- <adm:and>
- <adm:contains property="use-ssl" value="true" />
- <adm:contains property="allow-start-tls" value="true" />
- </adm:and>
- </adm:not>
- </adm:implies>
- </adm:condition>
- </adm:constraint>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-ldap-connection-handler</ldap:name>
- <ldap:superior>ds-cfg-connection-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.protocols.ldap.LDAPConnectionHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-reference name="listen-port" />
- <adm:property-reference name="use-ssl" />
- <adm:property-reference name="ssl-cert-nickname" />
- <adm:property-reference name="use-tcp-keep-alive" />
- <adm:property-reference name="use-tcp-no-delay" />
- <adm:property-reference name="allow-tcp-reuse-address" />
- <adm:property name="key-manager-provider">
- <adm:synopsis>
- Specifies the name of the key manager that should be used with
- this
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately, but
- only for subsequent attempts to access the key manager
- provider for associated client connections.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="key-manager-provider"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced key manager provider must be enabled when
- the
- <adm:user-friendly-name />
- is enabled and configured to use SSL or StartTLS.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:and>
- <adm:contains property="enabled" value="true" />
- <adm:or>
- <adm:contains property="use-ssl" value="true" />
- <adm:contains property="allow-start-tls" value="true" />
- </adm:or>
- </adm:and>
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-key-manager-provider</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="trust-manager-provider">
- <adm:synopsis>
- Specifies the name of the trust manager that should be used with
- the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately, but
- only for subsequent attempts to access the trust manager
- provider for associated client connections.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="trust-manager-provider"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced trust manager provider must be enabled when
- the
- <adm:user-friendly-name />
- is enabled and configured to use SSL or StartTLS.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:and>
- <adm:contains property="enabled" value="true" />
- <adm:or>
- <adm:contains property="use-ssl" value="true" />
- <adm:contains property="allow-start-tls" value="true" />
- </adm:or>
- </adm:and>
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-trust-manager-provider</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="listen-address" multi-valued="true">
- <adm:synopsis>
- Specifies the address or set of addresses on which this
- <adm:user-friendly-name />
- should listen for connections from LDAP clients.
- </adm:synopsis>
- <adm:description>
- Multiple addresses may be provided as separate values for this
- attribute. If no values are provided, then the
- <adm:user-friendly-name />
- listens on all interfaces.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0.0.0.0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:ip-address />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-listen-address</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allow-ldap-v2">
- <adm:synopsis>
- Indicates whether connections from LDAPv2 clients are allowed.
- </adm:synopsis>
- <adm:description>
- If LDAPv2 clients are allowed, then only a minimal degree of
- special support are provided for them to ensure that
- LDAPv3-specific protocol elements (for example, Configuration Guide 25
- controls, extended response messages, intermediate response
- messages, referrals) are not sent to an LDAPv2 client.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allow-ldap-v2</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="keep-stats">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- should keep statistics.
- </adm:synopsis>
- <adm:description>
- If enabled, the
- <adm:user-friendly-name />
- maintains statistics about the number and types of operations
- requested over LDAP and the amount of data sent and received.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-keep-stats</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="send-rejection-notice" advanced="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- should send a notice of disconnection extended response message to
- the client if a new connection is rejected for some reason.
- </adm:synopsis>
- <adm:description>
- The extended response message may provide an explanation
- indicating the reason that the connection was rejected.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-send-rejection-notice</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-request-size" advanced="true">
- <adm:synopsis>
- Specifies the size in bytes of the largest LDAP request message that will
- be allowed by this LDAP Connection handler.
- </adm:synopsis>
- <adm:description>
- This property is analogous to the maxBERSize configuration
- attribute of the Sun Java System Directory Server. This can help
- prevent denial-of-service attacks by clients that indicate they
- send extremely large requests to the server causing it to
- attempt to allocate large amounts of memory.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5 megabytes</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size upper-limit="2147483647b"></adm:size>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-request-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="buffer-size" advanced="true">
- <adm:synopsis>
- Specifies the size in bytes of the LDAP response message write buffer.
- </adm:synopsis>
- <adm:description>
- This property specifies write buffer size allocated by the server for
- each client connection and used to buffer LDAP response messages data
- when writing.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>4096 bytes</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size lower-limit="1b" upper-limit="2147483647b"></adm:size>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-buffer-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="num-request-handlers" advanced="true">
- <adm:synopsis>
- Specifies the number of request handlers that are used to read
- requests from clients.
- </adm:synopsis>
- <adm:description>
- The
- <adm:user-friendly-name />
- uses one thread to accept new connections from clients, but uses
- one or more additional threads to read requests from existing
- client connections. This ensures that new requests are
- read efficiently and that the connection handler itself does not
- become a bottleneck when the server is under heavy load from many
- clients at the same time.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Let the server decide.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-num-request-handlers</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allow-start-tls">
- <adm:synopsis>
- Indicates whether clients are allowed to use StartTLS.
- </adm:synopsis>
- <adm:description>
- If enabled, the
- <adm:user-friendly-name />
- allows clients to use the StartTLS extended operation to
- initiate secure communication over an otherwise insecure channel.
- Note that this is only allowed if the
- <adm:user-friendly-name />
- is not configured to use SSL, and if the server is configured with
- a valid key manager provider and a valid trust manager provider.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allow-start-tls</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ssl-client-auth-policy">
- <adm:synopsis>
- Specifies the policy that the
- <adm:user-friendly-name />
- should use regarding client SSL certificates.
- Clients can use the SASL EXTERNAL mechanism only if the
- policy is set to "optional" or "required".
- </adm:synopsis>
- <adm:description>
- This is only applicable if clients are allowed to use SSL.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>optional</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="disabled">
- <adm:synopsis>
- Clients must not provide their own
- certificates when performing SSL negotiation.
- </adm:synopsis>
- </adm:value>
- <adm:value name="optional">
- <adm:synopsis>
- Clients are requested to provide their own certificates
- when performing SSL negotiation. The connection is
- nevertheless accepted if the client does not provide a
- certificate.
- </adm:synopsis>
- </adm:value>
- <adm:value name="required">
- <adm:synopsis>
- Clients are required to provide their own certificates
- when performing SSL negotiation and are refused access
- if they do not provide a certificate.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-client-auth-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="accept-backlog" advanced="true">
- <adm:synopsis>
- Specifies the maximum number of pending connection attempts that
- are allowed to queue up in the accept backlog before the
- server starts rejecting new connection attempts.
- </adm:synopsis>
- <adm:description>
- This is primarily an issue for cases in which a large number of
- connections are established to the server in a very short period
- of time (for example, a benchmark utility that creates a large number of
- client threads that each have their own connection to the server)
- and the connection handler is unable to keep up with the rate at
- which the new connections are established.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>128</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1">
- <adm:unit-synopsis>connections</adm:unit-synopsis>
- </adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-accept-backlog</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ssl-protocol" multi-valued="true">
- <adm:synopsis>
- Specifies the names of the SSL protocols that are allowed for
- use in SSL or StartTLS communication.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but only
- impact new SSL/TLS-based sessions created after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Uses the default set of SSL protocols provided by the server's
- JVM.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-protocol</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ssl-cipher-suite" multi-valued="true">
- <adm:synopsis>
- Specifies the names of the SSL cipher suites that are allowed
- for use in SSL or StartTLS communication.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but will
- only impact new SSL/TLS-based sessions created after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Uses the default set of SSL cipher suites provided by the
- server's JVM.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-cipher-suite</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-blocked-write-time-limit" advanced="true">
- <adm:synopsis>
- Specifies the maximum length of time that attempts to write data
- to LDAP clients should be allowed to block.
- </adm:synopsis>
- <adm:description>
- If an attempt to write data to a client takes longer than this
- length of time, then the client connection is terminated.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>2 minutes</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-blocked-write-time-limit</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDAPPassThroughAuthenticationPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDAPPassThroughAuthenticationPolicyConfiguration.xml
deleted file mode 100644
index 08a7a27..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDAPPassThroughAuthenticationPolicyConfiguration.xml
+++ /dev/null
@@ -1,663 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="ldap-pass-through-authentication-policy"
- plural-name="ldap-pass-through-authentication-policies" extends="authentication-policy"
- package="org.forgerock.opendj.admin" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
-
- <adm:synopsis>
- An authentication policy for users whose credentials are managed
- by a remote LDAP directory service.
- </adm:synopsis>
-
- <adm:description>
- Authentication attempts will be redirected to the remote LDAP
- directory service based on a combination of the criteria specified in this
- policy and the content of the user's entry in this directory server.
- </adm:description>
-
- <adm:constraint>
- <adm:synopsis>
- One or more mapped attributes must be specified when using the
- "mapped-bind" or "mapped-search" mapping policies.
- </adm:synopsis>
- <adm:condition>
- <adm:implies>
- <adm:or>
- <adm:contains property="mapping-policy" value="mapped-bind" />
- <adm:contains property="mapping-policy" value="mapped-search" />
- </adm:or>
- <adm:is-present property="mapped-attribute" />
- </adm:implies>
- </adm:condition>
- </adm:constraint>
-
- <adm:constraint>
- <adm:synopsis>
- One or more search base DNs must be specified when using the
- "mapped-search" mapping policy.
- </adm:synopsis>
- <adm:condition>
- <adm:implies>
- <adm:contains property="mapping-policy" value="mapped-search" />
- <adm:is-present property="mapped-search-base-dn" />
- </adm:implies>
- </adm:condition>
- </adm:constraint>
-
- <adm:constraint>
- <adm:synopsis>
- The mapped search bind password must be specified when using the
- "mapped-search" mapping policy and a mapped-search-bind-dn is defined.
- </adm:synopsis>
- <adm:condition>
- <adm:implies>
- <adm:and>
- <adm:contains property="mapping-policy" value="mapped-search" />
- <adm:is-present property="mapped-search-bind-dn" />
- </adm:and>
- <adm:or>
- <adm:is-present property="mapped-search-bind-password" />
- <adm:is-present property="mapped-search-bind-password-property" />
- <adm:is-present property="mapped-search-bind-password-environment-variable" />
- <adm:is-present property="mapped-search-bind-password-file" />
- </adm:or>
- </adm:implies>
- </adm:condition>
- </adm:constraint>
-
- <adm:constraint>
- <adm:synopsis>
- The cached password storage scheme must be specified when password
- caching is enabled.
- </adm:synopsis>
- <adm:condition>
- <adm:implies>
- <adm:contains property="use-password-caching" value="true" />
- <adm:is-present property="cached-password-storage-scheme" />
- </adm:implies>
- </adm:condition>
- </adm:constraint>
-
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-ldap-pass-through-authentication-policy</ldap:name>
- <ldap:superior>ds-cfg-authentication-policy</ldap:superior>
- </ldap:object-class>
- </adm:profile>
-
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.LDAPPassThroughAuthenticationPolicyFactory
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-
- <adm:property name="primary-remote-ldap-server" multi-valued="true"
- mandatory="true">
- <adm:synopsis>
- Specifies the primary list of remote LDAP servers which should
- be used for pass through authentication.
- </adm:synopsis>
- <adm:description>
- If more than one LDAP server is specified then operations
- may be distributed across them. If all of the primary LDAP servers are
- unavailable then operations will fail-over to the set of secondary LDAP
- servers, if defined.
- </adm:description>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^.+:[0-9]+$</adm:regex>
- <adm:usage>HOST:PORT</adm:usage>
- <adm:synopsis>
- A host name followed by a ":" and a port number.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-primary-remote-ldap-server</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="secondary-remote-ldap-server" multi-valued="true">
- <adm:synopsis>
- Specifies the secondary list of remote LDAP servers which
- should be used for pass through authentication in the event that the
- primary LDAP servers are unavailable.
- </adm:synopsis>
- <adm:description>
- If more than one LDAP server is specified then operations
- may be distributed across them. Operations will be rerouted to the primary
- LDAP servers as soon as they are determined to be available.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>No secondary LDAP servers.</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^.+:[0-9]+$</adm:regex>
- <adm:usage>HOST:PORT</adm:usage>
- <adm:synopsis>
- A host name followed by a ":" and a port number.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-secondary-remote-ldap-server</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="connection-timeout">
- <adm:synopsis>
- Specifies the timeout used when connecting to remote LDAP
- directory servers, performing SSL negotiation, and for individual search
- and bind requests.
- </adm:synopsis>
- <adm:description>
- If the timeout expires then the current operation will be
- aborted and retried against another LDAP server if one is available.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>3 seconds</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-connection-timeout</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property-reference name="use-ssl" />
-
- <adm:property name="trust-manager-provider">
- <adm:synopsis>
- Specifies the name of the trust manager that should be used
- when negotiating SSL connections with remote LDAP directory servers.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately, but only
- impact subsequent SSL connection negotiations.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- By default, no trust manager is specified indicating that only
- certificates signed by the authorities associated with this JVM will
- be accepted.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="trust-manager-provider"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced trust manager provider must be enabled
- when SSL is enabled.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:and>
- <adm:contains property="use-ssl" value="true" />
- </adm:and>
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-trust-manager-provider</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="mapping-policy" mandatory="true">
- <adm:synopsis>
- Specifies the mapping algorithm for obtaining the bind DN from
- the user's entry.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>unmapped</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="unmapped">
- <adm:synopsis>
- Bind to the remote LDAP directory service using the DN
- of the user's entry in this directory server.
- </adm:synopsis>
- </adm:value>
- <adm:value name="mapped-bind">
- <adm:synopsis>
- Bind to the remote LDAP directory service using a DN
- obtained from an attribute in the user's entry. This policy will
- check each attribute named in the "mapped-attribute" property. If
- more than one attribute or value is present then the first one will
- be used.
- </adm:synopsis>
- </adm:value>
- <adm:value name="mapped-search">
- <adm:synopsis>
- Bind to the remote LDAP directory service using the DN
- of an entry obtained using a search against the remote LDAP
- directory service. The search filter will comprise of an equality
- matching filter whose attribute type is the "mapped-attribute"
- property, and whose assertion value is the attribute value obtained
- from the user's entry. If more than one attribute or value is
- present then the filter will be composed of multiple equality
- filters combined using a logical OR (union).
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-mapping-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="mapped-attribute" multi-valued="true">
- <adm:synopsis>
- Specifies one or more attributes in the user's entry whose
- value(s) will determine the bind DN used when authenticating to the remote
- LDAP directory service. This property is mandatory when using the
- "mapped-bind" or "mapped-search" mapping policies.
- </adm:synopsis>
- <adm:description>
- At least one value must be provided. All values must refer
- to the name or OID of an attribute type defined in the directory server
- schema. At least one of the named attributes must exist in a user's
- local entry in order for authentication to proceed. When multiple
- attributes or values are found in the user's entry then the behavior is
- determined by the mapping policy.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-mapped-attribute</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="mapped-search-bind-dn">
- <adm:synopsis>
- Specifies the bind DN which should be used to perform user
- searches in the remote LDAP directory service.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>Searches will be performed anonymously.</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-mapped-search-bind-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="mapped-search-bind-password">
- <adm:synopsis>
- Specifies the bind password which should be used to perform
- user searches in the remote LDAP directory service.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:password />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-mapped-search-bind-password</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="mapped-search-bind-password-property">
- <adm:synopsis>
- Specifies the name of a Java property containing the bind password which
- should be used to perform user searches in the remote LDAP directory
- service.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-mapped-search-bind-password-property</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="mapped-search-bind-password-environment-variable">
- <adm:synopsis>
- Specifies the name of an environment variable containing the bind
- password which should be used to perform user searches in the remote LDAP
- directory service.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-mapped-search-bind-password-environment-variable
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="mapped-search-bind-password-file">
- <adm:synopsis>
- Specifies the name of a file containing the bind
- password which should be used to perform user searches in the remote LDAP
- directory service.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-mapped-search-bind-password-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="mapped-search-base-dn" multi-valued="true">
- <adm:synopsis>
- Specifies the set of base DNs below which to search for users
- in the remote LDAP directory service. This property is mandatory when
- using the "mapped-search" mapping policy.
- </adm:synopsis>
- <adm:description>
- If multiple values are given, searches are performed below
- all specified base DNs.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-mapped-search-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="use-tcp-keep-alive" advanced="true">
- <adm:synopsis>
- Indicates whether LDAP connections should use TCP keep-alive.
- </adm:synopsis>
- <adm:description>
- If enabled, the SO_KEEPALIVE socket option is used to
- indicate that TCP keepalive messages should periodically be sent to the
- client to verify that the associated connection is still valid. This may
- also help prevent cases in which intermediate network hardware
- could silently drop an otherwise idle client connection, provided
- that the keepalive interval configured in the underlying operating
- system is smaller than the timeout enforced by the network hardware.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-use-tcp-keep-alive</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="use-tcp-no-delay" advanced="true">
- <adm:synopsis>
- Indicates whether LDAP connections should use TCP no-delay.
- </adm:synopsis>
- <adm:description>
- If enabled, the TCP_NODELAY socket option is used to ensure
- that response messages to the client are sent immediately rather
- than potentially waiting to determine whether additional response
- messages can be sent in the same packet. In most cases, using the
- TCP_NODELAY socket option provides better performance and
- lower response times, but disabling it may help for some cases in
- which the server sends a large number of entries to a client
- in response to a search request.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-use-tcp-no-delay</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="ssl-protocol" multi-valued="true" advanced="true">
- <adm:synopsis>
- Specifies the names of the SSL protocols which are allowed for
- use in SSL based LDAP connections.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but will
- only impact new SSL LDAP connections created after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Uses the default set of SSL protocols provided by the
- server's JVM.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-protocol</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="ssl-cipher-suite" multi-valued="true"
- advanced="true">
- <adm:synopsis>
- Specifies the names of the SSL cipher suites that are allowed
- for use in SSL based LDAP connections.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately but will
- only impact new SSL LDAP connections created after the
- change.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Uses the default set of SSL cipher suites provided by the
- server's JVM.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-cipher-suite</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="use-password-caching" mandatory="true">
- <adm:synopsis>
- Indicates whether passwords should be cached locally within the user's
- entry.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-use-password-caching</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="cached-password-storage-scheme">
- <adm:synopsis>
- Specifies the name of a password storage scheme which should be used
- for encoding cached passwords.
- </adm:synopsis>
- <adm:description>
- Changing the password storage scheme will cause all existing cached
- passwords to be discarded.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="password-storage-scheme"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced password storage schemes must be enabled.
- </adm:synopsis>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-cached-password-storage-scheme</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="cached-password-ttl">
- <adm:synopsis>
- Specifies the maximum length of time that a locally cached password may
- be used for authentication before it is refreshed from the remote LDAP
- service.
- </adm:synopsis>
- <adm:description>
- This property represents a cache timeout. Increasing the timeout period
- decreases the frequency that bind operations are delegated to the
- remote LDAP service, but increases the risk of users authenticating
- using stale passwords.
-
- Note that authentication attempts which fail because the provided password
- does not match the locally cached password will always be retried against
- the remote LDAP service.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>8 hours</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="s"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-cached-password-ttl</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDIFBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDIFBackendConfiguration.xml
deleted file mode 100644
index 1fc8602..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDIFBackendConfiguration.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="ldif-backend" plural-name="ldif-backends"
- package="org.forgerock.opendj.admin" extends="backend"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for interacting with data
- stored in an LDIF file.
- </adm:synopsis>
- <adm:description>
- All basic LDAP operations are supported in the LDIF backend
- although it has minimal support for custom controls.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-ldif-backend</ldap:name>
- <ldap:superior>ds-cfg-backend</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.backends.LDIFBackend</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="writability-mode">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>enabled</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="ldif-file" mandatory="true">
- <adm:synopsis>
- Specifies the path to the LDIF file containing the data for
- this backend.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ldif-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="is-private-backend">
- <adm:synopsis>
- Indicates whether the backend should be considered a private
- backend, which indicates that it is used for storing operational
- data rather than user-defined information.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-is-private-backend</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDIFConnectionHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDIFConnectionHandlerConfiguration.xml
deleted file mode 100644
index 2165266..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LDIFConnectionHandlerConfiguration.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="ldif-connection-handler"
- plural-name="ldif-connection-handlers"
- package="org.forgerock.opendj.admin" extends="connection-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is used to process changes in the server using internal
- operations, where the changes to process are read from an LDIF file.
- </adm:synopsis>
- <adm:description>
- The connection handler periodically looks for the existence of a
- new file, processes the changes contained in that file as
- internal operations, and writes the result to an output file
- with comments indicating the result of the processing. NOTE: By
- default
- <adm:user-friendly-name />
- operations are not logged because they are internal operations. If
- you want to log these operations, allow internal logging in the
- access log publisher.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-ldif-connection-handler</ldap:name>
- <ldap:superior>ds-cfg-connection-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.protocols.LDIFConnectionHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="ldif-directory" mandatory="true">
- <adm:synopsis>
- Specifies the path to the directory in which the LDIF files should
- be placed.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>config/auto-process-ldif</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ldif-directory</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="poll-interval" mandatory="true">
- <adm:synopsis>
- Specifies how frequently the LDIF connection handler should check
- the LDIF directory to determine whether a new LDIF file has been
- added.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5 seconds</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-poll-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LastModPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LastModPluginConfiguration.xml
deleted file mode 100644
index 8bb63a4..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LastModPluginConfiguration.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="last-mod-plugin"
- plural-name="last-mod-plugins" package="org.forgerock.opendj.admin"
- extends="plugin" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is used to ensure that the creatorsName and createTimestamp
- attributes are included in an entry whenever it is added to the
- server and also to ensure that the modifiersName and modifyTimestamp
- attributes are updated whenever an entry is modified or renamed.
- </adm:synopsis>
- <adm:description>
- This behavior is described in RFC 4512. The implementation for
- the LastMod plugin is contained in the
- org.opends.server.plugins.LastModPlugin class. It must be
- configured with the preOperationAdd, preOperationModify, and
- preOperationModifyDN plugin types, but it does not have any
- other custom configuration.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-last-mod-plugin</ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.plugins.LastModPlugin</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="plugin-type" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>preoperationadd</adm:value>
- <adm:value>preoperationmodify</adm:value>
- <adm:value>preoperationmodifydn</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LengthBasedPasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LengthBasedPasswordValidatorConfiguration.xml
deleted file mode 100644
index bcd6199..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LengthBasedPasswordValidatorConfiguration.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="length-based-password-validator"
- plural-name="length-based-password-validators"
- package="org.forgerock.opendj.admin" extends="password-validator"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:TODO>
- Use constraints to enforce max-password-length >=
- min-password-length
- </adm:TODO>
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is used to determine whether a proposed password is acceptable based
- on whether the number of characters it contains falls within an
- acceptable range of values.
- </adm:synopsis>
- <adm:description>
- Both upper and lower bounds may be
- defined.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-length-based-password-validator</ldap:name>
- <ldap:superior>ds-cfg-password-validator</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.LengthBasedPasswordValidator
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="max-password-length">
- <adm:synopsis>
- Specifies the maximum number of characters that can be included in
- a proposed password.
- </adm:synopsis>
- <adm:description>
- A value of zero indicates that there will be no upper bound
- enforced. If both minimum and maximum lengths
- are defined, then the minimum length must be less than or equal to
- the maximum length.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" upper-limit="2147483647"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-password-length</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="min-password-length">
- <adm:synopsis>
- Specifies the minimum number of characters that must be included
- in a proposed password.
- </adm:synopsis>
- <adm:description>
- A value of zero indicates that there will be no lower bound
- enforced.
- If both minimum and maximum lengths
- are defined, then the minimum length must be less than or equal to
- the maximum length.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>6</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" upper-limit="2147483647"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-min-password-length</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LocalBackendWorkflowElementConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LocalBackendWorkflowElementConfiguration.xml
deleted file mode 100644
index ae61246..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LocalBackendWorkflowElementConfiguration.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2009 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="local-backend-workflow-element"
- plural-name="local-backend-workflow-elements"
- package="org.forgerock.opendj.admin" extends="workflow-element"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides access to a backend.
- </adm:synopsis>
- <adm:tag name="user-management" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-local-backend-workflow-element</ldap:name>
- <ldap:superior>ds-cfg-workflow-element</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.workflowelement.localbackend.LocalBackendWorkflowElement
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="backend" mandatory="true" read-only="true">
- <adm:synopsis>
- Identifies the backend accessed by the workflow element.
- </adm:synopsis>
- <adm:syntax>
- <adm:aggregation relation-name="backend" parent-path="/">
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-backend</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LocalDBBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LocalDBBackendConfiguration.xml
deleted file mode 100644
index fe838bc..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LocalDBBackendConfiguration.xml
+++ /dev/null
@@ -1,1077 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! Portions Copyright 2010-2013 ForgeRock AS.
- ! -->
-<adm:managed-object name="local-db-backend"
- plural-name="local-db-backends" package="org.forgerock.opendj.admin"
- extends="backend" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- uses the Berkeley DB Java Edition to store user-provided data in a local
- repository.
- </adm:synopsis>
- <adm:description>
- It is the traditional "directory server" backend and is similar to
- the backends provided by the Sun Java System Directory Server. The
- <adm:user-friendly-name />
- stores the entries in an encoded form and also provides indexes that
- can be used to quickly locate target entries based on different
- kinds of criteria.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-local-db-backend</ldap:name>
- <ldap:superior>ds-cfg-backend</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:relation name="local-db-index">
- <adm:one-to-many naming-property="attribute">
- <adm:default-managed-object name="aci">
- <adm:property name="index-type">
- <adm:value>presence</adm:value>
- </adm:property>
- <adm:property name="attribute">
- <adm:value>aci</adm:value>
- </adm:property>
- </adm:default-managed-object>
- <adm:default-managed-object name="entryUUID">
- <adm:property name="index-type">
- <adm:value>equality</adm:value>
- </adm:property>
- <adm:property name="attribute">
- <adm:value>entryUUID</adm:value>
- </adm:property>
- </adm:default-managed-object>
- <adm:default-managed-object name="objectClass">
- <adm:property name="index-type">
- <adm:value>equality</adm:value>
- </adm:property>
- <adm:property name="attribute">
- <adm:value>objectClass</adm:value>
- </adm:property>
- </adm:default-managed-object>
- <adm:default-managed-object name="ds-sync-hist">
- <adm:property name="index-type">
- <adm:value>ordering</adm:value>
- </adm:property>
- <adm:property name="attribute">
- <adm:value>ds-sync-hist</adm:value>
- </adm:property>
- </adm:default-managed-object>
- <adm:default-managed-object name="ds-sync-conflict">
- <adm:property name="index-type">
- <adm:value>equality</adm:value>
- </adm:property>
- <adm:property name="attribute">
- <adm:value>ds-sync-conflict</adm:value>
- </adm:property>
- </adm:default-managed-object>
- </adm:one-to-many>
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Index</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="index-type" />
- <cli:default-property name="index-entry-limit" />
- <cli:default-property name="index-extensible-matching-rule" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="local-db-vlv-index">
- <adm:one-to-many naming-property="name" />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=VLV Index</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="base-dn" />
- <cli:default-property name="scope" />
- <cli:default-property name="filter" />
- <cli:default-property name="sort-order" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.backends.jeb.BackendImpl
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="writability-mode">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>enabled</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="db-directory" mandatory="true">
- <adm:TODO>Default this to the db/backend-id</adm:TODO>
- <adm:synopsis>
- Specifies the path to the filesystem directory that is used
- to hold the Berkeley DB Java Edition database files containing the
- data for this backend.
- </adm:synopsis>
- <adm:description>
- The path may be either an absolute path or a path relative to the
- directory containing the base of the <adm:product-name /> directory server
- installation. The path may be any valid directory path in which
- the server has appropriate permissions to read and write files and
- has sufficient space to hold the database contents.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>db</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-directory</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="compact-encoding">
- <adm:synopsis>
- Indicates whether the backend should use a compact form when
- encoding entries by compressing the attribute descriptions and
- object class sets.
- </adm:synopsis>
- <adm:description>
- Note that this property applies only to the entries themselves and
- does not impact the index data.
- </adm:description>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this setting take effect only for writes that
- occur after the change is made. It is not retroactively
- applied to existing data.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-compact-encoding</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="entries-compressed" advanced="true">
- <adm:synopsis>
- Indicates whether the backend should attempt to compress entries
- before storing them in the database.
- </adm:synopsis>
- <adm:description>
- Note that this property applies only to the entries themselves and
- does not impact the index data. Further, the effectiveness of the
- compression is based on the type of data contained in the
- entry.
- </adm:description>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this setting take effect only for writes that
- occur after the change is made. It is not retroactively
- applied to existing data.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-entries-compressed</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="import-queue-size" advanced="true">
- <adm:synopsis>
- This parameter has been deprecated in OpenDS 2.1 and will be removed
- in <adm:product-name /> 3.0. It is only being kept for migration ease and is ignored
- in OpenDS versions after 2.0.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- This parameter has been deprecated in OpenDS 2.1 and will be removed
- in <adm:product-name /> 3.0. It is only being kept for migration ease and is ignored
- in OpenDS versions after 2.0.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>100</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="2147483647" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-import-queue-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="import-thread-count" advanced="true">
- <adm:synopsis>
- This parameter has been deprecated in OpenDS 2.1 and will be removed
- in <adm:product-name /> 3.0. It is only being kept for migration ease and is ignored
- in OpenDS versions after 2.0.
- </adm:synopsis>
- <adm:description>
- This parameter has been deprecated in OpenDS 2.1 and will be removed
- in <adm:product-name /> 3.0. It is only being kept for migration ease and is ignored
- in OpenDS versions after 2.0.
- </adm:description>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes do not take effect for any import that may already
- be in progress.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>8</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="2147483647" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-import-thread-count</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="index-entry-limit">
- <adm:synopsis>
- Specifies the maximum number of entries that is allowed to
- match a given index key before that particular index key is no
- longer maintained.
- </adm:synopsis>
- <adm:description>
- This property is analogous to the ALL IDs threshold in the Sun
- Java System Directory Server. Note that this is the default limit
- for the backend, and it may be overridden on a per-attribute
- basis.A value of 0 means there is no limit.
- </adm:description>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- If any index keys have already reached this limit, indexes
- need to be rebuilt before they are allowed to use the
- new limit.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>4000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" upper-limit="2147483647" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-index-entry-limit</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-directory-permissions" advanced="true">
- <adm:synopsis>
- Specifies the permissions that should be applied to the directory
- containing the server database files.
- </adm:synopsis>
- <adm:description>
- They should be expressed as three-digit octal values, which is the
- traditional representation for UNIX file permissions. The three
- digits represent the permissions that are available for the
- directory's owner, group members, and other users (in that order),
- and each digit is the octal representation of the read, write, and
- execute bits. Note that this only impacts permissions on the
- database directory and not on the files written into that
- directory. On UNIX systems, the user's umask controls
- permissions given to the database files.
- </adm:description>
- <adm:requires-admin-action>
- <adm:server-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>700</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^7[0-7][0-7]$</adm:regex>
- <adm:usage>MODE</adm:usage>
- <adm:synopsis>
- Any octal value between 700 and 777 (the owner must always
- have read, write, and execute permissions on the directory).
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-directory-permissions</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="preload-time-limit" advanced="true">
- <adm:synopsis>
- Specifies the length of time that the backend is allowed to
- spend "pre-loading" data when it is initialized.
- </adm:synopsis>
- <adm:description>
- The pre-load process is used to pre-populate the database
- cache, so that it can be more quickly available when the server is
- processing requests. A duration of zero means there is no
- pre-load.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0s</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="0" upper-limit="2147483647" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-preload-time-limit</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-cache-percent">
- <adm:synopsis>
- Specifies the percentage of JVM memory to allocate to the database cache.
- </adm:synopsis>
- <adm:description>
- Specifies the percentage of memory available to the JVM that
- should be used for caching database contents. Note that this is
- only used if the value of the db-cache-size property is set to
- "0 MB". Otherwise, the value of that property is used instead
- to control the cache size configuration.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>50</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="90" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-cache-percent</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-cache-size">
- <adm:synopsis>
- The amount of JVM memory to allocate to the database cache.
- </adm:synopsis>
- <adm:description>
- Specifies the amount of memory that should be used for caching
- database contents. A value of "0 MB" indicates that the
- db-cache-percent property should be used instead to specify the
- cache size.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0 MB</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size lower-limit="0 MB" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-cache-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-cleaner-min-utilization" advanced="true">
- <adm:synopsis>
- Specifies the minimum percentage of "live" data that the database
- cleaner attempts to keep in database log files.
- </adm:synopsis>
- <adm:description>
- If the amount of live data in any database log file drops below
- this percentage, then the cleaner moves the remaining live
- data in that file to the end of the database and deletes the
- original file in order to keep the database relatively compact.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>50</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" upper-limit="90" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-cleaner-min-utilization</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-run-cleaner" advanced="true">
- <adm:synopsis>
- Indicates whether the database cleaner threads should be
- enabled.
- </adm:synopsis>
- <adm:description>
- The cleaner threads are used to periodically compact the
- database by identifying database files with a low (that is, less than
- the amount specified by the db-cleaner-min-utilization property)
- percentage of live data, moving the remaining live data to the end
- of the log and deleting that file.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-run-cleaner</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-evictor-lru-only" advanced="true">
- <adm:synopsis>
- Indicates whether the database should evict existing data from the
- cache based on an LRU policy (where the least recently used
- information will be evicted first).
- </adm:synopsis>
- <adm:description>
- If set to "false", then the eviction keeps internal nodes of the underlying
- Btree in the cache over leaf nodes, even if the leaf nodes have
- been accessed more recently. This may be a better configuration
- for databases in which only a very small portion of the data is
- cached.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-evictor-lru-only</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-evictor-nodes-per-scan" advanced="true">
- <adm:synopsis>
- Specifies the number of Btree nodes that should be evicted from
- the cache in a single pass if it is determined that it is
- necessary to free existing data in order to make room for new
- information.
- </adm:synopsis>
- <adm:description>
- Changes to this property do not take effect until the backend is
- restarted. It is recommended that you also change this property
- when you set db-evictor-lru-only to false. This setting controls
- the number of Btree nodes that are considered, or sampled, each
- time a node is evicted. A setting of 10 often produces good
- results, but this may vary from application to application. The
- larger the nodes per scan, the more accurate the algorithm.
- However, don't set it too high. When considering larger numbers of
- nodes for each eviction, the evictor may delay the completion of a
- given database operation, which impacts the response time of the
- application thread. In JE 4.1 and later, setting this value too high
- in an application that is largely CPU bound can reduce the
- effectiveness of cache eviction. It's best to start with the default
- value, and increase it gradually to see if it is beneficial for your
- application.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>10</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="1000" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-evictor-nodes-per-scan</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-evictor-core-threads" advanced="true">
- <adm:synopsis>
- Specifies the core number of threads in the eviction thread pool.
- </adm:synopsis>
- <adm:description>
- Specifies the core number of threads in the eviction thread pool.
- These threads help keep memory usage within cache bounds,
- offloading work from application threads. db-evictor-core-threads,
- db-evictor-max-threads and db-evictor-keep-alive are used to configure
- the core, max and keepalive attributes for the eviction thread pool.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>1</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" upper-limit="2147483647" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-evictor-core-threads</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-evictor-max-threads" advanced="true">
- <adm:synopsis>
- Specifies the maximum number of threads in the eviction thread pool.
- </adm:synopsis>
- <adm:description>
- Specifies the maximum number of threads in the eviction thread pool.
- These threads help keep memory usage within cache bounds,
- offloading work from application threads. db-evictor-core-threads,
- db-evictor-max-threads and db-evictor-keep-alive are used to configure
- the core, max and keepalive attributes for the eviction thread pool.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>10</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="2147483647" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-evictor-max-threads</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-evictor-keep-alive" advanced="true">
- <adm:synopsis>
- The duration that excess threads in the eviction thread pool will
- stay idle. After this period, idle threads will terminate.
- </adm:synopsis>
- <adm:description>
- The duration that excess threads in the eviction thread pool will
- stay idle. After this period, idle threads will terminate.
- db-evictor-core-threads, db-evictor-max-threads and
- db-evictor-keep-alive are used to configure the core, max and
- keepalive attributes for the eviction thread pool.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>600s</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="s" lower-limit="1" upper-limit="86400" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-evictor-keep-alive</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-log-file-max" advanced="true">
- <adm:synopsis>
- Specifies the maximum size for a database log file.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>100mb</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size lower-limit="1mb" upper-limit="4gib" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-log-file-max</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-log-filecache-size" advanced="true">
- <adm:synopsis>
- Specifies the size of the file handle cache.
- </adm:synopsis>
- <adm:description>
- The file handle cache is used to keep as much opened log files
- as possible. When the cache is smaller than the number of logs,
- the database needs to close some handles and open log files it needs,
- resulting in less optimal performances. Ideally, the size of the cache
- should be higher than the number of files contained in the database.
- Make sure the OS number of open files per process is also tuned
- appropriately.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>100</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="3" upper-limit="2147483647" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-log-filecache-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-logging-file-handler-on" advanced="true">
- <adm:synopsis>
- Indicates whether the database should maintain a je.info file in
- the same directory as the database log directory.
- </adm:synopsis>
- <adm:description>
- This file contains information about the internal processing
- performed by the underlying database.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-logging-file-handler-on</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-logging-level" advanced="true">
- <adm:TODO>Use an enumeration</adm:TODO>
- <adm:synopsis>
- Specifies the log level that should be used by the database
- when it is writing information into the je.info file.
- </adm:synopsis>
- <adm:description>
- The database trace logging level is (in increasing order of
- verbosity) chosen from: OFF, SEVERE, WARNING, INFO, CONFIG, FINE,
- FINER, FINEST, ALL.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>CONFIG</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-logging-level</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-checkpointer-bytes-interval" advanced="true">
- <adm:synopsis>
- Specifies the maximum number of bytes that may be written to the
- database before it is forced to perform a checkpoint.
- </adm:synopsis>
- <adm:description>
- This can be used to bound the recovery time that may be required
- if the database environment is opened without having been properly
- closed. If this property is set to a non-zero value, the
- checkpointer wakeup interval is not used. To use time-based
- checkpointing, set this property to zero.
- </adm:description>
- <adm:requires-admin-action>
- <adm:server-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>500mb</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size lower-limit="0b" upper-limit="9223372036854775807b" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-checkpointer-bytes-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-checkpointer-wakeup-interval"
- advanced="true">
- <adm:synopsis>
- Specifies the maximum length of time that may pass between
- checkpoints.
- </adm:synopsis>
- <adm:description>
- Note that this is only used if the value of the checkpointer
- bytes interval is zero.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>30s</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="s" lower-limit="1" upper-limit="4294" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-checkpointer-wakeup-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-num-lock-tables" advanced="true">
- <adm:synopsis>
- Specifies the number of lock tables that are used by the underlying database.
- </adm:synopsis>
- <adm:description>
- This can be particularly important to help improve scalability by
- avoiding contention on systems with large numbers of CPUs. The
- value of this configuration property should be set to a prime
- number that is less than or equal to the number of worker threads
- configured for use in the server.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Let the server decide.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="32767" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-num-lock-tables</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-num-cleaner-threads" advanced="true">
- <adm:synopsis>
- Specifies the number of threads that the backend should maintain
- to keep the database log files at or near the desired utilization.
- </adm:synopsis>
- <adm:description>
- In environments with high write throughput, multiple cleaner
- threads may be required to maintain the desired utilization.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Let the server decide.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-num-cleaner-threads</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-txn-no-sync" advanced="true">
- <adm:synopsis>
- Indicates whether database writes should be primarily written to
- an internal buffer but not immediately written to disk.
- </adm:synopsis>
- <adm:description>
- Setting the value of this configuration attribute to "true" may
- improve write performance but could cause the most
- recent changes to be lost if the <adm:product-name /> directory server or the
- underlying JVM exits abnormally, or if an OS or hardware failure
- occurs (a behavior similar to running with transaction durability
- disabled in the Sun Java System Directory Server).
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-txn-no-sync</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="db-txn-write-no-sync" advanced="true">
- <adm:synopsis>
- Indicates whether the database should synchronously flush data as
- it is written to disk.
- </adm:synopsis>
- <adm:description>
- If this value is set to "false", then all data written to disk
- is synchronously flushed to persistent storage and thereby
- providing full durability. If it is set to "true", then data may
- be cached for a period of time by the underlying operating system
- before actually being written to disk. This may improve
- performance, but could cause the most recent
- changes to be lost in the event of an underlying OS or hardware
- failure (but not in the case that the <adm:product-name /> directory server or
- the JVM exits abnormally).
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-db-txn-write-no-sync</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="disk-low-threshold" advanced="true">
- <adm:synopsis>
- Low disk threshold to limit database updates
- </adm:synopsis>
- <adm:description>
- Specifies the "low" free space on the disk. When the available
- free space on the disk used by this database instance falls below the
- value specified, protocol updates on this database are permitted only
- by a user with the BYPASS_LOCKDOWN privilege.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>200 megabytes</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-disk-low-threshold</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="disk-full-threshold" advanced="true">
- <adm:synopsis>
- Full disk threshold to limit database updates
- </adm:synopsis>
- <adm:description>
- When the available free space on the disk used by this database
- instance falls below the value specified, no updates
- are permitted and the server returns an UNWILLING_TO_PERFORM error.
- Updates are allowed again as soon as free space rises above the
- threshold.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>100 megabytes</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:size lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-disk-full-threshold</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="je-property" advanced="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies the database and environment properties for the Berkeley
- DB Java Edition database serving the data for this backend.
- </adm:synopsis>
- <adm:description>
- Any Berkeley DB Java Edition property can be specified using the
- following form: property-name=property-value. Refer to <adm:product-name />
- documentation for further information on related properties, their
- implications, and range values. The definitive identification of
- all the property parameters is available in the example.properties
- file of Berkeley DB Java Edition distribution.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-je-property</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="index-filter-analyzer-enabled" advanced="true">
- <adm:synopsis>
- Indicates whether to gather statistical information about the search
- filters processed by the directory server while evaluating the usage of
- indexes.
- </adm:synopsis>
- <adm:description>
- Analyzing indexes requires gathering search filter usage patterns from
- user requests, especially for values as specified in the filters and
- subsequently looking the status of those values into the index files.
- When a search requests is processed, internal or user generated, a
- first phase uses indexes to find potential entries to be returned.
- Depending on the search filter, if the index of one of the specified
- attributes matches too many entries (exceeds the index entry limit),
- the search becomes non-indexed. In any case, all entries thus
- gathered (or the entire DIT) are matched against the filter for
- actually returning the search result.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-index-filter-analyzer-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="index-filter-analyzer-max-filters" advanced="true">
- <adm:synopsis>
- The maximum number of search filter statistics to keep.
- </adm:synopsis>
- <adm:description>
- When the maximum number of search filter is reached, the least used one
- will be deleted.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>25</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-index-filter-analyzer-max-filters</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="subordinate-indexes-enabled" advanced="true">
- <adm:synopsis>
- Indicates whether id2children and id2subtree indexes should be used for
- this backend. These indexes are used for constraining filtered searches
- to the search request's scope as well as for generating values for the
- hasSubordinates and numSubordinates virtual attributes.
- </adm:synopsis>
- <adm:description>
- Subordinate indexing is enabled by default and should only be disabled
- for specialized use cases. A typical use case is where the backend is
- to be subjected to heavy add/delete load beneath the same parent entry
- such as when used as a session database. Disabling the subordinate
- indexes means that the numSubordinates and hasSubordinates virtual
- attributes will not be supported.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-subordinate-indexes-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LocalDBIndexConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LocalDBIndexConfiguration.xml
deleted file mode 100644
index 3a6b8f2..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LocalDBIndexConfiguration.xml
+++ /dev/null
@@ -1,231 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2009 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="local-db-index" plural-name="local-db-indexes"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are used to store information that makes it possible to locate
- entries very quickly when processing search operations.
- </adm:synopsis>
- <adm:description>
- Indexing is performed on a per-attribute level and different types
- of indexing may be performed for different kinds of attributes, based
- on how they are expected to be accessed during search operations.
- </adm:description>
- <adm:tag name="database" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-local-db-index</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="attribute" mandatory="true" read-only="true">
- <adm:synopsis>
- Specifies the name of the attribute for which the index is to
- be maintained.
- </adm:synopsis>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-attribute</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="index-entry-limit">
- <adm:synopsis>
- Specifies the maximum number of entries that are allowed
- to match a given index key before that particular index key is no
- longer maintained.
- </adm:synopsis>
- <adm:description>
- This is analogous to the ALL IDs threshold in the Sun Java System
- Directory Server. If this is specified, its value overrides the JE
- backend-wide configuration. For no limit, use 0 for the value.
- </adm:description>
- <adm:requires-admin-action>
- <adm:other>
- <adm:synopsis>
- If any index keys have already reached this limit, indexes
- must be rebuilt before they will be allowed to use the
- new limit.
- </adm:synopsis>
- </adm:other>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:inherited>
- <adm:relative property-name="index-entry-limit" offset="1"
- managed-object-name="local-db-backend" />
- </adm:inherited>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" upper-limit="2147483647">
- <adm:unit-synopsis>Number of entries</adm:unit-synopsis>
- </adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-index-entry-limit</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="index-type" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies the type(s) of indexing that should be performed
- for the associated attribute.
- </adm:synopsis>
- <adm:description>
- For equality, presence, and substring index types, the associated
- attribute type must have a corresponding matching rule.
- </adm:description>
- <adm:requires-admin-action>
- <adm:other>
- <adm:synopsis>
- If any new index types are added for an attribute, and
- values for that attribute already exist in the
- database, the index must be rebuilt before it
- will be accurate.
- </adm:synopsis>
- </adm:other>
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="equality">
- <adm:synopsis>
- This index type is used to improve the efficiency
- of searches using equality search filters.
- </adm:synopsis>
- </adm:value>
- <adm:value name="ordering">
- <adm:synopsis>
- This index type is used to improve the efficiency
- of searches using "greater than or equal to" or "less then
- or equal to" search filters.
- </adm:synopsis>
- </adm:value>
- <adm:value name="presence">
- <adm:synopsis>
- This index type is used to improve the efficiency
- of searches using the presence search filters.
- </adm:synopsis>
- </adm:value>
- <adm:value name="substring">
- <adm:synopsis>
- This index type is used to improve the efficiency
- of searches using substring search filters.
- </adm:synopsis>
- </adm:value>
- <adm:value name="approximate">
- <adm:synopsis>
- This index type is used to improve the efficiency
- of searches using approximate matching search filters.
- </adm:synopsis>
- </adm:value>
- <adm:value name="extensible">
- <adm:synopsis>
- This index type is used to improve the efficiency
- of searches using extensible matching search filters.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-index-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="substring-length" advanced="true">
- <adm:synopsis>
- The length of substrings in a substring index.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:other>
- <adm:synopsis>
- The index must be rebuilt before it will reflect the
- new value.
- </adm:synopsis>
- </adm:other>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>6</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="3" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-substring-length</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="index-extensible-matching-rule" multi-valued="true">
- <adm:synopsis>
- The extensible matching rule in an extensible index.
- </adm:synopsis>
- <adm:description>
- An extensible matching rule must be specified using either LOCALE or OID of the matching rule.
- </adm:description>
- <adm:requires-admin-action>
- <adm:other>
- <adm:synopsis>
- The index must be rebuilt before it will reflect the
- new value.
- </adm:synopsis>
- </adm:other>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- No extensible matching rules will be indexed.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>([a-z][a-z](-[A-Z][A-Z]){0,2}(.(([a-z]{2,3})|\\d))?)|(^\\d.((\\d)+.)+\\d$)</adm:regex>
- <adm:usage>LOCALE | OID</adm:usage>
- <adm:synopsis>
- A Locale or an OID.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-index-extensible-matching-rule</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LocalDBVLVIndexConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LocalDBVLVIndexConfiguration.xml
deleted file mode 100644
index 606a091..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LocalDBVLVIndexConfiguration.xml
+++ /dev/null
@@ -1,231 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="local-db-vlv-index"
- plural-name="local-db-vlv-indexes"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are used to store information about a specific search request that
- makes it possible to efficiently process them using the VLV control.
- </adm:synopsis>
- <adm:description>
- A VLV index effectively notifies the server that a virtual list
- view, with specific query and sort parameters, will be performed.
- This index also allows the server to collect and maintain the
- information required to make using the virtual list view faster.
- </adm:description>
- <adm:tag name="database" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-local-db-vlv-index</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="base-dn" mandatory="true">
- <adm:synopsis>
- Specifies the base DN used in the search query that is being
- indexed.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:other>
- <adm:synopsis>
- The index must be rebuilt after modifying this
- property.
- </adm:synopsis>
- </adm:other>
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="scope" mandatory="true">
- <adm:synopsis>
- Specifies the LDAP scope of the query that is being indexed.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:other>
- <adm:synopsis>
- The index must be rebuilt after modifying this
- property.
- </adm:synopsis>
- </adm:other>
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="base-object">
- <adm:synopsis>Search the base object only.</adm:synopsis>
- </adm:value>
- <adm:value name="single-level">
- <adm:synopsis>
- Search the immediate children of the base object but do not
- include any of their descendants or the base object itself.
- </adm:synopsis>
- </adm:value>
- <adm:value name="subordinate-subtree">
- <adm:synopsis>
- Search the entire subtree below the base object but do not
- include the base object itself.
- </adm:synopsis>
- </adm:value>
- <adm:value name="whole-subtree">
- <adm:synopsis>
- Search the base object and the entire subtree below the base
- object.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-scope</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="filter" mandatory="true">
- <adm:synopsis>
- Specifies the LDAP filter used in the query that is being indexed.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:other>
- <adm:synopsis>
- The index must be rebuilt after modifying this
- property.
- </adm:synopsis>
- </adm:other>
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- A valid LDAP search filter.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-filter</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="sort-order" mandatory="true">
- <adm:synopsis>
- Specifies the names of the attributes that are used to sort the
- entries for the query being indexed.
- </adm:synopsis>
- <adm:description>
- Multiple attributes can be used to determine the sort order by
- listing the attribute names from highest to lowest precedence.
- Optionally, + or - can be prefixed to the attribute name to sort
- the attribute in ascending order or descending order respectively.
- </adm:description>
- <adm:requires-admin-action>
- <adm:other>
- <adm:synopsis>
- The index must be rebuilt after modifying this
- property.
- </adm:synopsis>
- </adm:other>
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- Valid attribute types defined in the schema, separated by a
- space and optionally prefixed by + or -.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-sort-order</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="name" mandatory="true" read-only="true">
- <adm:synopsis>
- Specifies a unique name for this VLV index.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- The VLV index name cannot be altered after the index is created.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-name</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-block-size" read-only="true"
- advanced="true">
- <adm:synopsis>
- Specifies the number of entry IDs to store in a single sorted
- set before it must be split.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- The blocks are resized lazily the next time the index is
- modified.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>4000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer>
- <adm:unit-synopsis>Number of entry IDs</adm:unit-synopsis>
- </adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-block-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LogPublisherConfiguration.xml
deleted file mode 100644
index a7df348..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LogPublisherConfiguration.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions copyright 2013 ForgeRock AS
- ! -->
-<adm:managed-object name="log-publisher" plural-name="log-publishers"
- package="org.forgerock.opendj.admin" abstract="true"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for distributing log messages from different loggers
- to a destination.
- </adm:synopsis>
- <adm:tag name="logging" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-log-publisher</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled for use.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- The fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.LogPublisher
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LogRetentionPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LogRetentionPolicyConfiguration.xml
deleted file mode 100644
index 4e6a5a5..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LogRetentionPolicyConfiguration.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="log-retention-policy"
- plural-name="log-retention-policies"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are used to specify when log files should be cleaned.
- </adm:synopsis>
- <adm:tag name="logging" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-log-retention-policy</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.loggers.RetentionPolicy
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LogRotationPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LogRotationPolicyConfiguration.xml
deleted file mode 100644
index 8e07ddc..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/LogRotationPolicyConfiguration.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="log-rotation-policy"
- plural-name="log-rotation-policies"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are used to specify when log files should be rotated.
- </adm:synopsis>
- <adm:tag name="logging" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-log-rotation-policy</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.loggers.RotationPolicy
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MD5PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MD5PasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index 36d4622..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MD5PasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="md5-password-storage-scheme"
- plural-name="md5-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords using an unsalted
- form of the MD5 message digest algorithm. Because the implementation
- does not use any kind of salting mechanism, a given password always
- has the same encoded form.
- </adm:synopsis>
- <adm:description>
- This scheme contains only an implementation for the user password
- syntax, with a storage scheme name of "MD5". Although the MD5 digest
- algorithm is relatively secure, recent cryptanalysis work has
- identified mechanisms for generating MD5 collisions. This does not
- impact the security of this algorithm as it is used in <adm:product-name />,
- but it is recommended that the MD5 password storage scheme only be used if
- client applications require it for compatibility purposes, and that a
- stronger digest like SSHA or SSHA256 be used for environments in which
- MD5 support is not required.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-md5-password-storage-scheme</ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.MD5PasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MatchingRuleConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MatchingRuleConfiguration.xml
deleted file mode 100644
index 25e9ac3..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MatchingRuleConfiguration.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="matching-rule" plural-name="matching-rules"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- define a set of rules for performing matching operations against
- assertion values.
- </adm:synopsis>
- <adm:description>
- Matching rules are frequently associated with an attribute syntax
- and are used to compare values according to that syntax. For example,
- the distinguishedNameEqualityMatch matching rule can be used to
- determine whether two DNs are equal and can ignore unnecessary spaces
- around commas and equal signs, differences in capitalization in
- attribute names, an so on.
- </adm:description>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-matching-rule</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled for use.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.MatchingRuleFactory
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MemberVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MemberVirtualAttributeConfiguration.xml
deleted file mode 100644
index 8a302ec..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MemberVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="member-virtual-attribute"
- plural-name="user-defined-virtual-attributes"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- generates a member or uniqueMember attribute whose values are
- the DNs of the members of a specified virtual static group.
- </adm:synopsis>
- <adm:description>
- This component is used to implement virtual static group
- functionality, in which it is possible to create an entry
- that looks like a static group but obtains all of its
- membership from a dynamic group (or some other type of
- group, including another static group).
- This implementation is most efficient when attempting to
- determine whether a given user is a member of a group
- (for example, with a filter like
- "(uniqueMember=uid=john.doe,ou=People,dc=example,dc=com)")
- when the search does not actually return the membership
- attribute. Although it works to generate the entire set of
- values for the member or uniqueMember attribute, this can be
- an expensive operation for a large group.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-member-virtual-attribute</ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.MemberVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="conflict-behavior">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>virtual-overrides-real</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="allow-retrieving-membership" mandatory="true">
- <adm:synopsis>
- Indicates whether to handle requests that request all values for
- the virtual attribute.
- </adm:synopsis>
- <adm:description>
- This operation can be very expensive in some cases and is not
- consistent with the primary function of virtual static groups, which
- is to make it possible to use static group idioms to determine
- whether a given user is a member.
- If this attribute is set to false, attempts to retrieve the entire
- set of values receive an empty set, and only attempts to determine
- whether the attribute has a specific value or set of values
- (which is the primary anticipated use for virtual static groups)
- are handled properly.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allow-retrieving-membership</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MemoryBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MemoryBackendConfiguration.xml
deleted file mode 100644
index 80be979..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MemoryBackendConfiguration.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="memory-backend" plural-name="memory-backends"
- package="org.forgerock.opendj.admin" extends="backend"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a directory server backend
- implementation that stores entries in memory.
- </adm:synopsis>
- <adm:description>
- There is no persistence of any kind, and the backend contents are
- cleared whenever the backend is brought online or offline and when
- the server is restarted.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-memory-backend</ldap:name>
- <ldap:superior>ds-cfg-backend</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.backends.MemoryBackend</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="writability-mode">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>enabled</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MemoryUsageMonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MemoryUsageMonitorProviderConfiguration.xml
deleted file mode 100644
index 68f3663..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MemoryUsageMonitorProviderConfiguration.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="memory-usage-monitor-provider"
- plural-name="memory-usage-monitor-providers"
- package="org.forgerock.opendj.admin" extends="monitor-provider"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- can be used to publish information about memory consumption and
- garbage collection activity in the JVM.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-memory-usage-monitor-provider</ldap:name>
- <ldap:superior>ds-cfg-monitor-provider</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.monitors.MemoryUsageMonitorProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MonitorBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MonitorBackendConfiguration.xml
deleted file mode 100644
index 1d8116f..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MonitorBackendConfiguration.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="monitor-backend"
- plural-name="monitor-backends" package="org.forgerock.opendj.admin"
- extends="backend" advanced="true"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- allows clients to access the information made
- available by directory server monitor providers.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-monitor-backend</ldap:name>
- <ldap:superior>ds-cfg-backend</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.backends.MonitorBackend</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="writability-mode">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>disabled</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MonitorProviderConfiguration.xml
deleted file mode 100644
index ededb0e..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/MonitorProviderConfiguration.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="monitor-provider"
- plural-name="monitor-providers" package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- can be used to provide information about the state of the server or
- one of its components.
- </adm:synopsis>
- <adm:description>
- This information is useful for monitoring or troubleshooting.
- </adm:description>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-monitor-provider</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled for use.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.MonitorProvider
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/NetworkGroupConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/NetworkGroupConfiguration.xml
deleted file mode 100644
index 0af18d0..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/NetworkGroupConfiguration.xml
+++ /dev/null
@@ -1,300 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2009 Sun Microsystems, Inc.
- ! Portions copyright 2013 ForgeRock AS.
- ! -->
-<adm:managed-object name="network-group"
- plural-name="network-groups"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name/>
- is used to classify incoming client connections and route requests to
- workflows.
- </adm:synopsis>
- <adm:tag name="core-server"/>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-network-group</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:relation name="network-group-qos-policy"
- managed-object-name="qos-policy"
- hidden="true">
- <adm:synopsis>
- Specifies the set of quality of service (QoS) policies enforced by
- the
- <adm:user-friendly-name/>
- .
- </adm:synopsis>
- <adm:description>
- All client connections belonging to the
- <adm:user-friendly-name/>
- will comply with its policies.
- </adm:description>
- <adm:one-to-many unique="true"
- plural-name="network-group-qos-policies"/>
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=QoS Policies</ldap:rdn-sequence>
- </adm:profile>
- </adm:relation>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name/>
- is enabled for use in the server.
- </adm:synopsis>
- <adm:description>
- If a
- <adm:user-friendly-name/>
- is not enabled then its workflows will not be accessible when
- processing operations.
- </adm:description>
- <adm:syntax>
- <adm:boolean/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="priority" mandatory="true">
- <adm:synopsis>
- Specifies the priority for this <adm:user-friendly-name/>.
- </adm:synopsis>
- <adm:description>
- A client connection is first compared against the
- <adm:user-friendly-name/>
- with the lowest priority. If the client connection does not match
- its connection criteria, then the client connection is compared against
- the
- <adm:user-friendly-name/>
- with next lowest priority, and so on. If no
- <adm:user-friendly-name/>
- is selected then the client connection is rejected.
- </adm:description>
- <adm:syntax>
- <adm:integer lower-limit="0"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-priority</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="workflow" multi-valued="true">
- <adm:synopsis>
- Specifies a set of workflows which should be accessible from this
- <adm:user-friendly-name/>
- .
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>No workflows will be accessible.</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="workflow"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced workflows must be enabled.
- </adm:synopsis>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true"/>
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-workflow</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allowed-auth-method" multi-valued="true">
- <adm:synopsis>
- Specifies a set of allowed authorization methods that clients
- must use in order to establish connections to this
- <adm:user-friendly-name/>.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately and do not
- interfere with connections that may have already been
- established.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- All authorization methods are allowed.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="anonymous">
- <adm:synopsis>
- Unauthorized clients.
- </adm:synopsis>
- </adm:value>
- <adm:value name="simple">
- <adm:synopsis>
- Clients who bind using simple authentication (name and password).
- </adm:synopsis>
- </adm:value>
- <adm:value name="sasl">
- <adm:synopsis>
- Clients who bind using SASL/external certificate based
- authentication.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allowed-auth-method</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allowed-protocol" multi-valued="true">
- <adm:synopsis>
- Specifies a set of allowed supported protocols that clients
- must use in order to establish connections to this
- <adm:user-friendly-name/>.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately and do not
- interfere with connections that may have already been
- established.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- All supported protocols are allowed.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="ldap">
- <adm:synopsis>
- Clients using LDAP are allowed.
- </adm:synopsis>
- </adm:value>
- <adm:value name="ldaps">
- <adm:synopsis>
- Clients using LDAPS are allowed.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allowed-protocol</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allowed-bind-dn" multi-valued="true">
- <adm:synopsis>
- Specifies a set of bind DN patterns that determine the
- clients that are allowed to establish connections to this
- <adm:user-friendly-name/>.
- </adm:synopsis>
- <adm:description>
- Valid bind DN filters are strings composed of zero or more
- wildcards. A double wildcard ** replaces one or more RDN
- components (as in uid=dmiller,**,dc=example,dc=com). A simple
- wildcard * replaces either a whole RDN, or a whole type, or a
- value substring (as in uid=bj*,ou=people,dc=example,dc=com).
- </adm:description>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately and do not
- interfere with connections that may have already been
- established.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- All bind DNs are allowed.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allowed-bind-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property-reference name="allowed-client" />
- <adm:property-reference name="denied-client" />
- <adm:property name="is-security-mandatory">
- <adm:synopsis>
- Specifies whether or not a secured client connection
- is required in order for clients to establish connections
- to this <adm:user-friendly-name/>.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately and do not
- interfere with connections that may have already been
- established.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-is-security-mandatory</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/NetworkGroupPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/NetworkGroupPluginConfiguration.xml
deleted file mode 100644
index 9c8bba2..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/NetworkGroupPluginConfiguration.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2009 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="network-group-plugin"
- plural-name="network-group-plugins" package="org.forgerock.opendj.admin"
- extends="plugin" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- hidden="true">
-
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- allows to group connections into different network groups and
- enforce specific resource limit policies for each network group.
- </adm:synopsis>
-
- <adm:description>
- The
- <adm:user-friendly-name />
- creates network groups based on client connection criteria. Each network
- group defines resource limit policies applied to all its connections.
- </adm:description>
-
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-network-group-plugin</ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
-
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.core.networkgroups.NetworkGroupPlugin
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-
- <adm:property-override name="plugin-type" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>postconnect</adm:value>
- <adm:value>preparseadd</adm:value>
- <adm:value>preparsebind</adm:value>
- <adm:value>preparsecompare</adm:value>
- <adm:value>preparsedelete</adm:value>
- <adm:value>preparseextended</adm:value>
- <adm:value>preparsemodify</adm:value>
- <adm:value>preparsemodifydn</adm:value>
- <adm:value>preparsesearch</adm:value>
- <adm:value>preparseunbind</adm:value>
- <adm:value>postresponsebind</adm:value>
- <adm:value>postresponseextended</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/NullBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/NullBackendConfiguration.xml
deleted file mode 100644
index 7bd125e..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/NullBackendConfiguration.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2009 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="null-backend" plural-name="null-backends"
- package="org.forgerock.opendj.admin" advanced="true" extends="backend"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name/>
- provides a directory server backend that implements a /dev/null like
- behavior for development and testing.
- </adm:synopsis>
- <adm:description>
- The
- <adm:user-friendly-name/>
- behaves as follows: all search operations return success but no
- data; all write operations do nothing; bind operations fail with
- invalid credentials; compare operations are only possible on
- objectClass and return true for top, nullBackendObject, and
- extensibleObject. In addition controls are supported although this
- implementation does not provide any specific emulation for controls.
- Generally known request controls are accepted and default response
- controls returned where applicable. Searches within a
- <adm:user-friendly-name/>
- are always considered indexed.
- <adm:user-friendly-plural-name/>
- are for development and testing only.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-null-backend</ldap:name>
- <ldap:superior>ds-cfg-backend</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.backends.NullBackend</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="writability-mode">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>enabled</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/NumSubordinatesVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/NumSubordinatesVirtualAttributeConfiguration.xml
deleted file mode 100644
index b19ffc8..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/NumSubordinatesVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="num-subordinates-virtual-attribute"
- plural-name="num-subordinates-virtual-attributes"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- generates a virtual attribute that specifies the
- number of immediate child entries that exist below the entry.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-num-subordinates-virtual-attribute</ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.NumSubordinatesVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="conflict-behavior" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>virtual-overrides-real</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="attribute-type">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>numSubordinates</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PBKDF2PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PBKDF2PasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index 79c8a41..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PBKDF2PasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2013 ForgeRock AS.
- ! -->
-<adm:managed-object name="pbkdf2-password-storage-scheme"
- plural-name="pbkdf2-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords using the
- PBKDF2 message digest algorithm.
- </adm:synopsis>
- <adm:description>
- This scheme contains an implementation for the user password syntax,
- with a storage scheme name of "PBKDF2".
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-pbkdf2-password-storage-scheme</ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.PBKDF2PasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="pbkdf2-iterations" advanced="false">
- <adm:synopsis>
- The number of algorithm iterations to make. NIST recommends
- at least 1000.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>10000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-pbkdf2-iterations</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PKCS11KeyManagerProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PKCS11KeyManagerProviderConfiguration.xml
deleted file mode 100644
index 5f9e417..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PKCS11KeyManagerProviderConfiguration.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2013 ForgeRock AS
- ! -->
-<adm:managed-object name="pkcs11-key-manager-provider"
- plural-name="pkcs11-key-manager-providers"
- package="org.forgerock.opendj.admin" extends="key-manager-provider"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- enables the server to access the private
- key information through the PKCS11 interface.
- </adm:synopsis>
- <adm:description>
- This standard interface is used by cryptographic accelerators and
- hardware security modules.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-pkcs11-key-manager-provider</ldap:name>
- <ldap:superior>ds-cfg-key-manager-provider</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.PKCS11KeyManagerProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-reference name="key-store-pin" />
- <adm:property-reference name="key-store-pin-property" />
- <adm:property-reference name="key-store-pin-environment-variable" />
- <adm:property-reference name="key-store-pin-file" />
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/Package.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/Package.xml
deleted file mode 100644
index ff846bc..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/Package.xml
+++ /dev/null
@@ -1,577 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2009 Sun Microsystems, Inc.
- ! Portions Copyright 2011-2013 ForgeRock AS
- ! -->
-<adm:package name="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- Core <adm:product-name /> directory server administrative components.
- </adm:synopsis>
- <adm:property name="listen-port" mandatory="true">
- <adm:synopsis>
- Specifies the port number on which the
- <adm:user-friendly-name />
- will listen for connections from clients.
- </adm:synopsis>
- <adm:description>
- Only a single port number may be provided.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="65535" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-listen-port</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="use-ssl">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- should use SSL.
- </adm:synopsis>
- <adm:description>
- If enabled, the
- <adm:user-friendly-name />
- will use SSL to encrypt communication with the clients.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-use-ssl</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="ssl-cert-nickname">
- <adm:TODO>Need a better default description.</adm:TODO>
- <adm:synopsis>
- Specifies the nickname (also called the alias) of the certificate
- that the
- <adm:user-friendly-name />
- should use when performing SSL communication.
- </adm:synopsis>
- <adm:description>
- This is only applicable when the
- <adm:user-friendly-name />
- is configured to use SSL.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>Let the server decide.</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string></adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-ssl-cert-nickname</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="key-store-pin">
- <adm:synopsis>
- Specifies the clear-text PIN needed to access the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property will take effect the next time that
- the
- <adm:user-friendly-name />
- is accessed.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-key-store-pin</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="key-store-pin-property">
- <adm:TODO>Better syntax for property name?</adm:TODO>
- <adm:synopsis>
- Specifies the name of the Java property that contains the
- clear-text PIN needed to access the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property will take effect the next time that
- the
- <adm:user-friendly-name />
- is accessed.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- The name of a defined Java property.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-key-store-pin-property</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="key-store-pin-environment-variable">
- <adm:synopsis>
- Specifies the name of the environment variable that contains the
- clear-text PIN needed to access the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property will take effect the next time that
- the
- <adm:user-friendly-name />
- is accessed.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- The name of a defined environment variable that contains the
- clear-text PIN required to access the contents of the key store.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-key-store-pin-environment-variable</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="key-store-pin-file">
- <adm:TODO>Should use a file-based property definition?</adm:TODO>
- <adm:synopsis>
- Specifies the path to the text file whose only contents should be
- a single line containing the clear-text PIN needed to access the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property will take effect the next time that
- the
- <adm:user-friendly-name />
- is accessed.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>FILE</adm:usage>
- <adm:synopsis>
- A path to an existing file that is readable by the server.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-key-store-pin-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="trust-store-pin">
- <adm:synopsis>
- Specifies the clear-text PIN needed to access the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property will take effect the next time that
- the
- <adm:user-friendly-name />
- is accessed.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-trust-store-pin</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="trust-store-pin-property">
- <adm:TODO>Better syntax for property name?</adm:TODO>
- <adm:synopsis>
- Specifies the name of the Java property that contains the
- clear-text PIN needed to access the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property will take effect the next time that
- the
- <adm:user-friendly-name />
- is accessed.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-trust-store-pin-property</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="trust-store-pin-environment-variable">
- <adm:synopsis>
- Specifies the name of the environment variable that contains the
- clear-text PIN needed to access the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property will take effect the next time that
- the
- <adm:user-friendly-name />
- is accessed.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-trust-store-pin-environment-variable
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="trust-store-pin-file">
- <adm:TODO>Should use a file-based property definition?</adm:TODO>
- <adm:synopsis>
- Specifies the path to the text file whose only contents should be
- a single line containing the clear-text PIN needed to access the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property will take effect the next time that
- the
- <adm:user-friendly-name />
- is accessed.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-trust-store-pin-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="include-filter" multi-valued="true">
- <adm:synopsis>
- The set of filters that define the entries that should be included
- in the cache.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-include-filter</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="exclude-filter" multi-valued="true">
- <adm:synopsis>
- The set of filters that define the entries that should be excluded
- from the cache.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-exclude-filter</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allowed-client" multi-valued="true">
- <adm:synopsis>
- Specifies a set of host names or address masks that determine the
- clients that are allowed to establish connections to this
- <adm:user-friendly-name/>.
- </adm:synopsis>
- <adm:description>
- Valid values include a host name, a fully qualified domain name, a
- domain name, an IP address, or a subnetwork with subnetwork mask.
- </adm:description>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately and do not
- interfere with connections that may have already been
- established.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- All clients with addresses that do not match an address on the
- deny list are allowed. If there is no deny list, then all
- clients are allowed.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:ip-address-mask />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allowed-client</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="denied-client" multi-valued="true">
- <adm:synopsis>
- Specifies a set of host names or address masks that determine
- the clients that are not allowed to establish connections to this
- <adm:user-friendly-name/>.
- </adm:synopsis>
- <adm:description>
- Valid values include a host name, a fully qualified domain name, a
- domain name, an IP address, or a subnetwork with subnetwork mask.
- If both allowed and denied client masks are defined and a client
- connection matches one or more masks in both lists, then the
- connection is denied. If only a denied list is specified,
- then any client not matching a mask in that list is allowed.
- </adm:description>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect immediately and do not
- interfere with connections that may have already been
- established.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- If an allow list is specified, then only clients with
- addresses on the allow list are allowed. Otherwise, all
- clients are allowed.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:ip-address-mask />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-denied-client</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="use-tcp-keep-alive" advanced="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- should use TCP keep-alive.
- </adm:synopsis>
- <adm:description>
- If enabled, the SO_KEEPALIVE socket option is used to indicate that TCP
- keepalive messages should periodically be sent to the client to
- verify that the associated connection is still valid. This may
- also help prevent cases in which intermediate network hardware
- could silently drop an otherwise idle client connection, provided
- that the keepalive interval configured in the underlying operating
- system is smaller than the timeout enforced by the network
- hardware.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-use-tcp-keep-alive</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="use-tcp-no-delay" advanced="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- should use TCP no-delay.
- </adm:synopsis>
- <adm:description>
- If enabled, the TCP_NODELAY socket option is used to ensure
- that response messages to the client are sent immediately rather
- than potentially waiting to determine whether additional response
- messages can be sent in the same packet. In most cases, using the
- TCP_NODELAY socket option provides better performance and
- lower response times, but disabling it may help for some cases in
- which the server sends a large number of entries to a client
- in response to a search request.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-use-tcp-no-delay</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allow-tcp-reuse-address" advanced="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- should reuse socket descriptors.
- </adm:synopsis>
- <adm:description>
- If enabled, the SO_REUSEADDR socket option is used on the
- server listen socket to potentially allow the reuse of socket
- descriptors for clients in a TIME_WAIT state. This may help the
- server avoid temporarily running out of socket descriptors in
- cases in which a very large number of short-lived connections have
- been established from the same client system.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allow-tcp-reuse-address</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:package>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ParallelWorkQueueConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ParallelWorkQueueConfiguration.xml
deleted file mode 100644
index e4f6353..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ParallelWorkQueueConfiguration.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2009 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="parallel-work-queue"
- plural-name="parallel-work-queues" extends="work-queue"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is a type of work queue that uses a number of worker threads that
- watch a queue and pick up an operation to process whenever one
- becomes available.
- </adm:synopsis>
- <adm:description>
- The parallel work queue is a FIFO queue serviced by a fixed
- number of worker threads. This fixed number of threads can be
- changed on the fly, with the change taking effect as soon as
- it is made. This work queue implementation is unbound ie it
- does not block after reaching certain queue size and as such
- should only be used on a very well tuned server configuration
- to avoid potential out of memory errors.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-parallel-work-queue</ldap:name>
- <ldap:superior>ds-cfg-work-queue</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.ParallelWorkQueue
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="num-worker-threads">
- <adm:synopsis>
- Specifies the number of worker threads to be used for processing
- operations placed in the queue.
- </adm:synopsis>
- <adm:description>
- If the value is increased,
- the additional worker threads are created immediately. If the
- value is reduced, the appropriate number of threads are destroyed
- as operations complete processing.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Let the server decide.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="2147483647" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-num-worker-threads</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordExpirationTimeVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordExpirationTimeVirtualAttributeConfiguration.xml
deleted file mode 100644
index 9917d42..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordExpirationTimeVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2012 profiq s.r.o.
- ! -->
-<adm:managed-object name="password-expiration-time-virtual-attribute"
- plural-name="password-expiration-time-virtual-attribute"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- generates a virtual attribute which shows the password expiration date.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-password-expiration-time-virtual-attribute
- </ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.PasswordExpirationTimeVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="conflict-behavior" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>virtual-overrides-real</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="attribute-type">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>ds-pwp-password-expiration-time</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
\ No newline at end of file
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordGeneratorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordGeneratorConfiguration.xml
deleted file mode 100644
index 7dcb2b4..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordGeneratorConfiguration.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="password-generator"
- plural-name="password-generators"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are used by the password modify extended operation to construct a
- new password for the user.
- </adm:synopsis>
- <adm:description>
- The server allows any number of password validators to be defined.
- This can impose any kinds of restrictions on the characteristics
- of valid passwords. Therefore, it is not feasible for the server
- to attempt to generate a password on its own that will meet all
- the requirements of all the validators. The password generator
- makes it possible to provide custom logic for creating a new password.
- </adm:description>
- <adm:tag name="user-management" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-password-generator</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled for use.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.PasswordGenerator
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordModifyExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordModifyExtendedOperationHandlerConfiguration.xml
deleted file mode 100644
index 73fde4c..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordModifyExtendedOperationHandlerConfiguration.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="password-modify-extended-operation-handler"
- plural-name="password-modify-extended-operation-handlers"
- package="org.forgerock.opendj.admin"
- extends="extended-operation-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- allows end users to change their own passwords, or
- administrators to reset user passwords.
- </adm:synopsis>
- <adm:description>
- The password modify extended operation is defined in RFC 3062. It
- includes the ability for users to provide their current password for
- further confirmation of their identity when changing the password,
- and it also includes the ability to generate a new password if the
- user does not provide one.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-password-modify-extended-operation-handler
- </ldap:name>
- <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.PasswordModifyExtendedOperation
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="identity-mapper" mandatory="true">
- <adm:synopsis>
- Specifies the name of the identity mapper that should be used in
- conjunction with the password modify extended operation.
- </adm:synopsis>
- <adm:description>
- This property is used to identify a user based on an
- authorization ID in the 'u:' form. Changes to this property take effect immediately.
- </adm:description>
- <adm:syntax>
- <adm:aggregation relation-name="identity-mapper"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced identity mapper must be enabled when the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-identity-mapper</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordPolicyConfiguration.xml
deleted file mode 100644
index 76ee4d4..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordPolicyConfiguration.xml
+++ /dev/null
@@ -1,941 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2009 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="password-policy"
- plural-name="password-policies"
- extends="authentication-policy"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- define a number of password management rules, as well as
- requirements for authentication processing.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-password-policy</ldap:name>
- <ldap:superior>ds-cfg-authentication-policy</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.core.PasswordPolicyFactory
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="password-attribute" mandatory="true">
- <adm:synopsis>
- Specifies the attribute type used to hold user passwords.
- </adm:synopsis>
- <adm:description>
- This attribute type must be defined in the server schema, and it
- must have either the user password or auth password syntax.
- </adm:description>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-password-attribute</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="default-password-storage-scheme" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies the names of the password storage schemes that are used
- to encode clear-text passwords for this password policy.
- </adm:synopsis>
- <adm:syntax>
- <adm:aggregation relation-name="password-storage-scheme"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced password storage schemes must be enabled.
- </adm:synopsis>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-default-password-storage-scheme</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="deprecated-password-storage-scheme"
- multi-valued="true">
- <adm:synopsis>
- Specifies the names of the password storage schemes that are
- considered deprecated for this password policy.
- </adm:synopsis>
- <adm:description>
- If a user with this password policy authenticates to the server
- and his/her password is encoded with a deprecated scheme, those
- values are removed and replaced with values encoded using the
- default password storage scheme(s).
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="password-storage-scheme"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced password storage schemes must be enabled.
- </adm:synopsis>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-deprecated-password-storage-scheme</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="password-validator" multi-valued="true">
- <adm:synopsis>
- Specifies the names of the password validators that are used
- with the associated password storage scheme.
- </adm:synopsis>
- <adm:description>
- The password validators are invoked when a user attempts to provide
- a new password, to determine whether the new password is acceptable.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="password-validator"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced password validators must be enabled.
- </adm:synopsis>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-password-validator</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="account-status-notification-handler"
- multi-valued="true">
- <adm:synopsis>
- Specifies the names of the account status notification handlers
- that are used with the associated password storage scheme.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation
- relation-name="account-status-notification-handler"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced account status notification handlers must be
- enabled.
- </adm:synopsis>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-account-status-notification-handler
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allow-user-password-changes">
- <adm:synopsis>
- Indicates whether users can change their own
- passwords.
- </adm:synopsis>
- <adm:description>
- This check is made in addition to access control evaluation.
- Both must allow the password change for it to occur.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allow-user-password-changes</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="password-change-requires-current-password">
- <adm:synopsis>
- Indicates whether user password changes must use
- the password modify extended operation and must include the user's
- current password before the change is allowed.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-password-change-requires-current-password
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="force-change-on-add">
- <adm:synopsis>
- Indicates whether users are forced to change their passwords
- upon first authenticating to the directory server after their
- account has been created.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-force-change-on-add</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="force-change-on-reset">
- <adm:synopsis>
- Indicates whether users are forced to change their passwords
- if they are reset by an administrator.
- </adm:synopsis>
- <adm:description>
- For this purpose, anyone with permission to change a given user's
- password other than that user is considered an administrator.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-force-change-on-reset</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="skip-validation-for-administrators"
- advanced="true">
- <adm:synopsis>
- Indicates whether passwords set by administrators are allowed
- to bypass the password validation process that is required
- for user password changes.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-skip-validation-for-administrators</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="password-generator">
- <adm:synopsis>
- Specifies the name of the password generator that is used
- with the associated password policy.
- </adm:synopsis>
- <adm:description>
- This is used in conjunction with the password modify extended
- operation to generate a new password for a user when none was
- provided in the request.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="password-generator"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced password generator must be enabled.
- </adm:synopsis>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-password-generator</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="require-secure-authentication">
- <adm:synopsis>
- Indicates whether users with the associated password policy are
- required to authenticate in a secure manner.
- </adm:synopsis>
- <adm:description>
- This might mean either using a secure communication channel
- between the client and the server, or using a SASL mechanism that
- does not expose the credentials.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-require-secure-authentication</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="require-secure-password-changes">
- <adm:synopsis>
- Indicates whether users with the associated password policy are
- required to change their password in a secure manner that does
- not expose the credentials.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-require-secure-password-changes</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allow-multiple-password-values" advanced="true">
- <adm:synopsis>
- Indicates whether user entries can have multiple
- distinct values for the password attribute.
- </adm:synopsis>
- <adm:description>
- This is potentially dangerous because many mechanisms used to
- change the password do not work well with such a configuration. If
- multiple password values are allowed, then any of them can be used
- to authenticate, and they are all subject to the same policy
- constraints.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allow-multiple-password-values</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allow-pre-encoded-passwords" advanced="true">
- <adm:synopsis>
- Indicates whether users can change their passwords
- by providing a pre-encoded value.
- </adm:synopsis>
- <adm:description>
- This can cause a security risk because the clear-text version of
- the password is not known and therefore validation checks cannot
- be applied to it.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allow-pre-encoded-passwords</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="min-password-age">
- <adm:synopsis>
- Specifies the minimum length of time after a
- password change before the user is allowed to change the
- password again.
- </adm:synopsis>
- <adm:description>
- The value of this attribute is an integer followed by a
- unit of seconds, minutes, hours, days, or weeks. This setting can
- be used to prevent users from changing their passwords repeatedly
- over a short period of time to flush an old password from the
- history so that it can be re-used.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0 seconds</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration lower-limit="0" upper-limit="2147483647" base-unit="s"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-min-password-age</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-password-age">
- <adm:synopsis>
- Specifies the maximum length of time that a user can continue
- using the same password before it must be changed (that is, the
- password expiration interval).
- </adm:synopsis>
- <adm:description>
- The value of this attribute is an integer followed by a
- unit of seconds, minutes, hours, days, or weeks. A value of 0
- seconds disables password expiration.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0 seconds</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration lower-limit="0" upper-limit="2147483647" base-unit="s"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-password-age</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-password-reset-age">
- <adm:synopsis>
- Specifies the maximum length of time that users have to change
- passwords after they have been reset by an administrator before
- they become locked.
- </adm:synopsis>
- <adm:description>
- The value of this attribute is an integer followed by a
- unit of seconds, minutes, hours, days, or weeks. A value of 0
- seconds disables this feature.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0 seconds</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration lower-limit="0" upper-limit="2147483647" base-unit="s"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-password-reset-age</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="password-expiration-warning-interval">
- <adm:synopsis>
- Specifies the maximum length of time before a user's password
- actually expires that the server begins to include warning
- notifications in bind responses for that user.
- </adm:synopsis>
- <adm:description>
- The value of this attribute is an integer followed by a
- unit of seconds, minutes, hours, days, or weeks. A value of 0
- seconds disables the warning interval.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5 days</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-password-expiration-warning-interval
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="expire-passwords-without-warning">
- <adm:synopsis>
- Indicates whether the directory server allows a user's
- password to expire even if that user has never seen an expiration
- warning notification.
- </adm:synopsis>
- <adm:description>
- If this property is true, accounts always expire when the
- expiration time arrives. If this property is false or disabled, the user
- always receives at least one warning notification, and the
- password expiration is set to the warning time plus the
- warning interval.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-expire-passwords-without-warning</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allow-expired-password-changes">
- <adm:synopsis>
- Indicates whether a user whose password is expired is still
- allowed to change that password using the password modify extended
- operation.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allow-expired-password-changes</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="grace-login-count">
- <adm:synopsis>
- Specifies the number of grace logins that a user is allowed
- after the account has expired to allow that user to choose a new
- password.
- </adm:synopsis>
- <adm:description>
- A value of 0 indicates that no grace logins are allowed.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" upper-limit="2147483647" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-grace-login-count</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="lockout-failure-count">
- <adm:synopsis>
- Specifies the maximum number of authentication failures that a
- user is allowed before the account is locked out.
- </adm:synopsis>
- <adm:description>
- A value of 0 indicates that accounts are never locked out
- due to failed attempts.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" upper-limit="2147483647"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-lockout-failure-count</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="lockout-duration">
- <adm:synopsis>
- Specifies the length of time that an account is locked
- after too many authentication failures.
- </adm:synopsis>
- <adm:description>
- The value of this attribute is an integer followed by a
- unit of seconds, minutes, hours, days, or weeks. A value of 0
- seconds indicates that the account must remain locked until an
- administrator resets the password.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0 seconds</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration lower-limit="0" upper-limit="2147483647" base-unit="s"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-lockout-duration</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="lockout-failure-expiration-interval">
- <adm:synopsis>
- Specifies the length of time before an
- authentication failure is no longer counted against a user for the
- purposes of account lockout.
- </adm:synopsis>
- <adm:description>
- The value of this attribute is an integer followed by a
- unit of seconds, minutes, hours, days, or weeks. A value of 0
- seconds indicates that the authentication failures must never
- expire. The failure count is always cleared upon a successful
- authentication.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0 seconds</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration lower-limit="0" upper-limit="2147483647" base-unit="s"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-lockout-failure-expiration-interval
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="require-change-by-time">
- <adm:synopsis>
- Specifies the time by which all users with the associated password
- policy must change their passwords.
- </adm:synopsis>
- <adm:description>
- The value is expressed in a generalized time format. If
- this time is equal to the current time or is in the past, then all
- users are required to change their passwords immediately. The
- behavior of the server in this mode is identical to the
- behavior observed when users are forced to change their passwords
- after an administrative reset.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- A valid timestamp in generalized time form (for example,
- a value of "20070409185811Z" indicates a value of April 9,
- 2007 at 6:58:11 pm GMT).
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-require-change-by-time</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="last-login-time-attribute">
- <adm:synopsis>
- Specifies the name or OID of the attribute type that is
- used to hold the last login time for users with the associated
- password policy.
- </adm:synopsis>
- <adm:description>
- This attribute type must be defined in the directory server schema
- and must either be defined as an operational attribute or must be
- allowed by the set of objectClasses for all users with the
- associated password policy.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-last-login-time-attribute</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="last-login-time-format">
- <adm:synopsis>
- Specifies the format string that is used to generate the
- last login time value for users with the associated password
- policy.
- </adm:synopsis>
- <adm:description>
- This format string conforms to the syntax described in the
- API documentation for the java.text.SimpleDateFormat class.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- Any valid format string that can be used with the
- java.text.SimpleDateFormat class.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-last-login-time-format</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="previous-last-login-time-format"
- multi-valued="true">
- <adm:synopsis>
- Specifies the format string(s) that might have been used with the
- last login time at any point in the past for users associated with
- the password policy.
- </adm:synopsis>
- <adm:description>
- These values are used to make it possible to parse previous
- values, but are not used to set new values. The format
- strings conform to the syntax described in the API
- documentation for the java.text.SimpleDateFormat class.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- Any valid format string that can be used with the
- java.text.SimpleDateFormat class.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-previous-last-login-time-format</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="idle-lockout-interval">
- <adm:synopsis>
- Specifies the maximum length of time that an account may remain
- idle (that is, the associated user does not authenticate to the
- server) before that user is locked out.
- </adm:synopsis>
- <adm:description>
- The value of this attribute is an integer followed by a
- unit of seconds, minutes, hours, days, or weeks. A value of 0
- seconds indicates that idle accounts are not automatically
- locked out. This feature is available only if the last login
- time is maintained.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0 seconds</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration lower-limit="0" upper-limit="2147483647"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-idle-lockout-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="state-update-failure-policy" advanced="true">
- <adm:synopsis>
- Specifies how the server deals with the inability to update
- password policy state information during an authentication
- attempt.
- </adm:synopsis>
- <adm:description>
- In particular, this property can be used to control whether an otherwise
- successful bind operation fails if a failure occurs while
- attempting to update password policy state information (for example, to
- clear a record of previous authentication failures or to update
- the last login time). It can also be used to control whether to
- reject a bind request if it is known ahead of time that it will not be
- possible to update the authentication failure times in the event of an
- unsuccessful bind attempt (for example, if the backend writability mode
- is disabled).
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>reactive</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="ignore">
- <adm:synopsis>
- If a bind attempt would otherwise be successful, then do not
- reject it if a problem occurs while attempting to update the
- password policy state information for the user.
- </adm:synopsis>
- </adm:value>
- <adm:value name="reactive">
- <adm:synopsis>
- Even if a bind attempt would otherwise be successful, reject
- it if a problem occurs while attempting to update the
- password policy state information for the user.
- </adm:synopsis>
- </adm:value>
- <adm:value name="proactive">
- <adm:synopsis>
- Proactively reject any bind attempt if it is known ahead of
- time that it would not be possible to update the user's
- password policy state information.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-state-update-failure-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="password-history-count">
- <adm:synopsis>
- Specifies the maximum number of former passwords to maintain in
- the password history.
- </adm:synopsis>
- <adm:description>
- When choosing a new password, the proposed password is
- checked to ensure that it does not match the current password, nor
- any other password in the history list. A value of zero indicates
- that either no password history is to be maintained (if the
- password history duration has a value of zero seconds), or that
- there is no maximum number of passwords to maintain in the history
- (if the password history duration has a value greater than zero
- seconds).
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0" upper-limit="2147483647" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-password-history-count</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="password-history-duration">
- <adm:synopsis>
- Specifies the maximum length of time that passwords remain
- in the password history.
- </adm:synopsis>
- <adm:description>
- When choosing a new password, the proposed password is
- checked to ensure that it does not match the current password, nor
- any other password in the history list. A value of zero seconds
- indicates that either no password history is to be maintained (if
- the password history count has a value of zero), or that there is
- no maximum duration for passwords in the history (if the password
- history count has a value greater than zero).
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0 seconds</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="s" lower-limit="0"
- upper-limit="2147483647" allow-unlimited="false" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-password-history-duration</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordPolicyImportPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordPolicyImportPluginConfiguration.xml
deleted file mode 100644
index 8d58a02..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordPolicyImportPluginConfiguration.xml
+++ /dev/null
@@ -1,158 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="password-policy-import-plugin"
- plural-name="password-policy-import-plugins"
- package="org.forgerock.opendj.admin" extends="plugin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- ensures that clear-text passwords contained in LDIF
- entries are properly encoded before they are stored in the
- appropriate directory server backend.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-password-policy-import-plugin</ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.plugins.PasswordPolicyImportPlugin
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="plugin-type" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>ldifimport</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="invoke-for-internal-operations">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="default-user-password-storage-scheme"
- multi-valued="true">
- <adm:synopsis>
- Specifies the names of the password storage schemes to be
- used for encoding passwords contained in attributes with the user
- password syntax for entries that do not include the
- ds-pwp-password-policy-dn attribute specifying which password
- policy is to be used to govern them.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- If the default password policy uses the attribute with the
- user password syntax, then the server uses the default
- password storage schemes for that password policy. Otherwise,
- it encodes user password values using the "SSHA" scheme.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="password-storage-scheme"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced password storage schemes must be enabled when the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-default-user-password-storage-scheme
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="default-auth-password-storage-scheme"
- multi-valued="true">
- <adm:synopsis>
- Specifies the names of password storage schemes that to be used
- for encoding passwords contained in attributes with the auth
- password syntax for entries that do not include the
- ds-pwp-password-policy-dn attribute specifying which password
- policy should be used to govern them.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- If the default password policy uses an attribute with the auth
- password syntax, then the server uses the default password
- storage schemes for that password policy. Otherwise, it
- encodes auth password values using the "SHA1" scheme.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation relation-name="password-storage-scheme"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced password storage schemes must be enabled when
- the Password Policy Import plug-in is enabled.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-default-auth-password-storage-scheme
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordPolicyStateExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordPolicyStateExtendedOperationHandlerConfiguration.xml
deleted file mode 100644
index 940753c..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordPolicyStateExtendedOperationHandlerConfiguration.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object
- name="password-policy-state-extended-operation-handler"
- plural-name="password-policy-state-extended-operation-handlers"
- package="org.forgerock.opendj.admin"
- extends="extended-operation-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides the ability for administrators to request and optionally
- alter password policy state information for a specified user.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-password-policy-state-extended-operation-handler
- </ldap:name>
- <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.PasswordPolicyStateExtendedOperation
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordPolicySubentryVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordPolicySubentryVirtualAttributeConfiguration.xml
deleted file mode 100644
index 04b3378..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordPolicySubentryVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2010 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="password-policy-subentry-virtual-attribute"
- plural-name="password-policy-subentry-virtual-attributes"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- generates a virtual attribute that points to the Password Policy
- subentry in effect for the entry.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-password-policy-subentry-virtual-attribute
- </ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.PasswordPolicySubentryVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="conflict-behavior" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>virtual-overrides-real</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="attribute-type">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>pwdPolicySubentry</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index c5357de..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="password-storage-scheme"
- plural-name="password-storage-schemes"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- encode new passwords provided by users so that they are stored in an
- encoded manner. This makes it difficult or impossible for someone to
- determine the clear-text passwords from the encoded values.
- </adm:synopsis>
- <adm:description>
- <adm:user-friendly-plural-name />
- also determine whether a clear-text password provided by a client
- matches the encoded value stored in the server.
- </adm:description>
- <adm:tag name="user-management" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-password-storage-scheme</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled for use.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.PasswordStorageScheme
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordValidatorConfiguration.xml
deleted file mode 100644
index 897f1d1..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PasswordValidatorConfiguration.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="password-validator"
- plural-name="password-validators"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for determining whether a proposed password is
- acceptable for use and could include checks like ensuring it
- meets minimum length requirements, that it has an appropriate
- range of characters, or that it is not in the history.
- </adm:synopsis>
- <adm:description>
- The password policy for a user specifies the set of password
- validators that should be used whenever that user provides a
- new password. In order to activate a password validator, the
- corresponding configuration entry must be enabled, and the DN
- of that entry should be included in the password-validator
- attribute of the password policy in which you want that
- validator active. All password validator configuration entries
- must contain the password-validator structural objectclass.
- </adm:description>
- <adm:tag name="user-management" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-password-validator</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- password validator is enabled for use.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- password validator implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.PasswordValidator
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PlainSASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PlainSASLMechanismHandlerConfiguration.xml
deleted file mode 100644
index 211f1f9..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PlainSASLMechanismHandlerConfiguration.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="plain-sasl-mechanism-handler"
- plural-name="plain-sasl-mechanism-handlers"
- package="org.forgerock.opendj.admin" extends="sasl-mechanism-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- performs all processing related to SASL PLAIN
- authentication.
- </adm:synopsis>
- <adm:description>
- The PLAIN SASL mechanism provides the ability for clients to
- authenticate using a username and password. This authentication
- is very similar to standard LDAP simple authentication, with the
- exception that it can authenticate based on an authentication ID
- (for example, a username) rather than requiring a full DN, and
- it can also include an authorization ID in addition to the
- authentication ID. Note that the SASL PLAIN mechanism does not
- make any attempt to protect the password.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-plain-sasl-mechanism-handler</ldap:name>
- <ldap:superior>ds-cfg-sasl-mechanism-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.PlainSASLMechanismHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="identity-mapper" mandatory="true">
- <adm:synopsis>
- Specifies the name of the identity mapper that is to be used
- with this SASL mechanism handler to match the authentication or
- authorization ID included in the SASL bind request to the
- corresponding user in the directory.
- </adm:synopsis>
- <adm:syntax>
- <adm:aggregation relation-name="identity-mapper"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced identity mapper must be enabled when the
- <adm:user-friendly-name />
- is enabled.
- </adm:synopsis>
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-identity-mapper</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PluginConfiguration.xml
deleted file mode 100644
index 728d47d..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PluginConfiguration.xml
+++ /dev/null
@@ -1,410 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="plugin" plural-name="plugins"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- provide a mechanism for executing custom code at specified points in
- operation processing and in the course of other events like
- connection establishment and termination, server startup and
- shutdown, and LDIF import and export.
- </adm:synopsis>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-plugin</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- plug-in is enabled for use.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- plug-in implementation.
- </adm:synopsis>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.plugin.DirectoryServerPlugin
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-type" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies the set of plug-in types for the plug-in, which specifies the times at which the plug-in is invoked.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="startup">
- <adm:synopsis>
- Invoked during the directory server startup process.
- </adm:synopsis>
- </adm:value>
- <adm:value name="shutdown">
- <adm:synopsis>
- Invoked during a graceful directory server shutdown.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postconnect">
- <adm:synopsis>
- Invoked whenever a new connection is established to the
- server.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postdisconnect">
- <adm:synopsis>
- Invoked whenever an existing connection is terminated (by
- either the client or the server).
- </adm:synopsis>
- </adm:value>
- <adm:value name="ldifimport">
- <adm:synopsis>
- Invoked for each entry read during an LDIF import.
- </adm:synopsis>
- </adm:value>
- <adm:value name="ldifimportend">
- <adm:synopsis>
- Invoked at the end of an LDIF import session.
- </adm:synopsis>
- </adm:value>
- <adm:value name="ldifimportbegin">
- <adm:synopsis>
- Invoked at the beginning of an LDIF import session.
- </adm:synopsis>
- </adm:value>
- <adm:value name="ldifexport">
- <adm:synopsis>
- Invoked for each operation to be written during an LDIF
- export.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preparseabandon">
- <adm:synopsis>
- Invoked prior to parsing an abandon request.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preparseadd">
- <adm:synopsis>
- Invoked prior to parsing an add request.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preparsebind">
- <adm:synopsis>
- Invoked prior to parsing a bind request.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preparsecompare">
- <adm:synopsis>
- Invoked prior to parsing a compare request.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preparsedelete">
- <adm:synopsis>
- Invoked prior to parsing a delete request.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preparseextended">
- <adm:synopsis>
- Invoked prior to parsing an extended request.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preparsemodify">
- <adm:synopsis>
- Invoked prior to parsing a modify request.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preparsemodifydn">
- <adm:synopsis>
- Invoked prior to parsing a modify DN request.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preparsesearch">
- <adm:synopsis>
- Invoked prior to parsing a search request.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preparseunbind">
- <adm:synopsis>
- Invoked prior to parsing an unbind request.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preoperationadd">
- <adm:synopsis>
- Invoked prior to performing the core add processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preoperationbind">
- <adm:synopsis>
- Invoked prior to performing the core bind processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preoperationcompare">
- <adm:synopsis>
- Invoked prior to performing the core compare processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preoperationdelete">
- <adm:synopsis>
- Invoked prior to performing the core delete processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preoperationextended">
- <adm:synopsis>
- Invoked prior to performing the core extended processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preoperationmodify">
- <adm:synopsis>
- Invoked prior to performing the core modify processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preoperationmodifydn">
- <adm:synopsis>
- Invoked prior to performing the core modify DN processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="preoperationsearch">
- <adm:synopsis>
- Invoked prior to performing the core search processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postoperationabandon">
- <adm:synopsis>
- Invoked after completing the abandon processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postoperationadd">
- <adm:synopsis>
- Invoked after completing the core add processing but before
- sending the response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postoperationbind">
- <adm:synopsis>
- Invoked after completing the core bind processing but before
- sending the response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postoperationcompare">
- <adm:synopsis>
- Invoked after completing the core compare processing but
- before sending the response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postoperationdelete">
- <adm:synopsis>
- Invoked after completing the core delete processing but
- before sending the response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postoperationextended">
- <adm:synopsis>
- Invoked after completing the core extended processing but
- before sending the response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postoperationmodify">
- <adm:synopsis>
- Invoked after completing the core modify processing but
- before sending the response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postoperationmodifydn">
- <adm:synopsis>
- Invoked after completing the core modify DN processing but
- before sending the response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postoperationsearch">
- <adm:synopsis>
- Invoked after completing the core search processing but
- before sending the response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postoperationunbind">
- <adm:synopsis>
- Invoked after completing the unbind processing.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postresponseadd">
- <adm:synopsis>
- Invoked after sending the add response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postresponsebind">
- <adm:synopsis>
- Invoked after sending the bind response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postresponsecompare">
- <adm:synopsis>
- Invoked after sending the compare response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postresponsedelete">
- <adm:synopsis>
- Invoked after sending the delete response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postresponseextended">
- <adm:synopsis>
- Invoked after sending the extended response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postresponsemodify">
- <adm:synopsis>
- Invoked after sending the modify response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postresponsemodifydn">
- <adm:synopsis>
- Invoked after sending the modify DN response to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postresponsesearch">
- <adm:synopsis>
- Invoked after sending the search result done message to the
- client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postsynchronizationadd">
- <adm:synopsis>
- Invoked after completing post-synchronization processing for
- an add operation.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postsynchronizationdelete">
- <adm:synopsis>
- Invoked after completing post-synchronization processing for
- a delete operation.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postsynchronizationmodify">
- <adm:synopsis>
- Invoked after completing post-synchronization processing for
- a modify operation.
- </adm:synopsis>
- </adm:value>
- <adm:value name="postsynchronizationmodifydn">
- <adm:synopsis>
- Invoked after completing post-synchronization processing for
- a modify DN operation.
- </adm:synopsis>
- </adm:value>
- <adm:value name="searchresultentry">
- <adm:synopsis>
- Invoked before sending a search result entry to the client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="searchresultreference">
- <adm:synopsis>
- Invoked before sending a search result reference to the
- client.
- </adm:synopsis>
- </adm:value>
- <adm:value name="subordinatemodifydn">
- <adm:synopsis>
- Invoked in the course of moving or renaming an entry
- subordinate to the target of a modify DN operation.
- </adm:synopsis>
- </adm:value>
- <adm:value name="subordinatedelete">
- <adm:synopsis>
- Invoked in the course of deleting a subordinate
- entry of a delete operation.
- </adm:synopsis>
- </adm:value>
- <adm:value name="intermediateresponse">
- <adm:synopsis>
- Invoked before sending an intermediate repsonse message to
- the client.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="invoke-for-internal-operations" advanced="true">
- <adm:synopsis>
- Indicates whether the plug-in should be invoked for internal
- operations.
- </adm:synopsis>
- <adm:description>
- Any plug-in that can be invoked for internal operations
- must ensure that it does not create any new
- internal operatons that can cause the same plug-in to be
- re-invoked.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-invoke-for-internal-operations</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PluginRootConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PluginRootConfiguration.xml
deleted file mode 100644
index 2d28020..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/PluginRootConfiguration.xml
+++ /dev/null
@@ -1,1669 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="plugin-root" plural-name="plugin-roots"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- defines the parent entry for all plug-ins defined in the server.
- </adm:synopsis>
- <adm:description>
- It can also include configuration attributes that define the order
- in which those plug-ins are to be loaded and invoked.
- </adm:description>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-plugin-root</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:relation name="plugin">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence />
- <ldap:naming-attribute>cn</ldap:naming-attribute>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:property name="plugin-order-startup">
- <adm:synopsis>
- Specifies the order in which startup plug-ins are to be loaded and
- invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of plug-in
- names (where the plug-in name is the RDN value from the plug-in
- configuration entry DN). The list can include at most one asterisk
- to indicate the position of any unspecified plug-in (and the
- relative order of those unspecified plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which startup plug-ins are loaded and invoked
- is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-startup</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-shutdown">
- <adm:synopsis>
- Specifies the order in which shutdown plug-ins are to be loaded and
- invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of plug-in
- names (where the plug-in name is the RDN value from the plug-in
- configuration entry DN). The list can include at most one asterisk
- to indicate the position of any unspecified plug-in (and the
- relative order of those unspecified plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which shutdown plug-ins are loaded and invoked
- is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-shutdown</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-connect">
- <adm:synopsis>
- Specifies the order in which post-connect plug-ins are to be loaded
- and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of plug-in
- names (where the plug-in name is the RDN value from the plug-in
- configuration entry DN). The list can include at most one asterisk
- to indicate the position of any unspecified plug-in (and the
- relative order of those unspecified plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-connect plug-ins are loaded and invoked
- is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-connect</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-disconnect">
- <adm:synopsis>
- Specifies the order in which post-disconnect plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-disconnect plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-disconnect</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-ldif-import">
- <adm:synopsis>
- Specifies the order in which LDIF import plug-ins are to be loaded
- and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of plug-in
- names (where the plug-in name is the RDN value from the plug-in
- configuration entry DN). The list can include at most one asterisk
- to indicate the position of any unspecified plug-in (and the
- relative order of those unspecified plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which LDIF import plug-ins are loaded and invoked
- is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-ldif-import</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-ldif-import-end">
- <adm:synopsis>
- Specifies the order in which LDIF import end plug-ins are to be loaded
- and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of plug-in
- names (where the plug-in name is the RDN value from the plug-in
- configuration entry DN). The list can include at most one asterisk
- to indicate the position of any unspecified plug-in (and the
- relative order of those unspecified plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which LDIF import end plug-ins are loaded and invoked
- is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-ldif-import-end</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-ldif-import-begin">
- <adm:synopsis>
- Specifies the order in which LDIF import begin plug-ins are to be loaded
- and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of plug-in
- names (where the plug-in name is the RDN value from the plug-in
- configuration entry DN). The list can include at most one asterisk
- to indicate the position of any unspecified plug-in (and the
- relative order of those unspecified plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which LDIF import begin plug-ins are loaded and invoked
- is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-ldif-import-begin</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-ldif-export">
- <adm:synopsis>
- Specifies the order in which LDIF export plug-ins are to be loaded
- and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of plug-in
- names (where the plug-in name is the RDN value from the plug-in
- configuration entry DN). The list can include at most one asterisk
- to indicate the position of any unspecified plug-in (and the
- relative order of those unspecified plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which LDIF export plug-ins are loaded and invoked
- is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-ldif-export</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-parse-abandon">
- <adm:synopsis>
- Specifies the order in which pre-parse abandon plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-parse abandon plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-parse-abandon</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-parse-add">
- <adm:synopsis>
- Specifies the order in which pre-parse add plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-parse add plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-parse-add</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-parse-bind">
- <adm:synopsis>
- Specifies the order in which pre-parse bind plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-parse bind plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-parse-bind</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-parse-compare">
- <adm:synopsis>
- Specifies the order in which pre-parse compare plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-parse compare plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-parse-compare</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-parse-delete">
- <adm:synopsis>
- Specifies the order in which pre-parse delete plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-parse delete plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-parse-delete</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-parse-extended">
- <adm:synopsis>
- Specifies the order in which pre-parse extended operation plug-ins
- are to be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a
- comma-delimited list of plug-in names (where the plug-in name is the
- RDN value from the plug-in configuration entry DN). The list can
- include at most one asterisk to indicate the position of any
- unspecified plug-in (and the relative order of those unspecified
- plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-parse extended operation plug-ins are
- loaded and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-parse-extended</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-parse-modify">
- <adm:synopsis>
- Specifies the order in which pre-parse modify plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-parse modify plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-parse-modify</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-parse-modify-dn">
- <adm:synopsis>
- Specifies the order in which pre-parse modify DN plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-parse modify DN plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-parse-modify-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-parse-search">
- <adm:synopsis>
- Specifies the order in which pre-parse search plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-parse search plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-parse-search</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-parse-unbind">
- <adm:synopsis>
- Specifies the order in which pre-parse unbind plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-parse unbind plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-parse-unbind</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-operation-add">
- <adm:synopsis>
- Specifies the order in which pre-operation add plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-operation add plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-operation-add</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-operation-bind">
- <adm:synopsis>
- Specifies the order in which pre-operation bind plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-operation bind plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-operation-bind</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-operation-compare">
- <adm:synopsis>
- Specifies the order in which pre-operation compare plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-operation compare plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-operation-compare</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-operation-delete">
- <adm:synopsis>
- Specifies the order in which pre-operation delete plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-operation delete plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-operation-delete</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-operation-extended">
- <adm:synopsis>
- Specifies the order in which pre-operation extended operation
- plug-ins are to be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a
- comma-delimited list of plug-in names (where the plug-in name is the
- RDN value from the plug-in configuration entry DN). The list can
- include at most one asterisk to indicate the position of any
- unspecified plug-in (and the relative order of those unspecified
- plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-operation extended operation plug-ins
- are loaded and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-plugin-order-pre-operation-extended
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-operation-modify">
- <adm:synopsis>
- Specifies the order in which pre-operation modify plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-operation modify plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-operation-modify</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-operation-modify-dn">
- <adm:synopsis>
- Specifies the order in which pre-operation modify DN plug-ins
- are to be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a
- comma-delimited list of plug-in names (where the plug-in name is the
- RDN value from the plug-in configuration entry DN). The list can
- include at most one asterisk to indicate the position of any
- unspecified plug-in (and the relative order of those unspecified
- plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-operation modify DN plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-plugin-order-pre-operation-modify-dn
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-pre-operation-search">
- <adm:synopsis>
- Specifies the order in which pre-operation search plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which pre-operation searc plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-pre-operation-search</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-operation-abandon">
- <adm:synopsis>
- Specifies the order in which post-operation abandon plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-operation abandon plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-plugin-order-post-operation-abandon
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-operation-add">
- <adm:synopsis>
- Specifies the order in which post-operation add plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-operation add plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-operation-add</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-operation-bind">
- <adm:synopsis>
- Specifies the order in which post-operation bind plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-operation bind plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-operation-bind</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-operation-compare">
- <adm:synopsis>
- Specifies the order in which post-operation compare plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-operation compare plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-plugin-order-post-operation-compare
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-operation-delete">
- <adm:synopsis>
- Specifies the order in which post-operation delete plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-operation delete plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-operation-delete</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-operation-extended">
- <adm:synopsis>
- Specifies the order in which post-operation extended operation
- plug-ins are to be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a
- comma-delimited list of plug-in names (where the plug-in name is the
- RDN value from the plug-in configuration entry DN). The list can
- include at most one asterisk to indicate the position of any
- unspecified plug-in (and the relative order of those unspecified
- plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-operation extended operation plug-ins
- are loaded and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-plugin-order-post-operation-extended
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-operation-modify">
- <adm:synopsis>
- Specifies the order in which post-operation modify plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-operation modify plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-operation-modify</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-operation-modify-dn">
- <adm:synopsis>
- Specifies the order in which post-operation modify DN plug-ins
- are to be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a
- comma-delimited list of plug-in names (where the plug-in name is the
- RDN value from the plug-in configuration entry DN). The list can
- include at most one asterisk to indicate the position of any
- unspecified plug-in (and the relative order of those unspecified
- plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-operation modify DN plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-plugin-order-post-operation-modify-dn
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-operation-search">
- <adm:synopsis>
- Specifies the order in which post-operation search plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-operation search plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-operation-search</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-operation-unbind">
- <adm:synopsis>
- Specifies the order in which post-operation unbind plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-operation unbind plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-operation-unbind</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-response-add">
- <adm:synopsis>
- Specifies the order in which post-response add plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-response add plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-response-add</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-response-bind">
- <adm:synopsis>
- Specifies the order in which post-response bind plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-response bind plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-response-bind</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-response-compare">
- <adm:synopsis>
- Specifies the order in which post-response compare plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-response compare plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-response-compare</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-response-delete">
- <adm:synopsis>
- Specifies the order in which post-response delete plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-response delete plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-response-delete</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-response-extended">
- <adm:synopsis>
- Specifies the order in which post-response extended operation
- plug-ins are to be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a
- comma-delimited list of plug-in names (where the plug-in name is the
- RDN value from the plug-in configuration entry DN). The list can
- include at most one asterisk to indicate the position of any
- unspecified plug-in (and the relative order of those unspecified
- plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-response extended operation plug-ins
- are loaded and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-plugin-order-post-response-extended
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-response-modify">
- <adm:synopsis>
- Specifies the order in which post-response modify plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-response modify plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-response-modify</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-response-modify-dn">
- <adm:synopsis>
- Specifies the order in which post-response modify DN plug-ins
- are to be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a
- comma-delimited list of plug-in names (where the plug-in name is the
- RDN value from the plug-in configuration entry DN). The list can
- include at most one asterisk to indicate the position of any
- unspecified plug-in (and the relative order of those unspecified
- plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-response modify DN plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-plugin-order-post-response-modify-dn
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-synchronization-add">
- <adm:synopsis>
- Specifies the order in which post-synchronization add plug-ins
- are to be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a
- comma-delimited list of plug-in names (where the plug-in name is the
- RDN value from the plug-in configuration entry DN). The list can
- include at most one asterisk to indicate the position of any
- unspecified plug-in (and the relative order of those unspecified
- plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-synchronization add plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-plugin-order-post-synchronization-add
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-synchronization-delete">
- <adm:synopsis>
- Specifies the order in which post-synchronization delete plug-ins
- are to be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a
- comma-delimited list of plug-in names (where the plug-in name is the
- RDN value from the plug-in configuration entry DN). The list can
- include at most one asterisk to indicate the position of any
- unspecified plug-in (and the relative order of those unspecified
- plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-synchronization delete plug-ins are
- loaded and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-plugin-order-post-synchronization-delete
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-synchronization-modify">
- <adm:synopsis>
- Specifies the order in which post-synchronization modify plug-ins
- are to be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a
- comma-delimited list of plug-in names (where the plug-in name is the
- RDN value from the plug-in configuration entry DN). The list can
- include at most one asterisk to indicate the position of any
- unspecified plug-in (and the relative order of those unspecified
- plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-synchronization modify plug-ins are
- loaded and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-plugin-order-post-synchronization-modify
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-synchronization-modify-dn">
- <adm:synopsis>
- Specifies the order in which post-synchronization modify DN
- plug-ins are to be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a
- comma-delimited list of plug-in names (where the plug-in name is the
- RDN value from the plug-in configuration entry DN). The list can
- include at most one asterisk to indicate the position of any
- unspecified plug-in (and the relative order of those unspecified
- plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-synchronization modify DN plug-ins are
- loaded and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-plugin-order-post-synchronization-modify-dn
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-post-response-search">
- <adm:synopsis>
- Specifies the order in which post-response search plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which post-response search plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-post-response-search</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-search-result-entry">
- <adm:synopsis>
- Specifies the order in which search result entry plug-ins are to be
- loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of
- plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which search result entry plug-ins are loaded and
- invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-search-result-entry</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-search-result-reference">
- <adm:synopsis>
- Specifies the order in which search result reference plug-ins
- are to be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a
- comma-delimited list of plug-in names (where the plug-in name is the
- RDN value from the plug-in configuration entry DN). The list can
- include at most one asterisk to indicate the position of any
- unspecified plug-in (and the relative order of those unspecified
- plug-ins is undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which search result reference plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-plugin-order-search-result-reference
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-subordinate-modify-dn">
- <adm:synopsis>
- Specifies the order in which subordinate modify DN plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which subordinate modify DN plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-subordinate-modify-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-subordinate-delete">
- <adm:synopsis>
- Specifies the order in which subordinate delete plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which subordinate delete plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-subordinate-delete</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="plugin-order-intermediate-response">
- <adm:synopsis>
- Specifies the order in which intermediate response plug-ins are to
- be loaded and invoked.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list
- of plug-in names (where the plug-in name is the RDN value from the
- plug-in configuration entry DN). The list can include at most one
- asterisk to indicate the position of any unspecified plug-in (and
- the relative order of those unspecified plug-ins is
- undefined).
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The order in which intermediate response plug-ins are loaded
- and invoked is undefined.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-plugin-order-intermediate-response</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ProfilerPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ProfilerPluginConfiguration.xml
deleted file mode 100644
index 8a17f8e..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ProfilerPluginConfiguration.xml
+++ /dev/null
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="profiler-plugin"
- plural-name="profiler-plugins" package="org.forgerock.opendj.admin"
- extends="plugin" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The Profiler plug-in
- captures profiling information about operations performed
- inside the JVM while the <adm:product-name /> directory server is running.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-profiler-plugin</ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.plugins.profiler.ProfilerPlugin
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="plugin-type" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>startup</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="invoke-for-internal-operations">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="profile-sample-interval" mandatory="true">
- <adm:synopsis>
- Specifies the sample interval in milliseconds to be used when
- capturing profiling information in the server.
- </adm:synopsis>
- <adm:description>
- When capturing
- data, the profiler thread sleeps for this length of time
- between calls to obtain traces for all threads running in the
- JVM.
- </adm:description>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this configuration attribute take effect the
- next time the profiler is started.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:duration lower-limit="1" upper-limit="2147483647" base-unit="ms" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-profile-sample-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="profile-directory" mandatory="true">
- <adm:synopsis>
- Specifies the path to the directory where profile information
- is to be written. This path may be either an absolute path or a path
- that is relative to the root of the <adm:product-name /> directory server
- instance.
- </adm:synopsis>
- <adm:description>
- The directory must exist and the directory server must have
- permission to create new files in it.
- </adm:description>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>DIR</adm:usage>
- <adm:synopsis>
- The path to any directory that exists on the filesystem
- and that can be read and written by the server user.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-profile-directory</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="enable-profiling-on-startup" mandatory="true">
- <adm:synopsis>
- Indicates whether the profiler plug-in is to start collecting data
- automatically when the directory server is started.
- </adm:synopsis>
- <adm:description>
- This property is read only when the server is
- started, and any changes take effect on the next restart.
- This property is typically set to "false" unless startup
- profiling is required, because otherwise the volume of data that
- can be collected can cause the server to run out of memory if it
- is not turned off in a timely manner.
- </adm:description>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enable-profiling-on-startup</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="profile-action">
- <adm:synopsis>
- Specifies the action that should be taken by the profiler.
- </adm:synopsis>
- <adm:description>
- A value of "start" causes the profiler thread to start
- collecting data if it is not already active. A value of "stop"
- causes the profiler thread to stop collecting data and write
- it to disk, and a value of "cancel" causes the profiler thread
- to stop collecting data and discard anything that has been
- captured. These operations occur immediately.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>none</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="none">
- <adm:synopsis>Do not take any action.</adm:synopsis>
- </adm:value>
- <adm:value name="start">
- <adm:synopsis>Start collecting profile data.</adm:synopsis>
- </adm:value>
- <adm:value name="stop">
- <adm:synopsis>
- Stop collecting profile data and write what has been
- captured to a file in the profile directory.
- </adm:synopsis>
- </adm:value>
- <adm:value name="cancel">
- <adm:synopsis>
- Stop collecting profile data and discard what has been
- captured.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-profile-action</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/QOSPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/QOSPolicyConfiguration.xml
deleted file mode 100644
index 2d35570..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/QOSPolicyConfiguration.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2009 Sun Microsystems, Inc.
- !
--->
-<adm:managed-object name="qos-policy"
- plural-name="qos-policies"
- abstract="true"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name/>
- determine the quality of service (QoS) clients receive when
- interacting with the server.
- </adm:synopsis>
- <adm:tag name="core-server"/>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-qos-policy</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.QOSPolicyFactory
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RC4PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RC4PasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index 9b2e7bf..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RC4PasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="rc4-password-storage-scheme"
- plural-name="rc4-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords using the RC4
- reversible encryption mechanism.
- </adm:synopsis>
- <adm:description>
- This scheme contains only an implementation for the user password
- syntax, with a storage scheme name of "RC4".
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-rc4-password-storage-scheme</ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.RC4PasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RandomPasswordGeneratorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RandomPasswordGeneratorConfiguration.xml
deleted file mode 100644
index 227524e..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RandomPasswordGeneratorConfiguration.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="random-password-generator"
- plural-name="random-password-generators"
- package="org.forgerock.opendj.admin" extends="password-generator"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- creates random passwords based on fixed-length strings
- built from one or more character sets.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-random-password-generator</ldap:name>
- <ldap:superior>ds-cfg-password-generator</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.RandomPasswordGenerator
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="password-character-set" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies one or more named character sets.
- </adm:synopsis>
- <adm:description>
- This is a multi-valued property, with each value defining a different
- character set. The format of the character set is the name of the set
- followed by a colon and the characters that are in that set.
- For example, the value "alpha:abcdefghijklmnopqrstuvwxyz" defines a
- character set named "alpha" containing all of the lower-case ASCII
- alphabetic characters.
- </adm:description>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>FORMAT</adm:usage>
- <adm:synopsis>
- A character set name (consisting of ASCII letters) followed by
- a colon and the set of characters that are included in that
- character set.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-password-character-set</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="password-format" mandatory="true">
- <adm:synopsis>
- Specifies the format to use for the generated password.
- </adm:synopsis>
- <adm:description>
- The value is a comma-delimited list of elements in which each of those
- elements is comprised of the name of a character set defined in
- the password-character-set property, a colon, and the number of
- characters to include from that set. For example, a value of
- "alpha:3,numeric:2,alpha:3" generates an 8-character password
- in which the first three characters are from the "alpha" set, the
- next two are from the "numeric" set, and the final three are from
- the "alpha" set.
- </adm:description>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>FORMAT</adm:usage>
- <adm:synopsis>
- A comma-delimited list whose elements comprise a valid character
- set name, a colon, and a positive integer indicating the number
- of characters from that set to be included.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-password-format</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ReferentialIntegrityPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ReferentialIntegrityPluginConfiguration.xml
deleted file mode 100644
index 054ed3e..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ReferentialIntegrityPluginConfiguration.xml
+++ /dev/null
@@ -1,263 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! Portions copyright 2011 profiq s.r.o.
- ! -->
-<adm:managed-object name="referential-integrity-plugin"
- plural-name="referential-integrity-plugins"
- package="org.forgerock.opendj.admin" extends="plugin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- maintains referential integrity for DN valued attributes.
- </adm:synopsis>
- <adm:description>
- The values of these attributes can reference entries that have been
- deleted by a delete operation or renamed by a modify DN operation.
- The referential integrity plug-in either removes stale references to
- deleted entries or updates references to renamed entries. The
- plug-in allows the scope of this referential
- check to be limited to a set of base DNs if desired. The plug-in
- also can be
- configured to perform the referential checking in the background
- mode specified intervals.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-referential-integrity-plugin</ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.plugins.ReferentialIntegrityPlugin
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="plugin-type" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>postoperationdelete</adm:value>
- <adm:value>postoperationmodifydn</adm:value>
- <adm:value>subordinatemodifydn</adm:value>
- <adm:value>subordinatedelete</adm:value>
- <adm:value>preoperationadd</adm:value>
- <adm:value>preoperationmodify</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="attribute-type" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies the attribute types for which referential integrity
- is to be maintained.
- </adm:synopsis>
- <adm:description>
- At least one attribute type must be specified, and the syntax
- of any attributes must be either a distinguished name
- (1.3.6.1.4.1.1466.115.121.1.12) or name and optional UID
- (1.3.6.1.4.1.1466.115.121.1.34).
- </adm:description>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-attribute-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="base-dn" multi-valued="true">
- <adm:synopsis>
- Specifies the base DN that limits the scope within which
- referential integrity is maintained.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Referential integrity is maintained in all public naming
- contexts.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-file">
- <adm:synopsis>
- Specifies the log file location where the update records are
- written when the plug-in is in background-mode processing.
- </adm:synopsis>
- <adm:description>
- The default location is the logs directory of the server
- instance, using the file name "referint".
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>logs/referint</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>FILE</adm:usage>
- <adm:synopsis>
- A path to an existing file that is readable by the server.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="update-interval">
- <adm:synopsis>
- Specifies the interval in seconds when referential integrity
- updates are made.
- </adm:synopsis>
- <adm:description>
- If this value is 0, then the updates are made synchronously in the
- foreground.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0 seconds</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="s" allow-unlimited="false" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-update-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="check-references">
- <adm:synopsis>
- Specifies whether or not reference attributes must refer to existing
- entries.
- </adm:synopsis>
- <adm:description>
- When this property is set to true, this plugin will ensure that any new
- references added as part of an add or modify operation point to existing
- entries, and that the referenced entries match the filter criteria for the
- referencing attribute, if specified.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-check-references</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="check-references-filter-criteria"
- multi-valued="true" mandatory="false">
- <adm:synopsis>
- Specifies additional filter criteria which will be enforced when checking
- references.
- </adm:synopsis>
- <adm:description>
- If a reference attribute has filter criteria defined then this plugin
- will ensure that any new references added as part of an add or modify
- operation refer to an existing entry which matches the specified filter.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^[^:]+:\\(.+\\)$</adm:regex>
- <adm:usage>ATTRIBUTE:FILTER</adm:usage>
- <adm:synopsis>An attribute-filter mapping.</adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-check-references-filter-criteria</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="check-references-scope-criteria">
- <adm:synopsis>
- Specifies whether or not referenced entries must reside within the same
- naming context as the entry containing the reference.
- </adm:synopsis>
- <adm:description>
- The reference scope will only be enforced when reference checking is
- enabled.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>global</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="global">
- <adm:synopsis>
- References may refer to existing entries located anywhere in the
- Directory.
- </adm:synopsis>
- </adm:value>
- <adm:value name="naming-context">
- <adm:synopsis>
- References must refer to existing entries located within the same
- naming context.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-check-references-scope-criteria</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RegularExpressionIdentityMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RegularExpressionIdentityMapperConfiguration.xml
deleted file mode 100644
index 3deeba1..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RegularExpressionIdentityMapperConfiguration.xml
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="regular-expression-identity-mapper"
- plural-name="regular-expression-identity-mappers"
- package="org.forgerock.opendj.admin" extends="identity-mapper"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a way to use a regular expression to translate the
- provided identifier when searching for the appropriate user entry.
- </adm:synopsis>
- <adm:description>
- This may be used, for example, if the provided identifier is
- expected to be an e-mail address or Kerberos principal, but only the
- username portion (the part before the "@" symbol) should be used in
- the mapping process. Note that a replacement will be made only if
- all or part of the provided ID string matches the given match
- pattern. If no part of the ID string matches the provided
- pattern, the given ID string is used without any alteration.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-regular-expression-identity-mapper</ldap:name>
- <ldap:superior>ds-cfg-identity-mapper</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.RegularExpressionIdentityMapper
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="match-attribute" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies the name or OID of the attribute whose value should
- match the provided identifier string after it has been processed
- by the associated regular expression.
- </adm:synopsis>
- <adm:description>
- All values must refer to the name or OID of an attribute type
- defined in the directory server schema. If multiple attributes
- or OIDs are provided, at least one of those attributes must contain
- the provided ID string value in exactly one entry.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- uid
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-match-attribute</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="match-base-dn" mandatory="false" multi-valued="true">
- <adm:synopsis>
- Specifies the base DN(s) that should be used when performing
- searches to map the provided ID string to a user entry. If multiple
- values are given, searches are performed below all the specified base DNs.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The server searches below all public naming contexts.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-match-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="match-pattern" mandatory="true">
- <adm:synopsis>
- Specifies the regular expression pattern that is used to
- identify portions of the ID string that will be replaced.
- </adm:synopsis>
- <adm:description>
- Any portion of the ID string that matches this pattern is
- replaced in accordance with the provided replace pattern (or is
- removed if no replace pattern is specified). If multiple
- substrings within the given ID string match this pattern, all
- occurrences are replaced. If no part of the given ID string
- matches this pattern, the ID string is not altered. Exactly one
- match pattern value must be provided, and it must be a
- valid regular expression as described in the API documentation for
- the java.util.regex.Pattern class, including support for capturing
- groups.
- </adm:description>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>REGEXP</adm:usage>
- <adm:synopsis>
- Any valid regular expression pattern which is supported by the
- javax.util.regex.Pattern class
- (see http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/util/regex/Pattern.html
- for documentation about this class for Java SE 6).
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-match-pattern</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="replace-pattern">
- <adm:synopsis>
- Specifies the replacement pattern that should be used for
- substrings in the ID string that match the provided regular
- expression pattern.
- </adm:synopsis>
- <adm:description>
- If no replacement pattern is provided, then any matching portions
- of the ID string will be removed (i.e., replaced with an empty
- string). The replacement pattern may include a string from a
- capturing group by using a dollar sign ($) followed by an integer
- value that indicates which capturing group should be used.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The replace pattern will be the empty string.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>REGEXP</adm:usage>
- <adm:synopsis>
- Any valid replacement string that is allowed by the
- javax.util.regex.Matcher class.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-replace-pattern</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RepeatedCharactersPasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RepeatedCharactersPasswordValidatorConfiguration.xml
deleted file mode 100644
index 7d5955b..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RepeatedCharactersPasswordValidatorConfiguration.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="repeated-characters-password-validator"
- plural-name="repeated-characters-password-validators"
- package="org.forgerock.opendj.admin" extends="password-validator"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is used to determine whether a proposed password is acceptable based
- on the number of times any character appears consecutively in a
- password value.
- </adm:synopsis>
- <adm:description>
- It ensures that user passwords do not contain strings
- of the same character repeated several times, like "aaaaaa" or
- "aaabbb".
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-repeated-characters-password-validator
- </ldap:name>
- <ldap:superior>ds-cfg-password-validator</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.RepeatedCharactersPasswordValidator
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="max-consecutive-length" mandatory="true">
- <adm:synopsis>
- Specifies the maximum number of times that any character can
- appear consecutively in a password value.
- </adm:synopsis>
- <adm:description>
- A value of zero indicates that no maximum limit is enforced.
- </adm:description>
- <adm:syntax>
- <adm:integer lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-consecutive-length</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="case-sensitive-validation" mandatory="true">
- <adm:synopsis>
- Indicates whether this password validator should treat password
- characters in a case-sensitive manner.
- </adm:synopsis>
- <adm:description>
- If the value of this property is false, the validator ignores
- any differences in capitalization
- when looking for consecutive characters in the
- password. If the value is true, the validator considers a
- character to be repeating only if all consecutive occurrences
- use the same capitalization.
- </adm:description>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-case-sensitive-validation</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ReplicationDomainConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ReplicationDomainConfiguration.xml
deleted file mode 100644
index 1b96569..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ReplicationDomainConfiguration.xml
+++ /dev/null
@@ -1,548 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! Portions Copyright 2011-2013 ForgeRock AS
- ! -->
-<adm:managed-object name="replication-domain"
- plural-name="replication-domains"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- A
- <adm:user-friendly-name />
- comprises of several Directory Servers sharing the same synchronized
- set of data.
- </adm:synopsis>
- <adm:tag name="replication" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-replication-domain</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:relation name="external-changelog-domain">
- <adm:one-to-one />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=External ChangeLog
- </ldap:rdn-sequence>
- </adm:profile>
- </adm:relation>
- <adm:property name="replication-server" multi-valued="true"
- mandatory="true">
- <adm:synopsis>
- Specifies the addresses of the Replication Servers within the
- <adm:user-friendly-name />
- to which the directory server should try to connect at startup
- time.
- </adm:synopsis>
- <adm:description>
- Addresses must be specified using the syntax: hostname:port
- </adm:description>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^.+:[0-9]+$</adm:regex>
- <adm:usage>HOST:PORT</adm:usage>
- <adm:synopsis>
- A host name followed by a ":" and a port number.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-replication-server</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="server-id" mandatory="true" read-only="true">
- <adm:synopsis>
- Specifies a unique identifier for the directory server within the
- <adm:user-friendly-name />.
- </adm:synopsis>
- <adm:description>
- Each directory server within the same
- <adm:user-friendly-name />
- must have a different server ID. A directory server which is a
- member of multiple
- <adm:user-friendly-plural-name />
- may use the same server ID for each of its
- <adm:user-friendly-name />
- configurations.
- </adm:description>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="65535"></adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-server-id</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="base-dn" mandatory="true" read-only="true">
- <adm:synopsis>
- Specifies the base DN of the replicated data.
- </adm:synopsis>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="window-size" advanced="true">
- <adm:synopsis>
- Specifies the window size that the directory server will use when
- communicating with Replication Servers.
- </adm:synopsis>
- <adm:description>
- This option may be deprecated and removed in future releases.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>100000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-window-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="heartbeat-interval">
- <adm:synopsis>
- Specifies the heart-beat interval that the directory server will
- use when communicating with Replication Servers.
- </adm:synopsis>
- <adm:description>
- The directory server expects a regular heart-beat coming from
- the Replication Server within the specified interval. If a
- heartbeat is not received within the interval, the Directory
- Server closes its connection and connects to another
- Replication Server.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>10000ms</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="100" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-heartbeat-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="changetime-heartbeat-interval" advanced="true">
- <adm:synopsis>
- Specifies the heart-beat interval that the directory server will
- use when sending its local change time to the Replication Server.
- </adm:synopsis>
- <adm:description>
- The directory server sends a regular heart-beat to the Replication
- within the specified interval. The heart-beat indicates the
- change time of the directory server to the Replication Server.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>1000ms</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-changetime-heartbeat-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="isolation-policy">
- <adm:synopsis>
- Specifies the behavior of the directory server if a write
- operation is attempted on the data within the
- <adm:user-friendly-name />
- when none of the configured Replication Servers are available.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>reject-all-updates</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="accept-all-updates">
- <adm:synopsis>
- Indicates that updates should be accepted even though it is
- not possible to send them to any Replication Server. Best
- effort is made to re-send those updates to a
- Replication Servers when one of them is available, however
- those changes are at risk because they are only
- available from the historical information. This mode can
- also introduce high replication latency.
- </adm:synopsis>
- </adm:value>
- <adm:value name="reject-all-updates">
- <adm:synopsis>
- Indicates that all updates attempted on this
- <adm:user-friendly-name />
- are rejected when no Replication Server is available.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-isolation-policy</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="assured-type" mandatory="false">
- <adm:synopsis>
- Defines the assured replication mode of the replicated domain.
- </adm:synopsis>
- <adm:description>
- The assured replication can be disabled or enabled. When enabled, two
- modes are available: Safe Data or Safe Read modes.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>not-assured</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="not-assured">
- <adm:synopsis>
- Assured replication is not enabled. Updates sent for replication
- (for being replayed on other LDAP servers in the topology) are sent
- without waiting for any acknowledgment and the LDAP client call
- returns immediately.
- </adm:synopsis>
- </adm:value>
- <adm:value name="safe-data">
- <adm:synopsis>
- Assured replication is enabled in Safe Data mode: updates sent for
- replication are subject to acknowledgment from the replication
- servers that have the same group ID as the local server (defined
- with the group-id property). The number of acknowledgments to expect
- is defined by the assured-sd-level property. After acknowledgments
- are received, LDAP client call returns.
- </adm:synopsis>
- </adm:value>
- <adm:value name="safe-read">
- <adm:synopsis>
- Assured replication is enabled in Safe Read mode: updates sent for
- replication are subject to acknowledgments from the LDAP servers in
- the topology that have the same group ID as the local server
- (defined with the group-id property). After acknowledgments are
- received, LDAP client call returns.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-assured-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="assured-sd-level" mandatory="false">
- <adm:synopsis>
- The level of acknowledgment for Safe Data assured sub mode.
- </adm:synopsis>
- <adm:description>
- When assured replication is configured in Safe Data mode, this value
- defines the number of replication servers (with the same group ID of the
- local server) that should acknowledge the sent update before the LDAP
- client call can return.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>1</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="127"></adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-assured-sd-level</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="assured-timeout" mandatory="false">
- <adm:synopsis>
- The timeout value when waiting for assured replication acknowledgments.
- </adm:synopsis>
- <adm:description>
- Defines the amount of milliseconds the server will wait for assured
- acknowledgments (in either Safe Data or Safe Read assured replication
- modes) before returning anyway the LDAP client call.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>2000ms</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-assured-timeout</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="group-id" mandatory="false">
- <adm:synopsis>
- The group ID associated with this replicated domain.
- </adm:synopsis>
- <adm:description>
- This value defines the group ID of the replicated domain. The replication
- system will preferably connect and send updates to replicate to a
- replication server with the same group ID as its own one (the local server
- group ID).
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>1</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="127"></adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-group-id</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="referrals-url" multi-valued="true" mandatory="false">
- <adm:synopsis>
- The URLs other LDAP servers should use to refer to the local server.
- </adm:synopsis>
- <adm:description>
- URLs used by peer servers in the topology to refer to the local server
- through LDAP referrals. If this attribute is not defined, every URLs
- available to access this server will be used. If defined, only URLs
- specified here will be used.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^[lL][dD][aA][pP][sS]?://.+$</adm:regex>
- <adm:usage>LDAP URL</adm:usage>
- <adm:synopsis>
- A LDAP URL compliant with RFC 2255.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-referrals-url</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="fractional-include" multi-valued="true" mandatory="false">
- <adm:synopsis>
- Allows to include some attributes to replicate to this server.
- </adm:synopsis>
- <adm:description>
- If fractional-include configuration attribute is used, only attributes
- specified in this attribute will be added/modified/deleted when an
- operation performed from another directory server is being replayed in the
- local server. Note that the usage of this configuration attribute is
- mutually exclusive with the usage of the fractional-exclude attribute.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <!-- This java regex is mostly derived from keystring BNF definition
- that can be found in RFC 2252, section "4.1. Common Encoding Aspects".
- This can be read as: (oid|\*):oid(,oid)*+
- -->
- <adm:regex>^((([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+)|\\*):(([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+)(,(([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+))*+$</adm:regex>
- <adm:usage>OC:AT[,...,AT]</adm:usage>
- <adm:synopsis>
- The name of one or more attribute types in the named object class to
- be included. The object class may be "*" indicating that the
- attribute type(s) should be included regardless of the type of entry
- they belong to.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-fractional-include</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="fractional-exclude" multi-valued="true" mandatory="false">
- <adm:synopsis>
- Allows to exclude some attributes to replicate to this server.
- </adm:synopsis>
- <adm:description>
- If fractional-exclude configuration attribute is used, attributes
- specified in this attribute will be ignored (not added/modified/deleted)
- when an operation performed from another directory server is being
- replayed in the local server. Note that the usage of this configuration
- attribute is mutually exclusive with the usage of the fractional-include
- attribute.
- </adm:description>
- <adm:default-behavior>
- <adm:undefined/>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <!-- This java regex is mostly derived from keystring BNF definition
- that can be found in RFC 2252, section "4.1. Common Encoding Aspects".
- This can be read as: (oid|\*):oid(,oid)*+
- -->
- <adm:regex>^((([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+)|\\*):(([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+)(,(([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+))*+$</adm:regex>
- <adm:usage>OC:AT[,...,AT]</adm:usage>
- <adm:synopsis>
- The name of one or more attribute types in the named object class to
- be excluded. The object class may be "*" indicating that the
- attribute type(s) should be excluded regardless of the type of entry
- they belong to.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-fractional-exclude</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="solve-conflicts" advanced="true">
- <adm:synopsis>
- Indicates if this server solves conflict.
- </adm:synopsis>
- <adm:description>
- This boolean indicates if this domain keeps the historical information
- necessary to solve conflicts.
- When set to false the server will not maintain historical information
- and will therefore not be able to solve conflict. This should therefore
- be done only if the replication is used in a single master type
- of deployment.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-solve-conflicts</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="log-changenumber" advanced="false">
- <adm:synopsis>
- Indicates if this server logs the ChangeNumber in access log.
- </adm:synopsis>
- <adm:description>
- This boolean indicates if the domain should log the ChangeNumber
- of replicated operations in the access log.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-log-changenumber</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="initialization-window-size">
- <adm:synopsis>
- Specifies the window size that this directory server may use when
- communicating with remote Directory Servers for initialization.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>100</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-initialization-window-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="conflicts-historical-purge-delay">
- <adm:synopsis>
- This delay indicates the time (in minutes) the domain keeps the historical
- information necessary to solve conflicts.When a change stored in the
- historical part of the user entry has a date (from its replication ChangeNumber)
- older than this delay, it is candidate to be purged.
- The purge is applied on 2 events: modify of the entry, dedicated purge task.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>1440m</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="m" allow-unlimited="false" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-conflicts-historical-purge-delay</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ReplicationServerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ReplicationServerConfiguration.xml
deleted file mode 100644
index 6d0aa6b..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ReplicationServerConfiguration.xml
+++ /dev/null
@@ -1,330 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! Portions copyright 2011-2013 ForgeRock AS
- ! -->
-<adm:managed-object name="replication-server"
- plural-name="replication-servers"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- publish updates to Directory Servers within a
- Replication Domain.
- </adm:synopsis>
- <adm:tag name="replication" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-replication-server</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="replication-server" multi-valued="true">
- <adm:synopsis>
- Specifies the addresses of other
- <adm:user-friendly-plural-name />
- to which this
- <adm:user-friendly-name />
- tries to connect at startup time.
- </adm:synopsis>
- <adm:description>
- Addresses must be specified using the syntax: "hostname:port". If IPv6
- addresses are used as the hostname, they must be specified using the
- syntax "[IPv6Address]:port".
- </adm:description>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>^.+:[0-9]+$</adm:regex>
- <adm:usage>HOST:PORT</adm:usage>
- <adm:synopsis>
- A host name followed by a ":" and a port number.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-replication-server</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="replication-server-id" mandatory="true"
- read-only="true">
- <adm:synopsis>
- Specifies a unique identifier for the
- <adm:user-friendly-name />.
- </adm:synopsis>
- <adm:description>
- Each
- <adm:user-friendly-name />
- must have a different server ID.
- </adm:description>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="65535"></adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-replication-server-id</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="window-size" advanced="true">
- <adm:synopsis>
- Specifies the window size that the
- <adm:user-friendly-name />
- uses when communicating with other
- <adm:user-friendly-plural-name />.
- </adm:synopsis>
- <adm:description>
- This option may be deprecated and removed in future releases.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>100000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer></adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-window-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="queue-size" advanced="true">
- <adm:synopsis>
- Specifies the number of changes that are kept in memory for
- each directory server in the Replication Domain.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>10000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-queue-size</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="replication-db-directory" mandatory="true"
- read-only="true">
- <adm:synopsis>
- The path where the
- <adm:user-friendly-name />
- stores all persistent information.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>changelogDb</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string></adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-replication-db-directory</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="replication-purge-delay">
- <adm:synopsis>
- The time (in seconds) after which the
- <adm:user-friendly-name />
- erases all persistent information.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>3 days</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="s" allow-unlimited="false" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-replication-purge-delay</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="replication-port" mandatory="true">
- <adm:synopsis>
- The port on which this
- <adm:user-friendly-name />
- waits for connections from other
- <adm:user-friendly-plural-name />
- or Directory Servers.
- </adm:synopsis>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="65535" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-replication-port</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="group-id" mandatory="false">
- <adm:synopsis>
- The group id for the replication server.
- </adm:synopsis>
- <adm:description>
- This value defines the group id of the replication server. The replication
- system of a LDAP server uses the group id of the replicated domain and
- tries to connect, if possible, to a replication with the same group id.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>1</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="127"></adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-group-id</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="assured-timeout" mandatory="false">
- <adm:synopsis>
- The timeout value when waiting for assured mode acknowledgments.
- </adm:synopsis>
- <adm:description>
- Defines the number of milliseconds that the replication server will wait
- for assured acknowledgments (in either Safe Data or Safe Read assured sub
- modes) before forgetting them and answer to the entity that sent an update
- and is waiting for acknowledgment.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>1000ms</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-assured-timeout</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="degraded-status-threshold" mandatory="false">
- <adm:synopsis>
- The number of pending changes as threshold value for putting a directory
- server in degraded status.
- </adm:synopsis>
- <adm:description>
- This value represents a number of pending changes a replication server has
- in queue for sending to a directory server. Once this value is crossed,
- the matching directory server goes in degraded status. When number of
- pending changes goes back under this value, the directory server is put
- back in normal status. 0 means status analyzer is disabled and directory
- servers are never put in degraded status.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0"></adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-degraded-status-threshold</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="weight" mandatory="false">
- <adm:synopsis>
- The weight of the replication server.
- </adm:synopsis>
- <adm:description>
- The weight affected to the replication server.
- Each replication server of the topology has a weight. When combined
- together, the weights of the replication servers of a same group can be
- translated to a percentage that determines the quantity of directory
- servers of the topology that should be connected to a replication server.
- For instance imagine a topology with 3 replication servers (with the same
- group id) with the following weights: RS1=1, RS2=1, RS3=2. This means that
- RS1 should have 25% of the directory servers connected in the topology,
- RS2 25%, and RS3 50%. This may be useful if the replication servers of the
- topology have a different power and one wants to spread the load between
- the replication servers according to their power.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>1</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1"></adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-weight</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="monitoring-period" mandatory="false">
- <adm:synopsis>
- The period between sending of monitoring messages.
- </adm:synopsis>
- <adm:description>
- Defines the duration that the replication server will wait
- before sending new monitoring messages to its peers (replication servers
- and directory servers). Larger values increase the length of time it
- takes for a directory server to detect and switch to a more suitable
- replication server, whereas smaller values increase the amount of
- background network traffic.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>60s</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-monitoring-period</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ReplicationSynchronizationProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ReplicationSynchronizationProviderConfiguration.xml
deleted file mode 100644
index 197cb43..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ReplicationSynchronizationProviderConfiguration.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="replication-synchronization-provider"
- plural-name="replication-synchronization-providers"
- package="org.forgerock.opendj.admin"
- extends="synchronization-provider"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides multi-master replication of data across multiple
- directory server instances.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-replication-synchronization-provider</ldap:name>
- <ldap:superior>ds-cfg-synchronization-provider</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:relation name="replication-domain">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=domains</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="server-id" />
- <cli:default-property name="replication-server" />
- <cli:default-property name="base-dn" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="replication-server">
- <adm:one-to-zero-or-one />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=replication server</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="replication-server-id" />
- <cli:default-property name="replication-port" />
- <cli:default-property name="replication-server" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.replication.plugin.MultimasterReplication
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="num-update-replay-threads" mandatory="false" read-only="false" advanced="true">
- <adm:synopsis>
- Specifies the number of update replay threads.
- </adm:synopsis>
- <adm:description>
- This value is the number of threads created for replaying every updates
- received for all the replication domains.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- 10
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="65535"></adm:integer>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-num-update-replay-threads</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="connection-timeout" advanced="true">
- <adm:synopsis>
- Specifies the timeout used when connecting to peers and when performing
- SSL negotiation.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>5 seconds</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-connection-timeout</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RequestFilteringQOSPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RequestFilteringQOSPolicyConfiguration.xml
deleted file mode 100644
index 6e07adb..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RequestFilteringQOSPolicyConfiguration.xml
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2009 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="request-filtering-qos-policy"
- plural-name="request-filtering-qos-policies"
- extends="qos-policy"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name/>
- is used to define the type of requests allowed by the server.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-request-filtering-qos-policy</ldap:name>
- <ldap:superior>ds-cfg-qos-policy</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.core.networkgroups.RequestFilteringPolicyFactory
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="allowed-operations" multi-valued="true">
- <adm:synopsis>
- Specifies which operations are allowed by the server.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>All operations are allowed.</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="add">
- <adm:synopsis>Add operations.</adm:synopsis>
- </adm:value>
- <adm:value name="bind">
- <adm:synopsis>Bind operations.</adm:synopsis>
- </adm:value>
- <adm:value name="compare">
- <adm:synopsis>Compare operations</adm:synopsis>
- </adm:value>
- <adm:value name="delete">
- <adm:synopsis>Delete operations</adm:synopsis>
- </adm:value>
- <adm:value name="extended">
- <adm:synopsis>Extended operations</adm:synopsis>
- </adm:value>
- <adm:value name="inequality-search">
- <adm:synopsis>Inequality Search operations
- </adm:synopsis>
- </adm:value>
- <adm:value name="modify">
- <adm:synopsis>Modify operations</adm:synopsis>
- </adm:value>
- <adm:value name="rename">
- <adm:synopsis>Rename operations</adm:synopsis>
- </adm:value>
- <adm:value name="search">
- <adm:synopsis>Search operations</adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allowed-operations</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allowed-attributes" multi-valued="true">
- <adm:synopsis>
- Specifies which attributes are allowed in search and
- compare operations.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>All non-prohibited attributes.</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allowed-attributes</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="prohibited-attributes" mandatory="false"
- multi-valued="true">
- <adm:synopsis>
- Specifies which attributes are not allowed in search
- and compare operations.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>All allowed attributes.</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-prohibited-attributes</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allowed-search-scopes" multi-valued="true">
- <adm:synopsis>
- Specifies which search scopes are allowed by the server.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>All search scopes are allowed.</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="base">
- <adm:synopsis>Base-object search.</adm:synopsis>
- </adm:value>
- <adm:value name="one">
- <adm:synopsis>One-level search.</adm:synopsis>
- </adm:value>
- <adm:value name="sub">
- <adm:synopsis>Whole subtree search</adm:synopsis>
- </adm:value>
- <adm:value name="children">
- <adm:synopsis>Subordinate subtree search</adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allowed-search-scopes</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="allowed-subtrees" multi-valued="true">
- <adm:synopsis>
- Specifies which subtrees are accessible to clients.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>All non-prohibited subtrees.</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allowed-subtrees</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="prohibited-subtrees" multi-valued="true">
- <adm:synopsis>
- Specifies which subtrees must be hidden from clients. Each
- prohibited subtree must be subordinate to an allowed subtree.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>All allowed subtrees.</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-prohibited-subtrees</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ResourceLimitsQOSPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ResourceLimitsQOSPolicyConfiguration.xml
deleted file mode 100644
index 44026e9..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/ResourceLimitsQOSPolicyConfiguration.xml
+++ /dev/null
@@ -1,274 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2009-2010 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="resource-limits-qos-policy"
- plural-name="resource-limits-qos-policies"
- extends="qos-policy"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name/>
- are used to define resource limits enforced by the server.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-resource-limits-qos-policy</ldap:name>
- <ldap:superior>ds-cfg-qos-policy</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.core.networkgroups.ResourceLimitsPolicyFactory
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="max-connections">
- <adm:TODO>Make use of unlimited.</adm:TODO>
- <adm:synopsis>
- Specifies the maximum number of concurrent client connections
- to the server.
- </adm:synopsis>
- <adm:description>
- A value of 0 means that no limit is enforced.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-connections</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-connections-from-same-ip">
- <adm:TODO>Make use of unlimited.</adm:TODO>
- <adm:synopsis>
- Specifies the maximum number of client connections from the
- same source address.
- </adm:synopsis>
- <adm:description>
- A value of 0 means that no limit is enforced.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-connections-from-same-ip</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-ops-per-connection">
- <adm:TODO>Make use of unlimited.</adm:TODO>
- <adm:synopsis>
- Specifies the maximum number of operations per
- client connection.
- </adm:synopsis>
- <adm:description>
- A value of 0 means that no limit is enforced.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-ops-per-connection</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-concurrent-ops-per-connection">
- <adm:TODO>Make use of unlimited.</adm:TODO>
- <adm:synopsis>
- Specifies the maximum number of concurrent operations
- per client connection.
- </adm:synopsis>
- <adm:description>
- A value of 0 means that no limit is enforced.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-concurrent-ops-per-connection</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="size-limit">
- <adm:TODO>Make use of unlimited.</adm:TODO>
- <adm:synopsis>
- Specifies the maximum number of entries that can be returned
- to the client during a single search operation.
- </adm:synopsis>
- <adm:description>
- A value of 0 indicates that no size limit is enforced. Note
- that this is the default for the server, but it may be
- overridden on a per-user basis using the ds-rlim-size-limit
- operational attribute.
- </adm:description>
- <adm:default-behavior>
- <adm:inherited>
- <adm:absolute property-name="size-limit"
- path="/relation=global-configuration"/>
- </adm:inherited>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-size-limit</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="time-limit">
- <adm:TODO>Make use of unlimited.</adm:TODO>
- <adm:synopsis>
- Specifies the maximum length of time that should be spent processing
- a search operation.
- </adm:synopsis>
- <adm:description>
- A value of 0 seconds indicates that no time limit is
- enforced. Note that this is the default for the server,
- but it may be overridden on a per-user basis using the
- ds-rlim-time-limit operational attribute.
- </adm:description>
- <adm:default-behavior>
- <adm:inherited>
- <adm:absolute property-name="time-limit"
- path="/relation=global-configuration"/>
- </adm:inherited>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="s" lower-limit="0"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-time-limit</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="min-substring-length">
- <adm:TODO>Make use of unlimited.</adm:TODO>
- <adm:synopsis>
- Specifies the minimum length for a search filter substring.
- </adm:synopsis>
- <adm:description>
- Search operations with short search filter substring are
- likely to match a high number of entries and might degrade
- performance overall. A value of 0 indicates that no limit is
- enforced.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-min-substring-length</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-ops-per-interval">
- <adm:synopsis>
- Specifies the maximum number of operations that can take place on
- the same network group during the specified interval.
- </adm:synopsis>
- <adm:description>
- When the maximum number of operations per interval is reached, all
- subsequent operations on the same network group are refused until the
- end of the time interval. This parameter allows to limit the throughput
- on the network group.
- A value of 0 indicates that no limit is enforced.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="0"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-ops-per-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-ops-interval">
- <adm:synopsis>
- Specifies the interval during which the number of operations is limited.
- </adm:synopsis>
- <adm:description>
- When the maximum number of operations per interval is reached, all
- subsequent operations on the same network group are refused until the
- end of the time interval. This parameter allows to limit the throughput
- on the network group.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>1s</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="1"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-ops-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RootConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RootConfiguration.xml
deleted file mode 100644
index c554e52..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RootConfiguration.xml
+++ /dev/null
@@ -1,487 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:root-managed-object xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- The root configuration provides an entry point to the rest of the
- <adm:product-name />
- configuration.
- </adm:synopsis>
- <adm:relation name="global-configuration"
- managed-object-name="global">
- <adm:one-to-one />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=config</ldap:rdn-sequence>
- </adm:profile>
- </adm:relation>
- <adm:relation name="connection-handler">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=connection handlers, cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- <cli:default-property name="listen-port" />
- <cli:default-property name="use-ssl" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="synchronization-provider">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Synchronization Providers, cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="access-control-handler">
- <adm:one-to-one />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Access Control Handler,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="crypto-manager">
- <adm:one-to-one />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Crypto Manager,cn=config</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="group-implementation">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Group Implementations,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="identity-mapper">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Identity Mappers,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="certificate-mapper">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Certificate Mappers,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="sasl-mechanism-handler">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=SASL Mechanisms,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="password-validator">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Password Validators,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="password-generator">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Password Generators,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="plugin-root" managed-object-name="plugin-root">
- <adm:one-to-one />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Plugins,cn=config</ldap:rdn-sequence>
- </adm:profile>
- </adm:relation>
- <adm:relation name="virtual-attribute">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Virtual Attributes,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation naming-argument-override="name">
- <cli:default-property name="enabled" />
- <cli:default-property name="attribute-type" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="extended-operation-handler">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Extended Operations,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="entry-cache">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Entry Caches,cn=config</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="cache-level" />
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="account-status-notification-handler">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Account Status Notification Handlers,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="alert-handler">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Alert Handlers,cn=config</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="password-storage-scheme">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Password Storage Schemes,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="backend">
- <adm:one-to-many naming-property="backend-id" />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Backends,cn=config</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- <cli:default-property name="base-dn" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="root-dn">
- <adm:one-to-one />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Root DNs,cn=config</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="default-root-privilege-name" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="root-dse-backend">
- <adm:one-to-one />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Root DSE,cn=config</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- <cli:default-property name="show-all-attributes" />
- <cli:default-property name="subordinate-base-dn" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="password-policy"
- managed-object-name="authentication-policy">
- <adm:one-to-many plural-name="password-policies" />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Password Policies,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="password-attribute" />
- <cli:default-property name="default-password-storage-scheme" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="log-publisher">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Loggers,cn=config</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="log-rotation-policy">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Log Rotation Policies,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="file-size-limit" />
- <cli:default-property name="rotation-interval" />
- <cli:default-property name="time-of-day" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="log-retention-policy">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Log Retention Policies,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="disk-space-used" />
- <cli:default-property name="free-disk-space" />
- <cli:default-property name="number-of-files" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="matching-rule">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Matching Rules,cn=config</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="attribute-syntax">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Syntaxes,cn=config</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="monitor-provider">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Monitor Providers,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="key-manager-provider">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Key Manager Providers,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="trust-manager-provider">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Trust Manager Providers,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="work-queue">
- <adm:one-to-one />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Work Queue,cn=config</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="java-class" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="network-group" hidden="true">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Network Groups,cn=config</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- <cli:default-property name="priority" />
- <cli:default-property name="workflow" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="workflow" hidden="true">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Workflows,cn=config</ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="workflow-element" hidden="true">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>
- cn=Workflow elements,cn=config
- </ldap:rdn-sequence>
- </adm:profile>
- <adm:profile name="cli">
- <cli:relation>
- <cli:default-property name="enabled" />
- </cli:relation>
- </adm:profile>
- </adm:relation>
- <adm:relation name="administration-connector">
- <adm:one-to-one />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Administration Connector,cn=config</ldap:rdn-sequence>
- </adm:profile>
- </adm:relation>
- <adm:relation name="extension" hidden="true">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=Extensions,cn=config</ldap:rdn-sequence>
- </adm:profile>
- </adm:relation>
- <adm:product-name>OpenDJ</adm:product-name>
- <adm:tag-definition name="logging">
- <adm:synopsis>Logging</adm:synopsis>
- </adm:tag-definition>
- <adm:tag-definition name="user-management">
- <adm:synopsis>User management</adm:synopsis>
- </adm:tag-definition>
- <adm:tag-definition name="replication">
- <adm:synopsis>Replication</adm:synopsis>
- </adm:tag-definition>
- <adm:tag-definition name="database">
- <adm:synopsis>Caching and back-ends</adm:synopsis>
- </adm:tag-definition>
- <adm:tag-definition name="security">
- <adm:synopsis>Authentication and authorization</adm:synopsis>
- </adm:tag-definition>
- <adm:tag-definition name="core-server">
- <adm:synopsis>Core server</adm:synopsis>
- </adm:tag-definition>
-</adm:root-managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RootDNConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RootDNConfiguration.xml
deleted file mode 100644
index aa81e83..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RootDNConfiguration.xml
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="root-dn" plural-name="root-dns"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- configuration contains all the Root DN Users defined in the
- directory server. In addition, it also defines the default set of
- privileges that Root DN Users automatically inherit.
- </adm:synopsis>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-root-dn</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:relation name="root-dn-user" hidden="true">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence />
- <ldap:naming-attribute>cn</ldap:naming-attribute>
- </adm:profile>
- </adm:relation>
- <adm:property name="default-root-privilege-name"
- multi-valued="true">
- <adm:synopsis>
- Specifies the names of the privileges that root users will be
- granted by default.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>bypass-lockdown</adm:value>
- <adm:value>bypass-acl</adm:value>
- <adm:value>modify-acl</adm:value>
- <adm:value>config-read</adm:value>
- <adm:value>config-write</adm:value>
- <adm:value>ldif-import</adm:value>
- <adm:value>ldif-export</adm:value>
- <adm:value>backend-backup</adm:value>
- <adm:value>backend-restore</adm:value>
- <adm:value>server-lockdown</adm:value>
- <adm:value>server-shutdown</adm:value>
- <adm:value>server-restart</adm:value>
- <adm:value>disconnect-client</adm:value>
- <adm:value>cancel-request</adm:value>
- <adm:value>password-reset</adm:value>
- <adm:value>update-schema</adm:value>
- <adm:value>privilege-change</adm:value>
- <adm:value>unindexed-search</adm:value>
- <adm:value>subentry-write</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="bypass-lockdown">
- <adm:synopsis>
- Allows the associated user to bypass server lockdown mode.
- </adm:synopsis>
- </adm:value>
- <adm:value name="bypass-acl">
- <adm:synopsis>
- Allows the associated user to bypass access control checks
- performed by the server.
- </adm:synopsis>
- </adm:value>
- <adm:value name="modify-acl">
- <adm:synopsis>
- Allows the associated user to modify the server's access
- control configuration.
- </adm:synopsis>
- </adm:value>
- <adm:value name="config-read">
- <adm:synopsis>
- Allows the associated user to read the server configuration.
- </adm:synopsis>
- </adm:value>
- <adm:value name="config-write">
- <adm:synopsis>
- Allows the associated user to update the server
- configuration. The config-read privilege is also required.
- </adm:synopsis>
- </adm:value>
- <adm:value name="jmx-read">
- <adm:synopsis>
- Allows the associated user to perform JMX read operations.
- </adm:synopsis>
- </adm:value>
- <adm:value name="jmx-write">
- <adm:synopsis>
- Allows the associated user to perform JMX write operations.
- </adm:synopsis>
- </adm:value>
- <adm:value name="jmx-notify">
- <adm:synopsis>
- Allows the associated user to subscribe to receive JMX
- notifications.
- </adm:synopsis>
- </adm:value>
- <adm:value name="ldif-import">
- <adm:synopsis>
- Allows the user to request that the server process LDIF
- import tasks.
- </adm:synopsis>
- </adm:value>
- <adm:value name="ldif-export">
- <adm:synopsis>
- Allows the user to request that the server process LDIF
- export tasks.
- </adm:synopsis>
- </adm:value>
- <adm:value name="backend-backup">
- <adm:synopsis>
- Allows the user to request that the server process backup
- tasks.
- </adm:synopsis>
- </adm:value>
- <adm:value name="backend-restore">
- <adm:synopsis>
- Allows the user to request that the server process restore
- tasks.
- </adm:synopsis>
- </adm:value>
- <adm:value name="server-lockdown">
- <adm:synopsis>
- Allows the user to place and bring the server of lockdown mode.
- </adm:synopsis>
- </adm:value>
- <adm:value name="server-shutdown">
- <adm:synopsis>
- Allows the user to request that the server shut down.
- </adm:synopsis>
- </adm:value>
- <adm:value name="server-restart">
- <adm:synopsis>
- Allows the user to request that the server perform an
- in-core restart.
- </adm:synopsis>
- </adm:value>
- <adm:value name="proxied-auth">
- <adm:synopsis>
- Allows the user to use the proxied authorization control, or
- to perform a bind that specifies an alternate authorization
- identity.
- </adm:synopsis>
- </adm:value>
- <adm:value name="disconnect-client">
- <adm:synopsis>
- Allows the user to terminate other client connections.
- </adm:synopsis>
- </adm:value>
- <adm:value name="cancel-request">
- <adm:synopsis>
- Allows the user to cancel operations in progress on other
- client connections.
- </adm:synopsis>
- </adm:value>
- <adm:value name="password-reset">
- <adm:synopsis>
- Allows the user to reset user passwords.
- </adm:synopsis>
- </adm:value>
- <adm:value name="data-sync">
- <adm:synopsis>
- Allows the user to participate in data synchronization.
- </adm:synopsis>
- </adm:value>
- <adm:value name="update-schema">
- <adm:synopsis>
- Allows the user to make changes to the server schema.
- </adm:synopsis>
- </adm:value>
- <adm:value name="privilege-change">
- <adm:synopsis>
- Allows the user to make changes to the set of defined root
- privileges, as well as to grant and revoke privileges for
- users.
- </adm:synopsis>
- </adm:value>
- <adm:value name="unindexed-search">
- <adm:synopsis>
- Allows the user to request that the server process a search
- that cannot be optimized using server indexes.
- </adm:synopsis>
- </adm:value>
- <adm:value name="subentry-write">
- <adm:synopsis>
- Allows the associated user to perform LDAP subentry write
- operations.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-default-root-privilege-name</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RootDNUserConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RootDNUserConfiguration.xml
deleted file mode 100644
index 02ee034..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RootDNUserConfiguration.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="root-dn-user" plural-name="root-dn-users"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- A
- <adm:user-friendly-name />
- are administrative users who can granted special privileges that
- are not available to non-root users (for example, the ability to bind to
- the server in lockdown mode).
- </adm:synopsis>
- <adm:description>
- By default a
- <adm:user-friendly-name />
- inherits the default set of privileges defined in the Root DN
- configuration.
- </adm:description>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-root-dn-user</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="alternate-bind-dn" multi-valued="true">
- <adm:synopsis>
- Specifies one or more alternate DNs that can be used to bind to
- the server as this root user.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- This root user is allowed to bind only using the DN of
- the associated configuration entry.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-alternate-bind-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RootDSEBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RootDSEBackendConfiguration.xml
deleted file mode 100644
index e07d16c..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/RootDSEBackendConfiguration.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="root-dse-backend"
- plural-name="root-dse-backends" package="org.forgerock.opendj.admin"
- advanced="true" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- contains the directory server root DSE.
- </adm:synopsis>
- <adm:description>
- This is a special meta-backend that dynamically generates the
- root DSE entry for base-level searches and simply redirects to
- other backends for operations in other scopes.
- </adm:description>
- <adm:tag name="core-server" />
- <adm:tag name="database" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-root-dse-backend</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="subordinate-base-dn" multi-valued="true">
- <adm:synopsis>
- Specifies the set of base DNs used for singleLevel,
- wholeSubtree, and subordinateSubtree searches based at the root
- DSE.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The set of all user-defined suffixes is used.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-subordinate-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="show-all-attributes" mandatory="true">
- <adm:synopsis>
- Indicates whether all attributes in the root DSE are to be treated
- like user attributes (and therefore returned to clients by
- default) regardless of the directory server schema configuration.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-show-all-attributes</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SASLMechanismHandlerConfiguration.xml
deleted file mode 100644
index 811be90..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SASLMechanismHandlerConfiguration.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="sasl-mechanism-handler"
- plural-name="sasl-mechanism-handlers"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- The SASL mechanism handler configuration entry is the parent
- for all SASL mechanism handlers defined in the <adm:product-name />
- directory server.
- </adm:synopsis>
- <adm:description>
- SASL mechanism handlers are responsible for
- authenticating users during the course of processing a SASL
- (Simple Authentication and Security Layer, as defined in
- RFC 4422) bind.
- </adm:description>
- <adm:tag name="security" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-sasl-mechanism-handler</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- SASL mechanism handler is enabled for use.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- SASL mechanism handler implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.SASLMechanismHandler
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SHA1PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SHA1PasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index 9c5217b..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SHA1PasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="sha1-password-storage-scheme"
- plural-name="sha1-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords using an unsalted
- form of the SHA-1 message digest algorithm. Because the implementation
- does not use any kind of salting mechanism, a given password always has
- the same encoded form.
- </adm:synopsis>
- <adm:description>
- This scheme contains only an implementation for the user password
- syntax, with a storage scheme name of "SHA".
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-sha1-password-storage-scheme</ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SHA1PasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SMTPAccountStatusNotificationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SMTPAccountStatusNotificationHandlerConfiguration.xml
deleted file mode 100644
index 2f31157..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SMTPAccountStatusNotificationHandlerConfiguration.xml
+++ /dev/null
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="smtp-account-status-notification-handler"
- plural-name="smtp-account-status-notification-handlers"
- extends="account-status-notification-handler"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is a notification handler that sends
- email messages to end users and/or administrators whenever an
- account status notification is generated.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-smtp-account-status-notification-handler
- </ldap:name>
- <ldap:superior>
- ds-cfg-account-status-notification-handler
- </ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SMTPAccountStatusNotificationHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="email-address-attribute-type"
- multi-valued="true">
- <adm:synopsis>
- Specifies which attribute in the user's entries may be used to obtain
- the email address when notifying the end user.
- </adm:synopsis>
- <adm:description>
- You can specify more than one email address as separate values. In this case,
- the <adm:product-name /> server sends a notification to all email addresses identified.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- If no email address attribute types are specified, then no
- attempt is made to send email notification messages to
- end users. Only those users specified in the set of additional
- recipient addresses are sent the notification messages.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-email-address-attribute-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="recipient-address" multi-valued="true">
- <adm:synopsis>
- Specifies an email address to which notification messages are
- sent, either instead of or in addition to the end user for whom
- the notification has been generated.
- </adm:synopsis>
- <adm:description>
- This may be used to ensure that server administrators also receive
- a copy of any notification messages that are generated.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- If no additional recipient addresses are specified, then only
- the end users that are the subjects of the account status
- notifications receive the notification messages.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-recipient-address</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="send-message-without-end-user-address"
- mandatory="true" advanced="true">
- <adm:synopsis>
- Indicates whether an email notification message should be
- generated and sent to the set of notification recipients even if
- the user entry does not contain any values for any of the email
- address attributes (that is, in cases when it is not be possible to
- notify the end user).
- </adm:synopsis>
- <adm:description>
- This is only applicable if both one or more email address
- attribute types and one or more additional recipient addresses are
- specified.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>true</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-send-message-without-end-user-address
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="sender-address" mandatory="true">
- <adm:synopsis>
- Specifies the email address from which the message is sent.
- Note that this does not necessarily have to be a legitimate email
- address.
- </adm:synopsis>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-sender-address</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="message-subject" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies the subject that should be used for email messages
- generated by this account status notification handler.
- </adm:synopsis>
- <adm:description>
- The values for this property should begin with the name of an
- account status notification type followed by a colon and the
- subject that should be used for the associated notification
- message. If an email message is generated for an account status
- notification type for which no subject is defined, then that
- message is given a generic subject.
- </adm:description>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-message-subject</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="message-template-file" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies the path to the file containing the message template
- to generate the email notification messages.
- </adm:synopsis>
- <adm:description>
- The values for this property should begin with the name of an
- account status notification type followed by a colon and the path
- to the template file that should be used for that notification
- type. If an account status notification has a notification type
- that is not associated with a message template file, then no email
- message is generated for that notification.
- </adm:description>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-message-template-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SMTPAlertHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SMTPAlertHandlerConfiguration.xml
deleted file mode 100644
index 22fc8666..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SMTPAlertHandlerConfiguration.xml
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="smtp-alert-handler"
- plural-name="smtp-alert-handlers"
- package="org.forgerock.opendj.admin" extends="alert-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- may be used to send e-mail messages to notify administrators of
- significant events that occur within the server.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-smtp-alert-handler</ldap:name>
- <ldap:superior>ds-cfg-alert-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SMTPAlertHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="sender-address" mandatory="true">
- <adm:synopsis>
- Specifies the email address to use as the sender for messages
- generated by this alert handler.
- </adm:synopsis>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-sender-address</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="recipient-address" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies an email address to which the messages should be sent.
- </adm:synopsis>
- <adm:description>
- Multiple values may be provided if there should be more than one
- recipient.
- </adm:description>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-recipient-address</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="message-subject" mandatory="true">
- <adm:synopsis>
- Specifies the subject that should be used for email messages
- generated by this alert handler.
- </adm:synopsis>
- <adm:description>
- The token "%%%%alert-type%%%%" is dynamically replaced with
- the alert type string. The token "%%%%alert-id%%%%" is
- dynamically replaced with the alert ID value. The token
- "%%%%alert-message%%%%" is dynamically replaced with the
- alert message. The token "\\n" is replaced with an
- end-of-line marker.
- </adm:description>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-message-subject</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="message-body" mandatory="true">
- <adm:synopsis>
- Specifies the body that should be used for email messages
- generated by this alert handler.
- </adm:synopsis>
- <adm:description>
- The token "%%%%alert-type%%%%" is dynamically replaced with
- the alert type string. The token "%%%%alert-id%%%%" is
- dynamically replaced with the alert ID value. The token
- "%%%%alert-message%%%%" is dynamically replaced with the
- alert message. The token "\\n" is replaced with an
- end-of-line marker.
- </adm:description>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-message-body</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SNMPConnectionHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SNMPConnectionHandlerConfiguration.xml
deleted file mode 100644
index cec77ab..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SNMPConnectionHandlerConfiguration.xml
+++ /dev/null
@@ -1,347 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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 2008-2009 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
-! -->
-<adm:managed-object name="snmp-connection-handler"
- plural-name="snmp-connection-handlers"
- package="org.forgerock.opendj.admin"
- extends="connection-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap" >
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- can be used to process SNMP requests to retrieve monitoring information
- described by the MIB 2605. Supported protocol are SNMP V1, V2c and V3.
- </adm:synopsis>
- <adm:description>
- The SNMP connection handler will process SNMP requests sent by SNMP
- Managers to retrieve information described the MIB 2605. To enable
- the SNMP Connection Handler, the ds-cfg-opendmk-jarfile parameter
- has to be set to the OpenDMK jar files location.
- </adm:description>
-
- <!-- Connection Handler ldap profile -->
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-snmp-connection-handler</ldap:name>
- <ldap:superior>ds-cfg-connection-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <!-- Class to instanciate -->
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.snmp.SNMPConnectionHandler
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <!-- SNMP Port -->
- <adm:property-reference name="listen-port" />
- <adm:property name="listen-address" multi-valued="true" read-only="true">
- <adm:synopsis>
- Specifies the address or set of addresses on which this
- <adm:user-friendly-name />
- should listen for connections from SNMP clients.
- </adm:synopsis>
- <adm:description>
- Multiple addresses may be provided as separate values for this
- attribute. If no values are provided, then the
- <adm:user-friendly-name />
- listens on all interfaces.
- </adm:description>
- <adm:requires-admin-action>
- <adm:server-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>0.0.0.0</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:ip-address />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-listen-address</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="trap-port" mandatory="true">
- <adm:synopsis>
- Specifies the port to use to send SNMP Traps.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:integer />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-trap-port</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <!-- SNMP Version -->
- <!-- SNMP Community or Context Name -->
- <adm:property name="community">
- <adm:synopsis>
- Specifies the v1,v2 community or the v3 context name allowed to
- access the MIB 2605 monitoring information or the USM MIB. The
- mapping between "community" and "context name" is set.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>OpenDJ</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-community</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <!-- SNMP V1/V2 Allowed managers -->
- <adm:property name="allowed-manager" multi-valued="true">
- <adm:synopsis>
- Specifies the hosts of the managers to be granted the access rights.
- This property is required for SNMP v1 and v2 security configuration.
- An asterisk (*) opens access to all managers.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>*</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allowed-manager</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <!-- SNMP V3 Allowed users -->
- <adm:property name="allowed-user" multi-valued="true">
- <adm:synopsis>
- Specifies the users to be granted the access rights. This property
- is required for SNMP v3 security configuration.
- An asterisk (*) opens access to all users.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>*</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-allowed-user</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <!-- SNMP V3 Security level -->
- <adm:property name="security-level">
- <adm:synopsis>
- Specifies the type of security level : NoAuthNoPriv : No security
- mechanisms activated, AuthNoPriv : Authentication activated with no
- privacy, AuthPriv : Authentication with privacy activated.
- This property is required for SNMP V3 security configuration.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>authnopriv</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="noauthnopriv">
- <adm:synopsis>
- No security mechanisms activated.
- </adm:synopsis>
- </adm:value>
- <adm:value name="authnopriv">
- <adm:synopsis>
- Authentication activated with no privacy.
- </adm:synopsis>
- </adm:value>
- <adm:value name="authpriv">
- <adm:synopsis>
- Authentication with privacy activated.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-security-level</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <!-- Trap Community -->
- <adm:property name="traps-community" >
- <adm:synopsis>
- Specifies the community string that must be included in the traps
- sent to define managers (trap-destinations).
- This property is used in the context of SNMP v1, v2 and v3.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>OpenDJ</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-traps-community</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <!-- Traps destinations -->
- <adm:property name="traps-destination" multi-valued="true">
- <adm:synopsis>
- Specifies the hosts to which V1 traps will be sent. V1 Traps are
- sent to every host listed.
- </adm:synopsis>
- <adm:description>
- If this list is empty, V1 traps are sent to "localhost".
- Each host in the list must be identifed by its name or complete IP Addess.
- </adm:description>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- If the list is empty, V1 traps are sent to "localhost".
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-traps-destination</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <!-- Agent Engine Security USM Configuration -->
- <adm:property name="security-agent-file">
- <adm:synopsis>
- Specifies the USM security configuration to receive authenticated
- only SNMP requests.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- config/snmp/security/opendj-snmp.security
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-security-agent-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <!-- SNMP Registration or not -->
- <adm:property name="registered-mbean">
- <adm:synopsis>
- Indicates whether the SNMP objects have to be registered in the
- directory server MBeanServer or not allowing to access SNMP Objects
- with RMI connector if enabled.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-registered-mbean</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-
- <adm:property name="opendmk-jarfile">
- <adm:synopsis>
- Indicates the OpenDMK runtime jar file location
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-opendmk-jarfile</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
\ No newline at end of file
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedMD5PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedMD5PasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index bcfa8b9..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedMD5PasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="salted-md5-password-storage-scheme"
- plural-name="salted-md5-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords using a salted form
- of the MD5 message digest algorithm.
- </adm:synopsis>
- <adm:description>
- This scheme contains an implementation for the user password syntax,
- with a storage scheme name of "SMD5", and an implementation of the
- auth password syntax, with a storage scheme name of "MD5". Although the
- MD5 digest algorithm is relatively secure, recent cryptanalysis work has
- identified mechanisms for generating MD5 collisions. This does not
- impact the security of this algorithm as it is used in <adm:product-name />,
- but it is recommended that the MD5 password storage scheme only be used if
- client applications require it for compatibility purposes, and that a
- stronger digest like SSHA or SSHA256 be used for environments in which
- MD5 support is not required.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-salted-md5-password-storage-scheme</ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SaltedMD5PasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedSHA1PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedSHA1PasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index 6c24459..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedSHA1PasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="salted-sha1-password-storage-scheme"
- plural-name="salted-sha1-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords using a salted form
- of the SHA-1 message digest algorithm.
- </adm:synopsis>
- <adm:description>
- This scheme contains an implementation for the user password syntax,
- with a storage scheme name of "SSHA", and an implementation of the
- auth password syntax, with a storage scheme name of "SHA1".
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-salted-sha1-password-storage-scheme</ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SaltedSHA1PasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedSHA256PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedSHA256PasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index 2b5276a..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedSHA256PasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="salted-sha256-password-storage-scheme"
- plural-name="salted-sha256-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords using a salted form
- of the 256-bit SHA-2 message digest algorithm.
- </adm:synopsis>
- <adm:description>
- This scheme contains an implementation for the user password syntax,
- with a storage scheme name of "SSHA256", and an implementation of
- the auth password syntax, with a storage scheme name of "SHA256".
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-salted-sha256-password-storage-scheme
- </ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SaltedSHA256PasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedSHA384PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedSHA384PasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index 53999f9..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedSHA384PasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="salted-sha384-password-storage-scheme"
- plural-name="salted-sha384-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords using a salted form
- of the 384-bit SHA-2 message digest algorithm.
- </adm:synopsis>
- <adm:description>
- This scheme contains an implementation for the user password syntax,
- with a storage scheme name of "SSHA384", and an implementation of
- the auth password syntax, with a storage scheme name of "SHA384".
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-salted-sha384-password-storage-scheme
- </ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SaltedSHA384PasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedSHA512PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedSHA512PasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index 893e632..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SaltedSHA512PasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="salted-sha512-password-storage-scheme"
- plural-name="salted-sha512-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords using a salted form
- of the 512-bit SHA-2 message digest algorithm.
- </adm:synopsis>
- <adm:description>
- This scheme contains an implementation for the user password syntax,
- with a storage scheme name of "SSHA512", and an implementation of
- the auth password syntax, with a storage scheme name of "SHA512".
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-salted-sha512-password-storage-scheme
- </ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SaltedSHA512PasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SambaPasswordPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SambaPasswordPluginConfiguration.xml
deleted file mode 100644
index 06c1a02..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SambaPasswordPluginConfiguration.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2011 profiq s.r.o.
- ! Portions copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="samba-password-plugin"
- plural-name="samba-password-plugins"
- package="org.forgerock.opendj.admin" extends="plugin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>Samba Password Synchronization Plugin.</adm:synopsis>
- <adm:description>
- This plugin captures clear-text password changes for a user and generates
- LanMan or NTLM hashes for the respective Samba attributes (sambaLMPassword
- and sambaNTPassword).
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-samba-password-plugin</ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.plugins.SambaPasswordPlugin</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="plugin-type" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>preoperationmodify</adm:value>
- <adm:value>postoperationextended</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="pwd-sync-policy" mandatory="true" multi-valued="true">
- <adm:synopsis>
- Specifies which Samba passwords should be kept synchronized.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>sync-nt-password</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="sync-nt-password">
- <adm:synopsis>
- Synchronize the NT password attribute "sambaNTPassword"
- </adm:synopsis>
- </adm:value>
- <adm:value name="sync-lm-password">
- <adm:synopsis>
- Synchronize the LanMan password attribute "sambaLMPassword"
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>
- ds-cfg-pwd-sync-policy
- </ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="samba-administrator-dn" mandatory="false">
- <adm:synopsis>
- Specifies the distinguished name of the user which Samba uses to
- perform Password Modify extended operations against this directory
- server in order to synchronize the userPassword attribute after the
- LanMan or NT passwords have been updated.
- </adm:synopsis>
- <adm:description>
- The user must have the 'password-reset' privilege and should not be
- a root user. This user name can be used in order to identify Samba
- connections and avoid double re-synchronization of the same password.
- If this property is left undefined, then no password updates will be
- skipped.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>Synchronize all updates to user passwords</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-samba-administrator-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SchemaBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SchemaBackendConfiguration.xml
deleted file mode 100644
index b8cfae3..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SchemaBackendConfiguration.xml
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="schema-backend" plural-name="schema-backends"
- package="org.forgerock.opendj.admin" extends="backend"
- advanced="true" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides access to the directory server schema information,
- including the attribute types, object classes, attribute syntaxes,
- matching rules, matching rule uses, DIT content rules, and DIT
- structure rules that it contains.
- </adm:synopsis>
- <adm:description>
- The server allows "modify" operations in this backend to alter the
- server schema definitions. The configuration entry for this backend
- is based on the ds-cfg-schema-backend structural object class. Note
- that any attribute types included in this entry that are not
- included in this object class (or the parent ds-cfg-backend class)
- appears directly in the schema entry.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-schema-backend</ldap:name>
- <ldap:superior>ds-cfg-backend</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.backends.SchemaBackend</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="writability-mode">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>enabled</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="schema-entry-dn" advanced="true"
- multi-valued="true">
- <adm:synopsis>
- Defines the base DNs of the subtrees in which the schema
- information is published in addition to the value included
- in the base-dn property.
- </adm:synopsis>
- <adm:description>
- The value provided in the base-dn property is the only one that
- appears in the subschemaSubentry operational attribute of the
- server's root DSE (which is necessary because that is a
- single-valued attribute) and as a virtual attribute in other
- entries. The schema-entry-dn attribute may be used to make the
- schema information available in other locations to accommodate
- certain client applications that have been hard-coded to expect the
- schema to reside in a specific location.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>cn=schema</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-schema-entry-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="show-all-attributes" mandatory="true">
- <adm:synopsis>
- Indicates whether to treat all attributes in the schema entry as
- if they were user attributes regardless of their configuration.
- </adm:synopsis>
- <adm:description>
- This may provide compatibility with some applications that expect
- schema attributes like attributeTypes and objectClasses to be
- included by default even if they are not requested. Note that the
- ldapSyntaxes attribute is always treated as operational in
- order to avoid problems with attempts to modify the schema over
- protocol.
- </adm:description>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-show-all-attributes</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SevenBitCleanPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SevenBitCleanPluginConfiguration.xml
deleted file mode 100644
index 407a665..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SevenBitCleanPluginConfiguration.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="seven-bit-clean-plugin"
- plural-name="seven-bit-clean-plugins"
- package="org.forgerock.opendj.admin" extends="plugin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- ensures that values for a specified set of attributes
- are 7-bit clean.
- </adm:synopsis>
- <adm:description>
- That is, for those attributes, the values are not allowed to contain
- any bytes having the high-order bit set, which is used to indicate
- the presence of non-ASCII characters. Some applications do not
- properly handle attribute values that contain non-ASCII characters,
- and this plug-in can help ensure that attributes used by those
- applications do not contain characters that can cause problems in
- those applications.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-seven-bit-clean-plugin</ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.plugins.SevenBitCleanPlugin
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="plugin-type" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>ldifimport</adm:value>
- <adm:value>preparseadd</adm:value>
- <adm:value>preparsemodify</adm:value>
- <adm:value>preparsemodifydn</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="attribute-type" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies the name or OID of an attribute type for which values
- should be checked to ensure that they are 7-bit clean.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>uid</adm:value>
- <adm:value>mail</adm:value>
- <adm:value>userPassword</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-attribute-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="base-dn" multi-valued="true">
- <adm:synopsis>
- Specifies the base DN below which the checking is performed.
- </adm:synopsis>
- <adm:description>
- Any attempt to update a value for one of the configured attributes
- below this base DN must be 7-bit clean for the operation to be
- allowed.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- All entries below all public naming contexts will be checked.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SimilarityBasedPasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SimilarityBasedPasswordValidatorConfiguration.xml
deleted file mode 100644
index 63d1dff..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SimilarityBasedPasswordValidatorConfiguration.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="similarity-based-password-validator"
- plural-name="similarity-based-password-validators"
- package="org.forgerock.opendj.admin" extends="password-validator"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- determines whether a proposed password is acceptable by measuring
- how similar it is to the user's current password.
- </adm:synopsis>
- <adm:description>
- In particular,
- it uses the Levenshtein Distance algorithm to determine the
- minimum number of changes (where a change may be inserting,
- deleting, or replacing a character) to transform one string into
- the other. It can be used to prevent users from making only minor
- changes to their current password when setting a new password.
- Note that for this password validator to be effective, it is
- necessary to have access to the user's current password.
- Therefore, if this password validator is to be enabled, the
- password-change-requires-current-password attribute in the
- password policy configuration must also be set to true.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-similarity-based-password-validator</ldap:name>
- <ldap:superior>ds-cfg-password-validator</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SimilarityBasedPasswordValidator
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="min-password-difference" mandatory="true">
- <adm:synopsis>
- Specifies the minimum difference of new and old password.
- </adm:synopsis>
- <adm:description>
- A value of zero indicates that no difference between passwords is
- acceptable.
- </adm:description>
- <adm:syntax>
- <adm:integer lower-limit="0" upper-limit="2147483647"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-min-password-difference</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SizeLimitLogRetentionPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SizeLimitLogRetentionPolicyConfiguration.xml
deleted file mode 100644
index 17bb213..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SizeLimitLogRetentionPolicyConfiguration.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="size-limit-log-retention-policy"
- plural-name="size-limit-log-retention-policies"
- package="org.forgerock.opendj.admin" extends="log-retention-policy"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- Retention policy based on the amount of space taken by all the log
- files on disk.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-size-limit-log-retention-policy</ldap:name>
- <ldap:superior>ds-cfg-log-retention-policy</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.loggers.SizeBasedRetentionPolicy
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="disk-space-used" mandatory="true">
- <adm:synopsis>
- Specifies the maximum total disk space used by the log files.
- </adm:synopsis>
- <adm:syntax>
- <adm:size lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-disk-space-used</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SizeLimitLogRotationPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SizeLimitLogRotationPolicyConfiguration.xml
deleted file mode 100644
index 5cfe302..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SizeLimitLogRotationPolicyConfiguration.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="size-limit-log-rotation-policy"
- plural-name="size-limit-log-rotation-policies"
- package="org.forgerock.opendj.admin" extends="log-rotation-policy"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- Rotation policy based on the size of the log file.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-size-limit-log-rotation-policy</ldap:name>
- <ldap:superior>ds-cfg-log-rotation-policy</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.loggers.SizeBasedRotationPolicy
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="file-size-limit" mandatory="true">
- <adm:synopsis>
- Specifies the maximum size that a log file can reach before
- it is rotated.
- </adm:synopsis>
- <adm:syntax>
- <adm:size lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-file-size-limit</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SoftReferenceEntryCacheConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SoftReferenceEntryCacheConfiguration.xml
deleted file mode 100644
index f668682..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SoftReferenceEntryCacheConfiguration.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="soft-reference-entry-cache"
- plural-name="soft-reference-entry-caches"
- package="org.forgerock.opendj.admin" extends="entry-cache"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is a directory server entry cache implementation that uses soft
- references to manage objects to allow them to be
- freed if the JVM is running low on memory.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-soft-reference-entry-cache</ldap:name>
- <ldap:superior>ds-cfg-entry-cache</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SoftReferenceEntryCache
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="lock-timeout" advanced="true">
- <adm:synopsis>
- Specifies the length of time in milliseconds to wait while attempting to
- acquire a read or write lock.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>3000ms</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="0"
- allow-unlimited="true" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-lock-timeout</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property-reference name="include-filter" />
- <adm:property-reference name="exclude-filter" />
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/StackTraceMonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/StackTraceMonitorProviderConfiguration.xml
deleted file mode 100644
index 9169962..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/StackTraceMonitorProviderConfiguration.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="stack-trace-monitor-provider"
- plural-name="stack-trace-monitor-providers"
- package="org.forgerock.opendj.admin" extends="monitor-provider"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- enables clients to obtain a stack trace of all the threads that are
- currently running in the directory server.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-stack-trace-monitor-provider</ldap:name>
- <ldap:superior>ds-cfg-monitor-provider</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.monitors.StackTraceMonitorProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/StartTLSExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/StartTLSExtendedOperationHandlerConfiguration.xml
deleted file mode 100644
index bbc3380..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/StartTLSExtendedOperationHandlerConfiguration.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="start-tls-extended-operation-handler"
- plural-name="start-tls-extended-operation-handlers"
- package="org.forgerock.opendj.admin"
- extends="extended-operation-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides the ability clients to use the StartTLS extended operation
- to initiate a secure communication channel over an otherwise
- clear-text LDAP connection.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-start-tls-extended-operation-handler</ldap:name>
- <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.StartTLSExtendedOperation
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/StaticGroupImplementationConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/StaticGroupImplementationConfiguration.xml
deleted file mode 100644
index ec8f8f8..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/StaticGroupImplementationConfiguration.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="static-group-implementation"
- plural-name="static-group-implementations"
- package="org.forgerock.opendj.admin" extends="group-implementation"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a grouping mechanism in which the group membership is based
- on an explicit list of the DNs of the users that are members of the
- group.
- </adm:synopsis>
- <adm:description>
- Note that it is possible to nest static groups by including the DN of a
- nested group in the member list for the parent group.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-static-group-implementation</ldap:name>
- <ldap:superior>ds-cfg-group-implementation</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.server.extensions.StaticGroup</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/StructuralObjectClassVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/StructuralObjectClassVirtualAttributeConfiguration.xml
deleted file mode 100644
index 34c3e32..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/StructuralObjectClassVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2009 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="structural-object-class-virtual-attribute"
- plural-name="structural-object-class-virtual-attributes"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- generates a virtual attribute that specifies the structural object class
- with the schema definitions in effect for the
- entry. This attribute is defined in RFC 4512.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-structural-object-class-virtual-attribute</ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.StructuralObjectClassVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="conflict-behavior" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>virtual-overrides-real</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="attribute-type">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>structuralObjectClass</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SubjectAttributeToUserAttributeCertificateMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SubjectAttributeToUserAttributeCertificateMapperConfiguration.xml
deleted file mode 100644
index 7652a54..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SubjectAttributeToUserAttributeCertificateMapperConfiguration.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object
- name="subject-attribute-to-user-attribute-certificate-mapper"
- plural-name="subject-attribute-to-user-attribute-certificate-mappers"
- package="org.forgerock.opendj.admin" extends="certificate-mapper"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- maps client certificates to user entries by mapping the values of
- attributes contained in the certificate subject to attributes
- contained in user entries.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-subject-attribute-to-user-attribute-certificate-mapper
- </ldap:name>
- <ldap:superior>ds-cfg-certificate-mapper</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SubjectAttributeToUserAttributeCertificateMapper
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="subject-attribute-mapping" mandatory="true"
- multi-valued="true">
- <adm:synopsis>
- Specifies a mapping between certificate attributes and user
- attributes.
- </adm:synopsis>
- <adm:description>
- Each value should be in the form "certattr:userattr" where
- certattr is the name of the attribute in the certificate subject
- and userattr is the name of the corresponding attribute in user
- entries. There may be multiple mappings defined, and when
- performing the mapping values for all attributes present in the
- certificate subject that have mappings defined must be present in
- the corresponding user entries.
- </adm:description>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-subject-attribute-mapping</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="user-base-dn" multi-valued="true">
- <adm:synopsis>
- Specifies the base DNs that should be used when performing
- searches to map the client certificate to a user entry.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The server will perform the search in all public naming
- contexts.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-user-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SubjectDNToUserAttributeCertificateMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SubjectDNToUserAttributeCertificateMapperConfiguration.xml
deleted file mode 100644
index 73667a5..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SubjectDNToUserAttributeCertificateMapperConfiguration.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object
- name="subject-dn-to-user-attribute-certificate-mapper"
- plural-name="subject-dn-to-user-attribute-certificate-mappers"
- package="org.forgerock.opendj.admin" extends="certificate-mapper"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- maps client certificates to user entries by looking for the
- certificate subject DN in a specified attribute of user entries.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>
- ds-cfg-subject-dn-to-user-attribute-certificate-mapper
- </ldap:name>
- <ldap:superior>ds-cfg-certificate-mapper</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SubjectDNToUserAttributeCertificateMapper
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="subject-attribute" mandatory="true">
- <adm:synopsis>
- Specifies the name or OID of the attribute whose value should
- exactly match the certificate subject DN.
- </adm:synopsis>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-subject-attribute</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="user-base-dn" multi-valued="true">
- <adm:synopsis>
- Specifies the base DNs that should be used when performing
- searches to map the client certificate to a user entry.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The server will perform the search in all public naming
- contexts.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-user-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SubjectEqualsDNCertificateMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SubjectEqualsDNCertificateMapperConfiguration.xml
deleted file mode 100644
index cbdfa12..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SubjectEqualsDNCertificateMapperConfiguration.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="subject-equals-dn-certificate-mapper"
- plural-name="subject-equals-dn-certificate-mappers"
- package="org.forgerock.opendj.admin" extends="certificate-mapper"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- maps client certificates to user entries based on the assumption
- that the certificate subject is the same as the DN of the target
- user entry.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-subject-equals-dn-certificate-mapper</ldap:name>
- <ldap:superior>ds-cfg-certificate-mapper</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SubjectEqualsDNCertificateMapper
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SubschemaSubentryVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SubschemaSubentryVirtualAttributeConfiguration.xml
deleted file mode 100644
index 6b54544..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SubschemaSubentryVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="subschema-subentry-virtual-attribute"
- plural-name="subschema-subentry-virtual-attributes"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- generates a virtual attribute that specifies the location of the
- subschemaSubentry with the schema definitions in effect for the
- entry. This attribute is defined in RFC 4512.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-subschema-subentry-virtual-attribute</ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.SubschemaSubentryVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="conflict-behavior" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>virtual-overrides-real</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="attribute-type">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>subschemaSubentry</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SynchronizationProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SynchronizationProviderConfiguration.xml
deleted file mode 100644
index a00018a..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SynchronizationProviderConfiguration.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="synchronization-provider"
- plural-name="synchronization-providers"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for handling synchronization of the directory server
- data with other <adm:product-name /> instances or other data repositories.
- </adm:synopsis>
- <adm:description>
- The <adm:product-name /> directory server takes a centralized approach to
- replication, rather than the point-to-point approach taken by Sun
- Java System Directory Server. In <adm:product-name />, one or more replication
- servers are created in the environment. The replication servers
- typically do not store user data but keep a log of all changes made
- within the topology. Each directory server instance in the topology
- is pointed at the replication servers. This plan simplifies the
- deployment and management of the environment. Although you can run
- the replication server on the same system (or even in the same
- instance) as the directory server, the two servers can be separated
- onto different systems. This approach can provide better performance
- or functionality in large environments.
- </adm:description>
- <adm:tag name="replication" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-synchronization-provider</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled for use.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.SynchronizationProvider
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SystemInfoMonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SystemInfoMonitorProviderConfiguration.xml
deleted file mode 100644
index c8f03ce..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/SystemInfoMonitorProviderConfiguration.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="system-info-monitor-provider"
- plural-name="system-info-monitor-providers"
- package="org.forgerock.opendj.admin" extends="monitor-provider"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- can be used to publish information about the system and virtual
- machine on which the directory server is running.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-system-info-monitor-provider</ldap:name>
- <ldap:superior>ds-cfg-monitor-provider</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.monitors.SystemInfoMonitorProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TaskBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TaskBackendConfiguration.xml
deleted file mode 100644
index 3bf6fe9..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TaskBackendConfiguration.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="task-backend" plural-name="task-backends"
- package="org.forgerock.opendj.admin" extends="backend"
- advanced="true" xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The Task Backend provides a mechanism for scheduling tasks in the
- <adm:product-name /> directory server. Tasks are intended to provide access to
- certain types of administrative functions in the server that may not
- be convenient to perform remotely.
- </adm:synopsis>
- <adm:description>
- <adm:product-name /> supports tasks to backup and restore backends, to import and export LDIF
- files, and to stop and restart the server. The details of a task are
- in an entry that is below the root of the Task Backend. The Task Backend
- is responsible for decoding that task entry and ensuring that it is processed
- as requested. Tasks may be invoked immediately, but they may also be scheduled for execution at
- some future time. The task backend can also process recurring tasks to
- ensure that maintenance operations (for example, backups) are
- performed automatically on a regular basis.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-task-backend</ldap:name>
- <ldap:superior>ds-cfg-backend</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.backends.task.TaskBackend
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="writability-mode">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>enabled</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="task-backing-file" mandatory="true">
- <adm:synopsis>
- Specifies the path to the backing file for storing
- information about the tasks configured in the server.
- </adm:synopsis>
- <adm:description>
- It may be either an absolute path or a relative path to
- the base of the <adm:product-name /> directory server instance.
- </adm:description>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-task-backing-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="task-retention-time">
- <adm:synopsis>
- Specifies the length of time that task entries should be
- retained after processing on the associated task has been
- completed.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>24 hours</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:duration />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-task-retention-time</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="notification-sender-address">
- <adm:synopsis>
- Specifies the email address to use as the sender (that is,
- the "From:" address) address for notification mail messages generated
- when a task completes execution.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The default sender address used is
- "opendj-task-notification@" followed by the canonical address
- of the system on which the server is running.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-notification-sender-address</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TelephoneNumberAttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TelephoneNumberAttributeSyntaxConfiguration.xml
deleted file mode 100644
index ef10a9c..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TelephoneNumberAttributeSyntaxConfiguration.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="telephone-number-attribute-syntax"
- plural-name="telephone-number-attribute-syntaxes"
- extends="attribute-syntax" package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- define an attribute syntax for storing telephone number information.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-telephone-number-attribute-syntax</ldap:name>
- <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.schema.TelephoneNumberSyntax
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="strict-format" advanced="true">
- <adm:synopsis>
- Indicates whether to require telephone number values to strictly
- comply with the standard definition for this syntax.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>false</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-strict-format</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TimeLimitLogRotationPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TimeLimitLogRotationPolicyConfiguration.xml
deleted file mode 100644
index 9b7f4ed..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TimeLimitLogRotationPolicyConfiguration.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="time-limit-log-rotation-policy"
- plural-name="time-limit-log-rotation-policies"
- package="org.forgerock.opendj.admin" extends="log-rotation-policy"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- Rotation policy based on the time since last rotation.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-time-limit-log-rotation-policy</ldap:name>
- <ldap:superior>ds-cfg-log-rotation-policy</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.loggers.TimeLimitRotationPolicy
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="rotation-interval" mandatory="true">
- <adm:synopsis>
- Specifies the time interval between rotations.
- </adm:synopsis>
- <adm:syntax>
- <adm:duration base-unit="ms" lower-limit="1" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-rotation-interval</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TraditionalWorkQueueConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TraditionalWorkQueueConfiguration.xml
deleted file mode 100644
index 668247c..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TraditionalWorkQueueConfiguration.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="traditional-work-queue"
- plural-name="traditional-work-queues" extends="work-queue"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is a type of work queue that uses a number of worker threads that
- watch a queue and pick up an operation to process whenever one
- becomes available.
- </adm:synopsis>
- <adm:description>
- The traditional work queue is a FIFO queue serviced by a fixed
- number of worker threads. This fixed number of threads can be
- changed on the fly, with the change taking effect as soon as
- it is made. You can limit the size of the work queue to a specified
- number of operations. When this many operations are in the
- queue, waiting to be picked up by threads, any new requests are
- rejected with an error message.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-traditional-work-queue</ldap:name>
- <ldap:superior>ds-cfg-work-queue</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.TraditionalWorkQueue
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="num-worker-threads">
- <adm:synopsis>
- Specifies the number of worker threads to be used for processing
- operations placed in the queue.
- </adm:synopsis>
- <adm:description>
- If the value is increased,
- the additional worker threads are created immediately. If the
- value is reduced, the appropriate number of threads are destroyed
- as operations complete processing.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Let the server decide.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="2147483647" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-num-worker-threads</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="max-work-queue-capacity">
- <adm:synopsis>
- Specifies the maximum number of queued operations that can be in the work
- queue at any given time.
- </adm:synopsis>
- <adm:description>
- If the work queue is already full and additional requests are
- received by the server, then the server front end, and possibly the
- client, will be blocked until the work queue has available capacity.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>1000</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:integer lower-limit="1" upper-limit="2147483647"/>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-max-work-queue-capacity</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TripleDESPasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TripleDESPasswordStorageSchemeConfiguration.xml
deleted file mode 100644
index 1ce221f..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TripleDESPasswordStorageSchemeConfiguration.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="triple-des-password-storage-scheme"
- plural-name="triple-des-password-storage-schemes"
- package="org.forgerock.opendj.admin"
- extends="password-storage-scheme"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a mechanism for encoding user passwords using the
- triple-DES (DES/EDE) reversible encryption mechanism.
- </adm:synopsis>
- <adm:description>
- This scheme contains only an implementation for the user password
- syntax, with a storage scheme name of "3DES".
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-triple-des-password-storage-scheme</ldap:name>
- <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.TripleDESPasswordStorageScheme
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TrustManagerProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TrustManagerProviderConfiguration.xml
deleted file mode 100644
index b1d4123..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TrustManagerProviderConfiguration.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="trust-manager-provider"
- plural-name="trust-manager-providers"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- determine whether to trust presented
- certificates.
- </adm:synopsis>
- <adm:tag name="security" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-trust-manager-provider</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicate whether the
- <adm:user-friendly-name />
- is enabled for use.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- The fully-qualified name of the Java class that provides
- the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.TrustManagerProvider
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TrustStoreBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TrustStoreBackendConfiguration.xml
deleted file mode 100644
index c48d388..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/TrustStoreBackendConfiguration.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="trust-store-backend"
- plural-name="trust-store-backends" extends="backend"
- package="org.forgerock.opendj.admin" advanced="true"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides an LDAP view of a file-based trust store. It is used by the
- administrative cryptographic framework.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-trust-store-backend</ldap:name>
- <ldap:superior>ds-cfg-backend</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.backends.TrustStoreBackend
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="writability-mode">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>enabled</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="trust-store-file" mandatory="true">
- <adm:TODO>Should use a file-based property definition?</adm:TODO>
- <adm:synopsis>
- Specifies the path to the file that stores the trust information.
- </adm:synopsis>
- <adm:description>
- It may be an absolute path, or a path that is relative to the
- <adm:product-name />
- instance root.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>config/ads-truststore</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-trust-store-file</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="trust-store-type">
- <adm:TODO>
- Can we restrict this to an enumeration? How can the client guess
- which values are possible? What is the default value?
- </adm:TODO>
- <adm:synopsis>
- Specifies the format for the data in the key store file.
- </adm:synopsis>
- <adm:description>
- Valid values should always include 'JKS' and 'PKCS12', but
- different implementations may allow other values as well.
- </adm:description>
- <adm:requires-admin-action>
- <adm:none>
- <adm:synopsis>
- Changes to this property take effect the next time that
- the key manager is accessed.
- </adm:synopsis>
- </adm:none>
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>The JVM default value is used.</adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-trust-store-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property-reference name="trust-store-pin" />
- <adm:property-reference name="trust-store-pin-property" />
- <adm:property-reference name="trust-store-pin-environment-variable" />
- <adm:property-reference name="trust-store-pin-file" />
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/UniqueAttributePluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/UniqueAttributePluginConfiguration.xml
deleted file mode 100644
index de95f5e..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/UniqueAttributePluginConfiguration.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="unique-attribute-plugin"
- plural-name="unique-attribute-plugins"
- package="org.forgerock.opendj.admin" extends="plugin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- enforces constraints on the value of an attribute within a
- portion of the directory.
- </adm:synopsis>
- <adm:description>
- The values for each attribute must be unique within each base DN
- specified in the plugin's base-dn property or within all of the
- server's public naming contexts if no base DNs were specified.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-unique-attribute-plugin</ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.plugins.UniqueAttributePlugin
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property-override name="plugin-type" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>preoperationadd</adm:value>
- <adm:value>preoperationmodify</adm:value>
- <adm:value>preoperationmodifydn</adm:value>
- <adm:value>postoperationadd</adm:value>
- <adm:value>postoperationmodify</adm:value>
- <adm:value>postoperationmodifydn</adm:value>
- <adm:value>postsynchronizationadd</adm:value>
- <adm:value>postsynchronizationmodify</adm:value>
- <adm:value>postsynchronizationmodifydn</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="type" mandatory="true" multi-valued="true">
- <adm:synopsis>
- Specifies the type of attributes to check for value uniqueness.
- </adm:synopsis>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="base-dn" multi-valued="true">
- <adm:synopsis>
- Specifies a base DN within which the attribute must be unique.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The plug-in uses the server's public naming contexts in the
- searches.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/UniqueCharactersPasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/UniqueCharactersPasswordValidatorConfiguration.xml
deleted file mode 100644
index d85764d..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/UniqueCharactersPasswordValidatorConfiguration.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="unique-characters-password-validator"
- plural-name="unique-characters-password-validators"
- package="org.forgerock.opendj.admin" extends="password-validator"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is used to determine whether a proposed password is acceptable based
- on the number of unique characters that it contains.
- </adm:synopsis>
- <adm:description>
- This validator can be used to prevent simple passwords that contain only
- a few characters like "aabbcc" or "abcabc".
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-unique-characters-password-validator</ldap:name>
- <ldap:superior>ds-cfg-password-validator</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.UniqueCharactersPasswordValidator
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="min-unique-characters" mandatory="true">
- <adm:synopsis>
- Specifies the minimum number of unique characters that a password
- will be allowed to contain.
- </adm:synopsis>
- <adm:description>
- A value of zero indicates that no minimum value is
- enforced.
- </adm:description>
- <adm:syntax>
- <adm:integer lower-limit="0" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-min-unique-characters</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="case-sensitive-validation" mandatory="true">
- <adm:synopsis>
- Indicates whether this password validator should treat password
- characters in a case-sensitive manner.
- </adm:synopsis>
- <adm:description>
- A value of true indicates that the validator does not consider
- a capital letter to be the same as its lower-case counterpart.
- A value of false indicates that the validator ignores
- differences in capitalization when looking at the number of
- unique characters in the password.
- </adm:description>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-case-sensitive-validation</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/UserDefinedVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/UserDefinedVirtualAttributeConfiguration.xml
deleted file mode 100644
index dea3398..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/UserDefinedVirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="user-defined-virtual-attribute"
- plural-name="user-defined-virtual-attributes"
- package="org.forgerock.opendj.admin" extends="virtual-attribute"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- creates virtual attributes with user-defined values in
- entries that match the criteria defined in the plug-in's
- configuration.
- </adm:synopsis>
- <adm:description>
- The functionality of these attributes is similar to Class
- of Service (CoS) in the Sun Java System Directory Server.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-user-defined-virtual-attribute</ldap:name>
- <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.UserDefinedVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
- <adm:property name="value" mandatory="true" multi-valued="true">
- <adm:synopsis>
- Specifies the values to be included in the virtual
- attribute.
- </adm:synopsis>
- <adm:syntax>
- <adm:string />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-value</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/VersionMonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/VersionMonitorProviderConfiguration.xml
deleted file mode 100644
index e773d7a..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/VersionMonitorProviderConfiguration.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="version-monitor-provider"
- plural-name="version-monitor-providers"
- package="org.forgerock.opendj.admin" extends="monitor-provider"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- can be used to publish directory server version information.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-version-monitor-provider</ldap:name>
- <ldap:superior>ds-cfg-monitor-provider</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.monitors.VersionMonitorProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/VirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/VirtualAttributeConfiguration.xml
deleted file mode 100644
index 612983d..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/VirtualAttributeConfiguration.xml
+++ /dev/null
@@ -1,275 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="virtual-attribute"
- plural-name="virtual-attributes" package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- are responsible for dynamically generating attribute values that
- appear in entries but are not persistently stored in the backend.
- </adm:synopsis>
- <adm:description>
- Virtual attributes are associated with a virtual attribute
- provider, which contains the logic for generating the value.
- </adm:description>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-virtual-attribute</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the virtual attribute
- provider class that generates the attribute values.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.VirtualAttributeProvider
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled for use.
- </adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="attribute-type" mandatory="true">
- <adm:synopsis>
- Specifies the attribute type for the attribute whose values are to
- be dynamically assigned by the virtual attribute.
- </adm:synopsis>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-attribute-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="base-dn" multi-valued="true">
- <adm:synopsis>
- Specifies the base DNs for the branches containing entries that
- are eligible to use this virtual attribute.
- </adm:synopsis>
- <adm:description>
- If no values are given, then the server generates virtual attributes
- anywhere in the server.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- The location of the entry in the server is not taken into
- account when determining whether an entry is eligible to use
- this virtual attribute.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="scope">
- <adm:synopsis>
- Specifies the LDAP scope associated with base DNs for entries that are
- eligible to use this virtual attribute.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>whole-subtree</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="base-object">
- <adm:synopsis>Search the base object only.</adm:synopsis>
- </adm:value>
- <adm:value name="single-level">
- <adm:synopsis>
- Search the immediate children of the base object but do not
- include any of their descendants or the base object itself.
- </adm:synopsis>
- </adm:value>
- <adm:value name="subordinate-subtree">
- <adm:synopsis>
- Search the entire subtree below the base object but do not
- include the base object itself.
- </adm:synopsis>
- </adm:value>
- <adm:value name="whole-subtree">
- <adm:synopsis>
- Search the base object and the entire subtree below the base
- object.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-scope</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="group-dn" multi-valued="true">
- <adm:synopsis>
- Specifies the DNs of the groups whose members can be eligible to
- use this virtual attribute.
- </adm:synopsis>
- <adm:description>
- If no values are given, then group
- membership is not taken into account when generating the virtual
- attribute. If one or more group DNs are specified, then only
- members of those groups are allowed to have the virtual attribute.
- </adm:description>
- <adm:default-behavior>
- <adm:alias>
- <adm:synopsis>
- Group membership is not taken into account when
- determining whether an entry is eligible to use this virtual
- attribute.
- </adm:synopsis>
- </adm:alias>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-group-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="filter" multi-valued="true">
- <adm:synopsis>
- Specifies the search filters to be applied against entries to
- determine if the virtual attribute is to be generated for those
- entries.
- </adm:synopsis>
- <adm:description>
- If no values are given, then any entry is eligible to
- have the value generated. If one or more filters are specified,
- then only entries that match at least one of those filters are
- allowed to have the virtual attribute.
- </adm:description>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>(objectClass=*)</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:string>
- <adm:pattern>
- <adm:regex>.*</adm:regex>
- <adm:usage>STRING</adm:usage>
- <adm:synopsis>
- Any valid search filter string.
- </adm:synopsis>
- </adm:pattern>
- </adm:string>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-filter</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="conflict-behavior">
- <adm:synopsis>
- Specifies the behavior that the server is to exhibit for entries
- that already contain one or more real values for the associated
- attribute.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>real-overrides-virtual</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:enumeration>
- <adm:value name="real-overrides-virtual">
- <adm:synopsis>
- Indicates that any real values contained in the entry are
- preserved and used, and virtual values are not generated.
- </adm:synopsis>
- </adm:value>
- <adm:value name="virtual-overrides-real">
- <adm:synopsis>
- Indicates that the virtual attribute provider suppresses
- any real values contained in the entry
- and generates virtual values and uses them.
- </adm:synopsis>
- </adm:value>
- <adm:value name="merge-real-and-virtual">
- <adm:synopsis>
- Indicates that the virtual attribute provider
- is to preserve any real values contained in the entry
- and merge them with the set of generated virtual values
- so that both the real and virtual values are used.
- </adm:synopsis>
- </adm:value>
- </adm:enumeration>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-conflict-behavior</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/VirtualStaticGroupImplementationConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/VirtualStaticGroupImplementationConfiguration.xml
deleted file mode 100644
index 92f88e8..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/VirtualStaticGroupImplementationConfiguration.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="virtual-static-group-implementation"
- plural-name="virtual-static-group-implementations"
- package="org.forgerock.opendj.admin" extends="group-implementation"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides a grouping mechanism in which the membership for the
- virtual static group is based on the membership for another group
- defined within the server.
- </adm:synopsis>
- <adm:description>
- The primary benefit of virtual static groups is that they make it
- possible to present other types of groups (for example, dynamic groups) as
- if they were static groups for the benefit of applications that do
- not support alternate grouping mechanisms.
- </adm:description>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-virtual-static-group-implementation</ldap:name>
- <ldap:superior>ds-cfg-group-implementation</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.VirtualStaticGroup
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/WhoAmIExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/WhoAmIExtendedOperationHandlerConfiguration.xml
deleted file mode 100644
index 4d7287a..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/WhoAmIExtendedOperationHandlerConfiguration.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="who-am-i-extended-operation-handler"
- plural-name="who-am-i-extended-operation-handlers"
- package="org.forgerock.opendj.admin"
- extends="extended-operation-handler"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides the ability for clients to request their authorization
- identity using the "Who Am I?" extended operation as defined in RFC
- 4532.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-who-am-i-extended-operation-handler</ldap:name>
- <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class" advanced="true">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.WhoAmIExtendedOperation
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/WorkQueueConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/WorkQueueConfiguration.xml
deleted file mode 100644
index f10d4b0..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/WorkQueueConfiguration.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="work-queue" plural-name="work-queues"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap"
- xmlns:cli="http://www.opends.org/admin-cli">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- provides the configuration for the server work queue and
- is responsible for ensuring that requests received from clients are
- processed in a timely manner.
- </adm:synopsis>
- <adm:description>
- Only a single work queue can be defined in the server.
- Whenever a connection handler receives a client request, it should
- place the request in the work queue to be processed
- appropriately.
- </adm:description>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-work-queue</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:profile name="cli">
- <cli:managed-object custom="true" />
- </adm:profile>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:server-restart />
- </adm:requires-admin-action>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.WorkQueue
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/WorkflowConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/WorkflowConfiguration.xml
deleted file mode 100644
index ddda222..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/WorkflowConfiguration.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! Portions Copyright 2011 ForgeRock AS
- ! -->
-<adm:managed-object name="workflow" plural-name="workflows"
- package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- The
- <adm:user-friendly-name />
- is a list of processing steps (Work Flow Elements) that are applied
- to data as it is retrieved from the directory server.
- </adm:synopsis>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-workflow</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled for use in the server.
- </adm:synopsis>
- <adm:description>
- If a
- <adm:user-friendly-name />
- is not enabled, then its contents are not accessible when
- processing operations.
- </adm:description>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="workflow-element" mandatory="true">
- <adm:synopsis>
- Specifies the root Workflow Element in the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:syntax>
- <adm:aggregation relation-name="workflow-element"
- parent-path="/">
- <adm:constraint>
- <adm:synopsis>
- The referenced workflow element must be enabled.
- </adm:synopsis>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
- </adm:constraint>
- </adm:aggregation>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-workflow-element</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="base-dn" mandatory="true" read-only="true">
- <adm:synopsis>
- Specifies the base DN of the data targeted by the
- <adm:user-friendly-name />
- .
- </adm:synopsis>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/WorkflowElementConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/WorkflowElementConfiguration.xml
deleted file mode 100644
index 035f476..0000000
--- a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/admin/WorkflowElementConfiguration.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2007-2010 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="workflow-element"
- plural-name="workflow-elements" package="org.forgerock.opendj.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- <adm:user-friendly-plural-name />
- implement a single processing step in a Work Flow.
- </adm:synopsis>
- <adm:description>
- A
- <adm:user-friendly-name />
- can perform a task such as mapping DNs, renaming attributes,
- filtering attributes, joining data sources, proxying, or
- load-balancing. The simplest
- <adm:user-friendly-name />
- is the Local Backend Work Flow Element, which routes data
- to a Backend.
- </adm:description>
- <adm:tag name="core-server" />
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-workflow-element</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="enabled" mandatory="true">
- <adm:synopsis>
- Indicates whether the
- <adm:user-friendly-name />
- is enabled for use in the server.
- </adm:synopsis>
- <adm:description>
- If a
- <adm:user-friendly-name />
- is not enabled, then its contents are not accessible when
- processing operations.
- </adm:description>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="java-class" mandatory="true">
- <adm:synopsis>
- Specifies the fully-qualified name of the Java class that provides the
- <adm:user-friendly-name />
- implementation.
- </adm:synopsis>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.workflowelement.WorkflowElement
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AESPasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AESPasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..7aebe87
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AESPasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="aes-password-storage-scheme"
+ plural-name="aes-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords using the AES
+ reversible encryption mechanism.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains only an implementation for the user password
+ syntax, with a storage scheme name of "AES".
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-aes-password-storage-scheme</ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.AESPasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccessControlHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccessControlHandlerConfiguration.xml
new file mode 100644
index 0000000..d929581
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccessControlHandlerConfiguration.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="access-control-handler"
+ plural-name="access-control-handlers"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ manage the application-wide access control. The <adm:product-name /> access control
+ handler is defined through an extensible interface, so that alternate
+ implementations can be created. Only one access control handler may be
+ active in the server at any given time.
+ </adm:synopsis>
+ <adm:description>
+ Note that <adm:product-name /> also has a privilege subsystem, which may have an impact
+ on what clients may be allowed to do in the server. For example, any user
+ with the bypass-acl privilege is not subject to access control
+ checking regardless of whether the access control implementation is
+ enabled.
+ </adm:description>
+ <adm:tag name="security" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-access-control-handler</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled. If set to FALSE, then no access control is enforced, and any
+ client (including unauthenticated or anonymous clients) could be allowed to perform any
+ operation if not subject to other restrictions, such as those enforced by the privilege
+ subsystem.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.AccessControlHandler
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccessLogFilteringCriteriaConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccessLogFilteringCriteriaConfiguration.xml
new file mode 100644
index 0000000..f0d433b
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccessLogFilteringCriteriaConfiguration.xml
@@ -0,0 +1,475 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2011 ForgeRock AS.
+ ! -->
+<adm:managed-object name="access-log-filtering-criteria"
+ plural-name="access-log-filtering-criteria"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ A set of rules which together determine whether a log record should be
+ logged or not.
+ </adm:synopsis>
+ <adm:tag name="logging" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-access-log-filtering-criteria</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="log-record-type" multi-valued="true">
+ <adm:synopsis>
+ Filters log records based on their type.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="abandon">
+ <adm:synopsis>Abandon operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="add">
+ <adm:synopsis>Add operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="bind">
+ <adm:synopsis>Bind operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="compare">
+ <adm:synopsis>Compare operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="delete">
+ <adm:synopsis>Delete operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="extended">
+ <adm:synopsis>Extended operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="modify">
+ <adm:synopsis>Modify operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="rename">
+ <adm:synopsis>Rename operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="search">
+ <adm:synopsis>Search operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="unbind">
+ <adm:synopsis>Unbind operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="connect">
+ <adm:synopsis>Client connections</adm:synopsis>
+ </adm:value>
+ <adm:value name="disconnect">
+ <adm:synopsis>Client disconnections</adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-record-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="connection-client-address-equal-to" multi-valued="true">
+ <adm:synopsis>
+ Filters log records associated with connections which match at least one
+ of the specified client host names or address masks.
+ </adm:synopsis>
+ <adm:description>
+ Valid values include a host name, a fully qualified domain name, a
+ domain name, an IP address, or a subnetwork with subnetwork mask.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:ip-address-mask />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-connection-client-address-equal-to</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="connection-client-address-not-equal-to" multi-valued="true">
+ <adm:synopsis>
+ Filters log records associated with connections which do not match any
+ of the specified client host names or address masks.
+ </adm:synopsis>
+ <adm:description>
+ Valid values include a host name, a fully qualified domain name, a
+ domain name, an IP address, or a subnetwork with subnetwork mask.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:ip-address-mask />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-connection-client-address-not-equal-to</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="connection-protocol-equal-to" multi-valued="true">
+ <adm:synopsis>
+ Filters log records associated with connections which match any
+ of the specified protocols.
+ </adm:synopsis>
+ <adm:description>
+ Typical values include "ldap", "ldaps", or "jmx".
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>[a-zA-Z0-9]+</adm:regex>
+ <adm:usage>NAME</adm:usage>
+ <adm:synopsis>
+ The protocol name as reported in the access log.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-connection-protocol-equal-to</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="connection-port-equal-to" multi-valued="true">
+ <adm:synopsis>
+ Filters log records associated with connections to any of the specified
+ listener port numbers.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="65535" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-connection-port-equal-to</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="user-dn-equal-to" multi-valued="true">
+ <adm:synopsis>
+ Filters log records associated with users matching at least one of the
+ specified DN patterns.
+ </adm:synopsis>
+ <adm:description>
+ Valid DN filters are strings composed of zero or more wildcards. A double
+ wildcard ** replaces one or more RDN components (as in
+ uid=dmiller,**,dc=example,dc=com). A simple wildcard * replaces either a
+ whole RDN, or a whole type, or a value substring (as in
+ uid=bj*,ou=people,dc=example,dc=com).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-user-dn-equal-to</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="user-dn-not-equal-to" multi-valued="true">
+ <adm:synopsis>
+ Filters log records associated with users which do not match any of the
+ specified DN patterns.
+ </adm:synopsis>
+ <adm:description>
+ Valid DN filters are strings composed of zero or more wildcards. A double
+ wildcard ** replaces one or more RDN components (as in
+ uid=dmiller,**,dc=example,dc=com). A simple wildcard * replaces either a
+ whole RDN, or a whole type, or a value substring (as in
+ uid=bj*,ou=people,dc=example,dc=com).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-user-dn-not-equal-to</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="user-is-member-of" multi-valued="true">
+ <adm:synopsis>
+ Filters log records associated with users which are members of at least
+ one of the specified groups.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-user-is-member-of</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="user-is-not-member-of" multi-valued="true">
+ <adm:synopsis>
+ Filters log records associated with users which are not members of any
+ of the specified groups.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-user-is-not-member-of</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="request-target-dn-equal-to" multi-valued="true">
+ <adm:synopsis>
+ Filters operation log records associated with operations which target
+ entries matching at least one of the specified DN patterns.
+ </adm:synopsis>
+ <adm:description>
+ Valid DN filters are strings composed of zero or more wildcards. A double
+ wildcard ** replaces one or more RDN components (as in
+ uid=dmiller,**,dc=example,dc=com). A simple wildcard * replaces either a
+ whole RDN, or a whole type, or a value substring (as in
+ uid=bj*,ou=people,dc=example,dc=com).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-request-target-dn-equal-to</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="request-target-dn-not-equal-to" multi-valued="true">
+ <adm:synopsis>
+ Filters operation log records associated with operations which target
+ entries matching none of the specified DN patterns.
+ </adm:synopsis>
+ <adm:description>
+ Valid DN filters are strings composed of zero or more wildcards. A double
+ wildcard ** replaces one or more RDN components (as in
+ uid=dmiller,**,dc=example,dc=com). A simple wildcard * replaces either a
+ whole RDN, or a whole type, or a value substring (as in
+ uid=bj*,ou=people,dc=example,dc=com).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-request-target-dn-not-equal-to</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="response-result-code-equal-to" multi-valued="true">
+ <adm:synopsis>
+ Filters operation response log records associated with operations which
+ include any of the specified result codes.
+ </adm:synopsis>
+ <adm:description>
+ It is recommended to only use this criteria in conjunction with the
+ "combined" output mode of the access logger, since this filter criteria
+ is only applied to response log messages.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-response-result-code-equal-to</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="response-result-code-not-equal-to" multi-valued="true">
+ <adm:synopsis>
+ Filters operation response log records associated with operations which
+ do not include any of the specified result codes.
+ </adm:synopsis>
+ <adm:description>
+ It is recommended to only use this criteria in conjunction with the
+ "combined" output mode of the access logger, since this filter criteria
+ is only applied to response log messages.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-response-result-code-not-equal-to</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="response-etime-greater-than">
+ <adm:synopsis>
+ Filters operation response log records associated with operations which
+ took longer than the specified number of milli-seconds to complete.
+ </adm:synopsis>
+ <adm:description>
+ It is recommended to only use this criteria in conjunction with the
+ "combined" output mode of the access logger, since this filter criteria
+ is only applied to response log messages.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer>
+ <adm:unit-synopsis>milli-seconds</adm:unit-synopsis>
+ </adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-response-etime-greater-than</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="response-etime-less-than">
+ <adm:synopsis>
+ Filters operation response log records associated with operations which
+ took less than the specified number of milli-seconds to complete.
+ </adm:synopsis>
+ <adm:description>
+ It is recommended to only use this criteria in conjunction with the
+ "combined" output mode of the access logger, since this filter criteria
+ is only applied to response log messages.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer>
+ <adm:unit-synopsis>milli-seconds</adm:unit-synopsis>
+ </adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-response-etime-less-than</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="search-response-nentries-greater-than">
+ <adm:synopsis>
+ Filters search operation response log records associated with searches
+ which returned more than the specified number of entries.
+ </adm:synopsis>
+ <adm:description>
+ It is recommended to only use this criteria in conjunction with the
+ "combined" output mode of the access logger, since this filter criteria
+ is only applied to response log messages.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer>
+ <adm:unit-synopsis>entries</adm:unit-synopsis>
+ </adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-search-response-nentries-greater-than</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="search-response-nentries-less-than">
+ <adm:synopsis>
+ Filters search operation response log records associated with searches
+ which returned less than the specified number of entries.
+ </adm:synopsis>
+ <adm:description>
+ It is recommended to only use this criteria in conjunction with the
+ "combined" output mode of the access logger, since this filter criteria
+ is only applied to response log messages.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer>
+ <adm:unit-synopsis>entries</adm:unit-synopsis>
+ </adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-search-response-nentries-less-than</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="search-response-is-indexed">
+ <adm:synopsis>
+ Filters search operation response log records associated with searches
+ which were either indexed or unindexed.
+ </adm:synopsis>
+ <adm:description>
+ It is recommended to only use this criteria in conjunction with the
+ "combined" output mode of the access logger, since this filter criteria
+ is only applied to response log messages.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-search-response-is-indexed</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccessLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccessLogPublisherConfiguration.xml
new file mode 100644
index 0000000..d0818af
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccessLogPublisherConfiguration.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions copyright 2011-2013 ForgeRock AS
+ ! -->
+<adm:managed-object name="access-log-publisher"
+ plural-name="access-log-publishers"
+ package="org.forgerock.opendj.server.config" extends="log-publisher"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for distributing access log messages from the access
+ logger to a destination.
+ </adm:synopsis>
+ <adm:description>
+ Access log messages provide information about the types of operations
+ processed by the server.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-access-log-publisher</ldap:name>
+ <ldap:superior>ds-cfg-log-publisher</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:relation name="access-log-filtering-criteria">
+ <adm:synopsis>
+ The set of criteria which will be used to filter log records.
+ </adm:synopsis>
+ <adm:one-to-many/>
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Filtering Criteria</ldap:rdn-sequence>
+ </adm:profile>
+ </adm:relation>
+ <adm:property-override name="java-class">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.api.AccessLogPublisher</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="filtering-policy">
+ <adm:synopsis>
+ Specifies how filtering criteria should be applied to log records.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>no-filtering</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="no-filtering">
+ <adm:synopsis>
+ No filtering will be performed, and all records will be logged.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="inclusive">
+ <adm:synopsis>
+ Records must match at least one of the filtering criteria in order
+ to be logged.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="exclusive">
+ <adm:synopsis>
+ Records must not match any of the filtering criteria in order to be
+ logged.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-filtering-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="suppress-internal-operations" advanced="true">
+ <adm:synopsis>
+ Indicates whether internal operations (for example, operations
+ that are initiated by plugins) should be logged along with the
+ operations that are requested by users.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-suppress-internal-operations</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="suppress-synchronization-operations"
+ advanced="true">
+ <adm:synopsis>
+ Indicates whether access messages that are generated by
+ synchronization operations should be suppressed.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-suppress-synchronization-operations
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccountStatusNotificationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccountStatusNotificationHandlerConfiguration.xml
new file mode 100644
index 0000000..7a523a2
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AccountStatusNotificationHandlerConfiguration.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="account-status-notification-handler"
+ plural-name="account-status-notification-handlers"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are invoked to provide notification to users in some form (for example,
+ by an email message) when the status of a user's account has changed
+ in some way. The
+ <adm:user-friendly-name />
+ can be used to notify the user and/or administrators of the change.
+ </adm:synopsis>
+ <adm:tag name="user-management" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-account-status-notification-handler</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled. Only enabled handlers are invoked whenever
+ a related event occurs in the server.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.AccountStatusNotificationHandler
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AdministrationConnectorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AdministrationConnectorConfiguration.xml
new file mode 100644
index 0000000..ad58eef
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AdministrationConnectorConfiguration.xml
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2012 ForgeRock, AS.
+ ! -->
+<adm:managed-object name="administration-connector"
+ plural-name="administration-connectors"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is used to interact with administration tools using LDAP.
+ </adm:synopsis>
+ <adm:description>
+ It is a dedicated entry point for administration.
+ </adm:description>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-administration-connector</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-reference name="listen-port" />
+ <adm:property name="listen-address" multi-valued="true">
+ <adm:synopsis>
+ Specifies the address or set of addresses on which this
+ <adm:user-friendly-name />
+ should listen for connections from LDAP clients.
+ </adm:synopsis>
+ <adm:description>
+ Multiple addresses may be provided as separate values for this
+ attribute. If no values are provided, then the
+ <adm:user-friendly-name />
+ listens on all interfaces.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:server-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0.0.0.0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:ip-address />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-listen-address</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="key-manager-provider" mandatory="true">
+ <adm:synopsis>
+ Specifies the name of the key manager that is used with
+ the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:server-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="key-manager-provider"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced key manager provider must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-key-manager-provider</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="trust-manager-provider" mandatory="true">
+ <adm:synopsis>
+ Specifies the name of the trust manager that is used with
+ the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:server-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="trust-manager-provider"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced trust manager provider must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-trust-manager-provider</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ssl-cert-nickname" mandatory="true">
+ <adm:synopsis>
+ Specifies the nickname (also called the alias) of the certificate
+ that the
+ <adm:user-friendly-name />
+ will use when performing SSL communication.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:server-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>Let the server decide.</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string></adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-cert-nickname</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ssl-protocol" multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the SSL protocols that are allowed for
+ use in SSL or StartTLS communication.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but only
+ impact new SSL/TLS-based sessions created after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Uses the default set of SSL protocols provided by the server's
+ JVM.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-protocol</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ssl-cipher-suite" multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the SSL cipher suites that are allowed
+ for use in SSL communication.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but will
+ only impact new SSL/TLS-based sessions created after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Uses the default set of SSL cipher suites provided by the
+ server's JVM.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-cipher-suite</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AlertHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AlertHandlerConfiguration.xml
new file mode 100644
index 0000000..91f187d
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AlertHandlerConfiguration.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="alert-handler" plural-name="alert-handlers"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are used to notify administrators of significant problems or notable
+ events that occur in the <adm:product-name /> directory server.
+ </adm:synopsis>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-alert-handler</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.AlertHandler
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="enabled-alert-type" multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the alert types that are enabled for this
+ alert handler.
+ </adm:synopsis>
+ <adm:description>
+ If there are any values for this attribute, then only alerts with
+ one of the specified types are allowed (unless they are also
+ included in the disabled alert types). If there are no values for
+ this attribute, then any alert with a type not included in the
+ list of disabled alert types is allowed.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ All alerts with types not included in the set of disabled
+ alert types are allowed.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled-alert-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="disabled-alert-type" multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the alert types that are disabled for this
+ alert handler.
+ </adm:synopsis>
+ <adm:description>
+ If there are any values for this attribute, then no alerts with
+ any of the specified types are allowed. If there are no values
+ for this attribute, then only alerts with a type included in the
+ set of enabled alert types are allowed, or if there are no
+ values for the enabled alert types option, then all alert types
+ are allowed.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ If there is a set of enabled alert types, then only alerts
+ with one of those types are allowed. Otherwise, all alerts
+ are allowed.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-disabled-alert-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AnonymousSASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AnonymousSASLMechanismHandlerConfiguration.xml
new file mode 100644
index 0000000..f9f4040
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AnonymousSASLMechanismHandlerConfiguration.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="anonymous-sasl-mechanism-handler"
+ plural-name="anonymous-sasl-mechanism-handlers"
+ package="org.forgerock.opendj.server.config" extends="sasl-mechanism-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The ANONYMOUS SASL mechanism provides the ability for clients to
+ perform an anonymous bind using a SASL mechanism.
+ </adm:synopsis>
+ <adm:description>
+ The only real
+ benefit that this provides over a normal anonymous bind (that is,
+ using simple authentication with no password) is that the ANONYMOUS
+ SASL mechanism also allows the client to include a trace string in
+ the request. This trace string can help identify the application that
+ performed the bind (although since there is no authentication,
+ there is no assurance that some other client did not spoof that
+ trace string).
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-anonymous-sasl-mechanism-handler</ldap:name>
+ <ldap:superior>ds-cfg-sasl-mechanism-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.AnonymousSASLMechanismHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeCleanupPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeCleanupPluginConfiguration.xml
new file mode 100644
index 0000000..598eb7f
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeCleanupPluginConfiguration.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2011 profiq s.r.o.
+ ! Portions copyright 2011 ForgeRock AS.
+ ! -->
+<adm:managed-object name="attribute-cleanup-plugin"
+ plural-name="attribute-cleanup-plugins" package="org.forgerock.opendj.server.config"
+ extends="plugin" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+
+ <adm:synopsis>
+ A pre-parse plugin which can be used to remove and rename
+ attributes in ADD and MODIFY requests before being processed.
+ </adm:synopsis>
+
+ <adm:description>
+ This plugin should be used in order maintain interoperability with client
+ applications which attempt to update attributes in a way which is
+ incompatible with LDAPv3 or <adm:product-name />. For example, this plugin may be used
+ in order to remove changes to operational attributes such as modifiersName,
+ creatorsName, modifyTimestamp, and createTimestamp (Sun DSEE chaining does
+ this).
+ </adm:description>
+
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-attribute-cleanup-plugin</ldap:name>
+ <ldap:superior>ds-cfg-plugin</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+
+ <adm:property-override name="java-class">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.plugins.AttributeCleanupPlugin</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+
+ <adm:property-override name="invoke-for-internal-operations">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+
+ <adm:property-override name="plugin-type" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>preparseadd</adm:value>
+ <adm:value>preparsemodify</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+
+ <adm:property name="remove-inbound-attributes" multi-valued="true">
+ <adm:synopsis>
+ A list of attributes which should be removed from incoming add
+ or modify requests.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>No attributes will be removed</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <!-- Use string syntax because we may be removing invalid attributes -->
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-remove-inbound-attributes</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="rename-inbound-attributes" multi-valued="true">
+ <adm:synopsis>
+ A list of attributes which should be renamed in incoming add
+ or modify requests.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>No attributes will be renamed</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^[^:]+:[^:]+$</adm:regex>
+ <adm:usage>FROM:TO</adm:usage>
+ <adm:synopsis>An attribute name mapping.</adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-rename-inbound-attributes</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeSyntaxConfiguration.xml
new file mode 100644
index 0000000..bf2d5e0
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeSyntaxConfiguration.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="attribute-syntax"
+ plural-name="attribute-syntaxes" package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ define the type of data that may be stored in an attribute with that
+ syntax. A syntax is generally associated with a set of matching
+ rules that indicate how to perform matching operations against
+ values of that syntax.
+ </adm:synopsis>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-attribute-syntax</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true" read-only="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.AttributeSyntax
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeTypeDescriptionAttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeTypeDescriptionAttributeSyntaxConfiguration.xml
new file mode 100644
index 0000000..b09bdcf
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeTypeDescriptionAttributeSyntaxConfiguration.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="attribute-type-description-attribute-syntax"
+ plural-name="attribute-type-description-attribute-syntaxes"
+ extends="attribute-syntax" package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ describe the format of the directory schema attribute type
+ definitions.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-attribute-type-description-attribute-syntax
+ </ldap:name>
+ <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.schema.AttributeTypeSyntax
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="strip-syntax-min-upper-bound" advanced="true">
+ <adm:synopsis>
+ Indicates whether the suggested minimum upper bound appended to an
+ attribute's syntax OID in it's schema definition Attribute Type
+ Description is stripped off.
+ </adm:synopsis>
+ <adm:description>
+ When retrieving the server's schema, some APIs (JNDI) fail in
+ their syntax lookup methods, because they do not parse this value
+ correctly. This configuration option allows the server to be
+ configured to provide schema definitions these APIs can parse
+ correctly.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-strip-syntax-min-upper-bound</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeValuePasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeValuePasswordValidatorConfiguration.xml
new file mode 100644
index 0000000..777ef7c
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AttributeValuePasswordValidatorConfiguration.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2012 ForgeRock, AS.
+ ! -->
+<adm:managed-object name="attribute-value-password-validator"
+ plural-name="attribute-value-password-validators"
+ package="org.forgerock.opendj.server.config" extends="password-validator"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ attempts to determine whether a proposed password is acceptable
+ for use by determining whether that password is contained in any
+ attribute within the user's entry.
+ </adm:synopsis>
+ <adm:description>
+ It can be configured to look
+ in all attributes or in a specified subset of attributes.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-attribute-value-password-validator</ldap:name>
+ <ldap:superior>ds-cfg-password-validator</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.AttributeValuePasswordValidator
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="match-attribute" multi-valued="true" >
+ <adm:synopsis>
+ Specifies the name(s) of the attribute(s) whose values should be
+ checked to determine whether they match the provided password.
+ If no values are provided, then the server checks if the proposed
+ password matches the value of any attribute in the user's entry.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ All attributes in the user entry will be checked.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-match-attribute</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="check-substrings" mandatory="false">
+ <adm:synopsis>
+ Indicates whether this password validator is to match portions of
+ the password string against attribute values.
+ </adm:synopsis>
+ <adm:description>
+ If "false" then only match the entire password against attribute values
+ otherwise ("true") check whether the password contains attribute values.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-check-substrings</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="min-substring-length" mandatory="false">
+ <adm:synopsis>
+ Indicates the minimal length of the substring within the password
+ in case substring checking is enabled.
+ </adm:synopsis>
+ <adm:description>
+ If "check-substrings" option is set to true, then this parameter
+ defines the length of the smallest word which should be used for
+ substring matching. Use with caution because values below 3 might
+ disqualify valid passwords.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-min-substring-length</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="test-reversed-password" mandatory="true">
+ <adm:synopsis>
+ Indicates whether this password validator should test the reversed
+ value of the provided password as well as the order in which it
+ was given.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-test-reversed-password</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AuthenticationPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AuthenticationPolicyConfiguration.xml
new file mode 100644
index 0000000..04335a2
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/AuthenticationPolicyConfiguration.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="authentication-policy"
+ plural-name="authentication-policies" abstract="true"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ define the policies which should be used for authenticating users and
+ managing the password and other account related state.
+ </adm:synopsis>
+ <adm:tag name="user-management" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-authentication-policy</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class which provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.AuthenticationPolicyFactory
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BackendConfiguration.xml
new file mode 100644
index 0000000..030f705
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BackendConfiguration.xml
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="backend" plural-name="backends"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for providing access to the underlying data
+ presented by the server.
+ </adm:synopsis>
+ <adm:description>
+ The data may be stored locally in an embedded database,
+ remotely in an external system, or generated on the fly
+ (for example, calculated from other information that is available).
+ </adm:description>
+ <adm:tag name="database" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-backend</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the backend is enabled in the server.
+ </adm:synopsis>
+ <adm:description>
+ If a backend is not enabled, then its contents are not
+ accessible when processing operations.
+ </adm:description>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ backend implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>org.opends.server.api.Backend</adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="backend-id" mandatory="true" read-only="true">
+ <adm:synopsis>
+ Specifies a name to identify the associated backend.
+ </adm:synopsis>
+ <adm:description>
+ The name must be unique among all backends in the server. The backend ID may
+ not be altered after the backend is created in the server.
+ </adm:description>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-backend-id</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="writability-mode" mandatory="true">
+ <adm:synopsis>
+ Specifies the behavior that the backend should use when processing
+ write operations.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="enabled">
+ <adm:synopsis>
+ Allows write operations to be performed in that backend (if
+ the requested operation is valid, the user has permission to
+ perform the operation, the backend supports that type of
+ write operation, and the global writability-mode property is
+ also enabled).
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="disabled">
+ <adm:synopsis>
+ Causes all write attempts to fail.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="internal-only">
+ <adm:synopsis>
+ Causes external write attempts to fail but allows writes by
+ replication and internal operations.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-writability-mode</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="base-dn" mandatory="true" multi-valued="true">
+ <adm:synopsis>
+ Specifies the base DN(s) for the data that the backend handles.
+ </adm:synopsis>
+ <adm:description>
+ A single backend may be responsible for one or more base DNs. Note
+ that no two backends may have the same base DN although one
+ backend may have a base DN that is below a base DN provided by
+ another backend (similar to the use of sub-suffixes in the Sun
+ Java System Directory Server). If any of the base DNs is
+ subordinate to a base DN for another backend, then all base DNs
+ for that backend must be subordinate to that same base DN.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ No administrative action is required by default although some
+ action may be required on a per-backend basis before the new
+ base DN may be used.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BackupBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BackupBackendConfiguration.xml
new file mode 100644
index 0000000..b11f9a7
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BackupBackendConfiguration.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="backup-backend" plural-name="backup-backends"
+ package="org.forgerock.opendj.server.config" extends="backend"
+ advanced="true" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides read-only access to the set of backups
+ that are available for <adm:product-name />.
+ </adm:synopsis>
+ <adm:description>
+ It is provided as a convenience feature that makes it easier to determine what
+ backups are available to be restored if necessary.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-backup-backend</ldap:name>
+ <ldap:superior>ds-cfg-backend</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.backends.BackupBackend</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="writability-mode" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>disabled</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="backup-directory" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the path to a backup directory containing one or more
+ backups for a particular backend.
+ </adm:synopsis>
+ <adm:description>
+ This is a multivalued property. Each value may specify a
+ different backup directory if desired (one for each backend
+ for which backups are taken). Values may be either absolute paths
+ or paths that are relative to the base of the <adm:product-name /> directory
+ server installation.
+ </adm:description>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-backup-directory</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/Base64PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/Base64PasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..65f5905
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/Base64PasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="base64-password-storage-scheme"
+ plural-name="base64-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords using the BASE64
+ encoding mechanism.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains only an implementation for the user password
+ syntax, with a storage scheme name of "BASE64". The
+ <adm:user-friendly-name />
+ merely obscures the password so that the clear-text password
+ is not available to casual observers. However, it offers no real
+ protection and should only be used if there are client applications
+ that specifically require this capability.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-base64-password-storage-scheme</ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.Base64PasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BlindTrustManagerProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BlindTrustManagerProviderConfiguration.xml
new file mode 100644
index 0000000..02f8a43
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BlindTrustManagerProviderConfiguration.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="blind-trust-manager-provider"
+ plural-name="blind-trust-manager-providers"
+ package="org.forgerock.opendj.server.config" extends="trust-manager-provider"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The blind trust manager provider always trusts any certificate that
+ is presented to it, regardless of its issuer, subject, and validity
+ dates.
+ </adm:synopsis>
+ <adm:description>
+ Use the blind trust manager provider only for testing
+ purposes, because it allows clients to use forged certificates
+ and authenticate as virtually any user in the server.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-blind-trust-manager-provider</ldap:name>
+ <ldap:superior>ds-cfg-trust-manager-provider</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.BlindTrustManagerProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BlowfishPasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BlowfishPasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..2151c0e
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/BlowfishPasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="blowfish-password-storage-scheme"
+ plural-name="blowfish-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords using the Blowfish
+ reversible encryption mechanism.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains only an implementation for the user password
+ syntax, with a storage scheme name of "BLOWFISH".
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-blowfish-password-storage-scheme</ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.BlowfishPasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CancelExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CancelExtendedOperationHandlerConfiguration.xml
new file mode 100644
index 0000000..f251705
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CancelExtendedOperationHandlerConfiguration.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="cancel-extended-operation-handler"
+ plural-name="cancel-extended-operation-handlers"
+ package="org.forgerock.opendj.server.config"
+ extends="extended-operation-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides support for the LDAP cancel extended operation as defined
+ in RFC 3909.
+ </adm:synopsis>
+ <adm:description>
+ It allows clients to cancel operations initiated from earlier
+ requests. The property ensures that both the cancel request and the
+ operation being canceled receives response messages.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-cancel-extended-operation-handler</ldap:name>
+ <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.CancelExtendedOperation
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CertificateAttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CertificateAttributeSyntaxConfiguration.xml
new file mode 100644
index 0000000..ca0b620
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CertificateAttributeSyntaxConfiguration.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2012 ForgeRock AS.
+ ! -->
+<adm:managed-object name="certificate-attribute-syntax"
+ plural-name="certificate-attribute-syntaxes"
+ extends="attribute-syntax" package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ define an attribute syntax for storing X.509 Certificates.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-certificate-attribute-syntax</ldap:name>
+ <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.schema.CertificateSyntax
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="strict-format" advanced="true">
+ <adm:synopsis>
+ Indicates whether or not X.509 Certificate values are required to
+ strictly comply with the standard definition for this syntax.
+ </adm:synopsis>
+ <adm:description>
+ When set to false, certificates will not be validated and, as a result
+ any sequence of bytes will be acceptable.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-strict-format</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CertificateMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CertificateMapperConfiguration.xml
new file mode 100644
index 0000000..79249e8
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CertificateMapperConfiguration.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="certificate-mapper"
+ plural-name="certificate-mappers"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for establishing a mapping between a client
+ certificate and the entry for the user that corresponds to that
+ certificate.
+ </adm:synopsis>
+ <adm:tag name="security" />
+ <adm:tag name="user-management" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-certificate-mapper</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.CertificateMapper
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ChangeNumberControlPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ChangeNumberControlPluginConfiguration.xml
new file mode 100644
index 0000000..8492808
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ChangeNumberControlPluginConfiguration.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2012 ForgeRock AS
+ ! -->
+<adm:managed-object name="change-number-control-plugin"
+ plural-name="change-number-control-plugins" package="org.forgerock.opendj.server.config"
+ extends="plugin" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ returns the change number generated by the replication subsystem.
+ </adm:synopsis>
+ <adm:description>
+ The <adm:user-friendly-name /> returns the change number generated
+ by the Multi-Master Replication subsystem when :
+ - the Multi-Master Replication is configured and enabled
+ - the request is a write operation (add, delete, modify, moddn)
+ - the control is part of a request.
+ If all of the above are true, the response contains a control response
+ with a string representing the change number.
+ The implementation for the chnage number control plug-in is contained
+ in the org.opends.server.plugins.ChangeNumberControlPlugin class. It must be
+ configured with the postOperationAdd, postOperationDelete,
+ postOperationModify and postOperationModifyDN plug-in types,
+ but it does not have any other custom configuration.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-change-number-control-plugin</ldap:name>
+ <ldap:superior>ds-cfg-plugin</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.plugins.ChangeNumberControlPlugin</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="plugin-type" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>postOperationAdd</adm:value>
+ <adm:value>postOperationDelete</adm:value>
+ <adm:value>postOperationModify</adm:value>
+ <adm:value>postOperationModifyDN</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CharacterSetPasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CharacterSetPasswordValidatorConfiguration.xml
new file mode 100644
index 0000000..1e87731
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CharacterSetPasswordValidatorConfiguration.xml
@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011-2012 ForgeRock AS
+ ! -->
+<adm:managed-object name="character-set-password-validator"
+ plural-name="character-set-password-validators"
+ package="org.forgerock.opendj.server.config" extends="password-validator"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ determines whether a proposed password is acceptable by
+ checking whether it contains a sufficient number of characters
+ from one or more user-defined character sets and ranges.
+ </adm:synopsis>
+ <adm:description>
+ For example,
+ the validator can ensure that passwords must
+ have at least one lowercase letter, one uppercase letter, one digit,
+ and one symbol.
+ </adm:description>
+ <adm:constraint>
+ <adm:synopsis>
+ The <adm:user-friendly-name/> must have at least one character set
+ or range specified.
+ </adm:synopsis>
+ <adm:condition>
+ <adm:or>
+ <adm:is-present property="character-set" />
+ <adm:is-present property="character-set-ranges" />
+ </adm:or>
+ </adm:condition>
+ </adm:constraint>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-character-set-password-validator</ldap:name>
+ <ldap:superior>ds-cfg-password-validator</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.CharacterSetPasswordValidator
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="character-set" mandatory="false"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies a character set containing characters that a password
+ may contain and a value indicating the minimum number of
+ characters required from that set.
+ </adm:synopsis>
+ <adm:description>
+ Each value must be an integer (indicating the minimum required
+ characters from the set which may be zero, indicating that the
+ character set is optional) followed by a colon and the characters to
+ include in that set (for example, "3:abcdefghijklmnopqrstuvwxyz"
+ indicates that a user password must contain at least three
+ characters from the set of lowercase ASCII letters). Multiple
+ character sets can be defined in separate values, although no
+ character can appear in more than one character set.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ If no sets are specified, the validator only uses the
+ defined character ranges.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string case-insensitive="false" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-character-set</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="character-set-ranges" mandatory="false"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies a character range containing characters that a password
+ may contain and a value indicating the minimum number of
+ characters required from that range.
+ </adm:synopsis>
+ <adm:description>
+ Each value must be an integer (indicating the minimum required
+ characters from the range which may be zero, indicating that the
+ character range is optional) followed by a colon and one or more
+ range specifications. A range specification is 3 characters: the
+ first character allowed, a minus, and the last character allowed.
+ For example, "3:A-Za-z0-9". The ranges in each value should not
+ overlap, and the characters in each range specification should be
+ ordered.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ If no ranges are specified, the validator only uses the
+ defined character sets.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string case-insensitive="false" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-character-set-ranges</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allow-unclassified-characters" mandatory="true">
+ <adm:synopsis>
+ Indicates whether this password validator allows passwords to
+ contain characters outside of any of the user-defined character
+ sets and ranges.
+ </adm:synopsis>
+ <adm:description>
+ If this is "false", then only those characters in the user-defined
+ character sets and ranges may be used in passwords. Any password
+ containing a character not included in any character set or range
+ will be rejected.
+ </adm:description>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allow-unclassified-characters</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="min-character-sets" mandatory="false">
+ <adm:synopsis>
+ Specifies the minimum number of character sets and ranges that a
+ password must contain.
+ </adm:synopsis>
+ <adm:description>
+ This property should only be used in conjunction with optional character
+ sets and ranges (those requiring zero characters). Its value must
+ include any mandatory character sets and ranges (those requiring greater
+ than zero characters). This is useful in situations where a password
+ must contain characters from mandatory character sets and ranges, and
+ characters from at least N optional character sets and ranges. For
+ example, it is quite common to require that a password contains at
+ least one non-alphanumeric character as well as characters from two
+ alphanumeric character sets (lower-case, upper-case, digits). In this
+ case, this property should be set to 3.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The password must contain characters from each of the mandatory
+ character sets and ranges and, if there are optional character sets
+ and ranges, at least one character from one of the optional character
+ sets and ranges.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-min-character-sets</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ClearPasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ClearPasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..7920849
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ClearPasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="clear-password-storage-scheme"
+ plural-name="clear-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for storing user passwords in clear text,
+ without any form of obfuscation.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains only an implementation for the user password
+ syntax, with a storage scheme name of "CLEAR". The
+ <adm:user-friendly-name />
+ should only be used if there are client applications that specifically
+ require this capability.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-clear-password-storage-scheme</ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.ClearPasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ClientConnectionMonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ClientConnectionMonitorProviderConfiguration.xml
new file mode 100644
index 0000000..3580c72
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ClientConnectionMonitorProviderConfiguration.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="client-connection-monitor-provider"
+ plural-name="client-connection-monitor-providers"
+ package="org.forgerock.opendj.server.config" extends="monitor-provider"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ exposes monitor information about the set of client connections that
+ are established to the <adm:product-name /> directory server.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-client-connection-monitor-provider</ldap:name>
+ <ldap:superior>ds-cfg-monitor-provider</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.monitors.ClientConnectionMonitorProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CollationMatchingRuleConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CollationMatchingRuleConfiguration.xml
new file mode 100644
index 0000000..f9a2760
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CollationMatchingRuleConfiguration.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="collation-matching-rule"
+ plural-name="collation-matching-rules"
+ package="org.forgerock.opendj.server.config" extends="matching-rule"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ provide support for locale-specific filtering and indexing.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-collation-matching-rule</ldap:name>
+ <ldap:superior>ds-cfg-matching-rule</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="matching-rule-type" multi-valued="true" mandatory="true">
+ <adm:synopsis>
+ the types of matching rules that should be supported for each locale
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="equality">
+ <adm:synopsis>
+ Specifies if equality type collation matching rule needs to
+ be created for each locale.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="less-than">
+ <adm:synopsis>
+ Specifies if less-than type collation matching rule needs to
+ be created for each locale.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="less-than-or-equal-to">
+ <adm:synopsis>
+ Specifies if less-than-or-equal-to type collation matching rule
+ needs to be created for each locale.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="greater-than">
+ <adm:synopsis>
+ Specifies if greater-than type collation matching rule needs
+ to be created for each locale.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="greater-than-or-equal-to">
+ <adm:synopsis>
+ Specifies if greater-than-or-equal-to type collation matching rule
+ needs to be created for each locale.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="substring">
+ <adm:synopsis>
+ Specifies if substring type collation matching rule needs to be
+ created for each locale.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-matching-rule-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="collation" multi-valued="true" mandatory="true">
+ <adm:synopsis>
+ the set of supported locales
+ </adm:synopsis>
+ <adm:description>
+ Collation must be specified using the syntax: LOCALE:OID
+ </adm:description>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^[a-z-A-Z]+:[0-9.]+\\d$</adm:regex>
+ <adm:usage>LOCALE:OID</adm:usage>
+ <adm:synopsis>
+ A Locale followed by a ":" and an OID.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-collation</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.schema.CollationMatchingRuleFactory
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
\ No newline at end of file
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CollectiveAttributeSubentriesVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CollectiveAttributeSubentriesVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..b580cbe
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CollectiveAttributeSubentriesVirtualAttributeConfiguration.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2009 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="collective-attribute-subentries-virtual-attribute"
+ plural-name="collective-attribute-subentries-virtual-attributes"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ generates a virtual attribute that specifies all collective
+ attribute subentries that affect the entry.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-collective-attribute-subentries-virtual-attribute
+ </ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.CollectiveAttributeSubentriesVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="conflict-behavior" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>virtual-overrides-real</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="attribute-type">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>collectiveAttributeSubentries</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ConfigFileHandlerBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ConfigFileHandlerBackendConfiguration.xml
new file mode 100644
index 0000000..925d718
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ConfigFileHandlerBackendConfiguration.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="config-file-handler-backend"
+ plural-name="config-file-handler-backends"
+ package="org.forgerock.opendj.server.config" extends="backend"
+ advanced="true" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ allows clients to access the server configuration over protocol, and
+ allow both read and write operations. Note: Modify DN operations are not
+ supported for entries in the server configuration.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-config-file-handler-backend</ldap:name>
+ <ldap:superior>ds-cfg-backend</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.ConfigFileHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="writability-mode" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>enabled</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ConnectionHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ConnectionHandlerConfiguration.xml
new file mode 100644
index 0000000..f3b923a
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ConnectionHandlerConfiguration.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="connection-handler"
+ plural-name="connection-handlers"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for handling all interaction with the clients,
+ including accepting the connections, reading requests, and sending
+ responses.
+ </adm:synopsis>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-connection-handler</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.ConnectionHandler
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property-reference name="allowed-client" />
+ <adm:property-reference name="denied-client" />
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CountryStringAttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CountryStringAttributeSyntaxConfiguration.xml
new file mode 100644
index 0000000..3e2b747
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CountryStringAttributeSyntaxConfiguration.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2012 ForgeRock AS.
+ ! Portions Copyright 2012 Manuel Gaupp
+ ! -->
+<adm:managed-object name="country-string-attribute-syntax"
+ plural-name="country-string-attribute-syntaxes"
+ extends="attribute-syntax" package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ define an attribute syntax for storing country codes.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-country-string-attribute-syntax</ldap:name>
+ <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.schema.CountryStringSyntax
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="strict-format" advanced="true">
+ <adm:synopsis>
+ Indicates whether or not country code values are required to
+ strictly comply with the standard definition for this syntax.
+ </adm:synopsis>
+ <adm:description>
+ When set to false, country codes will not be validated and, as
+ a result any string containing 2 characters will be acceptable.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-strict-format</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CramMD5SASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CramMD5SASLMechanismHandlerConfiguration.xml
new file mode 100644
index 0000000..0768d92
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CramMD5SASLMechanismHandlerConfiguration.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="cram-md5-sasl-mechanism-handler"
+ plural-name="cram-md5-sasl-mechanism-handlers"
+ package="org.forgerock.opendj.server.config" extends="sasl-mechanism-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The CRAM-MD5 SASL mechanism provides the ability for clients to
+ perform password-based authentication in a manner that does not
+ expose their password in the clear.
+ </adm:synopsis>
+ <adm:description>
+ Rather than including the
+ password in the bind request, the CRAM-MD5 mechanism uses a
+ two-step process in which the client needs only to prove that it
+ knows the password. The server sends randomly-generated data to
+ the client that is to be used in the process, which makes it
+ resistant to replay attacks. The one-way message digest
+ algorithm ensures that the original clear-text password is not
+ exposed. Note that the algorithm used by the CRAM-MD5 mechanism
+ requires that both the client and the server have access to the
+ clear-text password (or potentially a value that is derived from
+ the clear-text password). In order to authenticate to the server
+ using CRAM-MD5, the password for a user's account must be encoded
+ using a reversible password storage scheme that allows the server
+ to have access to the clear-text value.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-cram-md5-sasl-mechanism-handler</ldap:name>
+ <ldap:superior>ds-cfg-sasl-mechanism-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.CRAMMD5SASLMechanismHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="identity-mapper" mandatory="true">
+ <adm:synopsis>
+ Specifies the name of the identity mapper used
+ with this SASL mechanism handler to match the authentication
+ ID included in the SASL bind request to the corresponding
+ user in the directory.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:aggregation relation-name="identity-mapper"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced identity mapper must be enabled when the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-identity-mapper</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CryptPasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CryptPasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..d5c7e15
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CryptPasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2010-2013 ForgeRock AS
+ ! Portions Copyright 2012 Dariusz Janny <dariusz.janny@gmail.com>
+ ! -->
+<adm:managed-object name="crypt-password-storage-scheme"
+ plural-name="crypt-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords like Unix crypt does.
+ Like on most Unix systems, the password may be encrypted using different
+ algorithms, either Unix crypt, md5, sha256 or sha512.
+ </adm:synopsis>
+ <adm:description>
+ This implementation contains an implementation for the user
+ password syntax, with a storage scheme name of "CRYPT". Like on most
+ Unixes, the "CRYPT" storage scheme has different algorithms, the default
+ being the Unix crypt.
+
+ Even though the Unix crypt is a one-way digest, it
+ is relatively weak by today's standards. Because it supports
+ only a 12-bit salt (meaning that there are only 4096 possible ways to
+ encode a given password), it is also vulnerable to dictionary attacks.
+ You should therefore use this storage scheme only in cases where an
+ external application expects to retrieve the password and verify it
+ outside of the directory, rather than by performing an LDAP bind.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-crypt-password-storage-scheme</ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.CryptPasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="crypt-password-storage-encryption-algorithm" mandatory="true">
+ <adm:synopsis>
+ Specifies the algorithm to use to encrypt new passwords.
+ </adm:synopsis>
+ <adm:description>
+ Select the crypt algorithm to use to encrypt new passwords.
+ The value can either be "unix", which means the password is encrypted
+ with the Unix crypt algorithm, or md5 which means the password is
+ encrypted with the BSD MD5 algorithm and has a $1$ prefix,
+ or sha256 which means the password is encrypted with the SHA256 algorithm
+ and has a $5$ prefix, or sha512 which means the password is encrypted with
+ the SHA512 algorithm and has a $6$ prefix.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>unix</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="unix">
+ <adm:synopsis>
+ New passwords are encrypted with the Unix crypt algorithm.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="md5">
+ <adm:synopsis>
+ New passwords are encrypted with the BSD MD5 algorithm.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="sha256">
+ <adm:synopsis>
+ New passwords are encrypted with the Unix crypt SHA256 algorithm.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="sha512">
+ <adm:synopsis>
+ New passwords are encrypted with the Unix crypt SHA512 algorithm.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-crypt-password-storage-encryption-algorithm</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CryptoManagerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CryptoManagerConfiguration.xml
new file mode 100644
index 0000000..889808f
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/CryptoManagerConfiguration.xml
@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="crypto-manager" plural-name="crypto-managers"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a common interface for performing compression,
+ decompression, hashing, encryption and other kinds of cryptographic
+ operations.
+ </adm:synopsis>
+ <adm:tag name="security" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-crypto-manager</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="digest-algorithm" advanced="true">
+ <adm:synopsis>
+ Specifies the preferred message digest algorithm for the directory server.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately and
+ only affect cryptographic operations performed after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>SHA-1</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-digest-algorithm</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="mac-algorithm" advanced="true">
+ <adm:synopsis>
+ Specifies the preferred MAC algorithm for the directory server.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but only
+ affect cryptographic operations performed after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>HmacSHA1</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-mac-algorithm</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="mac-key-length" advanced="true">
+ <adm:synopsis>
+ Specifies the key length in bits for the preferred MAC algorithm.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but only
+ affect cryptographic operations performed after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>128</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-mac-key-length</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="cipher-transformation" advanced="true">
+ <adm:synopsis>
+ Specifies the cipher for the directory server
+ using the syntax algorithm/mode/padding.
+ </adm:synopsis>
+ <adm:description>
+ The full transformation is required: specifying only an algorithm
+ and allowing the cipher provider to supply the default mode and
+ padding is not supported, because there is no guarantee these
+ default values are the same among different implementations.
+ Some cipher algorithms, including RC4 and ARCFOUR, do not have a
+ mode or padding, and hence must be specified using NONE for the
+ mode field and NoPadding for the padding field. For example,
+ RC4/NONE/NoPadding.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but
+ only affect cryptographic operations performed after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>AES/CBC/PKCS5Padding</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-cipher-transformation</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="cipher-key-length" advanced="true">
+ <adm:synopsis>
+ Specifies the key length in bits for the preferred cipher.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but
+ only affect cryptographic operations performed after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>128</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-cipher-key-length</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="key-wrapping-transformation" multi-valued="false" advanced="false">
+ <adm:synopsis>
+ The preferred key wrapping transformation for the directory server. This value must
+ be the same for all server instances in a replication topology.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property will take effect immediately but will
+ only affect cryptographic operations performed after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>RSA/ECB/OAEPWITHSHA-1ANDMGF1PADDING</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-key-wrapping-transformation</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ssl-protocol" multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the SSL protocols that are allowed for
+ use in SSL or TLS communication.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but
+ only impact new SSL/TLS-based sessions created after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Uses the default set of SSL protocols provided by the server's
+ JVM.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-protocol</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ssl-cipher-suite" multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the SSL cipher suites that are allowed
+ for use in SSL or TLS communication.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but
+ only impact new SSL/TLS-based sessions created after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Uses the default set of SSL cipher suites provided by the
+ server's JVM.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-cipher-suite</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ssl-encryption">
+ <adm:synopsis>
+ Specifies whether SSL/TLS is used to provide encrypted
+ communication between two <adm:product-name /> server components.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but
+ only impact new SSL/TLS-based sessions created after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-encryption</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property-reference name="ssl-cert-nickname" />
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DebugLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DebugLogPublisherConfiguration.xml
new file mode 100644
index 0000000..dd4a421
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DebugLogPublisherConfiguration.xml
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions copyright 2013 ForgeRock AS
+ ! -->
+<adm:managed-object name="debug-log-publisher"
+ plural-name="debug-log-publishers"
+ package="org.forgerock.opendj.server.config" extends="log-publisher"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for distributing debug log messages from the debug
+ logger to a destination.
+ </adm:synopsis>
+ <adm:description>
+ Debug log messages provide information that can be used for debugging
+ or troubleshooting problems in the server, or for providing more
+ detailed information about the processing that the server performs.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-debug-log-publisher</ldap:name>
+ <ldap:superior>ds-cfg-log-publisher</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:relation name="debug-target">
+ <adm:one-to-many naming-property="debug-scope" />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Debug Targets</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="debug-level" />
+ <cli:default-property name="debug-category" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:property-override name="java-class">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.api.DebugLogPublisher</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="default-debug-level" mandatory="true">
+ <adm:synopsis>
+ The lowest severity level of debug messages to log when none of
+ the defined targets match the message.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>error</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="disabled">
+ <adm:synopsis>No messages will be logged.</adm:synopsis>
+ </adm:value>
+ <adm:value name="error">
+ <adm:synopsis>
+ Messages with severity level of ERROR or higher will be
+ logged.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="warning">
+ <adm:synopsis>
+ Messages with severity level of WARNING or higher will be
+ logged.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="info">
+ <adm:synopsis>
+ Messages with severity level of INFO or higher will be
+ logged.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="verbose">
+ <adm:synopsis>
+ Messages with severity level of VERBOSE or higher will be
+ logged.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="all">
+ <adm:synopsis>
+ Messages with any severity level will be logged.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-default-debug-level</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="default-debug-category" multi-valued="true">
+ <adm:synopsis>
+ The debug message categories to be logged when none of the defined
+ targets match the message.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Messages with any category will be logged if they have a
+ sufficient debug level.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="caught">
+ <adm:synopsis>Exception caught.</adm:synopsis>
+ </adm:value>
+ <adm:value name="constructor">
+ <adm:synopsis>Constructor entry.</adm:synopsis>
+ </adm:value>
+ <adm:value name="data">
+ <adm:synopsis>Raw data dump.</adm:synopsis>
+ </adm:value>
+ <adm:value name="database-access">
+ <adm:synopsis>Access to a backend database.</adm:synopsis>
+ </adm:value>
+ <adm:value name="enter">
+ <adm:synopsis>Method entry.</adm:synopsis>
+ </adm:value>
+ <adm:value name="exit">
+ <adm:synopsis>Method exit.</adm:synopsis>
+ </adm:value>
+ <adm:value name="message">
+ <adm:synopsis>Arbitrary debug message.</adm:synopsis>
+ </adm:value>
+ <adm:value name="protocol">
+ <adm:synopsis>Protocol element dump.</adm:synopsis>
+ </adm:value>
+ <adm:value name="thrown">
+ <adm:synopsis>Exception throw from method.</adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-default-debug-category</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="default-omit-method-entry-arguments">
+ <adm:synopsis>
+ Indicates whether to include method arguments in debug
+ messages logged by default.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-default-omit-method-entry-arguments
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="default-omit-method-return-value">
+ <adm:synopsis>
+ Indicates whether to include the return value in debug
+ messages logged by default.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-default-omit-method-return-value</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="default-include-throwable-cause">
+ <adm:synopsis>
+ Indicates whether to include the cause of exceptions in
+ exception thrown and caught messages logged by default.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-default-include-throwable-cause</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="default-throwable-stack-frames">
+ <adm:synopsis>
+ Indicates the number of stack frames to include in the
+ stack trace for method entry and exception thrown messages.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>2147483647</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" upper-limit="2147483647" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-default-throwable-stack-frames</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DebugTargetConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DebugTargetConfiguration.xml
new file mode 100644
index 0000000..c6c6ac6
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DebugTargetConfiguration.xml
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="debug-target" plural-name="debug-targets"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ define the types of messages logged by the debug logPublisher.
+ </adm:synopsis>
+ <adm:description>
+ Debug targets allow for fine-grain control of which messages are logged
+ based on the package, class, or method that generated the message. Each
+ debug target configuration entry resides below the entry with RDN of
+ "cn=Debug Target" immediately below the parent ds-cfg-debug-log-publisher
+ entry.
+ </adm:description>
+ <adm:tag name="logging" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-debug-target</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="debug-scope" mandatory="true" read-only="true">
+ <adm:synopsis>
+ Specifies the fully-qualified <adm:product-name /> Java package, class, or method affected
+ by the settings in this target definition. Use the number
+ character (#) to separate the class name and the method name
+ (that is, org.opends.server.core.DirectoryServer#startUp).
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>
+ ^([A-Za-z][A-Za-z0-9_]*\\.)*[A-Za-z][A-Za-z0-9_]*(#[A-Za-z][A-Za-z0-9_]*)?$
+ </adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ The fully-qualified <adm:product-name /> Java package, class, or method
+ name.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-debug-scope</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="debug-level" mandatory="true">
+ <adm:synopsis>
+ Specifies the lowest severity level of debug messages to log.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="disabled">
+ <adm:synopsis>No messages are logged.</adm:synopsis>
+ </adm:value>
+ <adm:value name="error">
+ <adm:synopsis>
+ Messages with severity level of ERROR or higher are
+ logged.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="warning">
+ <adm:synopsis>
+ Messages with severity level of WARNING or higher are
+ logged.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="info">
+ <adm:synopsis>
+ Messages with severity level of INFO or higher are
+ logged.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="verbose">
+ <adm:synopsis>
+ Messages with severity level of VERBOSE or higher are
+ logged.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="all">
+ <adm:synopsis>
+ Messages with any severity level are logged.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-debug-level</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="debug-category" multi-valued="true">
+ <adm:synopsis>
+ Specifies the debug message categories to be logged.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Messages with any category are logged if they have a
+ sufficient debug level.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="caught">
+ <adm:synopsis>Exception caught</adm:synopsis>
+ </adm:value>
+ <adm:value name="constructor">
+ <adm:synopsis>Constructor entry</adm:synopsis>
+ </adm:value>
+ <adm:value name="data">
+ <adm:synopsis>Raw data dump</adm:synopsis>
+ </adm:value>
+ <adm:value name="database-access">
+ <adm:synopsis>Access to a backend database.</adm:synopsis>
+ </adm:value>
+ <adm:value name="enter">
+ <adm:synopsis>Method entry</adm:synopsis>
+ </adm:value>
+ <adm:value name="exit">
+ <adm:synopsis>Method exit</adm:synopsis>
+ </adm:value>
+ <adm:value name="message">
+ <adm:synopsis>Arbitrary debug message</adm:synopsis>
+ </adm:value>
+ <adm:value name="protocol">
+ <adm:synopsis>Protocol element dump</adm:synopsis>
+ </adm:value>
+ <adm:value name="thrown">
+ <adm:synopsis>Exception thrown from method</adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-debug-category</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="omit-method-entry-arguments">
+ <adm:synopsis>
+ Specifies the property to indicate whether to include method arguments in debug
+ messages.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-omit-method-entry-arguments</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="omit-method-return-value">
+ <adm:synopsis>
+ Specifies the property to indicate whether to include the return value in debug
+ messages.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-omit-method-return-value</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="include-throwable-cause">
+ <adm:synopsis>
+ Specifies the property to indicate whether to include the cause of exceptions in
+ exception thrown and caught messages.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-include-throwable-cause</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="throwable-stack-frames">
+ <adm:synopsis>
+ Specifies the property to indicate the number of stack frames to include in the
+ stack trace for method entry and exception thrown messages.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-throwable-stack-frames</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DictionaryPasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DictionaryPasswordValidatorConfiguration.xml
new file mode 100644
index 0000000..d0bb153
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DictionaryPasswordValidatorConfiguration.xml
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 profiq, s.r.o.
+ ! Portions copyright 2012 ForgeRock AS.
+ ! -->
+<adm:managed-object name="dictionary-password-validator"
+ plural-name="dictionary-password-validators"
+ package="org.forgerock.opendj.server.config" extends="password-validator"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ determines whether a proposed password is acceptable based
+ on whether the given password value appears in a provided dictionary
+ file.
+ </adm:synopsis>
+ <adm:description>
+ A large dictionary file is provided with the server, but the
+ administrator can supply an alternate dictionary. In this case,
+ then the dictionary must be a plain-text file with
+ one word per line.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-dictionary-password-validator</ldap:name>
+ <ldap:superior>ds-cfg-password-validator</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.DictionaryPasswordValidator
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="dictionary-file" mandatory="true">
+ <adm:synopsis>
+ Specifies the path to the file containing a list of words that
+ cannot be used as passwords.
+ </adm:synopsis>
+ <adm:description>
+ It should be formatted with one word per line. The value can be an
+ absolute path or a path that is relative to the
+ <adm:product-name />
+ instance root.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ For Unix and Linux systems: config/wordlist.txt.
+ For Windows systems: config\\wordlist.txt
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>FILE</adm:usage>
+ <adm:synopsis>
+ The path to any text file contained on the system that is
+ readable by the server.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-dictionary-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="case-sensitive-validation" mandatory="true">
+ <adm:synopsis>
+ Indicates whether this password validator is to treat password
+ characters in a case-sensitive manner.
+ </adm:synopsis>
+ <adm:description>
+ If it is set to true, then the validator rejects a password only
+ if it appears in the dictionary with exactly the
+ same capitalization as provided by the user.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-case-sensitive-validation</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="test-reversed-password" mandatory="true">
+ <adm:synopsis>
+ Indicates whether this password validator is to test the reversed
+ value of the provided password as well as the order in which it
+ was given.
+ </adm:synopsis>
+ <adm:description>
+ For example, if the user provides a new password of
+ "password" and this configuration attribute is set to true, then
+ the value "drowssap" is also tested against attribute values
+ in the user's entry.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-test-reversed-password</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="check-substrings" mandatory="false">
+ <adm:synopsis>
+ Indicates whether this password validator is to match portions of
+ the password string against dictionary words.
+ </adm:synopsis>
+ <adm:description>
+ If "false" then only match the entire password against words
+ otherwise ("true") check whether the password contains words.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-check-substrings</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="min-substring-length" mandatory="false">
+ <adm:synopsis>
+ Indicates the minimal length of the substring within the password
+ in case substring checking is enabled.
+ </adm:synopsis>
+ <adm:description>
+ If "check-substrings" option is set to true, then this parameter
+ defines the length of the smallest word which should be used for
+ substring matching. Use with caution because values below 3 might
+ disqualify valid passwords.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-min-substring-length</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DigestMD5SASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DigestMD5SASLMechanismHandlerConfiguration.xml
new file mode 100644
index 0000000..3726fde
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DigestMD5SASLMechanismHandlerConfiguration.xml
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="digest-md5-sasl-mechanism-handler"
+ plural-name="digest-md5-sasl-mechanism-handlers"
+ package="org.forgerock.opendj.server.config" extends="sasl-mechanism-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The DIGEST-MD5 SASL mechanism
+ is used to perform all processing related to SASL DIGEST-MD5
+ authentication.
+ </adm:synopsis>
+ <adm:description>
+ The DIGEST-MD5 SASL mechanism is very similar
+ to the CRAM-MD5 mechanism in that it allows for password-based
+ authentication without exposing the password in the clear
+ (although it does require that both the client and the server
+ have access to the clear-text password). Like the CRAM-MD5
+ mechanism, it uses data that is randomly generated by the server
+ to make it resistant to replay attacks, but it also includes
+ randomly-generated data from the client, which makes it also
+ resistant to problems resulting from weak server-side random
+ number generation.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-digest-md5-sasl-mechanism-handler</ldap:name>
+ <ldap:superior>ds-cfg-sasl-mechanism-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.DigestMD5SASLMechanismHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="realm">
+ <adm:synopsis>
+ Specifies the realms that is to be used by the server for
+ DIGEST-MD5 authentication.
+ </adm:synopsis>
+ <adm:description>
+ If this value is not provided, then the server defaults to use the fully
+ qualified hostname of the machine.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ If this value is not provided, then the server defaults to use the fully
+ qualified hostname of the machine.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ Any realm string that does not contain a comma.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-realm</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="quality-of-protection">
+ <adm:synopsis>
+ The name of a property that specifies the quality of protection
+ the server will support.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>none</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="none">
+ <adm:synopsis>
+ QOP equals authentication only.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="integrity">
+ <adm:synopsis>
+ Quality of protection equals authentication with integrity
+ protection.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="confidentiality">
+ <adm:synopsis>
+ Quality of protection equals authentication with integrity and
+ confidentiality protection.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-quality-of-protection</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="identity-mapper" mandatory="true">
+ <adm:synopsis>
+ Specifies the name of the identity mapper that is to be used
+ with this SASL mechanism handler to match the authentication
+ or authorization
+ ID included in the SASL bind request to the corresponding
+ user in the directory.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:aggregation relation-name="identity-mapper"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced identity mapper must be enabled when the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-identity-mapper</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="server-fqdn">
+ <adm:synopsis>
+ Specifies the DNS-resolvable fully-qualified domain name for the
+ server that is used when validating the digest-uri parameter during
+ the authentication process.
+ </adm:synopsis>
+ <adm:description>
+ If this configuration attribute is
+ present, then the server expects that clients use a digest-uri equal
+ to "ldap/" followed by the value of this attribute. For example, if
+ the attribute has a value of "directory.example.com", then the
+ server expects clients to use a digest-uri of
+ "ldap/directory.example.com". If no value is provided, then the
+ server does not attempt to validate the digest-uri provided by the
+ client and accepts any value.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The server attempts to determine the
+ fully-qualified domain name dynamically.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ The fully-qualified address that is expected for clients to use
+ when connecting to the server and authenticating via DIGEST-MD5.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-server-fqdn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DirectoryStringAttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DirectoryStringAttributeSyntaxConfiguration.xml
new file mode 100644
index 0000000..8a0f0c7
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DirectoryStringAttributeSyntaxConfiguration.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="directory-string-attribute-syntax"
+ plural-name="directory-string-attribute-syntaxes"
+ extends="attribute-syntax" package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ defines an attribute syntax for storing arbitrary string (and
+ sometimes binary) data.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-directory-string-attribute-syntax</ldap:name>
+ <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.schema.DirectoryStringSyntax
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="allow-zero-length-values" advanced="true">
+ <adm:synopsis>
+ Indicates whether zero-length (that is, an empty string) values are
+ allowed.
+ </adm:synopsis>
+ <adm:description>
+ This is technically not allowed by the revised LDAPv3
+ specification, but some environments may require it for backward
+ compatibility with servers that do allow it.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allow-zero-length-values</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DseeCompatAccessControlHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DseeCompatAccessControlHandlerConfiguration.xml
new file mode 100644
index 0000000..898ea3b
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DseeCompatAccessControlHandlerConfiguration.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="dsee-compat-access-control-handler"
+ plural-name="dseecompat-access-control-handlers"
+ package="org.forgerock.opendj.server.config" extends="access-control-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides an implementation that uses syntax compatible with the
+ Sun Java System Directory Server Enterprise Edition
+ access control handlers.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-dsee-compat-access-control-handler</ldap:name>
+ <ldap:superior>ds-cfg-access-control-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.authorization.dseecompat.AciHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="global-aci" multi-valued="true">
+ <adm:synopsis>Defines global access control rules.</adm:synopsis>
+ <adm:description>
+ Global access control rules apply to all entries anywhere in the
+ data managed by the <adm:product-name /> directory server. The global access control
+ rules may be overridden by more specific access control rules
+ placed in the data.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ No global access control rules are defined, which means
+ that no access is allowed for any data in the server
+ unless specifically granted by access control rules in the
+ data.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aci />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-global-aci</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DynamicGroupImplementationConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DynamicGroupImplementationConfiguration.xml
new file mode 100644
index 0000000..b82031a
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/DynamicGroupImplementationConfiguration.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="dynamic-group-implementation"
+ plural-name="dynamic-group-implementations"
+ package="org.forgerock.opendj.server.config" extends="group-implementation"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a grouping mechanism in which the group membership is
+ determined based on criteria defined in one or more LDAP URLs.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-dynamic-group-implementation</ldap:name>
+ <ldap:superior>ds-cfg-group-implementation</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.extensions.DynamicGroup</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntityTagVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntityTagVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..868b038
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntityTagVirtualAttributeConfiguration.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2012 ForgeRock AS
+ ! -->
+<adm:managed-object name="entity-tag-virtual-attribute"
+ plural-name="entity-tag-virtual-attributes"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The <adm:user-friendly-name /> ensures that all entries contain an
+ "entity tag" or "Etag" as defined in section 3.11 of RFC 2616.
+ </adm:synopsis>
+ <adm:description>
+ The entity tag may be used by clients, in conjunction with the assertion
+ control, for optimistic concurrency control, as a way to help prevent
+ simultaneous updates of an entry from conflicting with each other.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-entity-tag-virtual-attribute</ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.EntityTagVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="conflict-behavior" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>real-overrides-virtual</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="attribute-type">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>etag</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="checksum-algorithm">
+ <adm:synopsis>
+ The algorithm which should be used for calculating the entity tag
+ checksum value.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>adler-32</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="adler-32">
+ <adm:synopsis>
+ The Adler-32 checksum algorithm which is almost as reliable as
+ a CRC-32 but can be computed much faster.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="crc-32">
+ <adm:synopsis>
+ The CRC-32 checksum algorithm.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-checksum-algorithm</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="excluded-attribute" multi-valued="true">
+ <adm:synopsis>
+ The list of attributes which should be ignored when calculating the
+ entity tag checksum value.
+ </adm:synopsis>
+ <adm:description>
+ Certain attributes like "ds-sync-hist" may vary between replicas due to
+ different purging schedules and should not be included in the checksum.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>ds-sync-hist</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-excluded-attribute</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryCacheConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryCacheConfiguration.xml
new file mode 100644
index 0000000..7b5414b
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryCacheConfiguration.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="entry-cache" plural-name="entry-caches"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for caching entries which are likely to be accessed
+ by client applications in order to improve <adm:product-name /> directory server
+ performance.
+ </adm:synopsis>
+ <adm:tag name="database" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-entry-cache</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.EntryCache
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="cache-level" mandatory="true">
+ <adm:synopsis>
+ Specifies the cache level in the cache order if more than
+ one instance of the cache is configured.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:integer lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-cache-level</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryCacheMonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryCacheMonitorProviderConfiguration.xml
new file mode 100644
index 0000000..cbd5d8f
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryCacheMonitorProviderConfiguration.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="entry-cache-monitor-provider"
+ plural-name="entry-cache-monitor-providers"
+ package="org.forgerock.opendj.server.config" extends="monitor-provider"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ exposes monitor information about the state of <adm:product-name /> directory server
+ entry caches.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-entry-cache-monitor-provider</ldap:name>
+ <ldap:superior>ds-cfg-monitor-provider</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.monitors.EntryCacheMonitorProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryDNVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryDNVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..79221bd
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryDNVirtualAttributeConfiguration.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="entry-dn-virtual-attribute"
+ plural-name="entry-dn-virtual-attributes"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ generates the entryDN operational attribute in directory entries,
+ which contains a normalized form of the entry's DN.
+ </adm:synopsis>
+ <adm:description>
+ This attribute is defined in the draft-zeilenga-ldap-entrydn
+ Internet Draft and contains the DN of the entry in which it is
+ contained.
+ This component provides the ability to use search filters containing the
+ entry's DN.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-entry-dn-virtual-attribute</ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.EntryDNVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="conflict-behavior" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>virtual-overrides-real</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="attribute-type">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>entryDN</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryUUIDPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryUUIDPluginConfiguration.xml
new file mode 100644
index 0000000..b90709e
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryUUIDPluginConfiguration.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="entry-uuid-plugin"
+ plural-name="entry-uuid-plugins" package="org.forgerock.opendj.server.config"
+ extends="plugin" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ generates values for the entryUUID operational attribute
+ whenever an entry is added via protocol or imported from LDIF.
+ </adm:synopsis>
+ <adm:description>
+ The entryUUID plug-in ensures that all entries
+ added to the server, whether through an LDAP add operation or via
+ an LDIF import, are assigned an entryUUID operational attribute if
+ they do not already have one. The entryUUID attribute contains a
+ universally unique identifier that can be used to identify an entry
+ in a manner that does not change (even in the event of a modify DN
+ operation). This plug-in generates a random UUID for entries created
+ by an add operation, but the UUID is constructed from the DN of the
+ entry during an LDIF import (which means that the same LDIF file
+ can be imported on different systems but still get the same value
+ for the entryUUID attribute). This behavior is based on the
+ specification contained in RFC 4530. The implementation for the
+ entry UUID plug-in is contained in the
+ org.opends.server.plugins.EntryUUIDPlugin class. It must be
+ configured with the preOperationAdd and ldifImport plug-in types,
+ but it does not have any other custom configuration. This
+ plug-in must be enabled in any directory that is intended to be used
+ in a synchronization environment.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-entry-uuid-plugin</ldap:name>
+ <ldap:superior>ds-cfg-plugin</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.plugins.EntryUUIDPlugin</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="plugin-type" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>ldifimport</adm:value>
+ <adm:value>preoperationadd</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryUUIDVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryUUIDVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..6b47582
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/EntryUUIDVirtualAttributeConfiguration.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="entry-uuid-virtual-attribute"
+ plural-name="entry-uuid-virtual-attributes"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ ensures that all entries contained in private backends
+ have values for the entryUUID operational attribute.
+ </adm:synopsis>
+ <adm:description>
+ The entryUUID values are generated based on a normalized
+ representation of the entry's DN, which does not cause a
+ consistency problem because <adm:product-name /> does not allow modify DN
+ operations to be performed in private backends.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-entry-uuid-virtual-attribute</ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.EntryUUIDVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="conflict-behavior" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>real-overrides-virtual</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="attribute-type">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>entryUUID</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ErrorLogAccountStatusNotificationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ErrorLogAccountStatusNotificationHandlerConfiguration.xml
new file mode 100644
index 0000000..1f9be00
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ErrorLogAccountStatusNotificationHandlerConfiguration.xml
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="error-log-account-status-notification-handler"
+ plural-name="error-log-account-status-notification-handlers"
+ extends="account-status-notification-handler"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is a notification handler that writes information
+ to the server error log whenever an appropriate account status event
+ occurs.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-error-log-account-status-notification-handler
+ </ldap:name>
+ <ldap:superior>
+ ds-cfg-account-status-notification-handler
+ </ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.ErrorLogAccountStatusNotificationHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="account-status-notification-type" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Indicates which types of event can trigger an account status notification.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="account-temporarily-locked">
+ <adm:synopsis>
+ Generate a notification whenever a user account has been temporarily
+ locked after too many failed attempts.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="account-permanently-locked">
+ <adm:synopsis>
+ Generate a notification whenever a user account has been permanently
+ locked after too many failed attempts.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="account-unlocked">
+ <adm:synopsis>
+ Generate a notification whenever a user account has been unlocked by an
+ administrator.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="account-idle-locked">
+ <adm:synopsis>
+ Generate a notification whenever a user account has been locked
+ because it was idle for too long.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="account-reset-locked">
+ <adm:synopsis>
+ Generate a notification whenever a user account has been locked,
+ because the password had been reset by an administrator but not changed
+ by the user within the required interval.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="account-disabled">
+ <adm:synopsis>
+ Generate a notification whenever a user account has been disabled by an
+ administrator.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="account-enabled">
+ <adm:synopsis>
+ Generate a notification whenever a user account has been enabled by an
+ administrator.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="account-expired">
+ <adm:synopsis>
+ Generate a notification whenever a user authentication has failed
+ because the account has expired.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="password-expired">
+ <adm:synopsis>
+ Generate a notification whenever a user authentication has failed
+ because the password has expired.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="password-expiring">
+ <adm:synopsis>
+ Generate a notification whenever a password expiration
+ warning is encountered for a user password for the first time.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="password-reset">
+ <adm:synopsis>
+ Generate a notification whenever a user's password is reset by an
+ administrator.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="password-changed">
+ <adm:synopsis>
+ Generate a notification whenever a user changes his/her own
+ password.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-account-status-notification-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ErrorLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ErrorLogPublisherConfiguration.xml
new file mode 100644
index 0000000..409c6b9
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ErrorLogPublisherConfiguration.xml
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions copyright 2013 ForgeRock AS
+ ! -->
+<adm:managed-object name="error-log-publisher"
+ plural-name="error-log-publishers"
+ package="org.forgerock.opendj.server.config" extends="log-publisher"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for distributing error log messages from the error
+ logger to a destination.
+ </adm:synopsis>
+ <adm:description>
+ Error log messages provide information about any warnings, errors,
+ or significant events that are encountered during server processing.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-error-log-publisher</ldap:name>
+ <ldap:superior>ds-cfg-log-publisher</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property-override name="java-class">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.api.ErrorLogPublisher</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="default-severity" multi-valued="true">
+ <adm:synopsis>
+ Specifies the default severity levels for the logger.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>fatal-error</adm:value>
+ <adm:value>severe-warning</adm:value>
+ <adm:value>severe-error</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="all">
+ <adm:synopsis>
+ Messages of all severity levels are logged.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="none">
+ <adm:synopsis>
+ No messages of any severity are logged by default. This
+ value is intended to be used in conjunction with the
+ override-severity property to define an error logger that
+ will publish no error message beside the errors of a given
+ category.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="fatal-error">
+ <adm:synopsis>
+ The error log severity that is used for messages that
+ provide information about fatal errors which may force the
+ server to shut down or operate in a significantly degraded
+ state.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="info">
+ <adm:synopsis>
+ The error log severity that is used for messages that
+ provide information about significant events within the
+ server that are not warnings or errors.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="mild-error">
+ <adm:synopsis>
+ The error log severity that is used for messages that
+ provide information about mild (recoverable) errors
+ encountered during processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="mild-warning">
+ <adm:synopsis>
+ The error log severity that is used for messages that
+ provide information about mild warnings triggered during
+ processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="notice">
+ <adm:synopsis>
+ The error log severity that is used for the most
+ important informational messages (i.e., information that
+ should almost always be logged but is not associated with a
+ warning or error condition).
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="severe-error">
+ <adm:synopsis>
+ The error log severity that is used for messages that
+ provide information about severe errors encountered during
+ processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="severe-warning">
+ <adm:synopsis>
+ The error log severity that is used for messages that
+ provide information about severe warnings triggered during
+ processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="debug">
+ <adm:synopsis>
+ The error log severity that is used for messages that
+ provide debugging information triggered during processing.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-default-severity</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="override-severity" multi-valued="true">
+ <adm:TODO>
+ This should be split into per-category properties whose value
+ defaults to the default-severity. See issue 2503.
+ </adm:TODO>
+ <adm:synopsis>
+ Specifies the override severity levels for the logger
+ based on the category of the messages.
+ </adm:synopsis>
+ <adm:description>
+ Each override severity level should include the category and the
+ severity levels to log for that category, for example,
+ core=mild-error,info,mild-warning. Valid categories are: core,
+ extensions, protocol, config, log, util, schema, plugin, jeb,
+ backend, tools, task, access-control, admin, sync, version,
+ quicksetup, admin-tool, dsconfig, user-defined. Valid severities
+ are: all, fatal-error, info, mild-error, mild-warning, notice,
+ severe-error, severe-warning, debug.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ All messages with the default severity levels are logged.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ A string in the form category=severity1,severity2...
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-override-severity</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExactMatchIdentityMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExactMatchIdentityMapperConfiguration.xml
new file mode 100644
index 0000000..6963e5d
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExactMatchIdentityMapperConfiguration.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="exact-match-identity-mapper"
+ plural-name="exact-match-identity-mappers"
+ package="org.forgerock.opendj.server.config" extends="identity-mapper"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ maps an identifier string to user entries by searching for the entry
+ containing a specified attribute whose value is the provided
+ identifier. For example, the username provided by the client for DIGEST-MD5
+ authentication must match the value of the uid attribute
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-exact-match-identity-mapper</ldap:name>
+ <ldap:superior>ds-cfg-identity-mapper</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.ExactMatchIdentityMapper
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="match-attribute" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the attribute whose value should exactly match the ID
+ string provided to this identity mapper.
+ </adm:synopsis>
+ <adm:description>
+ At least one value must be provided. All values must refer to the
+ name or OID of an attribute type defined in the directory server
+ schema. If multiple attributes or OIDs are provided, at least one of
+ those attributes must contain the provided ID string value in exactly
+ one entry. The internal search performed includes a logical OR across
+ all of these values.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ uid
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-match-attribute</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="match-base-dn" mandatory="false" multi-valued="true">
+ <adm:synopsis>
+ Specifies the set of base DNs below which to search for users.
+ </adm:synopsis>
+ <adm:description>
+ The base DNs will be used when performing searches to map the
+ provided ID string to a user entry. If multiple values are given, searches
+ are performed below all specified base DNs.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The server searches below all public naming contexts.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-match-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExtendedOperationHandlerConfiguration.xml
new file mode 100644
index 0000000..6f0aa60
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExtendedOperationHandlerConfiguration.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="extended-operation-handler"
+ plural-name="extended-operation-handlers"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ processes the different types of extended operations in the server.
+ </adm:synopsis>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-extended-operation-handler</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled (that is, whether the types of extended operations
+ are allowed in the server).
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.ExtendedOperationHandler
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExtensionConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExtensionConfiguration.xml
new file mode 100644
index 0000000..902526a
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExtensionConfiguration.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="extension"
+ plural-name="extensions"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ allows to extend the configuration with new type of objects.
+ </adm:synopsis>
+ <adm:description>
+ It is an entry point for extensions that requires configuration objects
+ that does not inherit from an existing top-level object.
+ </adm:description>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-extension</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.Extension
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExternalChangelogDomainConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExternalChangelogDomainConfiguration.xml
new file mode 100644
index 0000000..ed2bf8e
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExternalChangelogDomainConfiguration.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2009 Sun Microsystems, Inc.
+ ! Portions copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="external-changelog-domain"
+ plural-name="external-changelog-domains"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides configuration of the external changelog for the replication domain.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-external-changelog-domain</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ecl-include" multi-valued="true" mandatory="false">
+ <adm:synopsis>
+ Specifies a list of attributes which should be published with every
+ change log entry, regardless of whether or not the attribute itself
+ has changed.
+ </adm:synopsis>
+ <adm:description>
+ The list of attributes may include wild cards such as "*" and "+" as
+ well as object class references prefixed with an ampersand, for
+ example "@person".
+ The included attributes will be published using the "includedAttributes"
+ operational attribute as a single LDIF value rather like the
+ "changes" attribute. For modify and modifyDN operations the included
+ attributes will be taken from the entry before any changes were applied.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <!-- FIXME: can we constrain this with a regex? -->
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ecl-include</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ecl-include-for-deletes" multi-valued="true" mandatory="false">
+ <adm:synopsis>
+ Specifies a list of attributes which should be published with every
+ delete operation change log entry, in addition to those specified by the
+ "ecl-include" property.
+ </adm:synopsis>
+ <adm:description>
+ This property provides a means for applications to archive entries after
+ they have been deleted. See the description of the "ecl-include" property
+ for further information about how the included attributes are published.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <!-- FIXME: can we constrain this with a regex? -->
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ecl-include-for-deletes</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExternalSASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExternalSASLMechanismHandlerConfiguration.xml
new file mode 100644
index 0000000..45f407b
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ExternalSASLMechanismHandlerConfiguration.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="external-sasl-mechanism-handler"
+ plural-name="external-sasl-mechanism-handlers"
+ package="org.forgerock.opendj.server.config" extends="sasl-mechanism-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ performs all processing related to SASL EXTERNAL
+ authentication.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-external-sasl-mechanism-handler</ldap:name>
+ <ldap:superior>ds-cfg-sasl-mechanism-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.ExternalSASLMechanismHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="certificate-validation-policy" mandatory="true">
+ <adm:synopsis>
+ Indicates whether to attempt to validate the peer certificate
+ against a certificate held in the user's entry.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="always">
+ <adm:synopsis>
+ Always require the peer certificate to be present in the
+ user's entry.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="ifpresent">
+ <adm:synopsis>
+ If the user's entry contains one or more certificates,
+ require that one of them match the peer certificate.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="never">
+ <adm:synopsis>
+ Do not look for the peer certificate to be present in the
+ user's entry.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-certificate-validation-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="certificate-attribute">
+ <adm:synopsis>
+ Specifies the name of the attribute to hold user
+ certificates.
+ </adm:synopsis>
+ <adm:description>
+ This property must specify the name of a valid attribute type defined in
+ the server schema.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>userCertificate</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-certificate-attribute</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="certificate-mapper" mandatory="true">
+ <adm:synopsis>
+ Specifies the name of the certificate mapper that should be used
+ to match client certificates to user entries.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:aggregation relation-name="certificate-mapper"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced certificate mapper must be enabled when the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-certificate-mapper</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FIFOEntryCacheConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FIFOEntryCacheConfiguration.xml
new file mode 100644
index 0000000..e997196
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FIFOEntryCacheConfiguration.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="fifo-entry-cache"
+ plural-name="fifo-entry-caches" package="org.forgerock.opendj.server.config"
+ extends="entry-cache" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ use a FIFO queue to keep track of the cached entries.
+ </adm:synopsis>
+ <adm:description>
+ Entries that have been in the cache the longest are the most likely
+ candidates for purging if space is needed. In contrast to other
+ cache structures, the selection of entries to purge is not based on
+ how frequently or recently the entries have been accessed. This
+ requires significantly less locking (it will only be required when
+ an entry is added or removed from the cache, rather than each time
+ an entry is accessed). Cache sizing is based on the percentage of
+ free memory within the JVM, such that if enough memory is free, then
+ adding an entry to the cache will not require purging, but if more
+ than a specified percentage of the available memory within the JVM
+ is already consumed, then one or more entries will need to be
+ removed in order to make room for a new entry. It is also possible
+ to configure a maximum number of entries for the cache. If this is
+ specified, then the number of entries will not be allowed to exceed
+ this value, but it may not be possible to hold this many entries if
+ the available memory fills up first. Other configurable parameters
+ for this cache include the maximum length of time to block while
+ waiting to acquire a lock, and a set of filters that may be used to
+ define criteria for determining which entries are stored in the
+ cache. If a filter list is provided, then only entries matching at
+ least one of the given filters will be stored in the cache.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-fifo-entry-cache</ldap:name>
+ <ldap:superior>ds-cfg-entry-cache</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.FIFOEntryCache
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="lock-timeout" advanced="true">
+ <adm:synopsis>
+ Specifies the length of time to wait while attempting to acquire a read or
+ write lock.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>2000.0ms</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="0"
+ allow-unlimited="true" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-lock-timeout</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-memory-percent">
+ <adm:synopsis>
+ Specifies the maximum memory usage for the entry cache as a percentage of
+ the total JVM memory.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>90</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="100" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-memory-percent</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-entries">
+ <adm:synopsis>
+ Specifies the maximum number of entries that we will allow in the cache.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>2147483647</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-entries</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property-reference name="include-filter" />
+ <adm:property-reference name="exclude-filter" />
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedAccessLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedAccessLogPublisherConfiguration.xml
new file mode 100644
index 0000000..70d5db1
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedAccessLogPublisherConfiguration.xml
@@ -0,0 +1,365 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
+ ! Portions copyright 2011 ForgeRock AS.
+ ! -->
+<adm:managed-object name="file-based-access-log-publisher"
+ plural-name="file-based-access-log-publishers"
+ package="org.forgerock.opendj.server.config" extends="access-log-publisher"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ publish access messages to the file system.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-file-based-access-log-publisher</ldap:name>
+ <ldap:superior>ds-cfg-access-log-publisher</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.loggers.TextAccessLogPublisher
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="asynchronous" mandatory="true" advanced="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ will publish records asynchronously.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-asynchronous</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="queue-size" advanced="true">
+ <adm:synopsis>
+ The maximum number of log records that can be stored in the
+ asynchronous queue.
+ </adm:synopsis>
+ <adm:description>
+ Setting the queue size to zero activates parallel log writer
+ implementation which has no queue size limit and as such the
+ parallel log writer should only be used on a very well tuned
+ server configuration to avoid potential out of memory errors.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:other>
+ <adm:synopsis>
+ The <adm:user-friendly-name /> must be restarted if this property
+ is changed and the asynchronous property is set to true.
+ </adm:synopsis>
+ </adm:other>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-queue-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-file" mandatory="true">
+ <adm:synopsis>
+ The file name to use for the log files generated by the
+ <adm:user-friendly-name />.
+ The path to the file is relative to the server root.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>FILE</adm:usage>
+ <adm:synopsis>
+ A path to an existing file that is readable by the server.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-file-permissions" mandatory="true">
+ <adm:synopsis>
+ The UNIX permissions of the log files created by this
+ <adm:user-friendly-name />.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>640</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^([0-7][0-7][0-7])$</adm:regex>
+ <adm:usage>MODE</adm:usage>
+ <adm:synopsis>
+ A valid UNIX mode string. The mode string must contain
+ three digits between zero and seven.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-file-permissions</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="time-interval" advanced="true">
+ <adm:synopsis>
+ Specifies the interval at which to check whether the log files
+ need to be rotated.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5s</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-time-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="buffer-size" advanced="true">
+ <adm:synopsis>Specifies the log file buffer size.</adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>64kb</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-buffer-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="auto-flush" advanced="true">
+ <adm:synopsis>
+ Specifies whether to flush the writer after every log record.
+ </adm:synopsis>
+ <adm:description>
+ If the asynchronous writes option is used, the writer is
+ flushed after all the log records in the queue are written.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-auto-flush</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="append">
+ <adm:synopsis>
+ Specifies whether to append to existing log files.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-append</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="rotation-policy" multi-valued="true">
+ <adm:synopsis>
+ The rotation policy to use for the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:description>
+ When multiple policies are used, rotation will occur if any
+ policy's conditions are met.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ No rotation policy is used and log rotation will not occur.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation parent-path="/"
+ relation-name="log-rotation-policy" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-rotation-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="retention-policy" multi-valued="true">
+ <adm:synopsis>
+ The retention policy to use for the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:description>
+ When multiple policies are used, log files are cleaned when
+ any of the policy's conditions are met.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ No retention policy is used and log files are never cleaned.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation parent-path="/"
+ relation-name="log-retention-policy" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-retention-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-format">
+ <adm:synopsis>
+ Specifies how log records should be formatted and written to the access log.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>multi-line</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="combined">
+ <adm:synopsis>
+ Combine log records for operation requests and responses into a
+ single record. This format should be used when log records are to
+ be filtered based on response criteria (e.g. result code).
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="multi-line">
+ <adm:synopsis>
+ Outputs separate log records for operation requests and responses.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-format</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-record-time-format">
+ <adm:synopsis>
+ Specifies the format string that is used to generate log record
+ timestamps.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>dd/MMM/yyyy:HH:mm:ss Z</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ Any valid format string that can be used with the
+ java.text.SimpleDateFormat class.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-record-time-format</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-control-oids">
+ <adm:synopsis>
+ Specifies whether control OIDs will be included in operation log records.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-control-oids</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedAuditLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedAuditLogPublisherConfiguration.xml
new file mode 100644
index 0000000..eca7a3e
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedAuditLogPublisherConfiguration.xml
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2011 ForgeRock AS.
+ ! -->
+<adm:managed-object name="file-based-audit-log-publisher"
+ plural-name="file-based-audit-log-publishers"
+ package="org.forgerock.opendj.server.config" extends="access-log-publisher"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ publish access messages to the file system.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-file-based-audit-log-publisher</ldap:name>
+ <ldap:superior>ds-cfg-access-log-publisher</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.loggers.TextAuditLogPublisher
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="asynchronous" mandatory="true" advanced="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ will publish records asynchronously.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-asynchronous</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="queue-size" advanced="true">
+ <adm:synopsis>
+ The maximum number of log records that can be stored in the
+ asynchronous queue.
+ </adm:synopsis>
+ <adm:description>
+ Setting the queue size to zero activates parallel log writer
+ implementation which has no queue size limit and as such the
+ parallel log writer should only be used on a very well tuned
+ server configuration to avoid potential out of memory errors.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:other>
+ <adm:synopsis>
+ The <adm:user-friendly-name /> must be restarted if this property
+ is changed and the asynchronous property is set to true.
+ </adm:synopsis>
+ </adm:other>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-queue-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-file" mandatory="true">
+ <adm:synopsis>
+ The file name to use for the log files generated by the
+ <adm:user-friendly-name />.
+ The path to the file is relative to the server root.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>FILE</adm:usage>
+ <adm:synopsis>
+ A path to an existing file that is readable by the server.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-file-permissions" mandatory="true">
+ <adm:synopsis>
+ The UNIX permissions of the log files created by this
+ <adm:user-friendly-name />.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>640</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^([0-7][0-7][0-7])$</adm:regex>
+ <adm:usage>MODE</adm:usage>
+ <adm:synopsis>
+ A valid UNIX mode string. The mode string must contain
+ three digits between zero and seven.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-file-permissions</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="time-interval" advanced="true">
+ <adm:synopsis>
+ Specifies the interval at which to check whether the log files
+ need to be rotated.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5s</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-time-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="buffer-size" advanced="true">
+ <adm:synopsis>Specifies the log file buffer size.</adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>64kb</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-buffer-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="auto-flush" advanced="true">
+ <adm:synopsis>
+ Specifies whether to flush the writer after every log record.
+ </adm:synopsis>
+ <adm:description>
+ If the asynchronous writes option is used, the writer is
+ flushed after all the log records in the queue are written.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-auto-flush</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="append">
+ <adm:synopsis>
+ Specifies whether to append to existing log files.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-append</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="rotation-policy" multi-valued="true">
+ <adm:synopsis>
+ The rotation policy to use for the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:description>
+ When multiple policies are used, rotation will occur if any
+ policy's conditions are met.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ No rotation policy is used and log rotation will not occur.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation parent-path="/"
+ relation-name="log-rotation-policy" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-rotation-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="retention-policy" multi-valued="true">
+ <adm:synopsis>
+ The retention policy to use for the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:description>
+ When multiple policies are used, log files are cleaned when
+ any of the policy's conditions are met.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ No retention policy is used and log files are never cleaned.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation parent-path="/"
+ relation-name="log-retention-policy" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-retention-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedDebugLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedDebugLogPublisherConfiguration.xml
new file mode 100644
index 0000000..ae490b7
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedDebugLogPublisherConfiguration.xml
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="file-based-debug-log-publisher"
+ plural-name="file-based-debug-log-publishers"
+ package="org.forgerock.opendj.server.config" extends="debug-log-publisher"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ publish debug messages to the file system.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-file-based-debug-log-publisher</ldap:name>
+ <ldap:superior>ds-cfg-debug-log-publisher</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.loggers.debug.TextDebugLogPublisher
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="asynchronous" mandatory="true" advanced="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ will publish records asynchronously.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-asynchronous</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="queue-size" advanced="true">
+ <adm:synopsis>
+ The maximum number of log records that can be stored in the
+ asynchronous queue.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-queue-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-file" mandatory="true">
+ <adm:synopsis>
+ The file name to use for the log files generated by the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:description>
+ The path to the file is relative to the server root.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-file-permissions" mandatory="true">
+ <adm:synopsis>
+ The UNIX permissions of the log files created by this
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>640</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^([0-7][0-7][0-7])$</adm:regex>
+ <adm:usage>MODE</adm:usage>
+ <adm:synopsis>
+ A valid UNIX mode string. The mode string must contain
+ three digits between zero and seven.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-file-permissions</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="time-interval" advanced="true">
+ <adm:synopsis>
+ Specifies the interval at which to check whether the log files
+ need to be rotated.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5s</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-time-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="buffer-size" advanced="true">
+ <adm:synopsis>Specifies the log file buffer size.</adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>64kb</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-buffer-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="auto-flush" advanced="true">
+ <adm:synopsis>
+ Specifies whether to flush the writer after every log record.
+ </adm:synopsis>
+ <adm:description>
+ If the asynchronous writes option is used, the writer is
+ flushed after all the log records in the queue are written.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-auto-flush</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="append">
+ <adm:synopsis>
+ Specifies whether to append to existing log files.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-append</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="rotation-policy" multi-valued="true">
+ <adm:synopsis>
+ The rotation policy to use for the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:description>
+ When multiple policies are used, rotation will occur if any
+ policy's conditions are met.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ No rotation policy is used and log rotation will not occur.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation parent-path="/"
+ relation-name="log-rotation-policy" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-rotation-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="retention-policy" multi-valued="true">
+ <adm:synopsis>
+ The retention policy to use for the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:description>
+ When multiple policies are used, log files are cleaned when
+ any of the policy's conditions are met.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ No retention policy is used and log files are never
+ cleaned.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation parent-path="/"
+ relation-name="log-retention-policy" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-retention-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedErrorLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedErrorLogPublisherConfiguration.xml
new file mode 100644
index 0000000..e9b7abe
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedErrorLogPublisherConfiguration.xml
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="file-based-error-log-publisher"
+ plural-name="file-based-error-log-publishers"
+ package="org.forgerock.opendj.server.config" extends="error-log-publisher"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ publish error messages to the file system.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-file-based-error-log-publisher</ldap:name>
+ <ldap:superior>ds-cfg-error-log-publisher</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.loggers.TextErrorLogPublisher
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="asynchronous" mandatory="true" advanced="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ will publish records asynchronously.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-asynchronous</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="queue-size" advanced="true">
+ <adm:synopsis>
+ The maximum number of log records that can be stored in the
+ asynchronous queue.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-queue-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-file" mandatory="true">
+ <adm:synopsis>
+ The file name to use for the log files generated by the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:description>
+ The path to the file is relative to the server root.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-file-permissions" mandatory="true">
+ <adm:synopsis>
+ The UNIX permissions of the log files created by this
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>640</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^([0-7][0-7][0-7])$</adm:regex>
+ <adm:usage>MODE</adm:usage>
+ <adm:synopsis>
+ A valid UNIX mode string. The mode string must contain
+ three digits between zero and seven.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-file-permissions</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="time-interval" advanced="true">
+ <adm:synopsis>
+ Specifies the interval at which to check whether the log files
+ need to be rotated.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5s</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-time-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="buffer-size" advanced="true">
+ <adm:synopsis>Specifies the log file buffer size.</adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>64kb</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-buffer-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="auto-flush" advanced="true">
+ <adm:synopsis>
+ Specifies whether to flush the writer after every log record.
+ </adm:synopsis>
+ <adm:description>
+ If the asynchronous writes option is used, the writer will be
+ flushed after all the log records in the queue are written.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-auto-flush</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="append">
+ <adm:synopsis>
+ Specifies whether to append to existing log files.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-append</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="rotation-policy" multi-valued="true">
+ <adm:synopsis>
+ The rotation policy to use for the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:description>
+ When multiple policies are used, rotation will occur if any
+ policy's conditions are met.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ No rotation policy is used and log rotation will not occur.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation parent-path="/"
+ relation-name="log-rotation-policy" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-rotation-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="retention-policy" multi-valued="true">
+ <adm:synopsis>
+ The retention policy to use for the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:description>
+ When multiple policies are used, log files will be cleaned when
+ any of the policy's conditions are met.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ No retention policy is used and log files will never be
+ cleaned.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation parent-path="/"
+ relation-name="log-retention-policy" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-retention-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedHTTPAccessLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedHTTPAccessLogPublisherConfiguration.xml
new file mode 100644
index 0000000..df60884
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedHTTPAccessLogPublisherConfiguration.xml
@@ -0,0 +1,360 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2013 ForgeRock AS
+ ! -->
+<adm:managed-object name="file-based-http-access-log-publisher"
+ plural-name="file-based-http-access-log-publishers"
+ package="org.forgerock.opendj.server.config" extends="http-access-log-publisher"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ publish HTTP access messages to the file system.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-file-based-http-access-log-publisher</ldap:name>
+ <ldap:superior>ds-cfg-http-access-log-publisher</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.loggers.TextHTTPAccessLogPublisher
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="asynchronous" mandatory="true" advanced="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ will publish records asynchronously.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-asynchronous</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="queue-size" advanced="true">
+ <adm:synopsis>
+ The maximum number of log records that can be stored in the
+ asynchronous queue.
+ </adm:synopsis>
+ <adm:description>
+ Setting the queue size to zero activates parallel log writer
+ implementation which has no queue size limit and as such the
+ parallel log writer should only be used on a very well tuned
+ server configuration to avoid potential out of memory errors.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:other>
+ <adm:synopsis>
+ The <adm:user-friendly-name /> must be restarted if this property
+ is changed and the asynchronous property is set to true.
+ </adm:synopsis>
+ </adm:other>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-queue-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-file" mandatory="true">
+ <adm:synopsis>
+ The file name to use for the log files generated by the
+ <adm:user-friendly-name />.
+ The path to the file is relative to the server root.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>FILE</adm:usage>
+ <adm:synopsis>
+ A path to an existing file that is readable by the server.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-file-permissions" mandatory="true">
+ <adm:synopsis>
+ The UNIX permissions of the log files created by this
+ <adm:user-friendly-name />.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>640</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^([0-7][0-7][0-7])$</adm:regex>
+ <adm:usage>MODE</adm:usage>
+ <adm:synopsis>
+ A valid UNIX mode string. The mode string must contain
+ three digits between zero and seven.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-file-permissions</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="time-interval" advanced="true">
+ <adm:synopsis>
+ Specifies the interval at which to check whether the log files
+ need to be rotated.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5s</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-time-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="buffer-size" advanced="true">
+ <adm:synopsis>Specifies the log file buffer size.</adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>64kb</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-buffer-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="auto-flush" advanced="true">
+ <adm:synopsis>
+ Specifies whether to flush the writer after every log record.
+ </adm:synopsis>
+ <adm:description>
+ If the asynchronous writes option is used, the writer is
+ flushed after all the log records in the queue are written.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-auto-flush</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="append">
+ <adm:synopsis>
+ Specifies whether to append to existing log files.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-append</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="rotation-policy" multi-valued="true">
+ <adm:synopsis>
+ The rotation policy to use for the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:description>
+ When multiple policies are used, rotation will occur if any
+ policy's conditions are met.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ No rotation policy is used and log rotation will not occur.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation parent-path="/"
+ relation-name="log-rotation-policy" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-rotation-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="retention-policy" multi-valued="true">
+ <adm:synopsis>
+ The retention policy to use for the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:description>
+ When multiple policies are used, log files are cleaned when
+ any of the policy's conditions are met.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ No retention policy is used and log files are never cleaned.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation parent-path="/"
+ relation-name="log-retention-policy" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-retention-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-format">
+ <adm:synopsis>
+ Specifies how log records should be formatted and written to the HTTP
+ access log.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>cs-host c-ip cs-username x-datetime cs-method cs-uri-query
+ cs-version sc-status cs(User-Agent) x-connection-id x-etime</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>[a-zA-Z0-9-()]+( [a-zA-Z0-9-()]+)*</adm:regex>
+ <adm:usage>FORMAT</adm:usage>
+ <adm:synopsis>
+ A space separated list of fields describing the extended log format
+ to be used for logging HTTP accesses. Available values are listed on
+ the W3C working draft http://www.w3.org/TR/WD-logfile.html
+ and Microsoft website
+ http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/676400bc-8969-4aa7-851a-9319490a9bbb.mspx?mfr=true
+
+ OpenDJ supports the following standard fields: "c-ip", "c-port",
+ "cs-host", "cs-method", "cs-uri-query", "cs(User-Agent)",
+ "cs-username", "cs-version", "s-computername", "s-ip", "s-port",
+ "sc-status".
+
+ OpenDJ supports the following application specific field extensions:
+ "x-connection-id" displays the internal connection ID assigned to
+ the HTTP client connection, "x-datetime" displays the completion
+ date and time for the logged HTTP request and its ouput is
+ controlled by the "ds-cfg-log-record-time-format" property,
+ "x-etime" displays the total execution time for the logged HTTP
+ request.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-format</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-record-time-format">
+ <adm:synopsis>
+ Specifies the format string that is used to generate log record
+ timestamps.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>dd/MMM/yyyy:HH:mm:ss Z</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ Any valid format string that can be used with the
+ java.text.SimpleDateFormat class.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-record-time-format</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedKeyManagerProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedKeyManagerProviderConfiguration.xml
new file mode 100644
index 0000000..aef513c
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedKeyManagerProviderConfiguration.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2013 ForgeRock AS
+ ! -->
+<adm:managed-object name="file-based-key-manager-provider"
+ plural-name="file-based-key-manager-providers"
+ package="org.forgerock.opendj.server.config" extends="key-manager-provider"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ can be used to obtain the server certificate from a key store file on
+ the local file system.
+ </adm:synopsis>
+ <adm:description>
+ Multiple file formats may be supported, depending on the providers
+ supported by the underlying Java runtime environment.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-file-based-key-manager-provider</ldap:name>
+ <ldap:superior>ds-cfg-key-manager-provider</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.FileBasedKeyManagerProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="key-store-file" mandatory="true">
+ <adm:TODO>Should use a file-based property definition?</adm:TODO>
+ <adm:synopsis>
+ Specifies the path to the file that contains the private key
+ information. This may be an absolute path, or a path that is
+ relative to the
+ <adm:product-name />
+ instance root.
+ </adm:synopsis>
+ <adm:description>
+ Changes to this property will take effect the next
+ time that the key manager is accessed.
+ </adm:description>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>FILE</adm:usage>
+ <adm:synopsis>
+ A path to an existing file that is readable by the server.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-key-store-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="key-store-type">
+ <adm:TODO>
+ Can we restrict this to an enumeration? How can the client guess
+ which values are possible? What is the default value?
+ </adm:TODO>
+ <adm:synopsis>
+ Specifies the format for the data in the key store file.
+ </adm:synopsis>
+ <adm:description>
+ Valid values should always include 'JKS' and 'PKCS12', but
+ different implementations may allow other values as well. If no
+ value is provided, the JVM-default value is used.
+ Changes to this configuration attribute will take effect the next
+ time that the key manager is accessed.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ Any key store format supported by the Java runtime environment.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-key-store-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property-reference name="key-store-pin" />
+ <adm:property-reference name="key-store-pin-property" />
+ <adm:property-reference name="key-store-pin-environment-variable" />
+ <adm:property-reference name="key-store-pin-file" />
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedTrustManagerProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedTrustManagerProviderConfiguration.xml
new file mode 100644
index 0000000..3f1a970
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileBasedTrustManagerProviderConfiguration.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="file-based-trust-manager-provider"
+ plural-name="file-based-trust-manager-providers"
+ package="org.forgerock.opendj.server.config" extends="trust-manager-provider"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The file-based trust manager provider determines whether to trust a
+ presented certificate based on whether that certificate exists in a
+ server trust store file.
+ </adm:synopsis>
+ <adm:description>
+ The trust store file can be in either JKS
+ (the default Java key store format) or PKCS#12 (a standard
+ certificate format) form.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-file-based-trust-manager-provider</ldap:name>
+ <ldap:superior>ds-cfg-trust-manager-provider</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.FileBasedTrustManagerProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="trust-store-file" mandatory="true">
+ <adm:TODO>Should use a file-based property definition?</adm:TODO>
+ <adm:synopsis>
+ Specifies the path to the file containing the trust information.
+ It can be an absolute path or a path that is relative to the
+ <adm:product-name />
+ instance root.
+ </adm:synopsis>
+ <adm:description>
+ Changes to this configuration attribute take effect the next
+ time that the trust manager is accessed.
+ </adm:description>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ An absolute path or a path that is relative to the <adm:product-name /> directory server instance root.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-trust-store-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="trust-store-type">
+ <adm:TODO>
+ Can we restrict this to an enumeration? How can the client guess
+ which values are possible? What is the default value?
+ </adm:TODO>
+ <adm:synopsis>
+ Specifies the format for the data in the trust store file.
+ </adm:synopsis>
+ <adm:description>
+ Valid values always include 'JKS' and 'PKCS12', but different
+ implementations can allow other values as well. If no value is
+ provided, then the JVM default value is used. Changes to this
+ configuration attribute take effect the next time that the
+ trust manager is accessed.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ Any key store format supported by the Java runtime environment. The "JKS" and "PKCS12" formats are typically available in Java environments.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-trust-store-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property-reference name="trust-store-pin" />
+ <adm:property-reference name="trust-store-pin-property" />
+ <adm:property-reference name="trust-store-pin-environment-variable" />
+ <adm:property-reference name="trust-store-pin-file" />
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileCountLogRetentionPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileCountLogRetentionPolicyConfiguration.xml
new file mode 100644
index 0000000..12b4bcc
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileCountLogRetentionPolicyConfiguration.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="file-count-log-retention-policy"
+ plural-name="file-count-log-retention-policies"
+ package="org.forgerock.opendj.server.config" extends="log-retention-policy"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ Retention policy based on the number of rotated log files on disk.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-file-count-log-retention-policy</ldap:name>
+ <ldap:superior>ds-cfg-log-retention-policy</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.loggers.FileNumberRetentionPolicy
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="number-of-files" mandatory="true">
+ <adm:synopsis>
+ Specifies the number of archived log files to retain before the
+ oldest ones are cleaned.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:integer lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-number-of-files</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileSystemEntryCacheConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileSystemEntryCacheConfiguration.xml
new file mode 100644
index 0000000..81c5e5a
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FileSystemEntryCacheConfiguration.xml
@@ -0,0 +1,303 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="file-system-entry-cache"
+ plural-name="file-system-entry-caches"
+ package="org.forgerock.opendj.server.config" extends="entry-cache"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is an entry cache implementation which uses a JE database to keep
+ track of the entries.
+ </adm:synopsis>
+ <adm:description>
+ For best performance, the JE database should reside in a memory
+ based file system although any file system will do for this cache
+ to function. Entries are maintained either by FIFO (default) or LRU-based
+ (configurable) list implementation. Cache sizing is based on
+ the size of free space available in the file system, such that if
+ enough memory is free, then adding an entry to the cache will not
+ require purging. If more than the specified size of the file
+ system available space is already consumed, then one or more entries
+ need to be removed in order to make room for a new entry. It is
+ also possible to configure a maximum number of entries for the cache.
+ If this is specified, then the number of entries are not allowed
+ to exceed this value, but it may not be possible to hold this many
+ entries if the available memory fills up first. Other configurable
+ parameters for this cache include the maximum length of time to block
+ while waiting to acquire a lock, and a set of filters that may be
+ used to define criteria for determining which entries are stored in
+ the cache. If a set of filters are provided then an entry must match
+ at least one of them in order to be stored in the cache.
+ JE environment cache size can also be configured either as a percentage
+ of the free memory available in the JVM, or as an absolute size in
+ bytes. This cache has a persistence property which, if enabled,
+ allows for the contents of the cache to persist across server or
+ cache restarts.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-file-system-entry-cache</ldap:name>
+ <ldap:superior>ds-cfg-entry-cache</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="lock-timeout" advanced="true">
+ <adm:synopsis>
+ The length of time to wait while attempting to acquire a read or
+ write lock.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>2000.0ms</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" allow-unlimited="true" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-lock-timeout</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-memory-size">
+ <adm:synopsis>
+ The maximum size of the entry cache in bytes.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0b</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-memory-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-entries">
+ <adm:synopsis>
+ The maximum number of entries allowed in the cache.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>2147483647</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-entries</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="cache-type">
+ <adm:synopsis>
+ Specifies the policy which should be used for purging entries from
+ the cache.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>fifo</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="fifo">
+ <adm:synopsis>FIFO based entry cache.</adm:synopsis>
+ </adm:value>
+ <adm:value name="lru">
+ <adm:synopsis>LRU based entry cache.</adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-cache-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="cache-directory">
+ <adm:synopsis>
+ Specifies the directory in which the JE environment should store
+ the cache.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>/tmp/OpenDJ.FSCache</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-cache-directory</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="persistent-cache">
+ <adm:synopsis>
+ Specifies whether the cache should persist across restarts.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-persistent-cache</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="compact-encoding">
+ <adm:synopsis>
+ Indicates whether the cache should use a compact form when
+ encoding cache entries by compressing the attribute descriptions
+ and object class sets.
+ </adm:synopsis>
+ <adm:description>
+ Note that compression does not preserve user-supplied
+ capitalization in the object class and attribute type names.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changing this property only affects the encoding of the
+ cache entries put in the cache after the change is made. It
+ will not be retroactively applied to existing cache entries.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-compact-encoding</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-cache-percent">
+ <adm:synopsis>
+ Specifies the maximum memory usage for the internal JE cache as a percentage
+ of the total JVM memory.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>1</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" upper-limit="90" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-cache-percent</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-cache-size">
+ <adm:synopsis>
+ Specifies the maximum JVM memory usage in bytes for the internal JE cache.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0b</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-cache-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="je-property" multi-valued="true"
+ advanced="true">
+ <adm:synopsis>
+ Specifies the environment properties for the Berkeley DB Java
+ Edition database providing the backend for this entry cache.
+ </adm:synopsis>
+ <adm:description>
+ Any Berkeley DB Java Edition property can be specified using the
+ following form: property-name=property-value. Refer to the
+ <adm:product-name /> documentation for further information on related
+ properties, their implications and range values. The definitive
+ identification of all the property parameters available in the
+ example.properties file in the Berkeley DB Java Edition distribution.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>je.env.isLocking=false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-je-property</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property-reference name="include-filter" />
+ <adm:property-reference name="exclude-filter" />
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.FileSystemEntryCache
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FingerprintCertificateMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FingerprintCertificateMapperConfiguration.xml
new file mode 100644
index 0000000..4fd048d
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FingerprintCertificateMapperConfiguration.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="fingerprint-certificate-mapper"
+ plural-name="fingerprint-certificate-mappers"
+ package="org.forgerock.opendj.server.config" extends="certificate-mapper"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ maps client certificates to user entries by looking for the MD5 or
+ SHA1 fingerprint in a specified attribute of user entries.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-fingerprint-certificate-mapper</ldap:name>
+ <ldap:superior>ds-cfg-certificate-mapper</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.FingerprintCertificateMapper
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="fingerprint-attribute" mandatory="true">
+ <adm:synopsis>
+ Specifies the attribute in which to look for the fingerprint.
+ </adm:synopsis>
+ <adm:description>
+ Values of the fingerprint attribute should exactly match the MD5
+ or SHA1 representation of the certificate fingerprint.
+ </adm:description>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-fingerprint-attribute</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="fingerprint-algorithm" mandatory="true">
+ <adm:synopsis>
+ Specifies the name of the digest algorithm to
+ compute the fingerprint of client certificates.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="md5">
+ <adm:synopsis>
+ Use the MD5 digest algorithm to compute certificate
+ fingerprints.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="sha1">
+ <adm:synopsis>
+ Use the SHA-1 digest algorithm to compute certificate
+ fingerprints.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-fingerprint-algorithm</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="user-base-dn" multi-valued="true">
+ <adm:synopsis>
+ Specifies the set of base DNs below which to search for users.
+ </adm:synopsis>
+ <adm:description>
+ The base DNs are used when performing searches to map the
+ client certificates to a user entry.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The server performs the search in all public naming
+ contexts.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-user-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FixedTimeLogRotationPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FixedTimeLogRotationPolicyConfiguration.xml
new file mode 100644
index 0000000..97b9783
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FixedTimeLogRotationPolicyConfiguration.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="fixed-time-log-rotation-policy"
+ plural-name="fixed-time-log-rotation-policies"
+ package="org.forgerock.opendj.server.config" extends="log-rotation-policy"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ Rotation policy based on a fixed time of day.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-fixed-time-log-rotation-policy</ldap:name>
+ <ldap:superior>ds-cfg-log-rotation-policy</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.loggers.FixedTimeRotationPolicy
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="time-of-day" multi-valued="true"
+ mandatory="true">
+ <adm:synopsis>
+ Specifies the time of day at which log rotation should occur.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^(([0-1][0-9])|([2][0-3]))([0-5][0-9])$</adm:regex>
+ <adm:usage>HHmm</adm:usage>
+ <adm:synopsis>
+ 24 hour time of day in HHmm format.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-time-of-day</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FractionalLDIFImportPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FractionalLDIFImportPluginConfiguration.xml
new file mode 100644
index 0000000..7a73054
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FractionalLDIFImportPluginConfiguration.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2009 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="fractional-ldif-import-plugin"
+ plural-name="fractional-ldif-import-plugins"
+ package="org.forgerock.opendj.server.config" extends="plugin"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is used internally by the replication plugin to support fractional
+ replication.
+ </adm:synopsis>
+ <adm:description>
+ It is used to check fractional configuration consistency with local domain
+ one as well as to filter attributes when performing an online import from a
+ remote backend to a local backend.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-fractional-ldif-import-plugin</ldap:name>
+ <ldap:superior>ds-cfg-plugin</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FreeDiskSpaceLogRetentionPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FreeDiskSpaceLogRetentionPolicyConfiguration.xml
new file mode 100644
index 0000000..6f682f3
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/FreeDiskSpaceLogRetentionPolicyConfiguration.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="free-disk-space-log-retention-policy"
+ plural-name="free-disk-space-log-retention-policies"
+ package="org.forgerock.opendj.server.config" extends="log-retention-policy"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ Retention policy based on the free disk space available.
+ </adm:synopsis>
+ <adm:description>
+ This policy is only available on Java 6.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-free-disk-space-log-retention-policy</ldap:name>
+ <ldap:superior>ds-cfg-log-retention-policy</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.loggers.FreeDiskSpaceRetentionPolicy
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="free-disk-space" mandatory="true">
+ <adm:synopsis>Specifies the minimum amount of free disk space that
+ should be available on the file system on which the archived
+ log files are stored.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:size lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-free-disk-space</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GSSAPISASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GSSAPISASLMechanismHandlerConfiguration.xml
new file mode 100644
index 0000000..93876a8
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GSSAPISASLMechanismHandlerConfiguration.xml
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="gssapi-sasl-mechanism-handler"
+ plural-name="gssapi-sasl-mechanism-handlers"
+ package="org.forgerock.opendj.server.config" extends="sasl-mechanism-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The GSSAPI SASL mechanism
+ performs all processing related to SASL GSSAPI
+ authentication using Kerberos V5.
+ </adm:synopsis>
+ <adm:description>
+ The GSSAPI SASL mechanism provides the ability for clients
+ to authenticate themselves to the server using existing
+ authentication in a Kerberos environment. This mechanism
+ provides the ability to achieve single sign-on for
+ Kerberos-based clients.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-gssapi-sasl-mechanism-handler</ldap:name>
+ <ldap:superior>ds-cfg-sasl-mechanism-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.GSSAPISASLMechanismHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="realm">
+ <adm:synopsis>
+ Specifies the realm to be used for GSSAPI authentication.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The server attempts to determine the realm from the
+ underlying system configuration.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-realm</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="kdc-address">
+ <adm:synopsis>
+ Specifies the address of the KDC that is to be used for Kerberos
+ processing.
+ </adm:synopsis>
+ <adm:description>
+ If provided, this property must be a fully-qualified DNS-resolvable name.
+ If this property is not provided, then the server attempts to determine it
+ from the system-wide Kerberos configuration.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The server attempts to determine the KDC address from the
+ underlying system configuration.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-kdc-address</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="quality-of-protection">
+ <adm:synopsis>
+ The name of a property that specifies the quality of protection
+ the server will support.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>none</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="none">
+ <adm:synopsis>
+ QOP equals authentication only.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="integrity">
+ <adm:synopsis>
+ Quality of protection equals authentication with integrity
+ protection.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="confidentiality">
+ <adm:synopsis>
+ Quality of protection equals authentication with integrity and
+ confidentiality protection.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-quality-of-protection</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="principal-name">
+ <adm:synopsis>
+ Specifies the principal name.
+ </adm:synopsis>
+ <adm:description>
+ It can either be a simple user name or a
+ service name such as host/example.com.
+ If this property is not provided, then the server attempts to build the
+ principal name by appending the fully qualified domain name to the string
+ "ldap/".
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The server attempts to determine the principal name from the
+ underlying system configuration.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-principal-name</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="keytab">
+ <adm:synopsis>
+ Specifies the path to the keytab file that should be used for
+ Kerberos processing.
+ </adm:synopsis>
+ <adm:description>
+ If provided, this is either an absolute path or one that is
+ relative to the server instance root.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The server attempts to use the system-wide default keytab.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-keytab</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="server-fqdn">
+ <adm:synopsis>
+ Specifies the DNS-resolvable fully-qualified domain name for the
+ system.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The server attempts to determine the
+ fully-qualified domain name dynamically .
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-server-fqdn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="identity-mapper" mandatory="true">
+ <adm:synopsis>
+ Specifies the name of the identity mapper that is to be used
+ with this SASL mechanism handler
+ to match the Kerberos principal
+ included in the SASL bind request to the corresponding
+ user in the directory.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:aggregation relation-name="identity-mapper"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced identity mapper must be enabled when the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-identity-mapper</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GetConnectionIdExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GetConnectionIdExtendedOperationHandlerConfiguration.xml
new file mode 100644
index 0000000..f54a55c
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GetConnectionIdExtendedOperationHandlerConfiguration.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="get-connection-id-extended-operation-handler"
+ plural-name="get-connection-id-extended-operation-handlers"
+ package="org.forgerock.opendj.server.config"
+ extends="extended-operation-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for clients to obtain the internal connection
+ ID that the server uses to reference their client connection.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-get-connection-id-extended-operation-handler
+ </ldap:name>
+ <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.GetConnectionIDExtendedOperation
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GetSymmetricKeyExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GetSymmetricKeyExtendedOperationHandlerConfiguration.xml
new file mode 100644
index 0000000..f059524
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GetSymmetricKeyExtendedOperationHandlerConfiguration.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="get-symmetric-key-extended-operation-handler"
+ plural-name="get-symmetric-key-extended-operation-handlers"
+ package="org.forgerock.opendj.server.config"
+ extends="extended-operation-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is used by the <adm:product-name /> cryptographic framework for creating and
+ obtaining symmetric encryption keys.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-get-symmetric-key-extended-operation-handler
+ </ldap:name>
+ <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.crypto.GetSymmetricKeyExtendedOperation
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GlobalConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GlobalConfiguration.xml
new file mode 100644
index 0000000..74e915a
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GlobalConfiguration.xml
@@ -0,0 +1,925 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! Portions Copyright 2011-2012 ForgeRock AS
+ ! -->
+<adm:managed-object name="global" plural-name="globals"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:user-friendly-name>Global Configuration</adm:user-friendly-name>
+ <adm:user-friendly-plural-name>
+ Global Configurations
+ </adm:user-friendly-plural-name>
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ contains properties that affect the overall
+ operation of the <adm:product-name />.
+ </adm:synopsis>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-root-config</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="check-schema" advanced="true">
+ <adm:synopsis>
+ Indicates whether schema enforcement is active.
+ </adm:synopsis>
+ <adm:description>
+ When schema enforcement is activated, the directory server
+ ensures that all operations result in entries are valid
+ according to the defined server schema. It is strongly recommended
+ that this option be left enabled to prevent the inadvertent
+ addition of invalid data into the server.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-check-schema</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="default-password-policy" mandatory="true">
+ <adm:synopsis>
+ Specifies the name of the password policy that is in effect
+ for users whose entries do not specify an alternate password
+ policy (either via a real or virtual attribute).
+ </adm:synopsis>
+ <adm:description>
+ In addition, the default password policy will be used for providing
+ default parameters for sub-entry based password policies when not
+ provided or supported by the sub-entry itself.
+ This property must reference a password policy and no other type of
+ authentication policy.
+ </adm:description>
+ <adm:syntax>
+ <adm:aggregation relation-name="password-policy" parent-path="/" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-default-password-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="add-missing-rdn-attributes" advanced="true">
+ <adm:synopsis>
+ Indicates whether the directory server should automatically add
+ any attribute values contained in the entry's RDN into that entry
+ when processing an add request.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-add-missing-rdn-attributes</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allow-attribute-name-exceptions"
+ advanced="true">
+ <adm:synopsis>
+ Indicates whether the directory server should allow underscores
+ in attribute names and allow attribute names
+ to begin with numeric digits (both of which are violations of the
+ LDAP standards).
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allow-attribute-name-exceptions</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="invalid-attribute-syntax-behavior"
+ advanced="true">
+ <adm:synopsis>
+ Specifies how the directory server should handle operations whenever
+ an attribute value violates the associated attribute syntax.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>reject</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="accept">
+ <adm:synopsis>
+ The directory server silently accepts attribute values
+ that are invalid according to their associated syntax.
+ Matching operations targeting those values may not behave as
+ expected.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="reject">
+ <adm:synopsis>
+ The directory server rejects attribute values that are
+ invalid according to their associated syntax.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="warn">
+ <adm:synopsis>
+ The directory server accepts attribute values that are
+ invalid according to their associated syntax, but also
+ logs a warning message to the error log. Matching operations
+ targeting those values may not behave as expected.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-invalid-attribute-syntax-behavior</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="server-error-result-code" advanced="true">
+ <adm:synopsis>
+ Specifies the numeric value of the result code when request
+ processing fails due to an internal server error.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>80</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-server-error-result-code</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="single-structural-objectclass-behavior"
+ advanced="true">
+ <adm:synopsis>
+ Specifies how the directory server should handle operations an entry does
+ not contain a structural object class or contains multiple structural
+ classes.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>reject</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="accept">
+ <adm:synopsis>
+ The directory server silently accepts entries that do
+ not contain exactly one structural object class. Certain
+ schema features that depend on the entry's structural class
+ may not behave as expected.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="reject">
+ <adm:synopsis>
+ The directory server rejects entries that do not contain
+ exactly one structural object class.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="warn">
+ <adm:synopsis>
+ The directory server accepts entries that do not contain
+ exactly one structural object class, but also logs a
+ warning message to the error log. Certain schema features
+ that depend on the entry's structural class may not behave
+ as expected.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-single-structural-objectclass-behavior
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="notify-abandoned-operations" advanced="true">
+ <adm:synopsis>
+ Indicates whether the directory server should send a response to
+ any operation that is interrupted via an abandon request.
+ </adm:synopsis>
+ <adm:description>
+ The LDAP specification states that abandoned operations should not
+ receive any response, but this may cause problems with client
+ applications that always expect to receive a response to each
+ request.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-notify-abandoned-operations</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="size-limit">
+ <adm:synopsis>
+ Specifies the maximum number of entries that can be returned
+ to the client during a single search operation.
+ </adm:synopsis>
+ <adm:description>
+ A value of 0 indicates that no size limit is enforced. Note
+ that this is the default server-wide limit, but it may be
+ overridden on a per-user basis using the ds-rlim-size-limit
+ operational attribute.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>1000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-size-limit</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="time-limit">
+ <adm:synopsis>
+ Specifies the maximum length of time that should be spent processing
+ a single search operation.
+ </adm:synopsis>
+ <adm:description>
+ A value of 0 seconds indicates that no time limit is
+ enforced. Note that this is the default server-wide time limit,
+ but it may be overridden on a per-user basis using the
+ ds-rlim-time-limit operational attribute.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>60 seconds</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="s" lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-time-limit</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="proxied-authorization-identity-mapper"
+ mandatory="true">
+ <adm:synopsis>
+ Specifies the name of the identity mapper to map
+ authorization ID values (using the "u:" form) provided in the
+ proxied authorization control to the corresponding user entry.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:aggregation relation-name="identity-mapper"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced identity mapper must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-proxied-authorization-identity-mapper
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="writability-mode">
+ <adm:synopsis>
+ Specifies the kinds of write operations the directory server
+ can process.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>enabled</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="enabled">
+ <adm:synopsis>
+ The directory server attempts to process all write
+ operations that are requested of it, regardless of their
+ origin.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="disabled">
+ <adm:synopsis>
+ The directory server rejects all write operations that
+ are requested of it, regardless of their origin.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="internal-only">
+ <adm:synopsis>
+ The directory server attempts to process write
+ operations requested as internal operations or through
+ synchronization, but rejects any such operations
+ requested from external clients.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-writability-mode</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="reject-unauthenticated-requests">
+ <adm:synopsis>
+ Indicates whether the directory server should reject any request
+ (other than bind or StartTLS requests) received from a client that
+ has not yet been authenticated, whose last authentication attempt was
+ unsuccessful, or whose last authentication attempt used anonymous
+ authentication.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-reject-unauthenticated-requests</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="bind-with-dn-requires-password">
+ <adm:synopsis>
+ Indicates whether the directory server should reject any simple
+ bind request that contains a DN but no password.
+ </adm:synopsis>
+ <adm:description>
+ Although such bind requests are technically allowed by the LDAPv3
+ specification (and should be treated as anonymous simple
+ authentication), they may introduce security problems in
+ applications that do not verify that the client actually provided
+ a password.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-bind-with-dn-requires-password</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="lookthrough-limit">
+ <adm:synopsis>
+ Specifies the maximum number of entries that the directory server
+ should "look through" in the course of processing a search
+ request.
+ </adm:synopsis>
+ <adm:description>
+ This includes any entry that the server must examine in the course
+ of processing the request, regardless of whether it actually
+ matches the search criteria. A value of 0 indicates that no
+ lookthrough limit is enforced. Note that this is the default
+ server-wide limit, but it may be overridden on a per-user basis
+ using the ds-rlim-lookthrough-limit operational attribute.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-lookthrough-limit</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="smtp-server" multi-valued="true">
+ <adm:synopsis>
+ Specifies the address (and optional port number) for a mail server
+ that can be used to send email messages via SMTP.
+ </adm:synopsis>
+ <adm:description>
+ It may be an IP address or resolvable hostname, optionally
+ followed by a colon and a port number.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ If no values are defined, then the server cannot send email via SMTP.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^.+(:[0-9]+)?$</adm:regex>
+ <adm:usage>HOST[:PORT]</adm:usage>
+ <adm:synopsis>
+ A hostname, optionally followed by a ":" followed by a port
+ number.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-smtp-server</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allowed-task" advanced="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of a Java class that may be
+ invoked in the server.
+ </adm:synopsis>
+ <adm:description>
+ Any attempt to invoke a task not included in the list of allowed
+ tasks is rejected.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ If no values are defined, then the server does not allow any
+ tasks to be invoked.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allowed-task</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="disabled-privilege" multi-valued="true">
+ <adm:synopsis>
+ Specifies the name of a privilege that should not be evaluated by
+ the server.
+ </adm:synopsis>
+ <adm:description>
+ If a privilege is disabled, then it is assumed that all
+ clients (including unauthenticated clients) have that
+ privilege.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ If no values are defined, then the server enforces all
+ privileges.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="bypass-lockdown">
+ <adm:synopsis>
+ Allows the associated user to bypass server lockdown mode.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="bypass-acl">
+ <adm:synopsis>
+ Allows the associated user to bypass access control checks
+ performed by the server.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="modify-acl">
+ <adm:synopsis>
+ Allows the associated user to modify the server's access
+ control configuration.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="config-read">
+ <adm:synopsis>
+ Allows the associated user to read the server configuration.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="config-write">
+ <adm:synopsis>
+ Allows the associated user to update the server
+ configuration. The config-read privilege is also required.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="jmx-read">
+ <adm:synopsis>
+ Allows the associated user to perform JMX read operations.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="jmx-write">
+ <adm:synopsis>
+ Allows the associated user to perform JMX write operations.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="jmx-notify">
+ <adm:synopsis>
+ Allows the associated user to subscribe to receive JMX
+ notifications.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="ldif-import">
+ <adm:synopsis>
+ Allows the user to request that the server process LDIF
+ import tasks.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="ldif-export">
+ <adm:synopsis>
+ Allows the user to request that the server process LDIF
+ export tasks.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="backend-backup">
+ <adm:synopsis>
+ Allows the user to request that the server process backup
+ tasks.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="backend-restore">
+ <adm:synopsis>
+ Allows the user to request that the server process restore
+ tasks.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="server-lockdown">
+ <adm:synopsis>
+ Allows the user to place and bring the server of lockdown mode.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="server-shutdown">
+ <adm:synopsis>
+ Allows the user to request that the server shut down.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="server-restart">
+ <adm:synopsis>
+ Allows the user to request that the server perform an
+ in-core restart.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="proxied-auth">
+ <adm:synopsis>
+ Allows the user to use the proxied authorization control, or
+ to perform a bind that specifies an alternate authorization
+ identity.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="disconnect-client">
+ <adm:synopsis>
+ Allows the user to terminate other client connections.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="cancel-request">
+ <adm:synopsis>
+ Allows the user to cancel operations in progress on other
+ client connections.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="password-reset">
+ <adm:synopsis>
+ Allows the user to reset user passwords.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="data-sync">
+ <adm:synopsis>
+ Allows the user to participate in data synchronization.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="update-schema">
+ <adm:synopsis>
+ Allows the user to make changes to the server schema.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="privilege-change">
+ <adm:synopsis>
+ Allows the user to make changes to the set of defined root
+ privileges, as well as to grant and revoke privileges for
+ users.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="unindexed-search">
+ <adm:synopsis>
+ Allows the user to request that the server process a search
+ that cannot be optimized using server indexes.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="subentry-write">
+ <adm:synopsis>
+ Allows the associated user to perform LDAP subentry write
+ operations.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-disabled-privilege</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="return-bind-error-messages">
+ <adm:synopsis>
+ Indicates whether responses for failed bind operations should
+ include a message string providing the reason for the
+ authentication failure.
+ </adm:synopsis>
+ <adm:description>
+ Note that these messages may include information that could
+ potentially be used by an attacker. If this option is disabled,
+ then these messages appears only in the server's access log.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-return-bind-error-messages</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="idle-time-limit">
+ <adm:synopsis>
+ Specifies the maximum length of time that a client connection may
+ remain established since its last completed operation.
+ </adm:synopsis>
+ <adm:description>
+ A value of "0 seconds" indicates that no idle time limit is enforced.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0 seconds</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-idle-time-limit</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="save-config-on-successful-startup">
+ <adm:synopsis>
+ Indicates whether the directory server should save a copy of its
+ configuration whenever the startup process completes successfully.
+ </adm:synopsis>
+ <adm:description>
+ This ensures that the server provides a "last known good"
+ configuration, which can be used as a reference (or copied into
+ the active config) if the server fails to start with the current
+ "active" configuration.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-save-config-on-successful-startup</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="workflow-configuration-mode" hidden="true">
+ <adm:synopsis>
+ Specifies the workflow configuration mode (auto vs. manual).
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>auto</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="auto">
+ <adm:synopsis>
+ In the "auto" configuration mode, there is no workflow
+ configuration. The workflows are created automatically based
+ on the backend configuration. There is one workflow per
+ backend base DN.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="manual">
+ <adm:synopsis>
+ In the "manual" configuration mode, each workflow is created
+ according to its description in the configuration.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-workflow-configuration-mode</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="etime-resolution" mandatory="false">
+ <adm:synopsis>
+ Specifies the resolution to use for operation elapsed processing time (etime)
+ measurements.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ milliseconds
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="milliseconds">
+ <adm:synopsis>
+ Use millisecond resolution.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="nanoseconds">
+ <adm:synopsis>
+ Use nanosecond resolution.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-etime-resolution</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="entry-cache-preload" mandatory="false">
+ <adm:synopsis>
+ Indicates whether or not to preload the entry cache on startup.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:server-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-entry-cache-preload</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-allowed-client-connections">
+ <adm:synopsis>
+ Specifies the maximum number of client connections that may be
+ established at any given time
+ </adm:synopsis>
+ <adm:description>
+ A value of 0 indicates that unlimited client connection is allowed.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-allowed-client-connections</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-psearches">
+ <adm:synopsis>
+ Defines the maximum number of concurrent persistent searches that
+ can be performed on directory server
+ </adm:synopsis>
+ <adm:description>
+ The persistent search mechanism provides an active channel through which entries that change,
+ and information about the changes that occur, can be communicated. Because each persistent search
+ operation consumes resources, limiting the number of simultaneous persistent searches keeps the
+ performance impact minimal. A value of -1 indicates that there is no limit on the persistent searches.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>-1</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" allow-unlimited="true" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-psearches</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-internal-buffer-size" advanced="true">
+ <adm:synopsis>
+ The threshold capacity beyond which internal cached buffers used for
+ encoding and decoding entries and protocol messages will be trimmed
+ after use.
+ </adm:synopsis>
+ <adm:description>
+ Individual buffers may grow very large when encoding and decoding
+ large entries and protocol messages and should be reduced in size when
+ they are no longer needed. This setting specifies the threshold at which
+ a buffer is determined to have grown too big and should be trimmed down
+ after use.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>32 KB</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <!-- Upper limit to force 32-bit value -->
+ <adm:size lower-limit="512 B" upper-limit="1 GB"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-internal-buffer-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GoverningStructureRuleVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GoverningStructureRuleVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..e1d56ea
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GoverningStructureRuleVirtualAttributeConfiguration.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2009 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="governing-structure-rule-virtual-attribute"
+ plural-name="governing-structure-rule-virtual-attributes"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ generates a virtual attribute that specifies the DIT structure rule
+ with the schema definitions in effect for the
+ entry. This attribute is defined in RFC 4512.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-governing-structure-rule-virtual-attribute</ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.GoverningSturctureRuleVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="conflict-behavior" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>virtual-overrides-real</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="attribute-type">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>governingStructureRule</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GroupImplementationConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GroupImplementationConfiguration.xml
new file mode 100644
index 0000000..31d92b6
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/GroupImplementationConfiguration.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="group-implementation"
+ plural-name="group-implementations"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ define named collections of users.
+ </adm:synopsis>
+ <adm:description>
+ Different group implementations may have different ways of
+ determining membership. For example, some groups may explicitly list the members,
+ and/or they may dynamically determine membership.
+ </adm:description>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-group-implementation</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>org.opends.server.api.Group</adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/HTTPAccessLogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/HTTPAccessLogPublisherConfiguration.xml
new file mode 100644
index 0000000..ea0c85c
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/HTTPAccessLogPublisherConfiguration.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2013 ForgeRock AS
+ ! -->
+<adm:managed-object name="http-access-log-publisher"
+ plural-name="http-access-log-publishers"
+ package="org.forgerock.opendj.server.config" extends="log-publisher"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for distributing HTTP access log messages from the HTTP
+ access logger to a destination.
+ </adm:synopsis>
+ <adm:description>
+ HTTP access log messages provide information about the types of HTTP
+ requests processed by the server.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-http-access-log-publisher</ldap:name>
+ <ldap:superior>ds-cfg-log-publisher</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property-override name="java-class">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.api.HTTPAccessLogPublisher</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/HTTPConnectionHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/HTTPConnectionHandlerConfiguration.xml
new file mode 100644
index 0000000..597a7ec
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/HTTPConnectionHandlerConfiguration.xml
@@ -0,0 +1,573 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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 2013 ForgeRock AS
+ ! -->
+<adm:managed-object name="http-connection-handler"
+ plural-name="http-connection-handlers"
+ package="org.forgerock.opendj.server.config" extends="connection-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is used to interact with clients using HTTP.
+ </adm:synopsis>
+ <adm:description>
+ It provides full support for Rest2LDAP.
+ </adm:description>
+ <adm:constraint>
+ <adm:synopsis>
+ A Key Manager Provider must be specified when this
+ <adm:user-friendly-name />
+ is enabled and it is configured to use SSL.
+ </adm:synopsis>
+ <adm:condition>
+ <adm:implies>
+ <adm:contains property="enabled" value="true" />
+ <adm:implies>
+ <adm:contains property="use-ssl" value="true" />
+ <adm:is-present property="key-manager-provider" />
+ </adm:implies>
+ </adm:implies>
+ </adm:condition>
+ </adm:constraint>
+ <adm:constraint>
+ <adm:synopsis>
+ A Trust Manager Provider must be specified when this
+ <adm:user-friendly-name />
+ is enabled and it is configured to use SSL.
+ </adm:synopsis>
+ <adm:condition>
+ <adm:implies>
+ <adm:contains property="enabled" value="true" />
+ <adm:implies>
+ <adm:contains property="use-ssl" value="true" />
+ <adm:is-present property="trust-manager-provider" />
+ </adm:implies>
+ </adm:implies>
+ </adm:condition>
+ </adm:constraint>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-http-connection-handler</ldap:name>
+ <ldap:superior>ds-cfg-connection-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.protocols.http.HTTPConnectionHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-reference name="listen-port" />
+ <adm:property-reference name="use-ssl" />
+ <adm:property-reference name="ssl-cert-nickname" />
+ <adm:property-reference name="use-tcp-keep-alive" />
+ <adm:property-reference name="use-tcp-no-delay" />
+ <adm:property-reference name="allow-tcp-reuse-address" />
+ <adm:property name="key-manager-provider">
+ <adm:synopsis>
+ Specifies the name of the key manager that should be used with
+ this
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately, but
+ only for subsequent attempts to access the key manager
+ provider for associated client connections.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="key-manager-provider"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced key manager provider must be enabled when
+ the
+ <adm:user-friendly-name />
+ is enabled and configured to use SSL.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:and>
+ <adm:contains property="enabled" value="true" />
+ <adm:contains property="use-ssl" value="true" />
+ </adm:and>
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-key-manager-provider</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="trust-manager-provider">
+ <adm:synopsis>
+ Specifies the name of the trust manager that should be used with
+ the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately, but
+ only for subsequent attempts to access the trust manager
+ provider for associated client connections.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="trust-manager-provider"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced trust manager provider must be enabled when
+ the
+ <adm:user-friendly-name />
+ is enabled and configured to use SSL.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:and>
+ <adm:contains property="enabled" value="true" />
+ <adm:contains property="use-ssl" value="true" />
+ </adm:and>
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-trust-manager-provider</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="listen-address" multi-valued="true">
+ <adm:synopsis>
+ Specifies the address or set of addresses on which this
+ <adm:user-friendly-name />
+ should listen for connections from HTTP clients.
+ </adm:synopsis>
+ <adm:description>
+ Multiple addresses may be provided as separate values for this
+ attribute. If no values are provided, then the
+ <adm:user-friendly-name />
+ listens on all interfaces.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0.0.0.0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:ip-address />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-listen-address</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="keep-stats">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ should keep statistics.
+ </adm:synopsis>
+ <adm:description>
+ If enabled, the
+ <adm:user-friendly-name />
+ maintains statistics about the number and types of operations
+ requested over HTTP and the amount of data sent and received.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-keep-stats</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-request-size" advanced="true">
+ <adm:synopsis>
+ Specifies the size in bytes of the largest HTTP request message that will
+ be allowed by the <adm:user-friendly-name />.
+ </adm:synopsis>
+ <adm:description>
+ This can help prevent denial-of-service attacks by clients that indicate
+ they send extremely large requests to the server causing it to
+ attempt to allocate large amounts of memory.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5 megabytes</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size upper-limit="2147483647b"></adm:size>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-request-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="buffer-size" advanced="true">
+ <adm:synopsis>
+ Specifies the size in bytes of the HTTP response message write buffer.
+ </adm:synopsis>
+ <adm:description>
+ This property specifies write buffer size allocated by the server for
+ each client connection and used to buffer HTTP response messages data
+ when writing.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>4096 bytes</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size lower-limit="1b" upper-limit="2147483647b"></adm:size>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-buffer-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="num-request-handlers" advanced="true">
+ <adm:synopsis>
+ Specifies the number of request handlers that are used to read
+ requests from clients.
+ </adm:synopsis>
+ <adm:description>
+ The
+ <adm:user-friendly-name />
+ uses one thread to accept new connections from clients, but uses
+ one or more additional threads to read requests from existing
+ client connections. This ensures that new requests are
+ read efficiently and that the connection handler itself does not
+ become a bottleneck when the server is under heavy load from many
+ clients at the same time.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Let the server decide.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-num-request-handlers</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ssl-client-auth-policy">
+ <adm:synopsis>
+ Specifies the policy that the
+ <adm:user-friendly-name />
+ should use regarding client SSL certificates.
+ Clients can use the SASL EXTERNAL mechanism only if the
+ policy is set to "optional" or "required".
+ </adm:synopsis>
+ <adm:description>
+ This is only applicable if clients are allowed to use SSL.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>optional</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="disabled">
+ <adm:synopsis>
+ Clients must not provide their own
+ certificates when performing SSL negotiation.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="optional">
+ <adm:synopsis>
+ Clients are requested to provide their own certificates
+ when performing SSL negotiation, but still accept the
+ connection even if the client does not provide a
+ certificate.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="required">
+ <adm:synopsis>
+ Clients are requested to provide their own certificates
+ when performing SSL negotiation. The connection is
+ nevertheless accepted if the client does not provide a
+ certificate.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-client-auth-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="accept-backlog" advanced="true">
+ <adm:synopsis>
+ Specifies the maximum number of pending connection attempts that
+ are allowed to queue up in the accept backlog before the
+ server starts rejecting new connection attempts.
+ </adm:synopsis>
+ <adm:description>
+ This is primarily an issue for cases in which a large number of
+ connections are established to the server in a very short period
+ of time (for example, a benchmark utility that creates a large number of
+ client threads that each have their own connection to the server)
+ and the connection handler is unable to keep up with the rate at
+ which the new connections are established.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>128</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1">
+ <adm:unit-synopsis>connections</adm:unit-synopsis>
+ </adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-accept-backlog</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ssl-protocol" multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the SSL protocols that are allowed for
+ use in SSL communication.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but only
+ impact new SSL/TLS-based sessions created after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Uses the default set of SSL protocols provided by the server's
+ JVM.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-protocol</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ssl-cipher-suite" multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the SSL cipher suites that are allowed
+ for use in SSL communication.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but will
+ only impact new SSL/TLS-based sessions created after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Uses the default set of SSL cipher suites provided by the
+ server's JVM.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-cipher-suite</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-blocked-write-time-limit" advanced="true">
+ <adm:synopsis>
+ Specifies the maximum length of time that attempts to write data
+ to HTTP clients should be allowed to block.
+ </adm:synopsis>
+ <adm:description>
+ If an attempt to write data to a client takes longer than this
+ length of time, then the client connection is terminated.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>2 minutes</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-blocked-write-time-limit</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="config-file" mandatory="true">
+ <adm:synopsis>
+ Specifies the name of the configuration file for the <adm:user-friendly-name />.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>config/http-config.json</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>FILE</adm:usage>
+ <adm:synopsis>
+ A path to an existing file that is readable by the server.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-config-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="authentication-required" mandatory="true">
+ <adm:synopsis>
+ Specifies whether only authenticated requests can be processed by the
+ <adm:user-friendly-name />.
+ </adm:synopsis>
+ <adm:description>
+ If true, only authenticated requests will be processed by the
+ <adm:user-friendly-name />. If false, both authenticated requests and
+ unauthenticated requests will be processed. All requests are subject
+ to ACI limitations and unauthenticated requests are subject to server
+ limits like maximum number of entries returned. Note that setting
+ ds-cfg-reject-unauthenticated-requests to true will override the current
+ setting.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-authentication-required</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-concurrent-ops-per-connection">
+ <adm:synopsis>
+ Specifies the maximum number of internal operations that each
+ HTTP client connection can execute concurrently.
+ </adm:synopsis>
+ <adm:description>
+ This property allow to limit the impact that each HTTP request can have on
+ the whole server by limiting the number of internal operations that each
+ HTTP request can execute concurrently.
+ A value of 0 means that no limit is enforced.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Let the server decide.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-concurrent-ops-per-connection</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/HasSubordinatesVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/HasSubordinatesVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..15e904a
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/HasSubordinatesVirtualAttributeConfiguration.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="has-subordinates-virtual-attribute"
+ plural-name="has-subordinates-virtual-attributes"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ generates a virtual attribute that indicates whether
+ the entry has any subordinate entries.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-has-subordinates-virtual-attribute</ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.HasSubordinatesVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="conflict-behavior" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>virtual-overrides-real</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="attribute-type">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>hasSubordinates</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/IdentityMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/IdentityMapperConfiguration.xml
new file mode 100644
index 0000000..91b94e1
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/IdentityMapperConfiguration.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="identity-mapper"
+ plural-name="identity-mappers" package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for establishing a mapping between an identifier
+ string provided by a client, and the entry for the user that
+ corresponds to that identifier. <adm:user-friendly-plural-name />
+ are used to process several SASL mechanisms to map an authorization ID
+ (e.g., a Kerberos principal when using GSSAPI) to a directory user. They
+ are also used when processing requests with the proxied authorization control.
+ </adm:synopsis>
+ <adm:tag name="security" />
+ <adm:tag name="user-management" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-identity-mapper</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled for use.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.IdentityMapper
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/IsMemberOfVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/IsMemberOfVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..57f45a6
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/IsMemberOfVirtualAttributeConfiguration.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="is-member-of-virtual-attribute"
+ plural-name="is-member-of-virtual-attributes"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ generates the isMemberOf operational attribute,
+ which contains the DNs of
+ the groups in which the user is a member.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-is-member-of-virtual-attribute</ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.IsMemberOfVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="conflict-behavior" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>virtual-overrides-real</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="attribute-type">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>isMemberOf</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/JMXAlertHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/JMXAlertHandlerConfiguration.xml
new file mode 100644
index 0000000..c50826e
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/JMXAlertHandlerConfiguration.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="jmx-alert-handler"
+ plural-name="jmx-alert-handlers" package="org.forgerock.opendj.server.config"
+ extends="alert-handler" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is used to generate JMX notifications to alert administrators of
+ significant events that occur within the server.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-jmx-alert-handler</ldap:name>
+ <ldap:superior>ds-cfg-alert-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.JMXAlertHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/JMXConnectionHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/JMXConnectionHandlerConfiguration.xml
new file mode 100644
index 0000000..975e4bf
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/JMXConnectionHandlerConfiguration.xml
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
+ ! Portions Copyright 2013 ForgeRock AS.
+ ! -->
+<adm:managed-object name="jmx-connection-handler"
+ plural-name="jmx-connection-handlers"
+ package="org.forgerock.opendj.server.config" extends="connection-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is used to interact with clients using the Java Management
+ Extensions (JMX) protocol.
+ </adm:synopsis>
+ <adm:constraint>
+ <adm:synopsis>
+ A Key Manager Provider must be specified when this
+ <adm:user-friendly-name />
+ is enabled and it is configured to use SSL.
+ </adm:synopsis>
+ <adm:condition>
+ <adm:implies>
+ <adm:contains property="enabled" value="true" />
+ <adm:implies>
+ <adm:contains property="use-ssl" value="true" />
+ <adm:is-present property="key-manager-provider" />
+ </adm:implies>
+ </adm:implies>
+ </adm:condition>
+ </adm:constraint>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-jmx-connection-handler</ldap:name>
+ <ldap:superior>ds-cfg-connection-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.protocols.jmx.JmxConnectionHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="listen-address" multi-valued="true" read-only="true">
+ <adm:synopsis>
+ Specifies the address or set of addresses on which this
+ <adm:user-friendly-name />
+ should listen for connections from JMX clients. However JMX/RMI
+ doesn't allow this, and this property cannot be set.
+ </adm:synopsis>
+ <adm:description>
+ Multiple addresses may be provided as separate values for this
+ attribute. If no values are provided, then the
+ <adm:user-friendly-name />
+ listens on all interfaces.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:server-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0.0.0.0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:ip-address />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-listen-address</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property-reference name="listen-port" />
+ <adm:property-reference name="use-ssl" />
+ <adm:property-reference name="ssl-cert-nickname" />
+ <adm:property name="key-manager-provider">
+ <adm:synopsis>
+ Specifies the name of the key manager that should be used with
+ this
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately, but
+ only for subsequent attempts to access the key manager
+ provider for associated client connections.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="key-manager-provider"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced key manager provider must be enabled when
+ the
+ <adm:user-friendly-name />
+ is enabled and configured to use SSL.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:and>
+ <adm:contains property="enabled" value="true" />
+ <adm:contains property="use-ssl" value="true" />
+ </adm:and>
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-key-manager-provider</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="rmi-port">
+ <adm:synopsis>
+ Specifies the port number on which the JMX RMI service
+ will listen for connections from clients. A value of 0
+ indicates the service to choose a port of its own.
+ </adm:synopsis>
+ <adm:description>
+ If the value provided is different than 0, the value
+ will be used as the RMI port. Otherwise, the RMI service
+ will choose a port of its own.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" upper-limit="65535" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-rmi-port</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/JPEGAttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/JPEGAttributeSyntaxConfiguration.xml
new file mode 100644
index 0000000..dbb97fa
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/JPEGAttributeSyntaxConfiguration.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2012 ForgeRock AS
+ ! -->
+<adm:managed-object name="jpeg-attribute-syntax"
+ plural-name="jpeg-attribute-syntaxes"
+ extends="attribute-syntax" package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ define an attribute syntax for storing JPEG information.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-jpeg-attribute-syntax</ldap:name>
+ <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.schema.JPEGSyntax
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="strict-format" advanced="true">
+ <adm:synopsis>
+ Indicates whether to require JPEG values to strictly
+ comply with the standard definition for this syntax.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-strict-format</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/KeyManagerProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/KeyManagerProviderConfiguration.xml
new file mode 100644
index 0000000..2dfc8d6
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/KeyManagerProviderConfiguration.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="key-manager-provider"
+ plural-name="key-manager-providers"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for managing the key material that is used to
+ authenticate an SSL connection to its peer.
+ </adm:synopsis>
+ <adm:description>
+ <adm:user-friendly-plural-name />
+ essentially provide access to the certificate that is used by the
+ server when performing SSL or StartTLS negotiation.
+ </adm:description>
+ <adm:tag name="security" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-key-manager-provider</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled for use.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ The fully-qualified name of the Java class that provides
+ the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.KeyManagerProvider
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDAPAttributeDescriptionListPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDAPAttributeDescriptionListPluginConfiguration.xml
new file mode 100644
index 0000000..e1880ff
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDAPAttributeDescriptionListPluginConfiguration.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="ldap-attribute-description-list-plugin"
+ plural-name="ldap-attribute-description-list-plugins"
+ package="org.forgerock.opendj.server.config" extends="plugin"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides the ability for clients to include an attribute list in
+ a search request that names object classes instead of (or in
+ addition to) attributes.
+ </adm:synopsis>
+ <adm:description>
+ For example, if a client wishes to
+ retrieve all of the attributes in the inetOrgPerson object class,
+ then that client can include "@inetOrgPerson" in the attribute
+ list rather than naming all of those attributes individually.
+ This behavior is based on the specification contained in RFC 4529.
+ The implementation for the LDAP attribute description list plugin
+ is contained in the
+ org.opends.server.plugins.LDAPADListPlugin class. It must be
+ configured with the preParseSearch plugin type, but does not have
+ any other custom configuration.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-ldap-attribute-description-list-plugin
+ </ldap:name>
+ <ldap:superior>ds-cfg-plugin</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.plugins.LDAPADListPlugin
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="plugin-type" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>preparsesearch</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDAPConnectionHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDAPConnectionHandlerConfiguration.xml
new file mode 100644
index 0000000..6bdfeae
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDAPConnectionHandlerConfiguration.xml
@@ -0,0 +1,606 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
+ ! Portions copyright 2011-2013 ForgeRock AS
+ ! -->
+<adm:managed-object name="ldap-connection-handler"
+ plural-name="ldap-connection-handlers"
+ package="org.forgerock.opendj.server.config" extends="connection-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is used to interact with clients using LDAP.
+ </adm:synopsis>
+ <adm:description>
+ It provides full support for LDAPv3 and limited
+ support for LDAPv2.
+ </adm:description>
+ <adm:constraint>
+ <adm:synopsis>
+ A Key Manager Provider must be specified when this
+ <adm:user-friendly-name />
+ is enabled and it is configured to use SSL or StartTLS.
+ </adm:synopsis>
+ <adm:condition>
+ <adm:implies>
+ <adm:contains property="enabled" value="true" />
+ <adm:implies>
+ <adm:or>
+ <adm:contains property="use-ssl" value="true" />
+ <adm:contains property="allow-start-tls" value="true" />
+ </adm:or>
+ <adm:is-present property="key-manager-provider" />
+ </adm:implies>
+ </adm:implies>
+ </adm:condition>
+ </adm:constraint>
+ <adm:constraint>
+ <adm:synopsis>
+ A Trust Manager Provider must be specified when this
+ <adm:user-friendly-name />
+ is enabled and it is configured to use SSL or StartTLS.
+ </adm:synopsis>
+ <adm:condition>
+ <adm:implies>
+ <adm:contains property="enabled" value="true" />
+ <adm:implies>
+ <adm:or>
+ <adm:contains property="use-ssl" value="true" />
+ <adm:contains property="allow-start-tls" value="true" />
+ </adm:or>
+ <adm:is-present property="trust-manager-provider" />
+ </adm:implies>
+ </adm:implies>
+ </adm:condition>
+ </adm:constraint>
+ <adm:constraint>
+ <adm:synopsis>
+ A
+ <adm:user-friendly-name />
+ cannot be configured to support SSL and StartTLS at the same time.
+ Either SSL or StartTLS must be disabled in order for this
+ <adm:user-friendly-name />
+ to be used.
+ </adm:synopsis>
+ <adm:condition>
+ <adm:implies>
+ <adm:contains property="enabled" value="true" />
+ <adm:not>
+ <adm:and>
+ <adm:contains property="use-ssl" value="true" />
+ <adm:contains property="allow-start-tls" value="true" />
+ </adm:and>
+ </adm:not>
+ </adm:implies>
+ </adm:condition>
+ </adm:constraint>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-ldap-connection-handler</ldap:name>
+ <ldap:superior>ds-cfg-connection-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.protocols.ldap.LDAPConnectionHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-reference name="listen-port" />
+ <adm:property-reference name="use-ssl" />
+ <adm:property-reference name="ssl-cert-nickname" />
+ <adm:property-reference name="use-tcp-keep-alive" />
+ <adm:property-reference name="use-tcp-no-delay" />
+ <adm:property-reference name="allow-tcp-reuse-address" />
+ <adm:property name="key-manager-provider">
+ <adm:synopsis>
+ Specifies the name of the key manager that should be used with
+ this
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately, but
+ only for subsequent attempts to access the key manager
+ provider for associated client connections.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="key-manager-provider"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced key manager provider must be enabled when
+ the
+ <adm:user-friendly-name />
+ is enabled and configured to use SSL or StartTLS.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:and>
+ <adm:contains property="enabled" value="true" />
+ <adm:or>
+ <adm:contains property="use-ssl" value="true" />
+ <adm:contains property="allow-start-tls" value="true" />
+ </adm:or>
+ </adm:and>
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-key-manager-provider</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="trust-manager-provider">
+ <adm:synopsis>
+ Specifies the name of the trust manager that should be used with
+ the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately, but
+ only for subsequent attempts to access the trust manager
+ provider for associated client connections.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="trust-manager-provider"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced trust manager provider must be enabled when
+ the
+ <adm:user-friendly-name />
+ is enabled and configured to use SSL or StartTLS.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:and>
+ <adm:contains property="enabled" value="true" />
+ <adm:or>
+ <adm:contains property="use-ssl" value="true" />
+ <adm:contains property="allow-start-tls" value="true" />
+ </adm:or>
+ </adm:and>
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-trust-manager-provider</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="listen-address" multi-valued="true">
+ <adm:synopsis>
+ Specifies the address or set of addresses on which this
+ <adm:user-friendly-name />
+ should listen for connections from LDAP clients.
+ </adm:synopsis>
+ <adm:description>
+ Multiple addresses may be provided as separate values for this
+ attribute. If no values are provided, then the
+ <adm:user-friendly-name />
+ listens on all interfaces.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0.0.0.0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:ip-address />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-listen-address</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allow-ldap-v2">
+ <adm:synopsis>
+ Indicates whether connections from LDAPv2 clients are allowed.
+ </adm:synopsis>
+ <adm:description>
+ If LDAPv2 clients are allowed, then only a minimal degree of
+ special support are provided for them to ensure that
+ LDAPv3-specific protocol elements (for example, Configuration Guide 25
+ controls, extended response messages, intermediate response
+ messages, referrals) are not sent to an LDAPv2 client.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allow-ldap-v2</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="keep-stats">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ should keep statistics.
+ </adm:synopsis>
+ <adm:description>
+ If enabled, the
+ <adm:user-friendly-name />
+ maintains statistics about the number and types of operations
+ requested over LDAP and the amount of data sent and received.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-keep-stats</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="send-rejection-notice" advanced="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ should send a notice of disconnection extended response message to
+ the client if a new connection is rejected for some reason.
+ </adm:synopsis>
+ <adm:description>
+ The extended response message may provide an explanation
+ indicating the reason that the connection was rejected.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-send-rejection-notice</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-request-size" advanced="true">
+ <adm:synopsis>
+ Specifies the size in bytes of the largest LDAP request message that will
+ be allowed by this LDAP Connection handler.
+ </adm:synopsis>
+ <adm:description>
+ This property is analogous to the maxBERSize configuration
+ attribute of the Sun Java System Directory Server. This can help
+ prevent denial-of-service attacks by clients that indicate they
+ send extremely large requests to the server causing it to
+ attempt to allocate large amounts of memory.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5 megabytes</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size upper-limit="2147483647b"></adm:size>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-request-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="buffer-size" advanced="true">
+ <adm:synopsis>
+ Specifies the size in bytes of the LDAP response message write buffer.
+ </adm:synopsis>
+ <adm:description>
+ This property specifies write buffer size allocated by the server for
+ each client connection and used to buffer LDAP response messages data
+ when writing.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>4096 bytes</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size lower-limit="1b" upper-limit="2147483647b"></adm:size>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-buffer-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="num-request-handlers" advanced="true">
+ <adm:synopsis>
+ Specifies the number of request handlers that are used to read
+ requests from clients.
+ </adm:synopsis>
+ <adm:description>
+ The
+ <adm:user-friendly-name />
+ uses one thread to accept new connections from clients, but uses
+ one or more additional threads to read requests from existing
+ client connections. This ensures that new requests are
+ read efficiently and that the connection handler itself does not
+ become a bottleneck when the server is under heavy load from many
+ clients at the same time.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Let the server decide.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-num-request-handlers</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allow-start-tls">
+ <adm:synopsis>
+ Indicates whether clients are allowed to use StartTLS.
+ </adm:synopsis>
+ <adm:description>
+ If enabled, the
+ <adm:user-friendly-name />
+ allows clients to use the StartTLS extended operation to
+ initiate secure communication over an otherwise insecure channel.
+ Note that this is only allowed if the
+ <adm:user-friendly-name />
+ is not configured to use SSL, and if the server is configured with
+ a valid key manager provider and a valid trust manager provider.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allow-start-tls</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ssl-client-auth-policy">
+ <adm:synopsis>
+ Specifies the policy that the
+ <adm:user-friendly-name />
+ should use regarding client SSL certificates.
+ Clients can use the SASL EXTERNAL mechanism only if the
+ policy is set to "optional" or "required".
+ </adm:synopsis>
+ <adm:description>
+ This is only applicable if clients are allowed to use SSL.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>optional</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="disabled">
+ <adm:synopsis>
+ Clients must not provide their own
+ certificates when performing SSL negotiation.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="optional">
+ <adm:synopsis>
+ Clients are requested to provide their own certificates
+ when performing SSL negotiation. The connection is
+ nevertheless accepted if the client does not provide a
+ certificate.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="required">
+ <adm:synopsis>
+ Clients are required to provide their own certificates
+ when performing SSL negotiation and are refused access
+ if they do not provide a certificate.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-client-auth-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="accept-backlog" advanced="true">
+ <adm:synopsis>
+ Specifies the maximum number of pending connection attempts that
+ are allowed to queue up in the accept backlog before the
+ server starts rejecting new connection attempts.
+ </adm:synopsis>
+ <adm:description>
+ This is primarily an issue for cases in which a large number of
+ connections are established to the server in a very short period
+ of time (for example, a benchmark utility that creates a large number of
+ client threads that each have their own connection to the server)
+ and the connection handler is unable to keep up with the rate at
+ which the new connections are established.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>128</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1">
+ <adm:unit-synopsis>connections</adm:unit-synopsis>
+ </adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-accept-backlog</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ssl-protocol" multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the SSL protocols that are allowed for
+ use in SSL or StartTLS communication.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but only
+ impact new SSL/TLS-based sessions created after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Uses the default set of SSL protocols provided by the server's
+ JVM.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-protocol</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ssl-cipher-suite" multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the SSL cipher suites that are allowed
+ for use in SSL or StartTLS communication.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but will
+ only impact new SSL/TLS-based sessions created after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Uses the default set of SSL cipher suites provided by the
+ server's JVM.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-cipher-suite</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-blocked-write-time-limit" advanced="true">
+ <adm:synopsis>
+ Specifies the maximum length of time that attempts to write data
+ to LDAP clients should be allowed to block.
+ </adm:synopsis>
+ <adm:description>
+ If an attempt to write data to a client takes longer than this
+ length of time, then the client connection is terminated.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>2 minutes</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-blocked-write-time-limit</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDAPPassThroughAuthenticationPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDAPPassThroughAuthenticationPolicyConfiguration.xml
new file mode 100644
index 0000000..be93ebd
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDAPPassThroughAuthenticationPolicyConfiguration.xml
@@ -0,0 +1,663 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="ldap-pass-through-authentication-policy"
+ plural-name="ldap-pass-through-authentication-policies" extends="authentication-policy"
+ package="org.forgerock.opendj.server.config" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+
+ <adm:synopsis>
+ An authentication policy for users whose credentials are managed
+ by a remote LDAP directory service.
+ </adm:synopsis>
+
+ <adm:description>
+ Authentication attempts will be redirected to the remote LDAP
+ directory service based on a combination of the criteria specified in this
+ policy and the content of the user's entry in this directory server.
+ </adm:description>
+
+ <adm:constraint>
+ <adm:synopsis>
+ One or more mapped attributes must be specified when using the
+ "mapped-bind" or "mapped-search" mapping policies.
+ </adm:synopsis>
+ <adm:condition>
+ <adm:implies>
+ <adm:or>
+ <adm:contains property="mapping-policy" value="mapped-bind" />
+ <adm:contains property="mapping-policy" value="mapped-search" />
+ </adm:or>
+ <adm:is-present property="mapped-attribute" />
+ </adm:implies>
+ </adm:condition>
+ </adm:constraint>
+
+ <adm:constraint>
+ <adm:synopsis>
+ One or more search base DNs must be specified when using the
+ "mapped-search" mapping policy.
+ </adm:synopsis>
+ <adm:condition>
+ <adm:implies>
+ <adm:contains property="mapping-policy" value="mapped-search" />
+ <adm:is-present property="mapped-search-base-dn" />
+ </adm:implies>
+ </adm:condition>
+ </adm:constraint>
+
+ <adm:constraint>
+ <adm:synopsis>
+ The mapped search bind password must be specified when using the
+ "mapped-search" mapping policy and a mapped-search-bind-dn is defined.
+ </adm:synopsis>
+ <adm:condition>
+ <adm:implies>
+ <adm:and>
+ <adm:contains property="mapping-policy" value="mapped-search" />
+ <adm:is-present property="mapped-search-bind-dn" />
+ </adm:and>
+ <adm:or>
+ <adm:is-present property="mapped-search-bind-password" />
+ <adm:is-present property="mapped-search-bind-password-property" />
+ <adm:is-present property="mapped-search-bind-password-environment-variable" />
+ <adm:is-present property="mapped-search-bind-password-file" />
+ </adm:or>
+ </adm:implies>
+ </adm:condition>
+ </adm:constraint>
+
+ <adm:constraint>
+ <adm:synopsis>
+ The cached password storage scheme must be specified when password
+ caching is enabled.
+ </adm:synopsis>
+ <adm:condition>
+ <adm:implies>
+ <adm:contains property="use-password-caching" value="true" />
+ <adm:is-present property="cached-password-storage-scheme" />
+ </adm:implies>
+ </adm:condition>
+ </adm:constraint>
+
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-ldap-pass-through-authentication-policy</ldap:name>
+ <ldap:superior>ds-cfg-authentication-policy</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.LDAPPassThroughAuthenticationPolicyFactory
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+
+ <adm:property name="primary-remote-ldap-server" multi-valued="true"
+ mandatory="true">
+ <adm:synopsis>
+ Specifies the primary list of remote LDAP servers which should
+ be used for pass through authentication.
+ </adm:synopsis>
+ <adm:description>
+ If more than one LDAP server is specified then operations
+ may be distributed across them. If all of the primary LDAP servers are
+ unavailable then operations will fail-over to the set of secondary LDAP
+ servers, if defined.
+ </adm:description>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^.+:[0-9]+$</adm:regex>
+ <adm:usage>HOST:PORT</adm:usage>
+ <adm:synopsis>
+ A host name followed by a ":" and a port number.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-primary-remote-ldap-server</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="secondary-remote-ldap-server" multi-valued="true">
+ <adm:synopsis>
+ Specifies the secondary list of remote LDAP servers which
+ should be used for pass through authentication in the event that the
+ primary LDAP servers are unavailable.
+ </adm:synopsis>
+ <adm:description>
+ If more than one LDAP server is specified then operations
+ may be distributed across them. Operations will be rerouted to the primary
+ LDAP servers as soon as they are determined to be available.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>No secondary LDAP servers.</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^.+:[0-9]+$</adm:regex>
+ <adm:usage>HOST:PORT</adm:usage>
+ <adm:synopsis>
+ A host name followed by a ":" and a port number.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-secondary-remote-ldap-server</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="connection-timeout">
+ <adm:synopsis>
+ Specifies the timeout used when connecting to remote LDAP
+ directory servers, performing SSL negotiation, and for individual search
+ and bind requests.
+ </adm:synopsis>
+ <adm:description>
+ If the timeout expires then the current operation will be
+ aborted and retried against another LDAP server if one is available.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>3 seconds</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-connection-timeout</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property-reference name="use-ssl" />
+
+ <adm:property name="trust-manager-provider">
+ <adm:synopsis>
+ Specifies the name of the trust manager that should be used
+ when negotiating SSL connections with remote LDAP directory servers.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately, but only
+ impact subsequent SSL connection negotiations.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ By default, no trust manager is specified indicating that only
+ certificates signed by the authorities associated with this JVM will
+ be accepted.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="trust-manager-provider"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced trust manager provider must be enabled
+ when SSL is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:and>
+ <adm:contains property="use-ssl" value="true" />
+ </adm:and>
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-trust-manager-provider</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="mapping-policy" mandatory="true">
+ <adm:synopsis>
+ Specifies the mapping algorithm for obtaining the bind DN from
+ the user's entry.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>unmapped</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="unmapped">
+ <adm:synopsis>
+ Bind to the remote LDAP directory service using the DN
+ of the user's entry in this directory server.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="mapped-bind">
+ <adm:synopsis>
+ Bind to the remote LDAP directory service using a DN
+ obtained from an attribute in the user's entry. This policy will
+ check each attribute named in the "mapped-attribute" property. If
+ more than one attribute or value is present then the first one will
+ be used.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="mapped-search">
+ <adm:synopsis>
+ Bind to the remote LDAP directory service using the DN
+ of an entry obtained using a search against the remote LDAP
+ directory service. The search filter will comprise of an equality
+ matching filter whose attribute type is the "mapped-attribute"
+ property, and whose assertion value is the attribute value obtained
+ from the user's entry. If more than one attribute or value is
+ present then the filter will be composed of multiple equality
+ filters combined using a logical OR (union).
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-mapping-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="mapped-attribute" multi-valued="true">
+ <adm:synopsis>
+ Specifies one or more attributes in the user's entry whose
+ value(s) will determine the bind DN used when authenticating to the remote
+ LDAP directory service. This property is mandatory when using the
+ "mapped-bind" or "mapped-search" mapping policies.
+ </adm:synopsis>
+ <adm:description>
+ At least one value must be provided. All values must refer
+ to the name or OID of an attribute type defined in the directory server
+ schema. At least one of the named attributes must exist in a user's
+ local entry in order for authentication to proceed. When multiple
+ attributes or values are found in the user's entry then the behavior is
+ determined by the mapping policy.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-mapped-attribute</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="mapped-search-bind-dn">
+ <adm:synopsis>
+ Specifies the bind DN which should be used to perform user
+ searches in the remote LDAP directory service.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>Searches will be performed anonymously.</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-mapped-search-bind-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="mapped-search-bind-password">
+ <adm:synopsis>
+ Specifies the bind password which should be used to perform
+ user searches in the remote LDAP directory service.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:password />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-mapped-search-bind-password</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="mapped-search-bind-password-property">
+ <adm:synopsis>
+ Specifies the name of a Java property containing the bind password which
+ should be used to perform user searches in the remote LDAP directory
+ service.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-mapped-search-bind-password-property</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="mapped-search-bind-password-environment-variable">
+ <adm:synopsis>
+ Specifies the name of an environment variable containing the bind
+ password which should be used to perform user searches in the remote LDAP
+ directory service.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-mapped-search-bind-password-environment-variable
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="mapped-search-bind-password-file">
+ <adm:synopsis>
+ Specifies the name of a file containing the bind
+ password which should be used to perform user searches in the remote LDAP
+ directory service.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-mapped-search-bind-password-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="mapped-search-base-dn" multi-valued="true">
+ <adm:synopsis>
+ Specifies the set of base DNs below which to search for users
+ in the remote LDAP directory service. This property is mandatory when
+ using the "mapped-search" mapping policy.
+ </adm:synopsis>
+ <adm:description>
+ If multiple values are given, searches are performed below
+ all specified base DNs.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-mapped-search-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="use-tcp-keep-alive" advanced="true">
+ <adm:synopsis>
+ Indicates whether LDAP connections should use TCP keep-alive.
+ </adm:synopsis>
+ <adm:description>
+ If enabled, the SO_KEEPALIVE socket option is used to
+ indicate that TCP keepalive messages should periodically be sent to the
+ client to verify that the associated connection is still valid. This may
+ also help prevent cases in which intermediate network hardware
+ could silently drop an otherwise idle client connection, provided
+ that the keepalive interval configured in the underlying operating
+ system is smaller than the timeout enforced by the network hardware.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-use-tcp-keep-alive</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="use-tcp-no-delay" advanced="true">
+ <adm:synopsis>
+ Indicates whether LDAP connections should use TCP no-delay.
+ </adm:synopsis>
+ <adm:description>
+ If enabled, the TCP_NODELAY socket option is used to ensure
+ that response messages to the client are sent immediately rather
+ than potentially waiting to determine whether additional response
+ messages can be sent in the same packet. In most cases, using the
+ TCP_NODELAY socket option provides better performance and
+ lower response times, but disabling it may help for some cases in
+ which the server sends a large number of entries to a client
+ in response to a search request.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-use-tcp-no-delay</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="ssl-protocol" multi-valued="true" advanced="true">
+ <adm:synopsis>
+ Specifies the names of the SSL protocols which are allowed for
+ use in SSL based LDAP connections.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but will
+ only impact new SSL LDAP connections created after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Uses the default set of SSL protocols provided by the
+ server's JVM.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-protocol</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="ssl-cipher-suite" multi-valued="true"
+ advanced="true">
+ <adm:synopsis>
+ Specifies the names of the SSL cipher suites that are allowed
+ for use in SSL based LDAP connections.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately but will
+ only impact new SSL LDAP connections created after the
+ change.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Uses the default set of SSL cipher suites provided by the
+ server's JVM.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-cipher-suite</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="use-password-caching" mandatory="true">
+ <adm:synopsis>
+ Indicates whether passwords should be cached locally within the user's
+ entry.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-use-password-caching</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="cached-password-storage-scheme">
+ <adm:synopsis>
+ Specifies the name of a password storage scheme which should be used
+ for encoding cached passwords.
+ </adm:synopsis>
+ <adm:description>
+ Changing the password storage scheme will cause all existing cached
+ passwords to be discarded.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="password-storage-scheme"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced password storage schemes must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-cached-password-storage-scheme</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="cached-password-ttl">
+ <adm:synopsis>
+ Specifies the maximum length of time that a locally cached password may
+ be used for authentication before it is refreshed from the remote LDAP
+ service.
+ </adm:synopsis>
+ <adm:description>
+ This property represents a cache timeout. Increasing the timeout period
+ decreases the frequency that bind operations are delegated to the
+ remote LDAP service, but increases the risk of users authenticating
+ using stale passwords.
+
+ Note that authentication attempts which fail because the provided password
+ does not match the locally cached password will always be retried against
+ the remote LDAP service.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>8 hours</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="s"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-cached-password-ttl</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDIFBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDIFBackendConfiguration.xml
new file mode 100644
index 0000000..be1eb2f
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDIFBackendConfiguration.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="ldif-backend" plural-name="ldif-backends"
+ package="org.forgerock.opendj.server.config" extends="backend"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for interacting with data
+ stored in an LDIF file.
+ </adm:synopsis>
+ <adm:description>
+ All basic LDAP operations are supported in the LDIF backend
+ although it has minimal support for custom controls.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-ldif-backend</ldap:name>
+ <ldap:superior>ds-cfg-backend</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.backends.LDIFBackend</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="writability-mode">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>enabled</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="ldif-file" mandatory="true">
+ <adm:synopsis>
+ Specifies the path to the LDIF file containing the data for
+ this backend.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ldif-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="is-private-backend">
+ <adm:synopsis>
+ Indicates whether the backend should be considered a private
+ backend, which indicates that it is used for storing operational
+ data rather than user-defined information.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-is-private-backend</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDIFConnectionHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDIFConnectionHandlerConfiguration.xml
new file mode 100644
index 0000000..9110bad
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LDIFConnectionHandlerConfiguration.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="ldif-connection-handler"
+ plural-name="ldif-connection-handlers"
+ package="org.forgerock.opendj.server.config" extends="connection-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is used to process changes in the server using internal
+ operations, where the changes to process are read from an LDIF file.
+ </adm:synopsis>
+ <adm:description>
+ The connection handler periodically looks for the existence of a
+ new file, processes the changes contained in that file as
+ internal operations, and writes the result to an output file
+ with comments indicating the result of the processing. NOTE: By
+ default
+ <adm:user-friendly-name />
+ operations are not logged because they are internal operations. If
+ you want to log these operations, allow internal logging in the
+ access log publisher.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-ldif-connection-handler</ldap:name>
+ <ldap:superior>ds-cfg-connection-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.protocols.LDIFConnectionHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="ldif-directory" mandatory="true">
+ <adm:synopsis>
+ Specifies the path to the directory in which the LDIF files should
+ be placed.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>config/auto-process-ldif</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ldif-directory</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="poll-interval" mandatory="true">
+ <adm:synopsis>
+ Specifies how frequently the LDIF connection handler should check
+ the LDIF directory to determine whether a new LDIF file has been
+ added.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5 seconds</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-poll-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LastModPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LastModPluginConfiguration.xml
new file mode 100644
index 0000000..07181ed
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LastModPluginConfiguration.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="last-mod-plugin"
+ plural-name="last-mod-plugins" package="org.forgerock.opendj.server.config"
+ extends="plugin" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is used to ensure that the creatorsName and createTimestamp
+ attributes are included in an entry whenever it is added to the
+ server and also to ensure that the modifiersName and modifyTimestamp
+ attributes are updated whenever an entry is modified or renamed.
+ </adm:synopsis>
+ <adm:description>
+ This behavior is described in RFC 4512. The implementation for
+ the LastMod plugin is contained in the
+ org.opends.server.plugins.LastModPlugin class. It must be
+ configured with the preOperationAdd, preOperationModify, and
+ preOperationModifyDN plugin types, but it does not have any
+ other custom configuration.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-last-mod-plugin</ldap:name>
+ <ldap:superior>ds-cfg-plugin</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.plugins.LastModPlugin</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="plugin-type" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>preoperationadd</adm:value>
+ <adm:value>preoperationmodify</adm:value>
+ <adm:value>preoperationmodifydn</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LengthBasedPasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LengthBasedPasswordValidatorConfiguration.xml
new file mode 100644
index 0000000..00e9935
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LengthBasedPasswordValidatorConfiguration.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="length-based-password-validator"
+ plural-name="length-based-password-validators"
+ package="org.forgerock.opendj.server.config" extends="password-validator"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:TODO>
+ Use constraints to enforce max-password-length >=
+ min-password-length
+ </adm:TODO>
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is used to determine whether a proposed password is acceptable based
+ on whether the number of characters it contains falls within an
+ acceptable range of values.
+ </adm:synopsis>
+ <adm:description>
+ Both upper and lower bounds may be
+ defined.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-length-based-password-validator</ldap:name>
+ <ldap:superior>ds-cfg-password-validator</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.LengthBasedPasswordValidator
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="max-password-length">
+ <adm:synopsis>
+ Specifies the maximum number of characters that can be included in
+ a proposed password.
+ </adm:synopsis>
+ <adm:description>
+ A value of zero indicates that there will be no upper bound
+ enforced. If both minimum and maximum lengths
+ are defined, then the minimum length must be less than or equal to
+ the maximum length.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" upper-limit="2147483647"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-password-length</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="min-password-length">
+ <adm:synopsis>
+ Specifies the minimum number of characters that must be included
+ in a proposed password.
+ </adm:synopsis>
+ <adm:description>
+ A value of zero indicates that there will be no lower bound
+ enforced.
+ If both minimum and maximum lengths
+ are defined, then the minimum length must be less than or equal to
+ the maximum length.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>6</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" upper-limit="2147483647"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-min-password-length</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalBackendWorkflowElementConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalBackendWorkflowElementConfiguration.xml
new file mode 100644
index 0000000..a0591ac
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalBackendWorkflowElementConfiguration.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="local-backend-workflow-element"
+ plural-name="local-backend-workflow-elements"
+ package="org.forgerock.opendj.server.config" extends="workflow-element"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides access to a backend.
+ </adm:synopsis>
+ <adm:tag name="user-management" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-local-backend-workflow-element</ldap:name>
+ <ldap:superior>ds-cfg-workflow-element</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.workflowelement.localbackend.LocalBackendWorkflowElement
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="backend" mandatory="true" read-only="true">
+ <adm:synopsis>
+ Identifies the backend accessed by the workflow element.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:aggregation relation-name="backend" parent-path="/">
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-backend</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalDBBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalDBBackendConfiguration.xml
new file mode 100644
index 0000000..336b944
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalDBBackendConfiguration.xml
@@ -0,0 +1,1077 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! Portions Copyright 2010-2013 ForgeRock AS.
+ ! -->
+<adm:managed-object name="local-db-backend"
+ plural-name="local-db-backends" package="org.forgerock.opendj.server.config"
+ extends="backend" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ uses the Berkeley DB Java Edition to store user-provided data in a local
+ repository.
+ </adm:synopsis>
+ <adm:description>
+ It is the traditional "directory server" backend and is similar to
+ the backends provided by the Sun Java System Directory Server. The
+ <adm:user-friendly-name />
+ stores the entries in an encoded form and also provides indexes that
+ can be used to quickly locate target entries based on different
+ kinds of criteria.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-local-db-backend</ldap:name>
+ <ldap:superior>ds-cfg-backend</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:relation name="local-db-index">
+ <adm:one-to-many naming-property="attribute">
+ <adm:default-managed-object name="aci">
+ <adm:property name="index-type">
+ <adm:value>presence</adm:value>
+ </adm:property>
+ <adm:property name="attribute">
+ <adm:value>aci</adm:value>
+ </adm:property>
+ </adm:default-managed-object>
+ <adm:default-managed-object name="entryUUID">
+ <adm:property name="index-type">
+ <adm:value>equality</adm:value>
+ </adm:property>
+ <adm:property name="attribute">
+ <adm:value>entryUUID</adm:value>
+ </adm:property>
+ </adm:default-managed-object>
+ <adm:default-managed-object name="objectClass">
+ <adm:property name="index-type">
+ <adm:value>equality</adm:value>
+ </adm:property>
+ <adm:property name="attribute">
+ <adm:value>objectClass</adm:value>
+ </adm:property>
+ </adm:default-managed-object>
+ <adm:default-managed-object name="ds-sync-hist">
+ <adm:property name="index-type">
+ <adm:value>ordering</adm:value>
+ </adm:property>
+ <adm:property name="attribute">
+ <adm:value>ds-sync-hist</adm:value>
+ </adm:property>
+ </adm:default-managed-object>
+ <adm:default-managed-object name="ds-sync-conflict">
+ <adm:property name="index-type">
+ <adm:value>equality</adm:value>
+ </adm:property>
+ <adm:property name="attribute">
+ <adm:value>ds-sync-conflict</adm:value>
+ </adm:property>
+ </adm:default-managed-object>
+ </adm:one-to-many>
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Index</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="index-type" />
+ <cli:default-property name="index-entry-limit" />
+ <cli:default-property name="index-extensible-matching-rule" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="local-db-vlv-index">
+ <adm:one-to-many naming-property="name" />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=VLV Index</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="base-dn" />
+ <cli:default-property name="scope" />
+ <cli:default-property name="filter" />
+ <cli:default-property name="sort-order" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.backends.jeb.BackendImpl
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="writability-mode">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>enabled</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="db-directory" mandatory="true">
+ <adm:TODO>Default this to the db/backend-id</adm:TODO>
+ <adm:synopsis>
+ Specifies the path to the filesystem directory that is used
+ to hold the Berkeley DB Java Edition database files containing the
+ data for this backend.
+ </adm:synopsis>
+ <adm:description>
+ The path may be either an absolute path or a path relative to the
+ directory containing the base of the <adm:product-name /> directory server
+ installation. The path may be any valid directory path in which
+ the server has appropriate permissions to read and write files and
+ has sufficient space to hold the database contents.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>db</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-directory</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="compact-encoding">
+ <adm:synopsis>
+ Indicates whether the backend should use a compact form when
+ encoding entries by compressing the attribute descriptions and
+ object class sets.
+ </adm:synopsis>
+ <adm:description>
+ Note that this property applies only to the entries themselves and
+ does not impact the index data.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this setting take effect only for writes that
+ occur after the change is made. It is not retroactively
+ applied to existing data.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-compact-encoding</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="entries-compressed" advanced="true">
+ <adm:synopsis>
+ Indicates whether the backend should attempt to compress entries
+ before storing them in the database.
+ </adm:synopsis>
+ <adm:description>
+ Note that this property applies only to the entries themselves and
+ does not impact the index data. Further, the effectiveness of the
+ compression is based on the type of data contained in the
+ entry.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this setting take effect only for writes that
+ occur after the change is made. It is not retroactively
+ applied to existing data.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-entries-compressed</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="import-queue-size" advanced="true">
+ <adm:synopsis>
+ This parameter has been deprecated in OpenDS 2.1 and will be removed
+ in <adm:product-name /> 3.0. It is only being kept for migration ease and is ignored
+ in OpenDS versions after 2.0.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ This parameter has been deprecated in OpenDS 2.1 and will be removed
+ in <adm:product-name /> 3.0. It is only being kept for migration ease and is ignored
+ in OpenDS versions after 2.0.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>100</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="2147483647" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-import-queue-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="import-thread-count" advanced="true">
+ <adm:synopsis>
+ This parameter has been deprecated in OpenDS 2.1 and will be removed
+ in <adm:product-name /> 3.0. It is only being kept for migration ease and is ignored
+ in OpenDS versions after 2.0.
+ </adm:synopsis>
+ <adm:description>
+ This parameter has been deprecated in OpenDS 2.1 and will be removed
+ in <adm:product-name /> 3.0. It is only being kept for migration ease and is ignored
+ in OpenDS versions after 2.0.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes do not take effect for any import that may already
+ be in progress.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>8</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="2147483647" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-import-thread-count</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="index-entry-limit">
+ <adm:synopsis>
+ Specifies the maximum number of entries that is allowed to
+ match a given index key before that particular index key is no
+ longer maintained.
+ </adm:synopsis>
+ <adm:description>
+ This property is analogous to the ALL IDs threshold in the Sun
+ Java System Directory Server. Note that this is the default limit
+ for the backend, and it may be overridden on a per-attribute
+ basis.A value of 0 means there is no limit.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ If any index keys have already reached this limit, indexes
+ need to be rebuilt before they are allowed to use the
+ new limit.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>4000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" upper-limit="2147483647" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-index-entry-limit</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-directory-permissions" advanced="true">
+ <adm:synopsis>
+ Specifies the permissions that should be applied to the directory
+ containing the server database files.
+ </adm:synopsis>
+ <adm:description>
+ They should be expressed as three-digit octal values, which is the
+ traditional representation for UNIX file permissions. The three
+ digits represent the permissions that are available for the
+ directory's owner, group members, and other users (in that order),
+ and each digit is the octal representation of the read, write, and
+ execute bits. Note that this only impacts permissions on the
+ database directory and not on the files written into that
+ directory. On UNIX systems, the user's umask controls
+ permissions given to the database files.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:server-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>700</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^7[0-7][0-7]$</adm:regex>
+ <adm:usage>MODE</adm:usage>
+ <adm:synopsis>
+ Any octal value between 700 and 777 (the owner must always
+ have read, write, and execute permissions on the directory).
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-directory-permissions</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="preload-time-limit" advanced="true">
+ <adm:synopsis>
+ Specifies the length of time that the backend is allowed to
+ spend "pre-loading" data when it is initialized.
+ </adm:synopsis>
+ <adm:description>
+ The pre-load process is used to pre-populate the database
+ cache, so that it can be more quickly available when the server is
+ processing requests. A duration of zero means there is no
+ pre-load.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0s</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="0" upper-limit="2147483647" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-preload-time-limit</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-cache-percent">
+ <adm:synopsis>
+ Specifies the percentage of JVM memory to allocate to the database cache.
+ </adm:synopsis>
+ <adm:description>
+ Specifies the percentage of memory available to the JVM that
+ should be used for caching database contents. Note that this is
+ only used if the value of the db-cache-size property is set to
+ "0 MB". Otherwise, the value of that property is used instead
+ to control the cache size configuration.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>50</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="90" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-cache-percent</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-cache-size">
+ <adm:synopsis>
+ The amount of JVM memory to allocate to the database cache.
+ </adm:synopsis>
+ <adm:description>
+ Specifies the amount of memory that should be used for caching
+ database contents. A value of "0 MB" indicates that the
+ db-cache-percent property should be used instead to specify the
+ cache size.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0 MB</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size lower-limit="0 MB" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-cache-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-cleaner-min-utilization" advanced="true">
+ <adm:synopsis>
+ Specifies the minimum percentage of "live" data that the database
+ cleaner attempts to keep in database log files.
+ </adm:synopsis>
+ <adm:description>
+ If the amount of live data in any database log file drops below
+ this percentage, then the cleaner moves the remaining live
+ data in that file to the end of the database and deletes the
+ original file in order to keep the database relatively compact.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>50</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" upper-limit="90" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-cleaner-min-utilization</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-run-cleaner" advanced="true">
+ <adm:synopsis>
+ Indicates whether the database cleaner threads should be
+ enabled.
+ </adm:synopsis>
+ <adm:description>
+ The cleaner threads are used to periodically compact the
+ database by identifying database files with a low (that is, less than
+ the amount specified by the db-cleaner-min-utilization property)
+ percentage of live data, moving the remaining live data to the end
+ of the log and deleting that file.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-run-cleaner</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-evictor-lru-only" advanced="true">
+ <adm:synopsis>
+ Indicates whether the database should evict existing data from the
+ cache based on an LRU policy (where the least recently used
+ information will be evicted first).
+ </adm:synopsis>
+ <adm:description>
+ If set to "false", then the eviction keeps internal nodes of the underlying
+ Btree in the cache over leaf nodes, even if the leaf nodes have
+ been accessed more recently. This may be a better configuration
+ for databases in which only a very small portion of the data is
+ cached.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-evictor-lru-only</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-evictor-nodes-per-scan" advanced="true">
+ <adm:synopsis>
+ Specifies the number of Btree nodes that should be evicted from
+ the cache in a single pass if it is determined that it is
+ necessary to free existing data in order to make room for new
+ information.
+ </adm:synopsis>
+ <adm:description>
+ Changes to this property do not take effect until the backend is
+ restarted. It is recommended that you also change this property
+ when you set db-evictor-lru-only to false. This setting controls
+ the number of Btree nodes that are considered, or sampled, each
+ time a node is evicted. A setting of 10 often produces good
+ results, but this may vary from application to application. The
+ larger the nodes per scan, the more accurate the algorithm.
+ However, don't set it too high. When considering larger numbers of
+ nodes for each eviction, the evictor may delay the completion of a
+ given database operation, which impacts the response time of the
+ application thread. In JE 4.1 and later, setting this value too high
+ in an application that is largely CPU bound can reduce the
+ effectiveness of cache eviction. It's best to start with the default
+ value, and increase it gradually to see if it is beneficial for your
+ application.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>10</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="1000" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-evictor-nodes-per-scan</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-evictor-core-threads" advanced="true">
+ <adm:synopsis>
+ Specifies the core number of threads in the eviction thread pool.
+ </adm:synopsis>
+ <adm:description>
+ Specifies the core number of threads in the eviction thread pool.
+ These threads help keep memory usage within cache bounds,
+ offloading work from application threads. db-evictor-core-threads,
+ db-evictor-max-threads and db-evictor-keep-alive are used to configure
+ the core, max and keepalive attributes for the eviction thread pool.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>1</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" upper-limit="2147483647" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-evictor-core-threads</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-evictor-max-threads" advanced="true">
+ <adm:synopsis>
+ Specifies the maximum number of threads in the eviction thread pool.
+ </adm:synopsis>
+ <adm:description>
+ Specifies the maximum number of threads in the eviction thread pool.
+ These threads help keep memory usage within cache bounds,
+ offloading work from application threads. db-evictor-core-threads,
+ db-evictor-max-threads and db-evictor-keep-alive are used to configure
+ the core, max and keepalive attributes for the eviction thread pool.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>10</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="2147483647" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-evictor-max-threads</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-evictor-keep-alive" advanced="true">
+ <adm:synopsis>
+ The duration that excess threads in the eviction thread pool will
+ stay idle. After this period, idle threads will terminate.
+ </adm:synopsis>
+ <adm:description>
+ The duration that excess threads in the eviction thread pool will
+ stay idle. After this period, idle threads will terminate.
+ db-evictor-core-threads, db-evictor-max-threads and
+ db-evictor-keep-alive are used to configure the core, max and
+ keepalive attributes for the eviction thread pool.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>600s</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="s" lower-limit="1" upper-limit="86400" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-evictor-keep-alive</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-log-file-max" advanced="true">
+ <adm:synopsis>
+ Specifies the maximum size for a database log file.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>100mb</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size lower-limit="1mb" upper-limit="4gib" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-log-file-max</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-log-filecache-size" advanced="true">
+ <adm:synopsis>
+ Specifies the size of the file handle cache.
+ </adm:synopsis>
+ <adm:description>
+ The file handle cache is used to keep as much opened log files
+ as possible. When the cache is smaller than the number of logs,
+ the database needs to close some handles and open log files it needs,
+ resulting in less optimal performances. Ideally, the size of the cache
+ should be higher than the number of files contained in the database.
+ Make sure the OS number of open files per process is also tuned
+ appropriately.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>100</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="3" upper-limit="2147483647" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-log-filecache-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-logging-file-handler-on" advanced="true">
+ <adm:synopsis>
+ Indicates whether the database should maintain a je.info file in
+ the same directory as the database log directory.
+ </adm:synopsis>
+ <adm:description>
+ This file contains information about the internal processing
+ performed by the underlying database.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-logging-file-handler-on</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-logging-level" advanced="true">
+ <adm:TODO>Use an enumeration</adm:TODO>
+ <adm:synopsis>
+ Specifies the log level that should be used by the database
+ when it is writing information into the je.info file.
+ </adm:synopsis>
+ <adm:description>
+ The database trace logging level is (in increasing order of
+ verbosity) chosen from: OFF, SEVERE, WARNING, INFO, CONFIG, FINE,
+ FINER, FINEST, ALL.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>CONFIG</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-logging-level</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-checkpointer-bytes-interval" advanced="true">
+ <adm:synopsis>
+ Specifies the maximum number of bytes that may be written to the
+ database before it is forced to perform a checkpoint.
+ </adm:synopsis>
+ <adm:description>
+ This can be used to bound the recovery time that may be required
+ if the database environment is opened without having been properly
+ closed. If this property is set to a non-zero value, the
+ checkpointer wakeup interval is not used. To use time-based
+ checkpointing, set this property to zero.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:server-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>500mb</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size lower-limit="0b" upper-limit="9223372036854775807b" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-checkpointer-bytes-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-checkpointer-wakeup-interval"
+ advanced="true">
+ <adm:synopsis>
+ Specifies the maximum length of time that may pass between
+ checkpoints.
+ </adm:synopsis>
+ <adm:description>
+ Note that this is only used if the value of the checkpointer
+ bytes interval is zero.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>30s</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="s" lower-limit="1" upper-limit="4294" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-checkpointer-wakeup-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-num-lock-tables" advanced="true">
+ <adm:synopsis>
+ Specifies the number of lock tables that are used by the underlying database.
+ </adm:synopsis>
+ <adm:description>
+ This can be particularly important to help improve scalability by
+ avoiding contention on systems with large numbers of CPUs. The
+ value of this configuration property should be set to a prime
+ number that is less than or equal to the number of worker threads
+ configured for use in the server.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Let the server decide.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="32767" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-num-lock-tables</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-num-cleaner-threads" advanced="true">
+ <adm:synopsis>
+ Specifies the number of threads that the backend should maintain
+ to keep the database log files at or near the desired utilization.
+ </adm:synopsis>
+ <adm:description>
+ In environments with high write throughput, multiple cleaner
+ threads may be required to maintain the desired utilization.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Let the server decide.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-num-cleaner-threads</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-txn-no-sync" advanced="true">
+ <adm:synopsis>
+ Indicates whether database writes should be primarily written to
+ an internal buffer but not immediately written to disk.
+ </adm:synopsis>
+ <adm:description>
+ Setting the value of this configuration attribute to "true" may
+ improve write performance but could cause the most
+ recent changes to be lost if the <adm:product-name /> directory server or the
+ underlying JVM exits abnormally, or if an OS or hardware failure
+ occurs (a behavior similar to running with transaction durability
+ disabled in the Sun Java System Directory Server).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-txn-no-sync</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="db-txn-write-no-sync" advanced="true">
+ <adm:synopsis>
+ Indicates whether the database should synchronously flush data as
+ it is written to disk.
+ </adm:synopsis>
+ <adm:description>
+ If this value is set to "false", then all data written to disk
+ is synchronously flushed to persistent storage and thereby
+ providing full durability. If it is set to "true", then data may
+ be cached for a period of time by the underlying operating system
+ before actually being written to disk. This may improve
+ performance, but could cause the most recent
+ changes to be lost in the event of an underlying OS or hardware
+ failure (but not in the case that the <adm:product-name /> directory server or
+ the JVM exits abnormally).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-db-txn-write-no-sync</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="disk-low-threshold" advanced="true">
+ <adm:synopsis>
+ Low disk threshold to limit database updates
+ </adm:synopsis>
+ <adm:description>
+ Specifies the "low" free space on the disk. When the available
+ free space on the disk used by this database instance falls below the
+ value specified, protocol updates on this database are permitted only
+ by a user with the BYPASS_LOCKDOWN privilege.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>200 megabytes</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-disk-low-threshold</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="disk-full-threshold" advanced="true">
+ <adm:synopsis>
+ Full disk threshold to limit database updates
+ </adm:synopsis>
+ <adm:description>
+ When the available free space on the disk used by this database
+ instance falls below the value specified, no updates
+ are permitted and the server returns an UNWILLING_TO_PERFORM error.
+ Updates are allowed again as soon as free space rises above the
+ threshold.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>100 megabytes</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:size lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-disk-full-threshold</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="je-property" advanced="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the database and environment properties for the Berkeley
+ DB Java Edition database serving the data for this backend.
+ </adm:synopsis>
+ <adm:description>
+ Any Berkeley DB Java Edition property can be specified using the
+ following form: property-name=property-value. Refer to <adm:product-name />
+ documentation for further information on related properties, their
+ implications, and range values. The definitive identification of
+ all the property parameters is available in the example.properties
+ file of Berkeley DB Java Edition distribution.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-je-property</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="index-filter-analyzer-enabled" advanced="true">
+ <adm:synopsis>
+ Indicates whether to gather statistical information about the search
+ filters processed by the directory server while evaluating the usage of
+ indexes.
+ </adm:synopsis>
+ <adm:description>
+ Analyzing indexes requires gathering search filter usage patterns from
+ user requests, especially for values as specified in the filters and
+ subsequently looking the status of those values into the index files.
+ When a search requests is processed, internal or user generated, a
+ first phase uses indexes to find potential entries to be returned.
+ Depending on the search filter, if the index of one of the specified
+ attributes matches too many entries (exceeds the index entry limit),
+ the search becomes non-indexed. In any case, all entries thus
+ gathered (or the entire DIT) are matched against the filter for
+ actually returning the search result.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-index-filter-analyzer-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="index-filter-analyzer-max-filters" advanced="true">
+ <adm:synopsis>
+ The maximum number of search filter statistics to keep.
+ </adm:synopsis>
+ <adm:description>
+ When the maximum number of search filter is reached, the least used one
+ will be deleted.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>25</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-index-filter-analyzer-max-filters</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="subordinate-indexes-enabled" advanced="true">
+ <adm:synopsis>
+ Indicates whether id2children and id2subtree indexes should be used for
+ this backend. These indexes are used for constraining filtered searches
+ to the search request's scope as well as for generating values for the
+ hasSubordinates and numSubordinates virtual attributes.
+ </adm:synopsis>
+ <adm:description>
+ Subordinate indexing is enabled by default and should only be disabled
+ for specialized use cases. A typical use case is where the backend is
+ to be subjected to heavy add/delete load beneath the same parent entry
+ such as when used as a session database. Disabling the subordinate
+ indexes means that the numSubordinates and hasSubordinates virtual
+ attributes will not be supported.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-subordinate-indexes-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalDBIndexConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalDBIndexConfiguration.xml
new file mode 100644
index 0000000..05228f9
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalDBIndexConfiguration.xml
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="local-db-index" plural-name="local-db-indexes"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are used to store information that makes it possible to locate
+ entries very quickly when processing search operations.
+ </adm:synopsis>
+ <adm:description>
+ Indexing is performed on a per-attribute level and different types
+ of indexing may be performed for different kinds of attributes, based
+ on how they are expected to be accessed during search operations.
+ </adm:description>
+ <adm:tag name="database" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-local-db-index</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="attribute" mandatory="true" read-only="true">
+ <adm:synopsis>
+ Specifies the name of the attribute for which the index is to
+ be maintained.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-attribute</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="index-entry-limit">
+ <adm:synopsis>
+ Specifies the maximum number of entries that are allowed
+ to match a given index key before that particular index key is no
+ longer maintained.
+ </adm:synopsis>
+ <adm:description>
+ This is analogous to the ALL IDs threshold in the Sun Java System
+ Directory Server. If this is specified, its value overrides the JE
+ backend-wide configuration. For no limit, use 0 for the value.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:other>
+ <adm:synopsis>
+ If any index keys have already reached this limit, indexes
+ must be rebuilt before they will be allowed to use the
+ new limit.
+ </adm:synopsis>
+ </adm:other>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:inherited>
+ <adm:relative property-name="index-entry-limit" offset="1"
+ managed-object-name="local-db-backend" />
+ </adm:inherited>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" upper-limit="2147483647">
+ <adm:unit-synopsis>Number of entries</adm:unit-synopsis>
+ </adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-index-entry-limit</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="index-type" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the type(s) of indexing that should be performed
+ for the associated attribute.
+ </adm:synopsis>
+ <adm:description>
+ For equality, presence, and substring index types, the associated
+ attribute type must have a corresponding matching rule.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:other>
+ <adm:synopsis>
+ If any new index types are added for an attribute, and
+ values for that attribute already exist in the
+ database, the index must be rebuilt before it
+ will be accurate.
+ </adm:synopsis>
+ </adm:other>
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="equality">
+ <adm:synopsis>
+ This index type is used to improve the efficiency
+ of searches using equality search filters.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="ordering">
+ <adm:synopsis>
+ This index type is used to improve the efficiency
+ of searches using "greater than or equal to" or "less then
+ or equal to" search filters.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="presence">
+ <adm:synopsis>
+ This index type is used to improve the efficiency
+ of searches using the presence search filters.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="substring">
+ <adm:synopsis>
+ This index type is used to improve the efficiency
+ of searches using substring search filters.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="approximate">
+ <adm:synopsis>
+ This index type is used to improve the efficiency
+ of searches using approximate matching search filters.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="extensible">
+ <adm:synopsis>
+ This index type is used to improve the efficiency
+ of searches using extensible matching search filters.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-index-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="substring-length" advanced="true">
+ <adm:synopsis>
+ The length of substrings in a substring index.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:other>
+ <adm:synopsis>
+ The index must be rebuilt before it will reflect the
+ new value.
+ </adm:synopsis>
+ </adm:other>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>6</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="3" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-substring-length</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="index-extensible-matching-rule" multi-valued="true">
+ <adm:synopsis>
+ The extensible matching rule in an extensible index.
+ </adm:synopsis>
+ <adm:description>
+ An extensible matching rule must be specified using either LOCALE or OID of the matching rule.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:other>
+ <adm:synopsis>
+ The index must be rebuilt before it will reflect the
+ new value.
+ </adm:synopsis>
+ </adm:other>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ No extensible matching rules will be indexed.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>([a-z][a-z](-[A-Z][A-Z]){0,2}(.(([a-z]{2,3})|\\d))?)|(^\\d.((\\d)+.)+\\d$)</adm:regex>
+ <adm:usage>LOCALE | OID</adm:usage>
+ <adm:synopsis>
+ A Locale or an OID.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-index-extensible-matching-rule</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalDBVLVIndexConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalDBVLVIndexConfiguration.xml
new file mode 100644
index 0000000..829b1fa
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LocalDBVLVIndexConfiguration.xml
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="local-db-vlv-index"
+ plural-name="local-db-vlv-indexes"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are used to store information about a specific search request that
+ makes it possible to efficiently process them using the VLV control.
+ </adm:synopsis>
+ <adm:description>
+ A VLV index effectively notifies the server that a virtual list
+ view, with specific query and sort parameters, will be performed.
+ This index also allows the server to collect and maintain the
+ information required to make using the virtual list view faster.
+ </adm:description>
+ <adm:tag name="database" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-local-db-vlv-index</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="base-dn" mandatory="true">
+ <adm:synopsis>
+ Specifies the base DN used in the search query that is being
+ indexed.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:other>
+ <adm:synopsis>
+ The index must be rebuilt after modifying this
+ property.
+ </adm:synopsis>
+ </adm:other>
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="scope" mandatory="true">
+ <adm:synopsis>
+ Specifies the LDAP scope of the query that is being indexed.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:other>
+ <adm:synopsis>
+ The index must be rebuilt after modifying this
+ property.
+ </adm:synopsis>
+ </adm:other>
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="base-object">
+ <adm:synopsis>Search the base object only.</adm:synopsis>
+ </adm:value>
+ <adm:value name="single-level">
+ <adm:synopsis>
+ Search the immediate children of the base object but do not
+ include any of their descendants or the base object itself.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="subordinate-subtree">
+ <adm:synopsis>
+ Search the entire subtree below the base object but do not
+ include the base object itself.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="whole-subtree">
+ <adm:synopsis>
+ Search the base object and the entire subtree below the base
+ object.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-scope</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="filter" mandatory="true">
+ <adm:synopsis>
+ Specifies the LDAP filter used in the query that is being indexed.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:other>
+ <adm:synopsis>
+ The index must be rebuilt after modifying this
+ property.
+ </adm:synopsis>
+ </adm:other>
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ A valid LDAP search filter.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-filter</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="sort-order" mandatory="true">
+ <adm:synopsis>
+ Specifies the names of the attributes that are used to sort the
+ entries for the query being indexed.
+ </adm:synopsis>
+ <adm:description>
+ Multiple attributes can be used to determine the sort order by
+ listing the attribute names from highest to lowest precedence.
+ Optionally, + or - can be prefixed to the attribute name to sort
+ the attribute in ascending order or descending order respectively.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:other>
+ <adm:synopsis>
+ The index must be rebuilt after modifying this
+ property.
+ </adm:synopsis>
+ </adm:other>
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ Valid attribute types defined in the schema, separated by a
+ space and optionally prefixed by + or -.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-sort-order</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="name" mandatory="true" read-only="true">
+ <adm:synopsis>
+ Specifies a unique name for this VLV index.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ The VLV index name cannot be altered after the index is created.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-name</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-block-size" read-only="true"
+ advanced="true">
+ <adm:synopsis>
+ Specifies the number of entry IDs to store in a single sorted
+ set before it must be split.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ The blocks are resized lazily the next time the index is
+ modified.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>4000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer>
+ <adm:unit-synopsis>Number of entry IDs</adm:unit-synopsis>
+ </adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-block-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LogPublisherConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LogPublisherConfiguration.xml
new file mode 100644
index 0000000..664299e
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LogPublisherConfiguration.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions copyright 2013 ForgeRock AS
+ ! -->
+<adm:managed-object name="log-publisher" plural-name="log-publishers"
+ package="org.forgerock.opendj.server.config" abstract="true"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for distributing log messages from different loggers
+ to a destination.
+ </adm:synopsis>
+ <adm:tag name="logging" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-log-publisher</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled for use.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ The fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.LogPublisher
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LogRetentionPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LogRetentionPolicyConfiguration.xml
new file mode 100644
index 0000000..13a0460
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LogRetentionPolicyConfiguration.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="log-retention-policy"
+ plural-name="log-retention-policies"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are used to specify when log files should be cleaned.
+ </adm:synopsis>
+ <adm:tag name="logging" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-log-retention-policy</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.loggers.RetentionPolicy
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LogRotationPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LogRotationPolicyConfiguration.xml
new file mode 100644
index 0000000..0c77660
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/LogRotationPolicyConfiguration.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="log-rotation-policy"
+ plural-name="log-rotation-policies"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are used to specify when log files should be rotated.
+ </adm:synopsis>
+ <adm:tag name="logging" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-log-rotation-policy</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.loggers.RotationPolicy
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MD5PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MD5PasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..987e4e3
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MD5PasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="md5-password-storage-scheme"
+ plural-name="md5-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords using an unsalted
+ form of the MD5 message digest algorithm. Because the implementation
+ does not use any kind of salting mechanism, a given password always
+ has the same encoded form.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains only an implementation for the user password
+ syntax, with a storage scheme name of "MD5". Although the MD5 digest
+ algorithm is relatively secure, recent cryptanalysis work has
+ identified mechanisms for generating MD5 collisions. This does not
+ impact the security of this algorithm as it is used in <adm:product-name />,
+ but it is recommended that the MD5 password storage scheme only be used if
+ client applications require it for compatibility purposes, and that a
+ stronger digest like SSHA or SSHA256 be used for environments in which
+ MD5 support is not required.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-md5-password-storage-scheme</ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.MD5PasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MatchingRuleConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MatchingRuleConfiguration.xml
new file mode 100644
index 0000000..f8b06d8
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MatchingRuleConfiguration.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="matching-rule" plural-name="matching-rules"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ define a set of rules for performing matching operations against
+ assertion values.
+ </adm:synopsis>
+ <adm:description>
+ Matching rules are frequently associated with an attribute syntax
+ and are used to compare values according to that syntax. For example,
+ the distinguishedNameEqualityMatch matching rule can be used to
+ determine whether two DNs are equal and can ignore unnecessary spaces
+ around commas and equal signs, differences in capitalization in
+ attribute names, an so on.
+ </adm:description>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-matching-rule</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled for use.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.MatchingRuleFactory
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MemberVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MemberVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..3a7421f
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MemberVirtualAttributeConfiguration.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="member-virtual-attribute"
+ plural-name="user-defined-virtual-attributes"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ generates a member or uniqueMember attribute whose values are
+ the DNs of the members of a specified virtual static group.
+ </adm:synopsis>
+ <adm:description>
+ This component is used to implement virtual static group
+ functionality, in which it is possible to create an entry
+ that looks like a static group but obtains all of its
+ membership from a dynamic group (or some other type of
+ group, including another static group).
+ This implementation is most efficient when attempting to
+ determine whether a given user is a member of a group
+ (for example, with a filter like
+ "(uniqueMember=uid=john.doe,ou=People,dc=example,dc=com)")
+ when the search does not actually return the membership
+ attribute. Although it works to generate the entire set of
+ values for the member or uniqueMember attribute, this can be
+ an expensive operation for a large group.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-member-virtual-attribute</ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.MemberVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="conflict-behavior">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>virtual-overrides-real</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="allow-retrieving-membership" mandatory="true">
+ <adm:synopsis>
+ Indicates whether to handle requests that request all values for
+ the virtual attribute.
+ </adm:synopsis>
+ <adm:description>
+ This operation can be very expensive in some cases and is not
+ consistent with the primary function of virtual static groups, which
+ is to make it possible to use static group idioms to determine
+ whether a given user is a member.
+ If this attribute is set to false, attempts to retrieve the entire
+ set of values receive an empty set, and only attempts to determine
+ whether the attribute has a specific value or set of values
+ (which is the primary anticipated use for virtual static groups)
+ are handled properly.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allow-retrieving-membership</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MemoryBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MemoryBackendConfiguration.xml
new file mode 100644
index 0000000..bb7c575
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MemoryBackendConfiguration.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="memory-backend" plural-name="memory-backends"
+ package="org.forgerock.opendj.server.config" extends="backend"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a directory server backend
+ implementation that stores entries in memory.
+ </adm:synopsis>
+ <adm:description>
+ There is no persistence of any kind, and the backend contents are
+ cleared whenever the backend is brought online or offline and when
+ the server is restarted.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-memory-backend</ldap:name>
+ <ldap:superior>ds-cfg-backend</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.backends.MemoryBackend</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="writability-mode">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>enabled</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MemoryUsageMonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MemoryUsageMonitorProviderConfiguration.xml
new file mode 100644
index 0000000..69bb4a3
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MemoryUsageMonitorProviderConfiguration.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="memory-usage-monitor-provider"
+ plural-name="memory-usage-monitor-providers"
+ package="org.forgerock.opendj.server.config" extends="monitor-provider"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ can be used to publish information about memory consumption and
+ garbage collection activity in the JVM.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-memory-usage-monitor-provider</ldap:name>
+ <ldap:superior>ds-cfg-monitor-provider</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.monitors.MemoryUsageMonitorProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MonitorBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MonitorBackendConfiguration.xml
new file mode 100644
index 0000000..f3cdcde
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MonitorBackendConfiguration.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="monitor-backend"
+ plural-name="monitor-backends" package="org.forgerock.opendj.server.config"
+ extends="backend" advanced="true"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ allows clients to access the information made
+ available by directory server monitor providers.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-monitor-backend</ldap:name>
+ <ldap:superior>ds-cfg-backend</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.backends.MonitorBackend</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="writability-mode">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>disabled</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MonitorProviderConfiguration.xml
new file mode 100644
index 0000000..a90aa65
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/MonitorProviderConfiguration.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="monitor-provider"
+ plural-name="monitor-providers" package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ can be used to provide information about the state of the server or
+ one of its components.
+ </adm:synopsis>
+ <adm:description>
+ This information is useful for monitoring or troubleshooting.
+ </adm:description>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-monitor-provider</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled for use.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.MonitorProvider
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NetworkGroupConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NetworkGroupConfiguration.xml
new file mode 100644
index 0000000..b070ec6
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NetworkGroupConfiguration.xml
@@ -0,0 +1,300 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
+ ! Portions copyright 2013 ForgeRock AS.
+ ! -->
+<adm:managed-object name="network-group"
+ plural-name="network-groups"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name/>
+ is used to classify incoming client connections and route requests to
+ workflows.
+ </adm:synopsis>
+ <adm:tag name="core-server"/>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-network-group</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:relation name="network-group-qos-policy"
+ managed-object-name="qos-policy"
+ hidden="true">
+ <adm:synopsis>
+ Specifies the set of quality of service (QoS) policies enforced by
+ the
+ <adm:user-friendly-name/>
+ .
+ </adm:synopsis>
+ <adm:description>
+ All client connections belonging to the
+ <adm:user-friendly-name/>
+ will comply with its policies.
+ </adm:description>
+ <adm:one-to-many unique="true"
+ plural-name="network-group-qos-policies"/>
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=QoS Policies</ldap:rdn-sequence>
+ </adm:profile>
+ </adm:relation>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name/>
+ is enabled for use in the server.
+ </adm:synopsis>
+ <adm:description>
+ If a
+ <adm:user-friendly-name/>
+ is not enabled then its workflows will not be accessible when
+ processing operations.
+ </adm:description>
+ <adm:syntax>
+ <adm:boolean/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="priority" mandatory="true">
+ <adm:synopsis>
+ Specifies the priority for this <adm:user-friendly-name/>.
+ </adm:synopsis>
+ <adm:description>
+ A client connection is first compared against the
+ <adm:user-friendly-name/>
+ with the lowest priority. If the client connection does not match
+ its connection criteria, then the client connection is compared against
+ the
+ <adm:user-friendly-name/>
+ with next lowest priority, and so on. If no
+ <adm:user-friendly-name/>
+ is selected then the client connection is rejected.
+ </adm:description>
+ <adm:syntax>
+ <adm:integer lower-limit="0"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-priority</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="workflow" multi-valued="true">
+ <adm:synopsis>
+ Specifies a set of workflows which should be accessible from this
+ <adm:user-friendly-name/>
+ .
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>No workflows will be accessible.</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="workflow"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced workflows must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true"/>
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-workflow</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allowed-auth-method" multi-valued="true">
+ <adm:synopsis>
+ Specifies a set of allowed authorization methods that clients
+ must use in order to establish connections to this
+ <adm:user-friendly-name/>.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately and do not
+ interfere with connections that may have already been
+ established.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ All authorization methods are allowed.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="anonymous">
+ <adm:synopsis>
+ Unauthorized clients.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="simple">
+ <adm:synopsis>
+ Clients who bind using simple authentication (name and password).
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="sasl">
+ <adm:synopsis>
+ Clients who bind using SASL/external certificate based
+ authentication.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allowed-auth-method</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allowed-protocol" multi-valued="true">
+ <adm:synopsis>
+ Specifies a set of allowed supported protocols that clients
+ must use in order to establish connections to this
+ <adm:user-friendly-name/>.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately and do not
+ interfere with connections that may have already been
+ established.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ All supported protocols are allowed.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="ldap">
+ <adm:synopsis>
+ Clients using LDAP are allowed.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="ldaps">
+ <adm:synopsis>
+ Clients using LDAPS are allowed.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allowed-protocol</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allowed-bind-dn" multi-valued="true">
+ <adm:synopsis>
+ Specifies a set of bind DN patterns that determine the
+ clients that are allowed to establish connections to this
+ <adm:user-friendly-name/>.
+ </adm:synopsis>
+ <adm:description>
+ Valid bind DN filters are strings composed of zero or more
+ wildcards. A double wildcard ** replaces one or more RDN
+ components (as in uid=dmiller,**,dc=example,dc=com). A simple
+ wildcard * replaces either a whole RDN, or a whole type, or a
+ value substring (as in uid=bj*,ou=people,dc=example,dc=com).
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately and do not
+ interfere with connections that may have already been
+ established.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ All bind DNs are allowed.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allowed-bind-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property-reference name="allowed-client" />
+ <adm:property-reference name="denied-client" />
+ <adm:property name="is-security-mandatory">
+ <adm:synopsis>
+ Specifies whether or not a secured client connection
+ is required in order for clients to establish connections
+ to this <adm:user-friendly-name/>.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately and do not
+ interfere with connections that may have already been
+ established.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-is-security-mandatory</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NetworkGroupPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NetworkGroupPluginConfiguration.xml
new file mode 100644
index 0000000..f5a6a94
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NetworkGroupPluginConfiguration.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="network-group-plugin"
+ plural-name="network-group-plugins" package="org.forgerock.opendj.server.config"
+ extends="plugin" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ hidden="true">
+
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ allows to group connections into different network groups and
+ enforce specific resource limit policies for each network group.
+ </adm:synopsis>
+
+ <adm:description>
+ The
+ <adm:user-friendly-name />
+ creates network groups based on client connection criteria. Each network
+ group defines resource limit policies applied to all its connections.
+ </adm:description>
+
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-network-group-plugin</ldap:name>
+ <ldap:superior>ds-cfg-plugin</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.core.networkgroups.NetworkGroupPlugin
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+
+ <adm:property-override name="plugin-type" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>postconnect</adm:value>
+ <adm:value>preparseadd</adm:value>
+ <adm:value>preparsebind</adm:value>
+ <adm:value>preparsecompare</adm:value>
+ <adm:value>preparsedelete</adm:value>
+ <adm:value>preparseextended</adm:value>
+ <adm:value>preparsemodify</adm:value>
+ <adm:value>preparsemodifydn</adm:value>
+ <adm:value>preparsesearch</adm:value>
+ <adm:value>preparseunbind</adm:value>
+ <adm:value>postresponsebind</adm:value>
+ <adm:value>postresponseextended</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NullBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NullBackendConfiguration.xml
new file mode 100644
index 0000000..8e44222
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NullBackendConfiguration.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2009 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="null-backend" plural-name="null-backends"
+ package="org.forgerock.opendj.server.config" advanced="true" extends="backend"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name/>
+ provides a directory server backend that implements a /dev/null like
+ behavior for development and testing.
+ </adm:synopsis>
+ <adm:description>
+ The
+ <adm:user-friendly-name/>
+ behaves as follows: all search operations return success but no
+ data; all write operations do nothing; bind operations fail with
+ invalid credentials; compare operations are only possible on
+ objectClass and return true for top, nullBackendObject, and
+ extensibleObject. In addition controls are supported although this
+ implementation does not provide any specific emulation for controls.
+ Generally known request controls are accepted and default response
+ controls returned where applicable. Searches within a
+ <adm:user-friendly-name/>
+ are always considered indexed.
+ <adm:user-friendly-plural-name/>
+ are for development and testing only.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-null-backend</ldap:name>
+ <ldap:superior>ds-cfg-backend</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.backends.NullBackend</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="writability-mode">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>enabled</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NumSubordinatesVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NumSubordinatesVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..6a1c19e
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/NumSubordinatesVirtualAttributeConfiguration.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="num-subordinates-virtual-attribute"
+ plural-name="num-subordinates-virtual-attributes"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ generates a virtual attribute that specifies the
+ number of immediate child entries that exist below the entry.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-num-subordinates-virtual-attribute</ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.NumSubordinatesVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="conflict-behavior" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>virtual-overrides-real</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="attribute-type">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>numSubordinates</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PBKDF2PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PBKDF2PasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..163a9f0
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PBKDF2PasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2013 ForgeRock AS.
+ ! -->
+<adm:managed-object name="pbkdf2-password-storage-scheme"
+ plural-name="pbkdf2-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords using the
+ PBKDF2 message digest algorithm.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains an implementation for the user password syntax,
+ with a storage scheme name of "PBKDF2".
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-pbkdf2-password-storage-scheme</ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.PBKDF2PasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="pbkdf2-iterations" advanced="false">
+ <adm:synopsis>
+ The number of algorithm iterations to make. NIST recommends
+ at least 1000.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>10000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-pbkdf2-iterations</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PKCS11KeyManagerProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PKCS11KeyManagerProviderConfiguration.xml
new file mode 100644
index 0000000..3f69a49
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PKCS11KeyManagerProviderConfiguration.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2013 ForgeRock AS
+ ! -->
+<adm:managed-object name="pkcs11-key-manager-provider"
+ plural-name="pkcs11-key-manager-providers"
+ package="org.forgerock.opendj.server.config" extends="key-manager-provider"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ enables the server to access the private
+ key information through the PKCS11 interface.
+ </adm:synopsis>
+ <adm:description>
+ This standard interface is used by cryptographic accelerators and
+ hardware security modules.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-pkcs11-key-manager-provider</ldap:name>
+ <ldap:superior>ds-cfg-key-manager-provider</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.PKCS11KeyManagerProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-reference name="key-store-pin" />
+ <adm:property-reference name="key-store-pin-property" />
+ <adm:property-reference name="key-store-pin-environment-variable" />
+ <adm:property-reference name="key-store-pin-file" />
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/Package.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/Package.xml
new file mode 100644
index 0000000..86a8c32
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/Package.xml
@@ -0,0 +1,577 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
+ ! Portions Copyright 2011-2013 ForgeRock AS
+ ! -->
+<adm:package name="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ Core <adm:product-name /> directory server administrative components.
+ </adm:synopsis>
+ <adm:property name="listen-port" mandatory="true">
+ <adm:synopsis>
+ Specifies the port number on which the
+ <adm:user-friendly-name />
+ will listen for connections from clients.
+ </adm:synopsis>
+ <adm:description>
+ Only a single port number may be provided.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="65535" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-listen-port</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="use-ssl">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ should use SSL.
+ </adm:synopsis>
+ <adm:description>
+ If enabled, the
+ <adm:user-friendly-name />
+ will use SSL to encrypt communication with the clients.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-use-ssl</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="ssl-cert-nickname">
+ <adm:TODO>Need a better default description.</adm:TODO>
+ <adm:synopsis>
+ Specifies the nickname (also called the alias) of the certificate
+ that the
+ <adm:user-friendly-name />
+ should use when performing SSL communication.
+ </adm:synopsis>
+ <adm:description>
+ This is only applicable when the
+ <adm:user-friendly-name />
+ is configured to use SSL.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>Let the server decide.</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string></adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-ssl-cert-nickname</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="key-store-pin">
+ <adm:synopsis>
+ Specifies the clear-text PIN needed to access the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property will take effect the next time that
+ the
+ <adm:user-friendly-name />
+ is accessed.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-key-store-pin</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="key-store-pin-property">
+ <adm:TODO>Better syntax for property name?</adm:TODO>
+ <adm:synopsis>
+ Specifies the name of the Java property that contains the
+ clear-text PIN needed to access the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property will take effect the next time that
+ the
+ <adm:user-friendly-name />
+ is accessed.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ The name of a defined Java property.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-key-store-pin-property</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="key-store-pin-environment-variable">
+ <adm:synopsis>
+ Specifies the name of the environment variable that contains the
+ clear-text PIN needed to access the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property will take effect the next time that
+ the
+ <adm:user-friendly-name />
+ is accessed.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ The name of a defined environment variable that contains the
+ clear-text PIN required to access the contents of the key store.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-key-store-pin-environment-variable</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="key-store-pin-file">
+ <adm:TODO>Should use a file-based property definition?</adm:TODO>
+ <adm:synopsis>
+ Specifies the path to the text file whose only contents should be
+ a single line containing the clear-text PIN needed to access the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property will take effect the next time that
+ the
+ <adm:user-friendly-name />
+ is accessed.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>FILE</adm:usage>
+ <adm:synopsis>
+ A path to an existing file that is readable by the server.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-key-store-pin-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="trust-store-pin">
+ <adm:synopsis>
+ Specifies the clear-text PIN needed to access the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property will take effect the next time that
+ the
+ <adm:user-friendly-name />
+ is accessed.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-trust-store-pin</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="trust-store-pin-property">
+ <adm:TODO>Better syntax for property name?</adm:TODO>
+ <adm:synopsis>
+ Specifies the name of the Java property that contains the
+ clear-text PIN needed to access the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property will take effect the next time that
+ the
+ <adm:user-friendly-name />
+ is accessed.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-trust-store-pin-property</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="trust-store-pin-environment-variable">
+ <adm:synopsis>
+ Specifies the name of the environment variable that contains the
+ clear-text PIN needed to access the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property will take effect the next time that
+ the
+ <adm:user-friendly-name />
+ is accessed.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-trust-store-pin-environment-variable
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="trust-store-pin-file">
+ <adm:TODO>Should use a file-based property definition?</adm:TODO>
+ <adm:synopsis>
+ Specifies the path to the text file whose only contents should be
+ a single line containing the clear-text PIN needed to access the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property will take effect the next time that
+ the
+ <adm:user-friendly-name />
+ is accessed.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-trust-store-pin-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="include-filter" multi-valued="true">
+ <adm:synopsis>
+ The set of filters that define the entries that should be included
+ in the cache.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-include-filter</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="exclude-filter" multi-valued="true">
+ <adm:synopsis>
+ The set of filters that define the entries that should be excluded
+ from the cache.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-exclude-filter</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allowed-client" multi-valued="true">
+ <adm:synopsis>
+ Specifies a set of host names or address masks that determine the
+ clients that are allowed to establish connections to this
+ <adm:user-friendly-name/>.
+ </adm:synopsis>
+ <adm:description>
+ Valid values include a host name, a fully qualified domain name, a
+ domain name, an IP address, or a subnetwork with subnetwork mask.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately and do not
+ interfere with connections that may have already been
+ established.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ All clients with addresses that do not match an address on the
+ deny list are allowed. If there is no deny list, then all
+ clients are allowed.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:ip-address-mask />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allowed-client</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="denied-client" multi-valued="true">
+ <adm:synopsis>
+ Specifies a set of host names or address masks that determine
+ the clients that are not allowed to establish connections to this
+ <adm:user-friendly-name/>.
+ </adm:synopsis>
+ <adm:description>
+ Valid values include a host name, a fully qualified domain name, a
+ domain name, an IP address, or a subnetwork with subnetwork mask.
+ If both allowed and denied client masks are defined and a client
+ connection matches one or more masks in both lists, then the
+ connection is denied. If only a denied list is specified,
+ then any client not matching a mask in that list is allowed.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect immediately and do not
+ interfere with connections that may have already been
+ established.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ If an allow list is specified, then only clients with
+ addresses on the allow list are allowed. Otherwise, all
+ clients are allowed.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:ip-address-mask />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-denied-client</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="use-tcp-keep-alive" advanced="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ should use TCP keep-alive.
+ </adm:synopsis>
+ <adm:description>
+ If enabled, the SO_KEEPALIVE socket option is used to indicate that TCP
+ keepalive messages should periodically be sent to the client to
+ verify that the associated connection is still valid. This may
+ also help prevent cases in which intermediate network hardware
+ could silently drop an otherwise idle client connection, provided
+ that the keepalive interval configured in the underlying operating
+ system is smaller than the timeout enforced by the network
+ hardware.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-use-tcp-keep-alive</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="use-tcp-no-delay" advanced="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ should use TCP no-delay.
+ </adm:synopsis>
+ <adm:description>
+ If enabled, the TCP_NODELAY socket option is used to ensure
+ that response messages to the client are sent immediately rather
+ than potentially waiting to determine whether additional response
+ messages can be sent in the same packet. In most cases, using the
+ TCP_NODELAY socket option provides better performance and
+ lower response times, but disabling it may help for some cases in
+ which the server sends a large number of entries to a client
+ in response to a search request.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-use-tcp-no-delay</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allow-tcp-reuse-address" advanced="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ should reuse socket descriptors.
+ </adm:synopsis>
+ <adm:description>
+ If enabled, the SO_REUSEADDR socket option is used on the
+ server listen socket to potentially allow the reuse of socket
+ descriptors for clients in a TIME_WAIT state. This may help the
+ server avoid temporarily running out of socket descriptors in
+ cases in which a very large number of short-lived connections have
+ been established from the same client system.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allow-tcp-reuse-address</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:package>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ParallelWorkQueueConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ParallelWorkQueueConfiguration.xml
new file mode 100644
index 0000000..0186f0b
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ParallelWorkQueueConfiguration.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="parallel-work-queue"
+ plural-name="parallel-work-queues" extends="work-queue"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is a type of work queue that uses a number of worker threads that
+ watch a queue and pick up an operation to process whenever one
+ becomes available.
+ </adm:synopsis>
+ <adm:description>
+ The parallel work queue is a FIFO queue serviced by a fixed
+ number of worker threads. This fixed number of threads can be
+ changed on the fly, with the change taking effect as soon as
+ it is made. This work queue implementation is unbound ie it
+ does not block after reaching certain queue size and as such
+ should only be used on a very well tuned server configuration
+ to avoid potential out of memory errors.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-parallel-work-queue</ldap:name>
+ <ldap:superior>ds-cfg-work-queue</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.ParallelWorkQueue
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="num-worker-threads">
+ <adm:synopsis>
+ Specifies the number of worker threads to be used for processing
+ operations placed in the queue.
+ </adm:synopsis>
+ <adm:description>
+ If the value is increased,
+ the additional worker threads are created immediately. If the
+ value is reduced, the appropriate number of threads are destroyed
+ as operations complete processing.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Let the server decide.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="2147483647" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-num-worker-threads</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordExpirationTimeVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordExpirationTimeVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..158c189
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordExpirationTimeVirtualAttributeConfiguration.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2012 profiq s.r.o.
+ ! -->
+<adm:managed-object name="password-expiration-time-virtual-attribute"
+ plural-name="password-expiration-time-virtual-attribute"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ generates a virtual attribute which shows the password expiration date.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-password-expiration-time-virtual-attribute
+ </ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.PasswordExpirationTimeVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="conflict-behavior" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>virtual-overrides-real</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="attribute-type">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>ds-pwp-password-expiration-time</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
\ No newline at end of file
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordGeneratorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordGeneratorConfiguration.xml
new file mode 100644
index 0000000..f07ae7d
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordGeneratorConfiguration.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="password-generator"
+ plural-name="password-generators"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are used by the password modify extended operation to construct a
+ new password for the user.
+ </adm:synopsis>
+ <adm:description>
+ The server allows any number of password validators to be defined.
+ This can impose any kinds of restrictions on the characteristics
+ of valid passwords. Therefore, it is not feasible for the server
+ to attempt to generate a password on its own that will meet all
+ the requirements of all the validators. The password generator
+ makes it possible to provide custom logic for creating a new password.
+ </adm:description>
+ <adm:tag name="user-management" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-password-generator</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled for use.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.PasswordGenerator
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordModifyExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordModifyExtendedOperationHandlerConfiguration.xml
new file mode 100644
index 0000000..7d5f54d
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordModifyExtendedOperationHandlerConfiguration.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="password-modify-extended-operation-handler"
+ plural-name="password-modify-extended-operation-handlers"
+ package="org.forgerock.opendj.server.config"
+ extends="extended-operation-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ allows end users to change their own passwords, or
+ administrators to reset user passwords.
+ </adm:synopsis>
+ <adm:description>
+ The password modify extended operation is defined in RFC 3062. It
+ includes the ability for users to provide their current password for
+ further confirmation of their identity when changing the password,
+ and it also includes the ability to generate a new password if the
+ user does not provide one.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-password-modify-extended-operation-handler
+ </ldap:name>
+ <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.PasswordModifyExtendedOperation
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="identity-mapper" mandatory="true">
+ <adm:synopsis>
+ Specifies the name of the identity mapper that should be used in
+ conjunction with the password modify extended operation.
+ </adm:synopsis>
+ <adm:description>
+ This property is used to identify a user based on an
+ authorization ID in the 'u:' form. Changes to this property take effect immediately.
+ </adm:description>
+ <adm:syntax>
+ <adm:aggregation relation-name="identity-mapper"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced identity mapper must be enabled when the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-identity-mapper</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicyConfiguration.xml
new file mode 100644
index 0000000..d3df0b6
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicyConfiguration.xml
@@ -0,0 +1,941 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="password-policy"
+ plural-name="password-policies"
+ extends="authentication-policy"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ define a number of password management rules, as well as
+ requirements for authentication processing.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-password-policy</ldap:name>
+ <ldap:superior>ds-cfg-authentication-policy</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.core.PasswordPolicyFactory
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="password-attribute" mandatory="true">
+ <adm:synopsis>
+ Specifies the attribute type used to hold user passwords.
+ </adm:synopsis>
+ <adm:description>
+ This attribute type must be defined in the server schema, and it
+ must have either the user password or auth password syntax.
+ </adm:description>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-password-attribute</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="default-password-storage-scheme" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the password storage schemes that are used
+ to encode clear-text passwords for this password policy.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:aggregation relation-name="password-storage-scheme"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced password storage schemes must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-default-password-storage-scheme</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="deprecated-password-storage-scheme"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the password storage schemes that are
+ considered deprecated for this password policy.
+ </adm:synopsis>
+ <adm:description>
+ If a user with this password policy authenticates to the server
+ and his/her password is encoded with a deprecated scheme, those
+ values are removed and replaced with values encoded using the
+ default password storage scheme(s).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="password-storage-scheme"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced password storage schemes must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-deprecated-password-storage-scheme</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="password-validator" multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the password validators that are used
+ with the associated password storage scheme.
+ </adm:synopsis>
+ <adm:description>
+ The password validators are invoked when a user attempts to provide
+ a new password, to determine whether the new password is acceptable.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="password-validator"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced password validators must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-password-validator</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="account-status-notification-handler"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the account status notification handlers
+ that are used with the associated password storage scheme.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation
+ relation-name="account-status-notification-handler"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced account status notification handlers must be
+ enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-account-status-notification-handler
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allow-user-password-changes">
+ <adm:synopsis>
+ Indicates whether users can change their own
+ passwords.
+ </adm:synopsis>
+ <adm:description>
+ This check is made in addition to access control evaluation.
+ Both must allow the password change for it to occur.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allow-user-password-changes</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="password-change-requires-current-password">
+ <adm:synopsis>
+ Indicates whether user password changes must use
+ the password modify extended operation and must include the user's
+ current password before the change is allowed.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-password-change-requires-current-password
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="force-change-on-add">
+ <adm:synopsis>
+ Indicates whether users are forced to change their passwords
+ upon first authenticating to the directory server after their
+ account has been created.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-force-change-on-add</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="force-change-on-reset">
+ <adm:synopsis>
+ Indicates whether users are forced to change their passwords
+ if they are reset by an administrator.
+ </adm:synopsis>
+ <adm:description>
+ For this purpose, anyone with permission to change a given user's
+ password other than that user is considered an administrator.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-force-change-on-reset</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="skip-validation-for-administrators"
+ advanced="true">
+ <adm:synopsis>
+ Indicates whether passwords set by administrators are allowed
+ to bypass the password validation process that is required
+ for user password changes.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-skip-validation-for-administrators</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="password-generator">
+ <adm:synopsis>
+ Specifies the name of the password generator that is used
+ with the associated password policy.
+ </adm:synopsis>
+ <adm:description>
+ This is used in conjunction with the password modify extended
+ operation to generate a new password for a user when none was
+ provided in the request.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="password-generator"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced password generator must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-password-generator</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="require-secure-authentication">
+ <adm:synopsis>
+ Indicates whether users with the associated password policy are
+ required to authenticate in a secure manner.
+ </adm:synopsis>
+ <adm:description>
+ This might mean either using a secure communication channel
+ between the client and the server, or using a SASL mechanism that
+ does not expose the credentials.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-require-secure-authentication</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="require-secure-password-changes">
+ <adm:synopsis>
+ Indicates whether users with the associated password policy are
+ required to change their password in a secure manner that does
+ not expose the credentials.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-require-secure-password-changes</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allow-multiple-password-values" advanced="true">
+ <adm:synopsis>
+ Indicates whether user entries can have multiple
+ distinct values for the password attribute.
+ </adm:synopsis>
+ <adm:description>
+ This is potentially dangerous because many mechanisms used to
+ change the password do not work well with such a configuration. If
+ multiple password values are allowed, then any of them can be used
+ to authenticate, and they are all subject to the same policy
+ constraints.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allow-multiple-password-values</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allow-pre-encoded-passwords" advanced="true">
+ <adm:synopsis>
+ Indicates whether users can change their passwords
+ by providing a pre-encoded value.
+ </adm:synopsis>
+ <adm:description>
+ This can cause a security risk because the clear-text version of
+ the password is not known and therefore validation checks cannot
+ be applied to it.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allow-pre-encoded-passwords</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="min-password-age">
+ <adm:synopsis>
+ Specifies the minimum length of time after a
+ password change before the user is allowed to change the
+ password again.
+ </adm:synopsis>
+ <adm:description>
+ The value of this attribute is an integer followed by a
+ unit of seconds, minutes, hours, days, or weeks. This setting can
+ be used to prevent users from changing their passwords repeatedly
+ over a short period of time to flush an old password from the
+ history so that it can be re-used.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0 seconds</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration lower-limit="0" upper-limit="2147483647" base-unit="s"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-min-password-age</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-password-age">
+ <adm:synopsis>
+ Specifies the maximum length of time that a user can continue
+ using the same password before it must be changed (that is, the
+ password expiration interval).
+ </adm:synopsis>
+ <adm:description>
+ The value of this attribute is an integer followed by a
+ unit of seconds, minutes, hours, days, or weeks. A value of 0
+ seconds disables password expiration.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0 seconds</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration lower-limit="0" upper-limit="2147483647" base-unit="s"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-password-age</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-password-reset-age">
+ <adm:synopsis>
+ Specifies the maximum length of time that users have to change
+ passwords after they have been reset by an administrator before
+ they become locked.
+ </adm:synopsis>
+ <adm:description>
+ The value of this attribute is an integer followed by a
+ unit of seconds, minutes, hours, days, or weeks. A value of 0
+ seconds disables this feature.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0 seconds</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration lower-limit="0" upper-limit="2147483647" base-unit="s"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-password-reset-age</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="password-expiration-warning-interval">
+ <adm:synopsis>
+ Specifies the maximum length of time before a user's password
+ actually expires that the server begins to include warning
+ notifications in bind responses for that user.
+ </adm:synopsis>
+ <adm:description>
+ The value of this attribute is an integer followed by a
+ unit of seconds, minutes, hours, days, or weeks. A value of 0
+ seconds disables the warning interval.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5 days</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-password-expiration-warning-interval
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="expire-passwords-without-warning">
+ <adm:synopsis>
+ Indicates whether the directory server allows a user's
+ password to expire even if that user has never seen an expiration
+ warning notification.
+ </adm:synopsis>
+ <adm:description>
+ If this property is true, accounts always expire when the
+ expiration time arrives. If this property is false or disabled, the user
+ always receives at least one warning notification, and the
+ password expiration is set to the warning time plus the
+ warning interval.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-expire-passwords-without-warning</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allow-expired-password-changes">
+ <adm:synopsis>
+ Indicates whether a user whose password is expired is still
+ allowed to change that password using the password modify extended
+ operation.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allow-expired-password-changes</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="grace-login-count">
+ <adm:synopsis>
+ Specifies the number of grace logins that a user is allowed
+ after the account has expired to allow that user to choose a new
+ password.
+ </adm:synopsis>
+ <adm:description>
+ A value of 0 indicates that no grace logins are allowed.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" upper-limit="2147483647" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-grace-login-count</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="lockout-failure-count">
+ <adm:synopsis>
+ Specifies the maximum number of authentication failures that a
+ user is allowed before the account is locked out.
+ </adm:synopsis>
+ <adm:description>
+ A value of 0 indicates that accounts are never locked out
+ due to failed attempts.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" upper-limit="2147483647"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-lockout-failure-count</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="lockout-duration">
+ <adm:synopsis>
+ Specifies the length of time that an account is locked
+ after too many authentication failures.
+ </adm:synopsis>
+ <adm:description>
+ The value of this attribute is an integer followed by a
+ unit of seconds, minutes, hours, days, or weeks. A value of 0
+ seconds indicates that the account must remain locked until an
+ administrator resets the password.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0 seconds</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration lower-limit="0" upper-limit="2147483647" base-unit="s"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-lockout-duration</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="lockout-failure-expiration-interval">
+ <adm:synopsis>
+ Specifies the length of time before an
+ authentication failure is no longer counted against a user for the
+ purposes of account lockout.
+ </adm:synopsis>
+ <adm:description>
+ The value of this attribute is an integer followed by a
+ unit of seconds, minutes, hours, days, or weeks. A value of 0
+ seconds indicates that the authentication failures must never
+ expire. The failure count is always cleared upon a successful
+ authentication.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0 seconds</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration lower-limit="0" upper-limit="2147483647" base-unit="s"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-lockout-failure-expiration-interval
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="require-change-by-time">
+ <adm:synopsis>
+ Specifies the time by which all users with the associated password
+ policy must change their passwords.
+ </adm:synopsis>
+ <adm:description>
+ The value is expressed in a generalized time format. If
+ this time is equal to the current time or is in the past, then all
+ users are required to change their passwords immediately. The
+ behavior of the server in this mode is identical to the
+ behavior observed when users are forced to change their passwords
+ after an administrative reset.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ A valid timestamp in generalized time form (for example,
+ a value of "20070409185811Z" indicates a value of April 9,
+ 2007 at 6:58:11 pm GMT).
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-require-change-by-time</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="last-login-time-attribute">
+ <adm:synopsis>
+ Specifies the name or OID of the attribute type that is
+ used to hold the last login time for users with the associated
+ password policy.
+ </adm:synopsis>
+ <adm:description>
+ This attribute type must be defined in the directory server schema
+ and must either be defined as an operational attribute or must be
+ allowed by the set of objectClasses for all users with the
+ associated password policy.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-last-login-time-attribute</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="last-login-time-format">
+ <adm:synopsis>
+ Specifies the format string that is used to generate the
+ last login time value for users with the associated password
+ policy.
+ </adm:synopsis>
+ <adm:description>
+ This format string conforms to the syntax described in the
+ API documentation for the java.text.SimpleDateFormat class.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ Any valid format string that can be used with the
+ java.text.SimpleDateFormat class.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-last-login-time-format</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="previous-last-login-time-format"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the format string(s) that might have been used with the
+ last login time at any point in the past for users associated with
+ the password policy.
+ </adm:synopsis>
+ <adm:description>
+ These values are used to make it possible to parse previous
+ values, but are not used to set new values. The format
+ strings conform to the syntax described in the API
+ documentation for the java.text.SimpleDateFormat class.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ Any valid format string that can be used with the
+ java.text.SimpleDateFormat class.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-previous-last-login-time-format</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="idle-lockout-interval">
+ <adm:synopsis>
+ Specifies the maximum length of time that an account may remain
+ idle (that is, the associated user does not authenticate to the
+ server) before that user is locked out.
+ </adm:synopsis>
+ <adm:description>
+ The value of this attribute is an integer followed by a
+ unit of seconds, minutes, hours, days, or weeks. A value of 0
+ seconds indicates that idle accounts are not automatically
+ locked out. This feature is available only if the last login
+ time is maintained.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0 seconds</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration lower-limit="0" upper-limit="2147483647"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-idle-lockout-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="state-update-failure-policy" advanced="true">
+ <adm:synopsis>
+ Specifies how the server deals with the inability to update
+ password policy state information during an authentication
+ attempt.
+ </adm:synopsis>
+ <adm:description>
+ In particular, this property can be used to control whether an otherwise
+ successful bind operation fails if a failure occurs while
+ attempting to update password policy state information (for example, to
+ clear a record of previous authentication failures or to update
+ the last login time). It can also be used to control whether to
+ reject a bind request if it is known ahead of time that it will not be
+ possible to update the authentication failure times in the event of an
+ unsuccessful bind attempt (for example, if the backend writability mode
+ is disabled).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>reactive</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="ignore">
+ <adm:synopsis>
+ If a bind attempt would otherwise be successful, then do not
+ reject it if a problem occurs while attempting to update the
+ password policy state information for the user.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="reactive">
+ <adm:synopsis>
+ Even if a bind attempt would otherwise be successful, reject
+ it if a problem occurs while attempting to update the
+ password policy state information for the user.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="proactive">
+ <adm:synopsis>
+ Proactively reject any bind attempt if it is known ahead of
+ time that it would not be possible to update the user's
+ password policy state information.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-state-update-failure-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="password-history-count">
+ <adm:synopsis>
+ Specifies the maximum number of former passwords to maintain in
+ the password history.
+ </adm:synopsis>
+ <adm:description>
+ When choosing a new password, the proposed password is
+ checked to ensure that it does not match the current password, nor
+ any other password in the history list. A value of zero indicates
+ that either no password history is to be maintained (if the
+ password history duration has a value of zero seconds), or that
+ there is no maximum number of passwords to maintain in the history
+ (if the password history duration has a value greater than zero
+ seconds).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0" upper-limit="2147483647" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-password-history-count</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="password-history-duration">
+ <adm:synopsis>
+ Specifies the maximum length of time that passwords remain
+ in the password history.
+ </adm:synopsis>
+ <adm:description>
+ When choosing a new password, the proposed password is
+ checked to ensure that it does not match the current password, nor
+ any other password in the history list. A value of zero seconds
+ indicates that either no password history is to be maintained (if
+ the password history count has a value of zero), or that there is
+ no maximum duration for passwords in the history (if the password
+ history count has a value greater than zero).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0 seconds</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="s" lower-limit="0"
+ upper-limit="2147483647" allow-unlimited="false" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-password-history-duration</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicyImportPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicyImportPluginConfiguration.xml
new file mode 100644
index 0000000..6d78e1f
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicyImportPluginConfiguration.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="password-policy-import-plugin"
+ plural-name="password-policy-import-plugins"
+ package="org.forgerock.opendj.server.config" extends="plugin"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ ensures that clear-text passwords contained in LDIF
+ entries are properly encoded before they are stored in the
+ appropriate directory server backend.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-password-policy-import-plugin</ldap:name>
+ <ldap:superior>ds-cfg-plugin</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.plugins.PasswordPolicyImportPlugin
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="plugin-type" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>ldifimport</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="invoke-for-internal-operations">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="default-user-password-storage-scheme"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the password storage schemes to be
+ used for encoding passwords contained in attributes with the user
+ password syntax for entries that do not include the
+ ds-pwp-password-policy-dn attribute specifying which password
+ policy is to be used to govern them.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ If the default password policy uses the attribute with the
+ user password syntax, then the server uses the default
+ password storage schemes for that password policy. Otherwise,
+ it encodes user password values using the "SSHA" scheme.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="password-storage-scheme"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced password storage schemes must be enabled when the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-default-user-password-storage-scheme
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="default-auth-password-storage-scheme"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of password storage schemes that to be used
+ for encoding passwords contained in attributes with the auth
+ password syntax for entries that do not include the
+ ds-pwp-password-policy-dn attribute specifying which password
+ policy should be used to govern them.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ If the default password policy uses an attribute with the auth
+ password syntax, then the server uses the default password
+ storage schemes for that password policy. Otherwise, it
+ encodes auth password values using the "SHA1" scheme.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation relation-name="password-storage-scheme"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced password storage schemes must be enabled when
+ the Password Policy Import plug-in is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-default-auth-password-storage-scheme
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicyStateExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicyStateExtendedOperationHandlerConfiguration.xml
new file mode 100644
index 0000000..284262a
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicyStateExtendedOperationHandlerConfiguration.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object
+ name="password-policy-state-extended-operation-handler"
+ plural-name="password-policy-state-extended-operation-handlers"
+ package="org.forgerock.opendj.server.config"
+ extends="extended-operation-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides the ability for administrators to request and optionally
+ alter password policy state information for a specified user.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-password-policy-state-extended-operation-handler
+ </ldap:name>
+ <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.PasswordPolicyStateExtendedOperation
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicySubentryVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicySubentryVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..fedb36f
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordPolicySubentryVirtualAttributeConfiguration.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2010 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="password-policy-subentry-virtual-attribute"
+ plural-name="password-policy-subentry-virtual-attributes"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ generates a virtual attribute that points to the Password Policy
+ subentry in effect for the entry.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-password-policy-subentry-virtual-attribute
+ </ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.PasswordPolicySubentryVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="conflict-behavior" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>virtual-overrides-real</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="attribute-type">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>pwdPolicySubentry</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..ca04359
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="password-storage-scheme"
+ plural-name="password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ encode new passwords provided by users so that they are stored in an
+ encoded manner. This makes it difficult or impossible for someone to
+ determine the clear-text passwords from the encoded values.
+ </adm:synopsis>
+ <adm:description>
+ <adm:user-friendly-plural-name />
+ also determine whether a clear-text password provided by a client
+ matches the encoded value stored in the server.
+ </adm:description>
+ <adm:tag name="user-management" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-password-storage-scheme</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled for use.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.PasswordStorageScheme
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordValidatorConfiguration.xml
new file mode 100644
index 0000000..ba57c95
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PasswordValidatorConfiguration.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="password-validator"
+ plural-name="password-validators"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for determining whether a proposed password is
+ acceptable for use and could include checks like ensuring it
+ meets minimum length requirements, that it has an appropriate
+ range of characters, or that it is not in the history.
+ </adm:synopsis>
+ <adm:description>
+ The password policy for a user specifies the set of password
+ validators that should be used whenever that user provides a
+ new password. In order to activate a password validator, the
+ corresponding configuration entry must be enabled, and the DN
+ of that entry should be included in the password-validator
+ attribute of the password policy in which you want that
+ validator active. All password validator configuration entries
+ must contain the password-validator structural objectclass.
+ </adm:description>
+ <adm:tag name="user-management" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-password-validator</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ password validator is enabled for use.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ password validator implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.PasswordValidator
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PlainSASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PlainSASLMechanismHandlerConfiguration.xml
new file mode 100644
index 0000000..519f4f0
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PlainSASLMechanismHandlerConfiguration.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="plain-sasl-mechanism-handler"
+ plural-name="plain-sasl-mechanism-handlers"
+ package="org.forgerock.opendj.server.config" extends="sasl-mechanism-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ performs all processing related to SASL PLAIN
+ authentication.
+ </adm:synopsis>
+ <adm:description>
+ The PLAIN SASL mechanism provides the ability for clients to
+ authenticate using a username and password. This authentication
+ is very similar to standard LDAP simple authentication, with the
+ exception that it can authenticate based on an authentication ID
+ (for example, a username) rather than requiring a full DN, and
+ it can also include an authorization ID in addition to the
+ authentication ID. Note that the SASL PLAIN mechanism does not
+ make any attempt to protect the password.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-plain-sasl-mechanism-handler</ldap:name>
+ <ldap:superior>ds-cfg-sasl-mechanism-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.PlainSASLMechanismHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="identity-mapper" mandatory="true">
+ <adm:synopsis>
+ Specifies the name of the identity mapper that is to be used
+ with this SASL mechanism handler to match the authentication or
+ authorization ID included in the SASL bind request to the
+ corresponding user in the directory.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:aggregation relation-name="identity-mapper"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced identity mapper must be enabled when the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-identity-mapper</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PluginConfiguration.xml
new file mode 100644
index 0000000..c00c4e7
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PluginConfiguration.xml
@@ -0,0 +1,410 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="plugin" plural-name="plugins"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ provide a mechanism for executing custom code at specified points in
+ operation processing and in the course of other events like
+ connection establishment and termination, server startup and
+ shutdown, and LDIF import and export.
+ </adm:synopsis>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-plugin</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ plug-in is enabled for use.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ plug-in implementation.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.plugin.DirectoryServerPlugin
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-type" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the set of plug-in types for the plug-in, which specifies the times at which the plug-in is invoked.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="startup">
+ <adm:synopsis>
+ Invoked during the directory server startup process.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="shutdown">
+ <adm:synopsis>
+ Invoked during a graceful directory server shutdown.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postconnect">
+ <adm:synopsis>
+ Invoked whenever a new connection is established to the
+ server.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postdisconnect">
+ <adm:synopsis>
+ Invoked whenever an existing connection is terminated (by
+ either the client or the server).
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="ldifimport">
+ <adm:synopsis>
+ Invoked for each entry read during an LDIF import.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="ldifimportend">
+ <adm:synopsis>
+ Invoked at the end of an LDIF import session.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="ldifimportbegin">
+ <adm:synopsis>
+ Invoked at the beginning of an LDIF import session.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="ldifexport">
+ <adm:synopsis>
+ Invoked for each operation to be written during an LDIF
+ export.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preparseabandon">
+ <adm:synopsis>
+ Invoked prior to parsing an abandon request.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preparseadd">
+ <adm:synopsis>
+ Invoked prior to parsing an add request.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preparsebind">
+ <adm:synopsis>
+ Invoked prior to parsing a bind request.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preparsecompare">
+ <adm:synopsis>
+ Invoked prior to parsing a compare request.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preparsedelete">
+ <adm:synopsis>
+ Invoked prior to parsing a delete request.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preparseextended">
+ <adm:synopsis>
+ Invoked prior to parsing an extended request.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preparsemodify">
+ <adm:synopsis>
+ Invoked prior to parsing a modify request.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preparsemodifydn">
+ <adm:synopsis>
+ Invoked prior to parsing a modify DN request.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preparsesearch">
+ <adm:synopsis>
+ Invoked prior to parsing a search request.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preparseunbind">
+ <adm:synopsis>
+ Invoked prior to parsing an unbind request.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preoperationadd">
+ <adm:synopsis>
+ Invoked prior to performing the core add processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preoperationbind">
+ <adm:synopsis>
+ Invoked prior to performing the core bind processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preoperationcompare">
+ <adm:synopsis>
+ Invoked prior to performing the core compare processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preoperationdelete">
+ <adm:synopsis>
+ Invoked prior to performing the core delete processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preoperationextended">
+ <adm:synopsis>
+ Invoked prior to performing the core extended processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preoperationmodify">
+ <adm:synopsis>
+ Invoked prior to performing the core modify processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preoperationmodifydn">
+ <adm:synopsis>
+ Invoked prior to performing the core modify DN processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="preoperationsearch">
+ <adm:synopsis>
+ Invoked prior to performing the core search processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postoperationabandon">
+ <adm:synopsis>
+ Invoked after completing the abandon processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postoperationadd">
+ <adm:synopsis>
+ Invoked after completing the core add processing but before
+ sending the response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postoperationbind">
+ <adm:synopsis>
+ Invoked after completing the core bind processing but before
+ sending the response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postoperationcompare">
+ <adm:synopsis>
+ Invoked after completing the core compare processing but
+ before sending the response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postoperationdelete">
+ <adm:synopsis>
+ Invoked after completing the core delete processing but
+ before sending the response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postoperationextended">
+ <adm:synopsis>
+ Invoked after completing the core extended processing but
+ before sending the response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postoperationmodify">
+ <adm:synopsis>
+ Invoked after completing the core modify processing but
+ before sending the response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postoperationmodifydn">
+ <adm:synopsis>
+ Invoked after completing the core modify DN processing but
+ before sending the response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postoperationsearch">
+ <adm:synopsis>
+ Invoked after completing the core search processing but
+ before sending the response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postoperationunbind">
+ <adm:synopsis>
+ Invoked after completing the unbind processing.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postresponseadd">
+ <adm:synopsis>
+ Invoked after sending the add response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postresponsebind">
+ <adm:synopsis>
+ Invoked after sending the bind response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postresponsecompare">
+ <adm:synopsis>
+ Invoked after sending the compare response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postresponsedelete">
+ <adm:synopsis>
+ Invoked after sending the delete response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postresponseextended">
+ <adm:synopsis>
+ Invoked after sending the extended response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postresponsemodify">
+ <adm:synopsis>
+ Invoked after sending the modify response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postresponsemodifydn">
+ <adm:synopsis>
+ Invoked after sending the modify DN response to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postresponsesearch">
+ <adm:synopsis>
+ Invoked after sending the search result done message to the
+ client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postsynchronizationadd">
+ <adm:synopsis>
+ Invoked after completing post-synchronization processing for
+ an add operation.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postsynchronizationdelete">
+ <adm:synopsis>
+ Invoked after completing post-synchronization processing for
+ a delete operation.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postsynchronizationmodify">
+ <adm:synopsis>
+ Invoked after completing post-synchronization processing for
+ a modify operation.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="postsynchronizationmodifydn">
+ <adm:synopsis>
+ Invoked after completing post-synchronization processing for
+ a modify DN operation.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="searchresultentry">
+ <adm:synopsis>
+ Invoked before sending a search result entry to the client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="searchresultreference">
+ <adm:synopsis>
+ Invoked before sending a search result reference to the
+ client.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="subordinatemodifydn">
+ <adm:synopsis>
+ Invoked in the course of moving or renaming an entry
+ subordinate to the target of a modify DN operation.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="subordinatedelete">
+ <adm:synopsis>
+ Invoked in the course of deleting a subordinate
+ entry of a delete operation.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="intermediateresponse">
+ <adm:synopsis>
+ Invoked before sending an intermediate repsonse message to
+ the client.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="invoke-for-internal-operations" advanced="true">
+ <adm:synopsis>
+ Indicates whether the plug-in should be invoked for internal
+ operations.
+ </adm:synopsis>
+ <adm:description>
+ Any plug-in that can be invoked for internal operations
+ must ensure that it does not create any new
+ internal operatons that can cause the same plug-in to be
+ re-invoked.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-invoke-for-internal-operations</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PluginRootConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PluginRootConfiguration.xml
new file mode 100644
index 0000000..8caff05
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/PluginRootConfiguration.xml
@@ -0,0 +1,1669 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="plugin-root" plural-name="plugin-roots"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ defines the parent entry for all plug-ins defined in the server.
+ </adm:synopsis>
+ <adm:description>
+ It can also include configuration attributes that define the order
+ in which those plug-ins are to be loaded and invoked.
+ </adm:description>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-plugin-root</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:relation name="plugin">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence />
+ <ldap:naming-attribute>cn</ldap:naming-attribute>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:property name="plugin-order-startup">
+ <adm:synopsis>
+ Specifies the order in which startup plug-ins are to be loaded and
+ invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of plug-in
+ names (where the plug-in name is the RDN value from the plug-in
+ configuration entry DN). The list can include at most one asterisk
+ to indicate the position of any unspecified plug-in (and the
+ relative order of those unspecified plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which startup plug-ins are loaded and invoked
+ is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-startup</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-shutdown">
+ <adm:synopsis>
+ Specifies the order in which shutdown plug-ins are to be loaded and
+ invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of plug-in
+ names (where the plug-in name is the RDN value from the plug-in
+ configuration entry DN). The list can include at most one asterisk
+ to indicate the position of any unspecified plug-in (and the
+ relative order of those unspecified plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which shutdown plug-ins are loaded and invoked
+ is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-shutdown</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-connect">
+ <adm:synopsis>
+ Specifies the order in which post-connect plug-ins are to be loaded
+ and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of plug-in
+ names (where the plug-in name is the RDN value from the plug-in
+ configuration entry DN). The list can include at most one asterisk
+ to indicate the position of any unspecified plug-in (and the
+ relative order of those unspecified plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-connect plug-ins are loaded and invoked
+ is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-connect</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-disconnect">
+ <adm:synopsis>
+ Specifies the order in which post-disconnect plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-disconnect plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-disconnect</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-ldif-import">
+ <adm:synopsis>
+ Specifies the order in which LDIF import plug-ins are to be loaded
+ and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of plug-in
+ names (where the plug-in name is the RDN value from the plug-in
+ configuration entry DN). The list can include at most one asterisk
+ to indicate the position of any unspecified plug-in (and the
+ relative order of those unspecified plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which LDIF import plug-ins are loaded and invoked
+ is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-ldif-import</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-ldif-import-end">
+ <adm:synopsis>
+ Specifies the order in which LDIF import end plug-ins are to be loaded
+ and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of plug-in
+ names (where the plug-in name is the RDN value from the plug-in
+ configuration entry DN). The list can include at most one asterisk
+ to indicate the position of any unspecified plug-in (and the
+ relative order of those unspecified plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which LDIF import end plug-ins are loaded and invoked
+ is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-ldif-import-end</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-ldif-import-begin">
+ <adm:synopsis>
+ Specifies the order in which LDIF import begin plug-ins are to be loaded
+ and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of plug-in
+ names (where the plug-in name is the RDN value from the plug-in
+ configuration entry DN). The list can include at most one asterisk
+ to indicate the position of any unspecified plug-in (and the
+ relative order of those unspecified plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which LDIF import begin plug-ins are loaded and invoked
+ is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-ldif-import-begin</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-ldif-export">
+ <adm:synopsis>
+ Specifies the order in which LDIF export plug-ins are to be loaded
+ and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of plug-in
+ names (where the plug-in name is the RDN value from the plug-in
+ configuration entry DN). The list can include at most one asterisk
+ to indicate the position of any unspecified plug-in (and the
+ relative order of those unspecified plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which LDIF export plug-ins are loaded and invoked
+ is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-ldif-export</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-parse-abandon">
+ <adm:synopsis>
+ Specifies the order in which pre-parse abandon plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-parse abandon plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-parse-abandon</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-parse-add">
+ <adm:synopsis>
+ Specifies the order in which pre-parse add plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-parse add plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-parse-add</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-parse-bind">
+ <adm:synopsis>
+ Specifies the order in which pre-parse bind plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-parse bind plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-parse-bind</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-parse-compare">
+ <adm:synopsis>
+ Specifies the order in which pre-parse compare plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-parse compare plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-parse-compare</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-parse-delete">
+ <adm:synopsis>
+ Specifies the order in which pre-parse delete plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-parse delete plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-parse-delete</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-parse-extended">
+ <adm:synopsis>
+ Specifies the order in which pre-parse extended operation plug-ins
+ are to be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a
+ comma-delimited list of plug-in names (where the plug-in name is the
+ RDN value from the plug-in configuration entry DN). The list can
+ include at most one asterisk to indicate the position of any
+ unspecified plug-in (and the relative order of those unspecified
+ plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-parse extended operation plug-ins are
+ loaded and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-parse-extended</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-parse-modify">
+ <adm:synopsis>
+ Specifies the order in which pre-parse modify plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-parse modify plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-parse-modify</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-parse-modify-dn">
+ <adm:synopsis>
+ Specifies the order in which pre-parse modify DN plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-parse modify DN plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-parse-modify-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-parse-search">
+ <adm:synopsis>
+ Specifies the order in which pre-parse search plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-parse search plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-parse-search</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-parse-unbind">
+ <adm:synopsis>
+ Specifies the order in which pre-parse unbind plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-parse unbind plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-parse-unbind</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-operation-add">
+ <adm:synopsis>
+ Specifies the order in which pre-operation add plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-operation add plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-operation-add</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-operation-bind">
+ <adm:synopsis>
+ Specifies the order in which pre-operation bind plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-operation bind plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-operation-bind</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-operation-compare">
+ <adm:synopsis>
+ Specifies the order in which pre-operation compare plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-operation compare plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-operation-compare</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-operation-delete">
+ <adm:synopsis>
+ Specifies the order in which pre-operation delete plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-operation delete plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-operation-delete</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-operation-extended">
+ <adm:synopsis>
+ Specifies the order in which pre-operation extended operation
+ plug-ins are to be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a
+ comma-delimited list of plug-in names (where the plug-in name is the
+ RDN value from the plug-in configuration entry DN). The list can
+ include at most one asterisk to indicate the position of any
+ unspecified plug-in (and the relative order of those unspecified
+ plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-operation extended operation plug-ins
+ are loaded and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-plugin-order-pre-operation-extended
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-operation-modify">
+ <adm:synopsis>
+ Specifies the order in which pre-operation modify plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-operation modify plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-operation-modify</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-operation-modify-dn">
+ <adm:synopsis>
+ Specifies the order in which pre-operation modify DN plug-ins
+ are to be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a
+ comma-delimited list of plug-in names (where the plug-in name is the
+ RDN value from the plug-in configuration entry DN). The list can
+ include at most one asterisk to indicate the position of any
+ unspecified plug-in (and the relative order of those unspecified
+ plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-operation modify DN plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-plugin-order-pre-operation-modify-dn
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-pre-operation-search">
+ <adm:synopsis>
+ Specifies the order in which pre-operation search plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which pre-operation searc plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-pre-operation-search</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-operation-abandon">
+ <adm:synopsis>
+ Specifies the order in which post-operation abandon plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-operation abandon plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-plugin-order-post-operation-abandon
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-operation-add">
+ <adm:synopsis>
+ Specifies the order in which post-operation add plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-operation add plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-operation-add</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-operation-bind">
+ <adm:synopsis>
+ Specifies the order in which post-operation bind plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-operation bind plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-operation-bind</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-operation-compare">
+ <adm:synopsis>
+ Specifies the order in which post-operation compare plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-operation compare plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-plugin-order-post-operation-compare
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-operation-delete">
+ <adm:synopsis>
+ Specifies the order in which post-operation delete plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-operation delete plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-operation-delete</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-operation-extended">
+ <adm:synopsis>
+ Specifies the order in which post-operation extended operation
+ plug-ins are to be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a
+ comma-delimited list of plug-in names (where the plug-in name is the
+ RDN value from the plug-in configuration entry DN). The list can
+ include at most one asterisk to indicate the position of any
+ unspecified plug-in (and the relative order of those unspecified
+ plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-operation extended operation plug-ins
+ are loaded and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-plugin-order-post-operation-extended
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-operation-modify">
+ <adm:synopsis>
+ Specifies the order in which post-operation modify plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-operation modify plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-operation-modify</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-operation-modify-dn">
+ <adm:synopsis>
+ Specifies the order in which post-operation modify DN plug-ins
+ are to be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a
+ comma-delimited list of plug-in names (where the plug-in name is the
+ RDN value from the plug-in configuration entry DN). The list can
+ include at most one asterisk to indicate the position of any
+ unspecified plug-in (and the relative order of those unspecified
+ plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-operation modify DN plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-plugin-order-post-operation-modify-dn
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-operation-search">
+ <adm:synopsis>
+ Specifies the order in which post-operation search plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-operation search plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-operation-search</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-operation-unbind">
+ <adm:synopsis>
+ Specifies the order in which post-operation unbind plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-operation unbind plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-operation-unbind</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-response-add">
+ <adm:synopsis>
+ Specifies the order in which post-response add plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-response add plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-response-add</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-response-bind">
+ <adm:synopsis>
+ Specifies the order in which post-response bind plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-response bind plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-response-bind</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-response-compare">
+ <adm:synopsis>
+ Specifies the order in which post-response compare plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-response compare plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-response-compare</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-response-delete">
+ <adm:synopsis>
+ Specifies the order in which post-response delete plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-response delete plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-response-delete</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-response-extended">
+ <adm:synopsis>
+ Specifies the order in which post-response extended operation
+ plug-ins are to be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a
+ comma-delimited list of plug-in names (where the plug-in name is the
+ RDN value from the plug-in configuration entry DN). The list can
+ include at most one asterisk to indicate the position of any
+ unspecified plug-in (and the relative order of those unspecified
+ plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-response extended operation plug-ins
+ are loaded and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-plugin-order-post-response-extended
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-response-modify">
+ <adm:synopsis>
+ Specifies the order in which post-response modify plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-response modify plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-response-modify</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-response-modify-dn">
+ <adm:synopsis>
+ Specifies the order in which post-response modify DN plug-ins
+ are to be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a
+ comma-delimited list of plug-in names (where the plug-in name is the
+ RDN value from the plug-in configuration entry DN). The list can
+ include at most one asterisk to indicate the position of any
+ unspecified plug-in (and the relative order of those unspecified
+ plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-response modify DN plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-plugin-order-post-response-modify-dn
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-synchronization-add">
+ <adm:synopsis>
+ Specifies the order in which post-synchronization add plug-ins
+ are to be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a
+ comma-delimited list of plug-in names (where the plug-in name is the
+ RDN value from the plug-in configuration entry DN). The list can
+ include at most one asterisk to indicate the position of any
+ unspecified plug-in (and the relative order of those unspecified
+ plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-synchronization add plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-plugin-order-post-synchronization-add
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-synchronization-delete">
+ <adm:synopsis>
+ Specifies the order in which post-synchronization delete plug-ins
+ are to be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a
+ comma-delimited list of plug-in names (where the plug-in name is the
+ RDN value from the plug-in configuration entry DN). The list can
+ include at most one asterisk to indicate the position of any
+ unspecified plug-in (and the relative order of those unspecified
+ plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-synchronization delete plug-ins are
+ loaded and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-plugin-order-post-synchronization-delete
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-synchronization-modify">
+ <adm:synopsis>
+ Specifies the order in which post-synchronization modify plug-ins
+ are to be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a
+ comma-delimited list of plug-in names (where the plug-in name is the
+ RDN value from the plug-in configuration entry DN). The list can
+ include at most one asterisk to indicate the position of any
+ unspecified plug-in (and the relative order of those unspecified
+ plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-synchronization modify plug-ins are
+ loaded and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-plugin-order-post-synchronization-modify
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-synchronization-modify-dn">
+ <adm:synopsis>
+ Specifies the order in which post-synchronization modify DN
+ plug-ins are to be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a
+ comma-delimited list of plug-in names (where the plug-in name is the
+ RDN value from the plug-in configuration entry DN). The list can
+ include at most one asterisk to indicate the position of any
+ unspecified plug-in (and the relative order of those unspecified
+ plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-synchronization modify DN plug-ins are
+ loaded and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-plugin-order-post-synchronization-modify-dn
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-post-response-search">
+ <adm:synopsis>
+ Specifies the order in which post-response search plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which post-response search plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-post-response-search</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-search-result-entry">
+ <adm:synopsis>
+ Specifies the order in which search result entry plug-ins are to be
+ loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of
+ plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which search result entry plug-ins are loaded and
+ invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-search-result-entry</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-search-result-reference">
+ <adm:synopsis>
+ Specifies the order in which search result reference plug-ins
+ are to be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a
+ comma-delimited list of plug-in names (where the plug-in name is the
+ RDN value from the plug-in configuration entry DN). The list can
+ include at most one asterisk to indicate the position of any
+ unspecified plug-in (and the relative order of those unspecified
+ plug-ins is undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which search result reference plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-plugin-order-search-result-reference
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-subordinate-modify-dn">
+ <adm:synopsis>
+ Specifies the order in which subordinate modify DN plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which subordinate modify DN plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-subordinate-modify-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-subordinate-delete">
+ <adm:synopsis>
+ Specifies the order in which subordinate delete plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which subordinate delete plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-subordinate-delete</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="plugin-order-intermediate-response">
+ <adm:synopsis>
+ Specifies the order in which intermediate response plug-ins are to
+ be loaded and invoked.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list
+ of plug-in names (where the plug-in name is the RDN value from the
+ plug-in configuration entry DN). The list can include at most one
+ asterisk to indicate the position of any unspecified plug-in (and
+ the relative order of those unspecified plug-ins is
+ undefined).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The order in which intermediate response plug-ins are loaded
+ and invoked is undefined.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-plugin-order-intermediate-response</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ProfilerPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ProfilerPluginConfiguration.xml
new file mode 100644
index 0000000..5489634
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ProfilerPluginConfiguration.xml
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="profiler-plugin"
+ plural-name="profiler-plugins" package="org.forgerock.opendj.server.config"
+ extends="plugin" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The Profiler plug-in
+ captures profiling information about operations performed
+ inside the JVM while the <adm:product-name /> directory server is running.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-profiler-plugin</ldap:name>
+ <ldap:superior>ds-cfg-plugin</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.plugins.profiler.ProfilerPlugin
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="plugin-type" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>startup</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="invoke-for-internal-operations">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="profile-sample-interval" mandatory="true">
+ <adm:synopsis>
+ Specifies the sample interval in milliseconds to be used when
+ capturing profiling information in the server.
+ </adm:synopsis>
+ <adm:description>
+ When capturing
+ data, the profiler thread sleeps for this length of time
+ between calls to obtain traces for all threads running in the
+ JVM.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this configuration attribute take effect the
+ next time the profiler is started.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:duration lower-limit="1" upper-limit="2147483647" base-unit="ms" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-profile-sample-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="profile-directory" mandatory="true">
+ <adm:synopsis>
+ Specifies the path to the directory where profile information
+ is to be written. This path may be either an absolute path or a path
+ that is relative to the root of the <adm:product-name /> directory server
+ instance.
+ </adm:synopsis>
+ <adm:description>
+ The directory must exist and the directory server must have
+ permission to create new files in it.
+ </adm:description>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>DIR</adm:usage>
+ <adm:synopsis>
+ The path to any directory that exists on the filesystem
+ and that can be read and written by the server user.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-profile-directory</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="enable-profiling-on-startup" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the profiler plug-in is to start collecting data
+ automatically when the directory server is started.
+ </adm:synopsis>
+ <adm:description>
+ This property is read only when the server is
+ started, and any changes take effect on the next restart.
+ This property is typically set to "false" unless startup
+ profiling is required, because otherwise the volume of data that
+ can be collected can cause the server to run out of memory if it
+ is not turned off in a timely manner.
+ </adm:description>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enable-profiling-on-startup</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="profile-action">
+ <adm:synopsis>
+ Specifies the action that should be taken by the profiler.
+ </adm:synopsis>
+ <adm:description>
+ A value of "start" causes the profiler thread to start
+ collecting data if it is not already active. A value of "stop"
+ causes the profiler thread to stop collecting data and write
+ it to disk, and a value of "cancel" causes the profiler thread
+ to stop collecting data and discard anything that has been
+ captured. These operations occur immediately.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>none</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="none">
+ <adm:synopsis>Do not take any action.</adm:synopsis>
+ </adm:value>
+ <adm:value name="start">
+ <adm:synopsis>Start collecting profile data.</adm:synopsis>
+ </adm:value>
+ <adm:value name="stop">
+ <adm:synopsis>
+ Stop collecting profile data and write what has been
+ captured to a file in the profile directory.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="cancel">
+ <adm:synopsis>
+ Stop collecting profile data and discard what has been
+ captured.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-profile-action</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/QOSPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/QOSPolicyConfiguration.xml
new file mode 100644
index 0000000..601a640
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/QOSPolicyConfiguration.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2009 Sun Microsystems, Inc.
+ !
+-->
+<adm:managed-object name="qos-policy"
+ plural-name="qos-policies"
+ abstract="true"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name/>
+ determine the quality of service (QoS) clients receive when
+ interacting with the server.
+ </adm:synopsis>
+ <adm:tag name="core-server"/>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-qos-policy</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.QOSPolicyFactory
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RC4PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RC4PasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..beb7cea
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RC4PasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="rc4-password-storage-scheme"
+ plural-name="rc4-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords using the RC4
+ reversible encryption mechanism.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains only an implementation for the user password
+ syntax, with a storage scheme name of "RC4".
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-rc4-password-storage-scheme</ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.RC4PasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RandomPasswordGeneratorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RandomPasswordGeneratorConfiguration.xml
new file mode 100644
index 0000000..5995a5f
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RandomPasswordGeneratorConfiguration.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="random-password-generator"
+ plural-name="random-password-generators"
+ package="org.forgerock.opendj.server.config" extends="password-generator"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ creates random passwords based on fixed-length strings
+ built from one or more character sets.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-random-password-generator</ldap:name>
+ <ldap:superior>ds-cfg-password-generator</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.RandomPasswordGenerator
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="password-character-set" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies one or more named character sets.
+ </adm:synopsis>
+ <adm:description>
+ This is a multi-valued property, with each value defining a different
+ character set. The format of the character set is the name of the set
+ followed by a colon and the characters that are in that set.
+ For example, the value "alpha:abcdefghijklmnopqrstuvwxyz" defines a
+ character set named "alpha" containing all of the lower-case ASCII
+ alphabetic characters.
+ </adm:description>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>FORMAT</adm:usage>
+ <adm:synopsis>
+ A character set name (consisting of ASCII letters) followed by
+ a colon and the set of characters that are included in that
+ character set.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-password-character-set</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="password-format" mandatory="true">
+ <adm:synopsis>
+ Specifies the format to use for the generated password.
+ </adm:synopsis>
+ <adm:description>
+ The value is a comma-delimited list of elements in which each of those
+ elements is comprised of the name of a character set defined in
+ the password-character-set property, a colon, and the number of
+ characters to include from that set. For example, a value of
+ "alpha:3,numeric:2,alpha:3" generates an 8-character password
+ in which the first three characters are from the "alpha" set, the
+ next two are from the "numeric" set, and the final three are from
+ the "alpha" set.
+ </adm:description>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>FORMAT</adm:usage>
+ <adm:synopsis>
+ A comma-delimited list whose elements comprise a valid character
+ set name, a colon, and a positive integer indicating the number
+ of characters from that set to be included.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-password-format</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReferentialIntegrityPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReferentialIntegrityPluginConfiguration.xml
new file mode 100644
index 0000000..0038ff6
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReferentialIntegrityPluginConfiguration.xml
@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! Portions copyright 2011 profiq s.r.o.
+ ! -->
+<adm:managed-object name="referential-integrity-plugin"
+ plural-name="referential-integrity-plugins"
+ package="org.forgerock.opendj.server.config" extends="plugin"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ maintains referential integrity for DN valued attributes.
+ </adm:synopsis>
+ <adm:description>
+ The values of these attributes can reference entries that have been
+ deleted by a delete operation or renamed by a modify DN operation.
+ The referential integrity plug-in either removes stale references to
+ deleted entries or updates references to renamed entries. The
+ plug-in allows the scope of this referential
+ check to be limited to a set of base DNs if desired. The plug-in
+ also can be
+ configured to perform the referential checking in the background
+ mode specified intervals.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-referential-integrity-plugin</ldap:name>
+ <ldap:superior>ds-cfg-plugin</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.plugins.ReferentialIntegrityPlugin
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="plugin-type" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>postoperationdelete</adm:value>
+ <adm:value>postoperationmodifydn</adm:value>
+ <adm:value>subordinatemodifydn</adm:value>
+ <adm:value>subordinatedelete</adm:value>
+ <adm:value>preoperationadd</adm:value>
+ <adm:value>preoperationmodify</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="attribute-type" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the attribute types for which referential integrity
+ is to be maintained.
+ </adm:synopsis>
+ <adm:description>
+ At least one attribute type must be specified, and the syntax
+ of any attributes must be either a distinguished name
+ (1.3.6.1.4.1.1466.115.121.1.12) or name and optional UID
+ (1.3.6.1.4.1.1466.115.121.1.34).
+ </adm:description>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-attribute-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="base-dn" multi-valued="true">
+ <adm:synopsis>
+ Specifies the base DN that limits the scope within which
+ referential integrity is maintained.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Referential integrity is maintained in all public naming
+ contexts.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-file">
+ <adm:synopsis>
+ Specifies the log file location where the update records are
+ written when the plug-in is in background-mode processing.
+ </adm:synopsis>
+ <adm:description>
+ The default location is the logs directory of the server
+ instance, using the file name "referint".
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>logs/referint</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>FILE</adm:usage>
+ <adm:synopsis>
+ A path to an existing file that is readable by the server.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="update-interval">
+ <adm:synopsis>
+ Specifies the interval in seconds when referential integrity
+ updates are made.
+ </adm:synopsis>
+ <adm:description>
+ If this value is 0, then the updates are made synchronously in the
+ foreground.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0 seconds</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="s" allow-unlimited="false" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-update-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="check-references">
+ <adm:synopsis>
+ Specifies whether or not reference attributes must refer to existing
+ entries.
+ </adm:synopsis>
+ <adm:description>
+ When this property is set to true, this plugin will ensure that any new
+ references added as part of an add or modify operation point to existing
+ entries, and that the referenced entries match the filter criteria for the
+ referencing attribute, if specified.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-check-references</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="check-references-filter-criteria"
+ multi-valued="true" mandatory="false">
+ <adm:synopsis>
+ Specifies additional filter criteria which will be enforced when checking
+ references.
+ </adm:synopsis>
+ <adm:description>
+ If a reference attribute has filter criteria defined then this plugin
+ will ensure that any new references added as part of an add or modify
+ operation refer to an existing entry which matches the specified filter.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^[^:]+:\\(.+\\)$</adm:regex>
+ <adm:usage>ATTRIBUTE:FILTER</adm:usage>
+ <adm:synopsis>An attribute-filter mapping.</adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-check-references-filter-criteria</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="check-references-scope-criteria">
+ <adm:synopsis>
+ Specifies whether or not referenced entries must reside within the same
+ naming context as the entry containing the reference.
+ </adm:synopsis>
+ <adm:description>
+ The reference scope will only be enforced when reference checking is
+ enabled.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>global</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="global">
+ <adm:synopsis>
+ References may refer to existing entries located anywhere in the
+ Directory.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="naming-context">
+ <adm:synopsis>
+ References must refer to existing entries located within the same
+ naming context.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-check-references-scope-criteria</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RegularExpressionIdentityMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RegularExpressionIdentityMapperConfiguration.xml
new file mode 100644
index 0000000..e801058
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RegularExpressionIdentityMapperConfiguration.xml
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="regular-expression-identity-mapper"
+ plural-name="regular-expression-identity-mappers"
+ package="org.forgerock.opendj.server.config" extends="identity-mapper"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a way to use a regular expression to translate the
+ provided identifier when searching for the appropriate user entry.
+ </adm:synopsis>
+ <adm:description>
+ This may be used, for example, if the provided identifier is
+ expected to be an e-mail address or Kerberos principal, but only the
+ username portion (the part before the "@" symbol) should be used in
+ the mapping process. Note that a replacement will be made only if
+ all or part of the provided ID string matches the given match
+ pattern. If no part of the ID string matches the provided
+ pattern, the given ID string is used without any alteration.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-regular-expression-identity-mapper</ldap:name>
+ <ldap:superior>ds-cfg-identity-mapper</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.RegularExpressionIdentityMapper
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="match-attribute" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the name or OID of the attribute whose value should
+ match the provided identifier string after it has been processed
+ by the associated regular expression.
+ </adm:synopsis>
+ <adm:description>
+ All values must refer to the name or OID of an attribute type
+ defined in the directory server schema. If multiple attributes
+ or OIDs are provided, at least one of those attributes must contain
+ the provided ID string value in exactly one entry.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ uid
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-match-attribute</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="match-base-dn" mandatory="false" multi-valued="true">
+ <adm:synopsis>
+ Specifies the base DN(s) that should be used when performing
+ searches to map the provided ID string to a user entry. If multiple
+ values are given, searches are performed below all the specified base DNs.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The server searches below all public naming contexts.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-match-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="match-pattern" mandatory="true">
+ <adm:synopsis>
+ Specifies the regular expression pattern that is used to
+ identify portions of the ID string that will be replaced.
+ </adm:synopsis>
+ <adm:description>
+ Any portion of the ID string that matches this pattern is
+ replaced in accordance with the provided replace pattern (or is
+ removed if no replace pattern is specified). If multiple
+ substrings within the given ID string match this pattern, all
+ occurrences are replaced. If no part of the given ID string
+ matches this pattern, the ID string is not altered. Exactly one
+ match pattern value must be provided, and it must be a
+ valid regular expression as described in the API documentation for
+ the java.util.regex.Pattern class, including support for capturing
+ groups.
+ </adm:description>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>REGEXP</adm:usage>
+ <adm:synopsis>
+ Any valid regular expression pattern which is supported by the
+ javax.util.regex.Pattern class
+ (see http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/util/regex/Pattern.html
+ for documentation about this class for Java SE 6).
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-match-pattern</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="replace-pattern">
+ <adm:synopsis>
+ Specifies the replacement pattern that should be used for
+ substrings in the ID string that match the provided regular
+ expression pattern.
+ </adm:synopsis>
+ <adm:description>
+ If no replacement pattern is provided, then any matching portions
+ of the ID string will be removed (i.e., replaced with an empty
+ string). The replacement pattern may include a string from a
+ capturing group by using a dollar sign ($) followed by an integer
+ value that indicates which capturing group should be used.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The replace pattern will be the empty string.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>REGEXP</adm:usage>
+ <adm:synopsis>
+ Any valid replacement string that is allowed by the
+ javax.util.regex.Matcher class.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-replace-pattern</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RepeatedCharactersPasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RepeatedCharactersPasswordValidatorConfiguration.xml
new file mode 100644
index 0000000..2f16e69
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RepeatedCharactersPasswordValidatorConfiguration.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="repeated-characters-password-validator"
+ plural-name="repeated-characters-password-validators"
+ package="org.forgerock.opendj.server.config" extends="password-validator"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is used to determine whether a proposed password is acceptable based
+ on the number of times any character appears consecutively in a
+ password value.
+ </adm:synopsis>
+ <adm:description>
+ It ensures that user passwords do not contain strings
+ of the same character repeated several times, like "aaaaaa" or
+ "aaabbb".
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-repeated-characters-password-validator
+ </ldap:name>
+ <ldap:superior>ds-cfg-password-validator</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.RepeatedCharactersPasswordValidator
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="max-consecutive-length" mandatory="true">
+ <adm:synopsis>
+ Specifies the maximum number of times that any character can
+ appear consecutively in a password value.
+ </adm:synopsis>
+ <adm:description>
+ A value of zero indicates that no maximum limit is enforced.
+ </adm:description>
+ <adm:syntax>
+ <adm:integer lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-consecutive-length</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="case-sensitive-validation" mandatory="true">
+ <adm:synopsis>
+ Indicates whether this password validator should treat password
+ characters in a case-sensitive manner.
+ </adm:synopsis>
+ <adm:description>
+ If the value of this property is false, the validator ignores
+ any differences in capitalization
+ when looking for consecutive characters in the
+ password. If the value is true, the validator considers a
+ character to be repeating only if all consecutive occurrences
+ use the same capitalization.
+ </adm:description>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-case-sensitive-validation</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReplicationDomainConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReplicationDomainConfiguration.xml
new file mode 100644
index 0000000..dd9bf90
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReplicationDomainConfiguration.xml
@@ -0,0 +1,548 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! Portions Copyright 2011-2013 ForgeRock AS
+ ! -->
+<adm:managed-object name="replication-domain"
+ plural-name="replication-domains"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ A
+ <adm:user-friendly-name />
+ comprises of several Directory Servers sharing the same synchronized
+ set of data.
+ </adm:synopsis>
+ <adm:tag name="replication" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-replication-domain</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:relation name="external-changelog-domain">
+ <adm:one-to-one />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=External ChangeLog
+ </ldap:rdn-sequence>
+ </adm:profile>
+ </adm:relation>
+ <adm:property name="replication-server" multi-valued="true"
+ mandatory="true">
+ <adm:synopsis>
+ Specifies the addresses of the Replication Servers within the
+ <adm:user-friendly-name />
+ to which the directory server should try to connect at startup
+ time.
+ </adm:synopsis>
+ <adm:description>
+ Addresses must be specified using the syntax: hostname:port
+ </adm:description>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^.+:[0-9]+$</adm:regex>
+ <adm:usage>HOST:PORT</adm:usage>
+ <adm:synopsis>
+ A host name followed by a ":" and a port number.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-replication-server</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="server-id" mandatory="true" read-only="true">
+ <adm:synopsis>
+ Specifies a unique identifier for the directory server within the
+ <adm:user-friendly-name />.
+ </adm:synopsis>
+ <adm:description>
+ Each directory server within the same
+ <adm:user-friendly-name />
+ must have a different server ID. A directory server which is a
+ member of multiple
+ <adm:user-friendly-plural-name />
+ may use the same server ID for each of its
+ <adm:user-friendly-name />
+ configurations.
+ </adm:description>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="65535"></adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-server-id</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="base-dn" mandatory="true" read-only="true">
+ <adm:synopsis>
+ Specifies the base DN of the replicated data.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="window-size" advanced="true">
+ <adm:synopsis>
+ Specifies the window size that the directory server will use when
+ communicating with Replication Servers.
+ </adm:synopsis>
+ <adm:description>
+ This option may be deprecated and removed in future releases.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>100000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-window-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="heartbeat-interval">
+ <adm:synopsis>
+ Specifies the heart-beat interval that the directory server will
+ use when communicating with Replication Servers.
+ </adm:synopsis>
+ <adm:description>
+ The directory server expects a regular heart-beat coming from
+ the Replication Server within the specified interval. If a
+ heartbeat is not received within the interval, the Directory
+ Server closes its connection and connects to another
+ Replication Server.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>10000ms</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="100" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-heartbeat-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="changetime-heartbeat-interval" advanced="true">
+ <adm:synopsis>
+ Specifies the heart-beat interval that the directory server will
+ use when sending its local change time to the Replication Server.
+ </adm:synopsis>
+ <adm:description>
+ The directory server sends a regular heart-beat to the Replication
+ within the specified interval. The heart-beat indicates the
+ change time of the directory server to the Replication Server.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>1000ms</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-changetime-heartbeat-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="isolation-policy">
+ <adm:synopsis>
+ Specifies the behavior of the directory server if a write
+ operation is attempted on the data within the
+ <adm:user-friendly-name />
+ when none of the configured Replication Servers are available.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>reject-all-updates</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="accept-all-updates">
+ <adm:synopsis>
+ Indicates that updates should be accepted even though it is
+ not possible to send them to any Replication Server. Best
+ effort is made to re-send those updates to a
+ Replication Servers when one of them is available, however
+ those changes are at risk because they are only
+ available from the historical information. This mode can
+ also introduce high replication latency.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="reject-all-updates">
+ <adm:synopsis>
+ Indicates that all updates attempted on this
+ <adm:user-friendly-name />
+ are rejected when no Replication Server is available.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-isolation-policy</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="assured-type" mandatory="false">
+ <adm:synopsis>
+ Defines the assured replication mode of the replicated domain.
+ </adm:synopsis>
+ <adm:description>
+ The assured replication can be disabled or enabled. When enabled, two
+ modes are available: Safe Data or Safe Read modes.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>not-assured</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="not-assured">
+ <adm:synopsis>
+ Assured replication is not enabled. Updates sent for replication
+ (for being replayed on other LDAP servers in the topology) are sent
+ without waiting for any acknowledgment and the LDAP client call
+ returns immediately.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="safe-data">
+ <adm:synopsis>
+ Assured replication is enabled in Safe Data mode: updates sent for
+ replication are subject to acknowledgment from the replication
+ servers that have the same group ID as the local server (defined
+ with the group-id property). The number of acknowledgments to expect
+ is defined by the assured-sd-level property. After acknowledgments
+ are received, LDAP client call returns.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="safe-read">
+ <adm:synopsis>
+ Assured replication is enabled in Safe Read mode: updates sent for
+ replication are subject to acknowledgments from the LDAP servers in
+ the topology that have the same group ID as the local server
+ (defined with the group-id property). After acknowledgments are
+ received, LDAP client call returns.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-assured-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="assured-sd-level" mandatory="false">
+ <adm:synopsis>
+ The level of acknowledgment for Safe Data assured sub mode.
+ </adm:synopsis>
+ <adm:description>
+ When assured replication is configured in Safe Data mode, this value
+ defines the number of replication servers (with the same group ID of the
+ local server) that should acknowledge the sent update before the LDAP
+ client call can return.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>1</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="127"></adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-assured-sd-level</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="assured-timeout" mandatory="false">
+ <adm:synopsis>
+ The timeout value when waiting for assured replication acknowledgments.
+ </adm:synopsis>
+ <adm:description>
+ Defines the amount of milliseconds the server will wait for assured
+ acknowledgments (in either Safe Data or Safe Read assured replication
+ modes) before returning anyway the LDAP client call.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>2000ms</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-assured-timeout</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="group-id" mandatory="false">
+ <adm:synopsis>
+ The group ID associated with this replicated domain.
+ </adm:synopsis>
+ <adm:description>
+ This value defines the group ID of the replicated domain. The replication
+ system will preferably connect and send updates to replicate to a
+ replication server with the same group ID as its own one (the local server
+ group ID).
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>1</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="127"></adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-group-id</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="referrals-url" multi-valued="true" mandatory="false">
+ <adm:synopsis>
+ The URLs other LDAP servers should use to refer to the local server.
+ </adm:synopsis>
+ <adm:description>
+ URLs used by peer servers in the topology to refer to the local server
+ through LDAP referrals. If this attribute is not defined, every URLs
+ available to access this server will be used. If defined, only URLs
+ specified here will be used.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^[lL][dD][aA][pP][sS]?://.+$</adm:regex>
+ <adm:usage>LDAP URL</adm:usage>
+ <adm:synopsis>
+ A LDAP URL compliant with RFC 2255.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-referrals-url</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="fractional-include" multi-valued="true" mandatory="false">
+ <adm:synopsis>
+ Allows to include some attributes to replicate to this server.
+ </adm:synopsis>
+ <adm:description>
+ If fractional-include configuration attribute is used, only attributes
+ specified in this attribute will be added/modified/deleted when an
+ operation performed from another directory server is being replayed in the
+ local server. Note that the usage of this configuration attribute is
+ mutually exclusive with the usage of the fractional-exclude attribute.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <!-- This java regex is mostly derived from keystring BNF definition
+ that can be found in RFC 2252, section "4.1. Common Encoding Aspects".
+ This can be read as: (oid|\*):oid(,oid)*+
+ -->
+ <adm:regex>^((([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+)|\\*):(([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+)(,(([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+))*+$</adm:regex>
+ <adm:usage>OC:AT[,...,AT]</adm:usage>
+ <adm:synopsis>
+ The name of one or more attribute types in the named object class to
+ be included. The object class may be "*" indicating that the
+ attribute type(s) should be included regardless of the type of entry
+ they belong to.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-fractional-include</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="fractional-exclude" multi-valued="true" mandatory="false">
+ <adm:synopsis>
+ Allows to exclude some attributes to replicate to this server.
+ </adm:synopsis>
+ <adm:description>
+ If fractional-exclude configuration attribute is used, attributes
+ specified in this attribute will be ignored (not added/modified/deleted)
+ when an operation performed from another directory server is being
+ replayed in the local server. Note that the usage of this configuration
+ attribute is mutually exclusive with the usage of the fractional-include
+ attribute.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined/>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <!-- This java regex is mostly derived from keystring BNF definition
+ that can be found in RFC 2252, section "4.1. Common Encoding Aspects".
+ This can be read as: (oid|\*):oid(,oid)*+
+ -->
+ <adm:regex>^((([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+)|\\*):(([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+)(,(([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+))*+$</adm:regex>
+ <adm:usage>OC:AT[,...,AT]</adm:usage>
+ <adm:synopsis>
+ The name of one or more attribute types in the named object class to
+ be excluded. The object class may be "*" indicating that the
+ attribute type(s) should be excluded regardless of the type of entry
+ they belong to.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-fractional-exclude</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="solve-conflicts" advanced="true">
+ <adm:synopsis>
+ Indicates if this server solves conflict.
+ </adm:synopsis>
+ <adm:description>
+ This boolean indicates if this domain keeps the historical information
+ necessary to solve conflicts.
+ When set to false the server will not maintain historical information
+ and will therefore not be able to solve conflict. This should therefore
+ be done only if the replication is used in a single master type
+ of deployment.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-solve-conflicts</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="log-changenumber" advanced="false">
+ <adm:synopsis>
+ Indicates if this server logs the ChangeNumber in access log.
+ </adm:synopsis>
+ <adm:description>
+ This boolean indicates if the domain should log the ChangeNumber
+ of replicated operations in the access log.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-log-changenumber</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="initialization-window-size">
+ <adm:synopsis>
+ Specifies the window size that this directory server may use when
+ communicating with remote Directory Servers for initialization.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>100</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-initialization-window-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="conflicts-historical-purge-delay">
+ <adm:synopsis>
+ This delay indicates the time (in minutes) the domain keeps the historical
+ information necessary to solve conflicts.When a change stored in the
+ historical part of the user entry has a date (from its replication ChangeNumber)
+ older than this delay, it is candidate to be purged.
+ The purge is applied on 2 events: modify of the entry, dedicated purge task.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>1440m</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="m" allow-unlimited="false" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-conflicts-historical-purge-delay</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReplicationServerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReplicationServerConfiguration.xml
new file mode 100644
index 0000000..fbe3a60
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReplicationServerConfiguration.xml
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! Portions copyright 2011-2013 ForgeRock AS
+ ! -->
+<adm:managed-object name="replication-server"
+ plural-name="replication-servers"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ publish updates to Directory Servers within a
+ Replication Domain.
+ </adm:synopsis>
+ <adm:tag name="replication" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-replication-server</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="replication-server" multi-valued="true">
+ <adm:synopsis>
+ Specifies the addresses of other
+ <adm:user-friendly-plural-name />
+ to which this
+ <adm:user-friendly-name />
+ tries to connect at startup time.
+ </adm:synopsis>
+ <adm:description>
+ Addresses must be specified using the syntax: "hostname:port". If IPv6
+ addresses are used as the hostname, they must be specified using the
+ syntax "[IPv6Address]:port".
+ </adm:description>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>^.+:[0-9]+$</adm:regex>
+ <adm:usage>HOST:PORT</adm:usage>
+ <adm:synopsis>
+ A host name followed by a ":" and a port number.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-replication-server</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="replication-server-id" mandatory="true"
+ read-only="true">
+ <adm:synopsis>
+ Specifies a unique identifier for the
+ <adm:user-friendly-name />.
+ </adm:synopsis>
+ <adm:description>
+ Each
+ <adm:user-friendly-name />
+ must have a different server ID.
+ </adm:description>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="65535"></adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-replication-server-id</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="window-size" advanced="true">
+ <adm:synopsis>
+ Specifies the window size that the
+ <adm:user-friendly-name />
+ uses when communicating with other
+ <adm:user-friendly-plural-name />.
+ </adm:synopsis>
+ <adm:description>
+ This option may be deprecated and removed in future releases.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>100000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer></adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-window-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="queue-size" advanced="true">
+ <adm:synopsis>
+ Specifies the number of changes that are kept in memory for
+ each directory server in the Replication Domain.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>10000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-queue-size</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="replication-db-directory" mandatory="true"
+ read-only="true">
+ <adm:synopsis>
+ The path where the
+ <adm:user-friendly-name />
+ stores all persistent information.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>changelogDb</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string></adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-replication-db-directory</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="replication-purge-delay">
+ <adm:synopsis>
+ The time (in seconds) after which the
+ <adm:user-friendly-name />
+ erases all persistent information.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>3 days</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="s" allow-unlimited="false" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-replication-purge-delay</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="replication-port" mandatory="true">
+ <adm:synopsis>
+ The port on which this
+ <adm:user-friendly-name />
+ waits for connections from other
+ <adm:user-friendly-plural-name />
+ or Directory Servers.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="65535" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-replication-port</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="group-id" mandatory="false">
+ <adm:synopsis>
+ The group id for the replication server.
+ </adm:synopsis>
+ <adm:description>
+ This value defines the group id of the replication server. The replication
+ system of a LDAP server uses the group id of the replicated domain and
+ tries to connect, if possible, to a replication with the same group id.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>1</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="127"></adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-group-id</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="assured-timeout" mandatory="false">
+ <adm:synopsis>
+ The timeout value when waiting for assured mode acknowledgments.
+ </adm:synopsis>
+ <adm:description>
+ Defines the number of milliseconds that the replication server will wait
+ for assured acknowledgments (in either Safe Data or Safe Read assured sub
+ modes) before forgetting them and answer to the entity that sent an update
+ and is waiting for acknowledgment.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>1000ms</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-assured-timeout</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="degraded-status-threshold" mandatory="false">
+ <adm:synopsis>
+ The number of pending changes as threshold value for putting a directory
+ server in degraded status.
+ </adm:synopsis>
+ <adm:description>
+ This value represents a number of pending changes a replication server has
+ in queue for sending to a directory server. Once this value is crossed,
+ the matching directory server goes in degraded status. When number of
+ pending changes goes back under this value, the directory server is put
+ back in normal status. 0 means status analyzer is disabled and directory
+ servers are never put in degraded status.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0"></adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-degraded-status-threshold</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="weight" mandatory="false">
+ <adm:synopsis>
+ The weight of the replication server.
+ </adm:synopsis>
+ <adm:description>
+ The weight affected to the replication server.
+ Each replication server of the topology has a weight. When combined
+ together, the weights of the replication servers of a same group can be
+ translated to a percentage that determines the quantity of directory
+ servers of the topology that should be connected to a replication server.
+ For instance imagine a topology with 3 replication servers (with the same
+ group id) with the following weights: RS1=1, RS2=1, RS3=2. This means that
+ RS1 should have 25% of the directory servers connected in the topology,
+ RS2 25%, and RS3 50%. This may be useful if the replication servers of the
+ topology have a different power and one wants to spread the load between
+ the replication servers according to their power.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>1</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1"></adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-weight</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="monitoring-period" mandatory="false">
+ <adm:synopsis>
+ The period between sending of monitoring messages.
+ </adm:synopsis>
+ <adm:description>
+ Defines the duration that the replication server will wait
+ before sending new monitoring messages to its peers (replication servers
+ and directory servers). Larger values increase the length of time it
+ takes for a directory server to detect and switch to a more suitable
+ replication server, whereas smaller values increase the amount of
+ background network traffic.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>60s</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-monitoring-period</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReplicationSynchronizationProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReplicationSynchronizationProviderConfiguration.xml
new file mode 100644
index 0000000..f15fce5
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ReplicationSynchronizationProviderConfiguration.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="replication-synchronization-provider"
+ plural-name="replication-synchronization-providers"
+ package="org.forgerock.opendj.server.config"
+ extends="synchronization-provider"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides multi-master replication of data across multiple
+ directory server instances.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-replication-synchronization-provider</ldap:name>
+ <ldap:superior>ds-cfg-synchronization-provider</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:relation name="replication-domain">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=domains</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="server-id" />
+ <cli:default-property name="replication-server" />
+ <cli:default-property name="base-dn" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="replication-server">
+ <adm:one-to-zero-or-one />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=replication server</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="replication-server-id" />
+ <cli:default-property name="replication-port" />
+ <cli:default-property name="replication-server" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.replication.plugin.MultimasterReplication
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="num-update-replay-threads" mandatory="false" read-only="false" advanced="true">
+ <adm:synopsis>
+ Specifies the number of update replay threads.
+ </adm:synopsis>
+ <adm:description>
+ This value is the number of threads created for replaying every updates
+ received for all the replication domains.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ 10
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="65535"></adm:integer>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-num-update-replay-threads</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="connection-timeout" advanced="true">
+ <adm:synopsis>
+ Specifies the timeout used when connecting to peers and when performing
+ SSL negotiation.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>5 seconds</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-connection-timeout</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RequestFilteringQOSPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RequestFilteringQOSPolicyConfiguration.xml
new file mode 100644
index 0000000..a50e81f
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RequestFilteringQOSPolicyConfiguration.xml
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2009 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="request-filtering-qos-policy"
+ plural-name="request-filtering-qos-policies"
+ extends="qos-policy"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name/>
+ is used to define the type of requests allowed by the server.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-request-filtering-qos-policy</ldap:name>
+ <ldap:superior>ds-cfg-qos-policy</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.core.networkgroups.RequestFilteringPolicyFactory
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="allowed-operations" multi-valued="true">
+ <adm:synopsis>
+ Specifies which operations are allowed by the server.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>All operations are allowed.</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="add">
+ <adm:synopsis>Add operations.</adm:synopsis>
+ </adm:value>
+ <adm:value name="bind">
+ <adm:synopsis>Bind operations.</adm:synopsis>
+ </adm:value>
+ <adm:value name="compare">
+ <adm:synopsis>Compare operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="delete">
+ <adm:synopsis>Delete operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="extended">
+ <adm:synopsis>Extended operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="inequality-search">
+ <adm:synopsis>Inequality Search operations
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="modify">
+ <adm:synopsis>Modify operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="rename">
+ <adm:synopsis>Rename operations</adm:synopsis>
+ </adm:value>
+ <adm:value name="search">
+ <adm:synopsis>Search operations</adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allowed-operations</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allowed-attributes" multi-valued="true">
+ <adm:synopsis>
+ Specifies which attributes are allowed in search and
+ compare operations.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>All non-prohibited attributes.</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allowed-attributes</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="prohibited-attributes" mandatory="false"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies which attributes are not allowed in search
+ and compare operations.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>All allowed attributes.</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-prohibited-attributes</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allowed-search-scopes" multi-valued="true">
+ <adm:synopsis>
+ Specifies which search scopes are allowed by the server.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>All search scopes are allowed.</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="base">
+ <adm:synopsis>Base-object search.</adm:synopsis>
+ </adm:value>
+ <adm:value name="one">
+ <adm:synopsis>One-level search.</adm:synopsis>
+ </adm:value>
+ <adm:value name="sub">
+ <adm:synopsis>Whole subtree search</adm:synopsis>
+ </adm:value>
+ <adm:value name="children">
+ <adm:synopsis>Subordinate subtree search</adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allowed-search-scopes</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="allowed-subtrees" multi-valued="true">
+ <adm:synopsis>
+ Specifies which subtrees are accessible to clients.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>All non-prohibited subtrees.</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allowed-subtrees</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="prohibited-subtrees" multi-valued="true">
+ <adm:synopsis>
+ Specifies which subtrees must be hidden from clients. Each
+ prohibited subtree must be subordinate to an allowed subtree.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>All allowed subtrees.</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-prohibited-subtrees</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ResourceLimitsQOSPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ResourceLimitsQOSPolicyConfiguration.xml
new file mode 100644
index 0000000..d35beb3
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/ResourceLimitsQOSPolicyConfiguration.xml
@@ -0,0 +1,274 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2009-2010 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="resource-limits-qos-policy"
+ plural-name="resource-limits-qos-policies"
+ extends="qos-policy"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name/>
+ are used to define resource limits enforced by the server.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-resource-limits-qos-policy</ldap:name>
+ <ldap:superior>ds-cfg-qos-policy</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.core.networkgroups.ResourceLimitsPolicyFactory
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="max-connections">
+ <adm:TODO>Make use of unlimited.</adm:TODO>
+ <adm:synopsis>
+ Specifies the maximum number of concurrent client connections
+ to the server.
+ </adm:synopsis>
+ <adm:description>
+ A value of 0 means that no limit is enforced.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-connections</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-connections-from-same-ip">
+ <adm:TODO>Make use of unlimited.</adm:TODO>
+ <adm:synopsis>
+ Specifies the maximum number of client connections from the
+ same source address.
+ </adm:synopsis>
+ <adm:description>
+ A value of 0 means that no limit is enforced.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-connections-from-same-ip</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-ops-per-connection">
+ <adm:TODO>Make use of unlimited.</adm:TODO>
+ <adm:synopsis>
+ Specifies the maximum number of operations per
+ client connection.
+ </adm:synopsis>
+ <adm:description>
+ A value of 0 means that no limit is enforced.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-ops-per-connection</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-concurrent-ops-per-connection">
+ <adm:TODO>Make use of unlimited.</adm:TODO>
+ <adm:synopsis>
+ Specifies the maximum number of concurrent operations
+ per client connection.
+ </adm:synopsis>
+ <adm:description>
+ A value of 0 means that no limit is enforced.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-concurrent-ops-per-connection</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="size-limit">
+ <adm:TODO>Make use of unlimited.</adm:TODO>
+ <adm:synopsis>
+ Specifies the maximum number of entries that can be returned
+ to the client during a single search operation.
+ </adm:synopsis>
+ <adm:description>
+ A value of 0 indicates that no size limit is enforced. Note
+ that this is the default for the server, but it may be
+ overridden on a per-user basis using the ds-rlim-size-limit
+ operational attribute.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:inherited>
+ <adm:absolute property-name="size-limit"
+ path="/relation=global-configuration"/>
+ </adm:inherited>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-size-limit</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="time-limit">
+ <adm:TODO>Make use of unlimited.</adm:TODO>
+ <adm:synopsis>
+ Specifies the maximum length of time that should be spent processing
+ a search operation.
+ </adm:synopsis>
+ <adm:description>
+ A value of 0 seconds indicates that no time limit is
+ enforced. Note that this is the default for the server,
+ but it may be overridden on a per-user basis using the
+ ds-rlim-time-limit operational attribute.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:inherited>
+ <adm:absolute property-name="time-limit"
+ path="/relation=global-configuration"/>
+ </adm:inherited>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="s" lower-limit="0"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-time-limit</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="min-substring-length">
+ <adm:TODO>Make use of unlimited.</adm:TODO>
+ <adm:synopsis>
+ Specifies the minimum length for a search filter substring.
+ </adm:synopsis>
+ <adm:description>
+ Search operations with short search filter substring are
+ likely to match a high number of entries and might degrade
+ performance overall. A value of 0 indicates that no limit is
+ enforced.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-min-substring-length</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-ops-per-interval">
+ <adm:synopsis>
+ Specifies the maximum number of operations that can take place on
+ the same network group during the specified interval.
+ </adm:synopsis>
+ <adm:description>
+ When the maximum number of operations per interval is reached, all
+ subsequent operations on the same network group are refused until the
+ end of the time interval. This parameter allows to limit the throughput
+ on the network group.
+ A value of 0 indicates that no limit is enforced.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="0"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-ops-per-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-ops-interval">
+ <adm:synopsis>
+ Specifies the interval during which the number of operations is limited.
+ </adm:synopsis>
+ <adm:description>
+ When the maximum number of operations per interval is reached, all
+ subsequent operations on the same network group are refused until the
+ end of the time interval. This parameter allows to limit the throughput
+ on the network group.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>1s</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="1"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-ops-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootConfiguration.xml
new file mode 100644
index 0000000..059baa5
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootConfiguration.xml
@@ -0,0 +1,487 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:root-managed-object xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ The root configuration provides an entry point to the rest of the
+ <adm:product-name />
+ configuration.
+ </adm:synopsis>
+ <adm:relation name="global-configuration"
+ managed-object-name="global">
+ <adm:one-to-one />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="connection-handler">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=connection handlers, cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ <cli:default-property name="listen-port" />
+ <cli:default-property name="use-ssl" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="synchronization-provider">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Synchronization Providers, cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="access-control-handler">
+ <adm:one-to-one />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Access Control Handler,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="crypto-manager">
+ <adm:one-to-one />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Crypto Manager,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="group-implementation">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Group Implementations,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="identity-mapper">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Identity Mappers,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="certificate-mapper">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Certificate Mappers,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="sasl-mechanism-handler">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=SASL Mechanisms,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="password-validator">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Password Validators,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="password-generator">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Password Generators,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="plugin-root" managed-object-name="plugin-root">
+ <adm:one-to-one />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Plugins,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="virtual-attribute">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Virtual Attributes,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation naming-argument-override="name">
+ <cli:default-property name="enabled" />
+ <cli:default-property name="attribute-type" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="extended-operation-handler">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Extended Operations,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="entry-cache">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Entry Caches,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="cache-level" />
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="account-status-notification-handler">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Account Status Notification Handlers,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="alert-handler">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Alert Handlers,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="password-storage-scheme">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Password Storage Schemes,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="backend">
+ <adm:one-to-many naming-property="backend-id" />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Backends,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ <cli:default-property name="base-dn" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="root-dn">
+ <adm:one-to-one />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Root DNs,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="default-root-privilege-name" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="root-dse-backend">
+ <adm:one-to-one />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Root DSE,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ <cli:default-property name="show-all-attributes" />
+ <cli:default-property name="subordinate-base-dn" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="password-policy"
+ managed-object-name="authentication-policy">
+ <adm:one-to-many plural-name="password-policies" />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Password Policies,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="password-attribute" />
+ <cli:default-property name="default-password-storage-scheme" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="log-publisher">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Loggers,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="log-rotation-policy">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Log Rotation Policies,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="file-size-limit" />
+ <cli:default-property name="rotation-interval" />
+ <cli:default-property name="time-of-day" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="log-retention-policy">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Log Retention Policies,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="disk-space-used" />
+ <cli:default-property name="free-disk-space" />
+ <cli:default-property name="number-of-files" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="matching-rule">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Matching Rules,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="attribute-syntax">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Syntaxes,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="monitor-provider">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Monitor Providers,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="key-manager-provider">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Key Manager Providers,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="trust-manager-provider">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Trust Manager Providers,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="work-queue">
+ <adm:one-to-one />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Work Queue,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="java-class" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="network-group" hidden="true">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Network Groups,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ <cli:default-property name="priority" />
+ <cli:default-property name="workflow" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="workflow" hidden="true">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Workflows,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="workflow-element" hidden="true">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>
+ cn=Workflow elements,cn=config
+ </ldap:rdn-sequence>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:relation>
+ <cli:default-property name="enabled" />
+ </cli:relation>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="administration-connector">
+ <adm:one-to-one />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Administration Connector,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="extension" hidden="true">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=Extensions,cn=config</ldap:rdn-sequence>
+ </adm:profile>
+ </adm:relation>
+ <adm:product-name>OpenDJ</adm:product-name>
+ <adm:tag-definition name="logging">
+ <adm:synopsis>Logging</adm:synopsis>
+ </adm:tag-definition>
+ <adm:tag-definition name="user-management">
+ <adm:synopsis>User management</adm:synopsis>
+ </adm:tag-definition>
+ <adm:tag-definition name="replication">
+ <adm:synopsis>Replication</adm:synopsis>
+ </adm:tag-definition>
+ <adm:tag-definition name="database">
+ <adm:synopsis>Caching and back-ends</adm:synopsis>
+ </adm:tag-definition>
+ <adm:tag-definition name="security">
+ <adm:synopsis>Authentication and authorization</adm:synopsis>
+ </adm:tag-definition>
+ <adm:tag-definition name="core-server">
+ <adm:synopsis>Core server</adm:synopsis>
+ </adm:tag-definition>
+</adm:root-managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootDNConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootDNConfiguration.xml
new file mode 100644
index 0000000..5a44550
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootDNConfiguration.xml
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="root-dn" plural-name="root-dns"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ configuration contains all the Root DN Users defined in the
+ directory server. In addition, it also defines the default set of
+ privileges that Root DN Users automatically inherit.
+ </adm:synopsis>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-root-dn</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:relation name="root-dn-user" hidden="true">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence />
+ <ldap:naming-attribute>cn</ldap:naming-attribute>
+ </adm:profile>
+ </adm:relation>
+ <adm:property name="default-root-privilege-name"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the names of the privileges that root users will be
+ granted by default.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>bypass-lockdown</adm:value>
+ <adm:value>bypass-acl</adm:value>
+ <adm:value>modify-acl</adm:value>
+ <adm:value>config-read</adm:value>
+ <adm:value>config-write</adm:value>
+ <adm:value>ldif-import</adm:value>
+ <adm:value>ldif-export</adm:value>
+ <adm:value>backend-backup</adm:value>
+ <adm:value>backend-restore</adm:value>
+ <adm:value>server-lockdown</adm:value>
+ <adm:value>server-shutdown</adm:value>
+ <adm:value>server-restart</adm:value>
+ <adm:value>disconnect-client</adm:value>
+ <adm:value>cancel-request</adm:value>
+ <adm:value>password-reset</adm:value>
+ <adm:value>update-schema</adm:value>
+ <adm:value>privilege-change</adm:value>
+ <adm:value>unindexed-search</adm:value>
+ <adm:value>subentry-write</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="bypass-lockdown">
+ <adm:synopsis>
+ Allows the associated user to bypass server lockdown mode.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="bypass-acl">
+ <adm:synopsis>
+ Allows the associated user to bypass access control checks
+ performed by the server.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="modify-acl">
+ <adm:synopsis>
+ Allows the associated user to modify the server's access
+ control configuration.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="config-read">
+ <adm:synopsis>
+ Allows the associated user to read the server configuration.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="config-write">
+ <adm:synopsis>
+ Allows the associated user to update the server
+ configuration. The config-read privilege is also required.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="jmx-read">
+ <adm:synopsis>
+ Allows the associated user to perform JMX read operations.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="jmx-write">
+ <adm:synopsis>
+ Allows the associated user to perform JMX write operations.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="jmx-notify">
+ <adm:synopsis>
+ Allows the associated user to subscribe to receive JMX
+ notifications.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="ldif-import">
+ <adm:synopsis>
+ Allows the user to request that the server process LDIF
+ import tasks.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="ldif-export">
+ <adm:synopsis>
+ Allows the user to request that the server process LDIF
+ export tasks.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="backend-backup">
+ <adm:synopsis>
+ Allows the user to request that the server process backup
+ tasks.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="backend-restore">
+ <adm:synopsis>
+ Allows the user to request that the server process restore
+ tasks.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="server-lockdown">
+ <adm:synopsis>
+ Allows the user to place and bring the server of lockdown mode.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="server-shutdown">
+ <adm:synopsis>
+ Allows the user to request that the server shut down.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="server-restart">
+ <adm:synopsis>
+ Allows the user to request that the server perform an
+ in-core restart.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="proxied-auth">
+ <adm:synopsis>
+ Allows the user to use the proxied authorization control, or
+ to perform a bind that specifies an alternate authorization
+ identity.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="disconnect-client">
+ <adm:synopsis>
+ Allows the user to terminate other client connections.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="cancel-request">
+ <adm:synopsis>
+ Allows the user to cancel operations in progress on other
+ client connections.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="password-reset">
+ <adm:synopsis>
+ Allows the user to reset user passwords.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="data-sync">
+ <adm:synopsis>
+ Allows the user to participate in data synchronization.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="update-schema">
+ <adm:synopsis>
+ Allows the user to make changes to the server schema.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="privilege-change">
+ <adm:synopsis>
+ Allows the user to make changes to the set of defined root
+ privileges, as well as to grant and revoke privileges for
+ users.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="unindexed-search">
+ <adm:synopsis>
+ Allows the user to request that the server process a search
+ that cannot be optimized using server indexes.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="subentry-write">
+ <adm:synopsis>
+ Allows the associated user to perform LDAP subentry write
+ operations.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-default-root-privilege-name</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootDNUserConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootDNUserConfiguration.xml
new file mode 100644
index 0000000..910f7f9
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootDNUserConfiguration.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="root-dn-user" plural-name="root-dn-users"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ A
+ <adm:user-friendly-name />
+ are administrative users who can granted special privileges that
+ are not available to non-root users (for example, the ability to bind to
+ the server in lockdown mode).
+ </adm:synopsis>
+ <adm:description>
+ By default a
+ <adm:user-friendly-name />
+ inherits the default set of privileges defined in the Root DN
+ configuration.
+ </adm:description>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-root-dn-user</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="alternate-bind-dn" multi-valued="true">
+ <adm:synopsis>
+ Specifies one or more alternate DNs that can be used to bind to
+ the server as this root user.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ This root user is allowed to bind only using the DN of
+ the associated configuration entry.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-alternate-bind-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootDSEBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootDSEBackendConfiguration.xml
new file mode 100644
index 0000000..ce19b88
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/RootDSEBackendConfiguration.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="root-dse-backend"
+ plural-name="root-dse-backends" package="org.forgerock.opendj.server.config"
+ advanced="true" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ contains the directory server root DSE.
+ </adm:synopsis>
+ <adm:description>
+ This is a special meta-backend that dynamically generates the
+ root DSE entry for base-level searches and simply redirects to
+ other backends for operations in other scopes.
+ </adm:description>
+ <adm:tag name="core-server" />
+ <adm:tag name="database" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-root-dse-backend</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="subordinate-base-dn" multi-valued="true">
+ <adm:synopsis>
+ Specifies the set of base DNs used for singleLevel,
+ wholeSubtree, and subordinateSubtree searches based at the root
+ DSE.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The set of all user-defined suffixes is used.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-subordinate-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="show-all-attributes" mandatory="true">
+ <adm:synopsis>
+ Indicates whether all attributes in the root DSE are to be treated
+ like user attributes (and therefore returned to clients by
+ default) regardless of the directory server schema configuration.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-show-all-attributes</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SASLMechanismHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SASLMechanismHandlerConfiguration.xml
new file mode 100644
index 0000000..a05fa69
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SASLMechanismHandlerConfiguration.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="sasl-mechanism-handler"
+ plural-name="sasl-mechanism-handlers"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ The SASL mechanism handler configuration entry is the parent
+ for all SASL mechanism handlers defined in the <adm:product-name />
+ directory server.
+ </adm:synopsis>
+ <adm:description>
+ SASL mechanism handlers are responsible for
+ authenticating users during the course of processing a SASL
+ (Simple Authentication and Security Layer, as defined in
+ RFC 4422) bind.
+ </adm:description>
+ <adm:tag name="security" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-sasl-mechanism-handler</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ SASL mechanism handler is enabled for use.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ SASL mechanism handler implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.SASLMechanismHandler
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SHA1PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SHA1PasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..d91634a
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SHA1PasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="sha1-password-storage-scheme"
+ plural-name="sha1-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords using an unsalted
+ form of the SHA-1 message digest algorithm. Because the implementation
+ does not use any kind of salting mechanism, a given password always has
+ the same encoded form.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains only an implementation for the user password
+ syntax, with a storage scheme name of "SHA".
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-sha1-password-storage-scheme</ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SHA1PasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SMTPAccountStatusNotificationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SMTPAccountStatusNotificationHandlerConfiguration.xml
new file mode 100644
index 0000000..07127a7
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SMTPAccountStatusNotificationHandlerConfiguration.xml
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="smtp-account-status-notification-handler"
+ plural-name="smtp-account-status-notification-handlers"
+ extends="account-status-notification-handler"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is a notification handler that sends
+ email messages to end users and/or administrators whenever an
+ account status notification is generated.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-smtp-account-status-notification-handler
+ </ldap:name>
+ <ldap:superior>
+ ds-cfg-account-status-notification-handler
+ </ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SMTPAccountStatusNotificationHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="email-address-attribute-type"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies which attribute in the user's entries may be used to obtain
+ the email address when notifying the end user.
+ </adm:synopsis>
+ <adm:description>
+ You can specify more than one email address as separate values. In this case,
+ the <adm:product-name /> server sends a notification to all email addresses identified.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ If no email address attribute types are specified, then no
+ attempt is made to send email notification messages to
+ end users. Only those users specified in the set of additional
+ recipient addresses are sent the notification messages.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-email-address-attribute-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="recipient-address" multi-valued="true">
+ <adm:synopsis>
+ Specifies an email address to which notification messages are
+ sent, either instead of or in addition to the end user for whom
+ the notification has been generated.
+ </adm:synopsis>
+ <adm:description>
+ This may be used to ensure that server administrators also receive
+ a copy of any notification messages that are generated.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ If no additional recipient addresses are specified, then only
+ the end users that are the subjects of the account status
+ notifications receive the notification messages.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-recipient-address</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="send-message-without-end-user-address"
+ mandatory="true" advanced="true">
+ <adm:synopsis>
+ Indicates whether an email notification message should be
+ generated and sent to the set of notification recipients even if
+ the user entry does not contain any values for any of the email
+ address attributes (that is, in cases when it is not be possible to
+ notify the end user).
+ </adm:synopsis>
+ <adm:description>
+ This is only applicable if both one or more email address
+ attribute types and one or more additional recipient addresses are
+ specified.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>true</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-send-message-without-end-user-address
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="sender-address" mandatory="true">
+ <adm:synopsis>
+ Specifies the email address from which the message is sent.
+ Note that this does not necessarily have to be a legitimate email
+ address.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-sender-address</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="message-subject" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the subject that should be used for email messages
+ generated by this account status notification handler.
+ </adm:synopsis>
+ <adm:description>
+ The values for this property should begin with the name of an
+ account status notification type followed by a colon and the
+ subject that should be used for the associated notification
+ message. If an email message is generated for an account status
+ notification type for which no subject is defined, then that
+ message is given a generic subject.
+ </adm:description>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-message-subject</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="message-template-file" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the path to the file containing the message template
+ to generate the email notification messages.
+ </adm:synopsis>
+ <adm:description>
+ The values for this property should begin with the name of an
+ account status notification type followed by a colon and the path
+ to the template file that should be used for that notification
+ type. If an account status notification has a notification type
+ that is not associated with a message template file, then no email
+ message is generated for that notification.
+ </adm:description>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-message-template-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SMTPAlertHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SMTPAlertHandlerConfiguration.xml
new file mode 100644
index 0000000..be78c53
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SMTPAlertHandlerConfiguration.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="smtp-alert-handler"
+ plural-name="smtp-alert-handlers"
+ package="org.forgerock.opendj.server.config" extends="alert-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ may be used to send e-mail messages to notify administrators of
+ significant events that occur within the server.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-smtp-alert-handler</ldap:name>
+ <ldap:superior>ds-cfg-alert-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SMTPAlertHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="sender-address" mandatory="true">
+ <adm:synopsis>
+ Specifies the email address to use as the sender for messages
+ generated by this alert handler.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-sender-address</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="recipient-address" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies an email address to which the messages should be sent.
+ </adm:synopsis>
+ <adm:description>
+ Multiple values may be provided if there should be more than one
+ recipient.
+ </adm:description>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-recipient-address</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="message-subject" mandatory="true">
+ <adm:synopsis>
+ Specifies the subject that should be used for email messages
+ generated by this alert handler.
+ </adm:synopsis>
+ <adm:description>
+ The token "%%%%alert-type%%%%" is dynamically replaced with
+ the alert type string. The token "%%%%alert-id%%%%" is
+ dynamically replaced with the alert ID value. The token
+ "%%%%alert-message%%%%" is dynamically replaced with the
+ alert message. The token "\\n" is replaced with an
+ end-of-line marker.
+ </adm:description>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-message-subject</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="message-body" mandatory="true">
+ <adm:synopsis>
+ Specifies the body that should be used for email messages
+ generated by this alert handler.
+ </adm:synopsis>
+ <adm:description>
+ The token "%%%%alert-type%%%%" is dynamically replaced with
+ the alert type string. The token "%%%%alert-id%%%%" is
+ dynamically replaced with the alert ID value. The token
+ "%%%%alert-message%%%%" is dynamically replaced with the
+ alert message. The token "\\n" is replaced with an
+ end-of-line marker.
+ </adm:description>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-message-body</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SNMPConnectionHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SNMPConnectionHandlerConfiguration.xml
new file mode 100644
index 0000000..58710f2
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SNMPConnectionHandlerConfiguration.xml
@@ -0,0 +1,347 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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 2008-2009 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+! -->
+<adm:managed-object name="snmp-connection-handler"
+ plural-name="snmp-connection-handlers"
+ package="org.forgerock.opendj.server.config"
+ extends="connection-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap" >
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ can be used to process SNMP requests to retrieve monitoring information
+ described by the MIB 2605. Supported protocol are SNMP V1, V2c and V3.
+ </adm:synopsis>
+ <adm:description>
+ The SNMP connection handler will process SNMP requests sent by SNMP
+ Managers to retrieve information described the MIB 2605. To enable
+ the SNMP Connection Handler, the ds-cfg-opendmk-jarfile parameter
+ has to be set to the OpenDMK jar files location.
+ </adm:description>
+
+ <!-- Connection Handler ldap profile -->
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-snmp-connection-handler</ldap:name>
+ <ldap:superior>ds-cfg-connection-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <!-- Class to instanciate -->
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.snmp.SNMPConnectionHandler
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <!-- SNMP Port -->
+ <adm:property-reference name="listen-port" />
+ <adm:property name="listen-address" multi-valued="true" read-only="true">
+ <adm:synopsis>
+ Specifies the address or set of addresses on which this
+ <adm:user-friendly-name />
+ should listen for connections from SNMP clients.
+ </adm:synopsis>
+ <adm:description>
+ Multiple addresses may be provided as separate values for this
+ attribute. If no values are provided, then the
+ <adm:user-friendly-name />
+ listens on all interfaces.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:server-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>0.0.0.0</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:ip-address />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-listen-address</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="trap-port" mandatory="true">
+ <adm:synopsis>
+ Specifies the port to use to send SNMP Traps.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:integer />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-trap-port</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <!-- SNMP Version -->
+ <!-- SNMP Community or Context Name -->
+ <adm:property name="community">
+ <adm:synopsis>
+ Specifies the v1,v2 community or the v3 context name allowed to
+ access the MIB 2605 monitoring information or the USM MIB. The
+ mapping between "community" and "context name" is set.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>OpenDJ</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-community</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <!-- SNMP V1/V2 Allowed managers -->
+ <adm:property name="allowed-manager" multi-valued="true">
+ <adm:synopsis>
+ Specifies the hosts of the managers to be granted the access rights.
+ This property is required for SNMP v1 and v2 security configuration.
+ An asterisk (*) opens access to all managers.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>*</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allowed-manager</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <!-- SNMP V3 Allowed users -->
+ <adm:property name="allowed-user" multi-valued="true">
+ <adm:synopsis>
+ Specifies the users to be granted the access rights. This property
+ is required for SNMP v3 security configuration.
+ An asterisk (*) opens access to all users.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>*</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-allowed-user</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <!-- SNMP V3 Security level -->
+ <adm:property name="security-level">
+ <adm:synopsis>
+ Specifies the type of security level : NoAuthNoPriv : No security
+ mechanisms activated, AuthNoPriv : Authentication activated with no
+ privacy, AuthPriv : Authentication with privacy activated.
+ This property is required for SNMP V3 security configuration.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>authnopriv</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="noauthnopriv">
+ <adm:synopsis>
+ No security mechanisms activated.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="authnopriv">
+ <adm:synopsis>
+ Authentication activated with no privacy.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="authpriv">
+ <adm:synopsis>
+ Authentication with privacy activated.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-security-level</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <!-- Trap Community -->
+ <adm:property name="traps-community" >
+ <adm:synopsis>
+ Specifies the community string that must be included in the traps
+ sent to define managers (trap-destinations).
+ This property is used in the context of SNMP v1, v2 and v3.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>OpenDJ</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-traps-community</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <!-- Traps destinations -->
+ <adm:property name="traps-destination" multi-valued="true">
+ <adm:synopsis>
+ Specifies the hosts to which V1 traps will be sent. V1 Traps are
+ sent to every host listed.
+ </adm:synopsis>
+ <adm:description>
+ If this list is empty, V1 traps are sent to "localhost".
+ Each host in the list must be identifed by its name or complete IP Addess.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ If the list is empty, V1 traps are sent to "localhost".
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-traps-destination</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <!-- Agent Engine Security USM Configuration -->
+ <adm:property name="security-agent-file">
+ <adm:synopsis>
+ Specifies the USM security configuration to receive authenticated
+ only SNMP requests.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ config/snmp/security/opendj-snmp.security
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-security-agent-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <!-- SNMP Registration or not -->
+ <adm:property name="registered-mbean">
+ <adm:synopsis>
+ Indicates whether the SNMP objects have to be registered in the
+ directory server MBeanServer or not allowing to access SNMP Objects
+ with RMI connector if enabled.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-registered-mbean</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+
+ <adm:property name="opendmk-jarfile">
+ <adm:synopsis>
+ Indicates the OpenDMK runtime jar file location
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-opendmk-jarfile</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
\ No newline at end of file
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedMD5PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedMD5PasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..012c3d8
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedMD5PasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="salted-md5-password-storage-scheme"
+ plural-name="salted-md5-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords using a salted form
+ of the MD5 message digest algorithm.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains an implementation for the user password syntax,
+ with a storage scheme name of "SMD5", and an implementation of the
+ auth password syntax, with a storage scheme name of "MD5". Although the
+ MD5 digest algorithm is relatively secure, recent cryptanalysis work has
+ identified mechanisms for generating MD5 collisions. This does not
+ impact the security of this algorithm as it is used in <adm:product-name />,
+ but it is recommended that the MD5 password storage scheme only be used if
+ client applications require it for compatibility purposes, and that a
+ stronger digest like SSHA or SSHA256 be used for environments in which
+ MD5 support is not required.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-salted-md5-password-storage-scheme</ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SaltedMD5PasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA1PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA1PasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..972367d
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA1PasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="salted-sha1-password-storage-scheme"
+ plural-name="salted-sha1-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords using a salted form
+ of the SHA-1 message digest algorithm.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains an implementation for the user password syntax,
+ with a storage scheme name of "SSHA", and an implementation of the
+ auth password syntax, with a storage scheme name of "SHA1".
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-salted-sha1-password-storage-scheme</ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SaltedSHA1PasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA256PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA256PasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..535534e
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA256PasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="salted-sha256-password-storage-scheme"
+ plural-name="salted-sha256-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords using a salted form
+ of the 256-bit SHA-2 message digest algorithm.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains an implementation for the user password syntax,
+ with a storage scheme name of "SSHA256", and an implementation of
+ the auth password syntax, with a storage scheme name of "SHA256".
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-salted-sha256-password-storage-scheme
+ </ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SaltedSHA256PasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA384PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA384PasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..3c298b6
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA384PasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="salted-sha384-password-storage-scheme"
+ plural-name="salted-sha384-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords using a salted form
+ of the 384-bit SHA-2 message digest algorithm.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains an implementation for the user password syntax,
+ with a storage scheme name of "SSHA384", and an implementation of
+ the auth password syntax, with a storage scheme name of "SHA384".
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-salted-sha384-password-storage-scheme
+ </ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SaltedSHA384PasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA512PasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA512PasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..f88016e
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SaltedSHA512PasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="salted-sha512-password-storage-scheme"
+ plural-name="salted-sha512-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords using a salted form
+ of the 512-bit SHA-2 message digest algorithm.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains an implementation for the user password syntax,
+ with a storage scheme name of "SSHA512", and an implementation of
+ the auth password syntax, with a storage scheme name of "SHA512".
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-salted-sha512-password-storage-scheme
+ </ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SaltedSHA512PasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SambaPasswordPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SambaPasswordPluginConfiguration.xml
new file mode 100644
index 0000000..5b16b94
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SambaPasswordPluginConfiguration.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2011 profiq s.r.o.
+ ! Portions copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="samba-password-plugin"
+ plural-name="samba-password-plugins"
+ package="org.forgerock.opendj.server.config" extends="plugin"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>Samba Password Synchronization Plugin.</adm:synopsis>
+ <adm:description>
+ This plugin captures clear-text password changes for a user and generates
+ LanMan or NTLM hashes for the respective Samba attributes (sambaLMPassword
+ and sambaNTPassword).
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-samba-password-plugin</ldap:name>
+ <ldap:superior>ds-cfg-plugin</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.plugins.SambaPasswordPlugin</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="plugin-type" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>preoperationmodify</adm:value>
+ <adm:value>postoperationextended</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="pwd-sync-policy" mandatory="true" multi-valued="true">
+ <adm:synopsis>
+ Specifies which Samba passwords should be kept synchronized.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>sync-nt-password</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="sync-nt-password">
+ <adm:synopsis>
+ Synchronize the NT password attribute "sambaNTPassword"
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="sync-lm-password">
+ <adm:synopsis>
+ Synchronize the LanMan password attribute "sambaLMPassword"
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>
+ ds-cfg-pwd-sync-policy
+ </ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="samba-administrator-dn" mandatory="false">
+ <adm:synopsis>
+ Specifies the distinguished name of the user which Samba uses to
+ perform Password Modify extended operations against this directory
+ server in order to synchronize the userPassword attribute after the
+ LanMan or NT passwords have been updated.
+ </adm:synopsis>
+ <adm:description>
+ The user must have the 'password-reset' privilege and should not be
+ a root user. This user name can be used in order to identify Samba
+ connections and avoid double re-synchronization of the same password.
+ If this property is left undefined, then no password updates will be
+ skipped.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>Synchronize all updates to user passwords</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-samba-administrator-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SchemaBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SchemaBackendConfiguration.xml
new file mode 100644
index 0000000..3368c06
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SchemaBackendConfiguration.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="schema-backend" plural-name="schema-backends"
+ package="org.forgerock.opendj.server.config" extends="backend"
+ advanced="true" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides access to the directory server schema information,
+ including the attribute types, object classes, attribute syntaxes,
+ matching rules, matching rule uses, DIT content rules, and DIT
+ structure rules that it contains.
+ </adm:synopsis>
+ <adm:description>
+ The server allows "modify" operations in this backend to alter the
+ server schema definitions. The configuration entry for this backend
+ is based on the ds-cfg-schema-backend structural object class. Note
+ that any attribute types included in this entry that are not
+ included in this object class (or the parent ds-cfg-backend class)
+ appears directly in the schema entry.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-schema-backend</ldap:name>
+ <ldap:superior>ds-cfg-backend</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.backends.SchemaBackend</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="writability-mode">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>enabled</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="schema-entry-dn" advanced="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Defines the base DNs of the subtrees in which the schema
+ information is published in addition to the value included
+ in the base-dn property.
+ </adm:synopsis>
+ <adm:description>
+ The value provided in the base-dn property is the only one that
+ appears in the subschemaSubentry operational attribute of the
+ server's root DSE (which is necessary because that is a
+ single-valued attribute) and as a virtual attribute in other
+ entries. The schema-entry-dn attribute may be used to make the
+ schema information available in other locations to accommodate
+ certain client applications that have been hard-coded to expect the
+ schema to reside in a specific location.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>cn=schema</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-schema-entry-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="show-all-attributes" mandatory="true">
+ <adm:synopsis>
+ Indicates whether to treat all attributes in the schema entry as
+ if they were user attributes regardless of their configuration.
+ </adm:synopsis>
+ <adm:description>
+ This may provide compatibility with some applications that expect
+ schema attributes like attributeTypes and objectClasses to be
+ included by default even if they are not requested. Note that the
+ ldapSyntaxes attribute is always treated as operational in
+ order to avoid problems with attempts to modify the schema over
+ protocol.
+ </adm:description>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-show-all-attributes</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SevenBitCleanPluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SevenBitCleanPluginConfiguration.xml
new file mode 100644
index 0000000..f210bb5
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SevenBitCleanPluginConfiguration.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="seven-bit-clean-plugin"
+ plural-name="seven-bit-clean-plugins"
+ package="org.forgerock.opendj.server.config" extends="plugin"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ ensures that values for a specified set of attributes
+ are 7-bit clean.
+ </adm:synopsis>
+ <adm:description>
+ That is, for those attributes, the values are not allowed to contain
+ any bytes having the high-order bit set, which is used to indicate
+ the presence of non-ASCII characters. Some applications do not
+ properly handle attribute values that contain non-ASCII characters,
+ and this plug-in can help ensure that attributes used by those
+ applications do not contain characters that can cause problems in
+ those applications.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-seven-bit-clean-plugin</ldap:name>
+ <ldap:superior>ds-cfg-plugin</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.plugins.SevenBitCleanPlugin
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="plugin-type" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>ldifimport</adm:value>
+ <adm:value>preparseadd</adm:value>
+ <adm:value>preparsemodify</adm:value>
+ <adm:value>preparsemodifydn</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="attribute-type" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies the name or OID of an attribute type for which values
+ should be checked to ensure that they are 7-bit clean.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>uid</adm:value>
+ <adm:value>mail</adm:value>
+ <adm:value>userPassword</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-attribute-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="base-dn" multi-valued="true">
+ <adm:synopsis>
+ Specifies the base DN below which the checking is performed.
+ </adm:synopsis>
+ <adm:description>
+ Any attempt to update a value for one of the configured attributes
+ below this base DN must be 7-bit clean for the operation to be
+ allowed.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ All entries below all public naming contexts will be checked.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SimilarityBasedPasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SimilarityBasedPasswordValidatorConfiguration.xml
new file mode 100644
index 0000000..e5dd54b
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SimilarityBasedPasswordValidatorConfiguration.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="similarity-based-password-validator"
+ plural-name="similarity-based-password-validators"
+ package="org.forgerock.opendj.server.config" extends="password-validator"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ determines whether a proposed password is acceptable by measuring
+ how similar it is to the user's current password.
+ </adm:synopsis>
+ <adm:description>
+ In particular,
+ it uses the Levenshtein Distance algorithm to determine the
+ minimum number of changes (where a change may be inserting,
+ deleting, or replacing a character) to transform one string into
+ the other. It can be used to prevent users from making only minor
+ changes to their current password when setting a new password.
+ Note that for this password validator to be effective, it is
+ necessary to have access to the user's current password.
+ Therefore, if this password validator is to be enabled, the
+ password-change-requires-current-password attribute in the
+ password policy configuration must also be set to true.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-similarity-based-password-validator</ldap:name>
+ <ldap:superior>ds-cfg-password-validator</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SimilarityBasedPasswordValidator
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="min-password-difference" mandatory="true">
+ <adm:synopsis>
+ Specifies the minimum difference of new and old password.
+ </adm:synopsis>
+ <adm:description>
+ A value of zero indicates that no difference between passwords is
+ acceptable.
+ </adm:description>
+ <adm:syntax>
+ <adm:integer lower-limit="0" upper-limit="2147483647"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-min-password-difference</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SizeLimitLogRetentionPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SizeLimitLogRetentionPolicyConfiguration.xml
new file mode 100644
index 0000000..f8893aa
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SizeLimitLogRetentionPolicyConfiguration.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="size-limit-log-retention-policy"
+ plural-name="size-limit-log-retention-policies"
+ package="org.forgerock.opendj.server.config" extends="log-retention-policy"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ Retention policy based on the amount of space taken by all the log
+ files on disk.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-size-limit-log-retention-policy</ldap:name>
+ <ldap:superior>ds-cfg-log-retention-policy</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.loggers.SizeBasedRetentionPolicy
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="disk-space-used" mandatory="true">
+ <adm:synopsis>
+ Specifies the maximum total disk space used by the log files.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:size lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-disk-space-used</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SizeLimitLogRotationPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SizeLimitLogRotationPolicyConfiguration.xml
new file mode 100644
index 0000000..7a8b346
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SizeLimitLogRotationPolicyConfiguration.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="size-limit-log-rotation-policy"
+ plural-name="size-limit-log-rotation-policies"
+ package="org.forgerock.opendj.server.config" extends="log-rotation-policy"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ Rotation policy based on the size of the log file.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-size-limit-log-rotation-policy</ldap:name>
+ <ldap:superior>ds-cfg-log-rotation-policy</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.loggers.SizeBasedRotationPolicy
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="file-size-limit" mandatory="true">
+ <adm:synopsis>
+ Specifies the maximum size that a log file can reach before
+ it is rotated.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:size lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-file-size-limit</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SoftReferenceEntryCacheConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SoftReferenceEntryCacheConfiguration.xml
new file mode 100644
index 0000000..1fa09f2
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SoftReferenceEntryCacheConfiguration.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="soft-reference-entry-cache"
+ plural-name="soft-reference-entry-caches"
+ package="org.forgerock.opendj.server.config" extends="entry-cache"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is a directory server entry cache implementation that uses soft
+ references to manage objects to allow them to be
+ freed if the JVM is running low on memory.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-soft-reference-entry-cache</ldap:name>
+ <ldap:superior>ds-cfg-entry-cache</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SoftReferenceEntryCache
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="lock-timeout" advanced="true">
+ <adm:synopsis>
+ Specifies the length of time in milliseconds to wait while attempting to
+ acquire a read or write lock.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>3000ms</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="0"
+ allow-unlimited="true" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-lock-timeout</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property-reference name="include-filter" />
+ <adm:property-reference name="exclude-filter" />
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StackTraceMonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StackTraceMonitorProviderConfiguration.xml
new file mode 100644
index 0000000..32c39ab
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StackTraceMonitorProviderConfiguration.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="stack-trace-monitor-provider"
+ plural-name="stack-trace-monitor-providers"
+ package="org.forgerock.opendj.server.config" extends="monitor-provider"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ enables clients to obtain a stack trace of all the threads that are
+ currently running in the directory server.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-stack-trace-monitor-provider</ldap:name>
+ <ldap:superior>ds-cfg-monitor-provider</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.monitors.StackTraceMonitorProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StartTLSExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StartTLSExtendedOperationHandlerConfiguration.xml
new file mode 100644
index 0000000..c714b17
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StartTLSExtendedOperationHandlerConfiguration.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="start-tls-extended-operation-handler"
+ plural-name="start-tls-extended-operation-handlers"
+ package="org.forgerock.opendj.server.config"
+ extends="extended-operation-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides the ability clients to use the StartTLS extended operation
+ to initiate a secure communication channel over an otherwise
+ clear-text LDAP connection.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-start-tls-extended-operation-handler</ldap:name>
+ <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.StartTLSExtendedOperation
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StaticGroupImplementationConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StaticGroupImplementationConfiguration.xml
new file mode 100644
index 0000000..296252e
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StaticGroupImplementationConfiguration.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="static-group-implementation"
+ plural-name="static-group-implementations"
+ package="org.forgerock.opendj.server.config" extends="group-implementation"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a grouping mechanism in which the group membership is based
+ on an explicit list of the DNs of the users that are members of the
+ group.
+ </adm:synopsis>
+ <adm:description>
+ Note that it is possible to nest static groups by including the DN of a
+ nested group in the member list for the parent group.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-static-group-implementation</ldap:name>
+ <ldap:superior>ds-cfg-group-implementation</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>org.opends.server.extensions.StaticGroup</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StructuralObjectClassVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StructuralObjectClassVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..cb37397
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/StructuralObjectClassVirtualAttributeConfiguration.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2009 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="structural-object-class-virtual-attribute"
+ plural-name="structural-object-class-virtual-attributes"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ generates a virtual attribute that specifies the structural object class
+ with the schema definitions in effect for the
+ entry. This attribute is defined in RFC 4512.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-structural-object-class-virtual-attribute</ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.StructuralObjectClassVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="conflict-behavior" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>virtual-overrides-real</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="attribute-type">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>structuralObjectClass</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubjectAttributeToUserAttributeCertificateMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubjectAttributeToUserAttributeCertificateMapperConfiguration.xml
new file mode 100644
index 0000000..e933f4f
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubjectAttributeToUserAttributeCertificateMapperConfiguration.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object
+ name="subject-attribute-to-user-attribute-certificate-mapper"
+ plural-name="subject-attribute-to-user-attribute-certificate-mappers"
+ package="org.forgerock.opendj.server.config" extends="certificate-mapper"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ maps client certificates to user entries by mapping the values of
+ attributes contained in the certificate subject to attributes
+ contained in user entries.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-subject-attribute-to-user-attribute-certificate-mapper
+ </ldap:name>
+ <ldap:superior>ds-cfg-certificate-mapper</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SubjectAttributeToUserAttributeCertificateMapper
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="subject-attribute-mapping" mandatory="true"
+ multi-valued="true">
+ <adm:synopsis>
+ Specifies a mapping between certificate attributes and user
+ attributes.
+ </adm:synopsis>
+ <adm:description>
+ Each value should be in the form "certattr:userattr" where
+ certattr is the name of the attribute in the certificate subject
+ and userattr is the name of the corresponding attribute in user
+ entries. There may be multiple mappings defined, and when
+ performing the mapping values for all attributes present in the
+ certificate subject that have mappings defined must be present in
+ the corresponding user entries.
+ </adm:description>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-subject-attribute-mapping</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="user-base-dn" multi-valued="true">
+ <adm:synopsis>
+ Specifies the base DNs that should be used when performing
+ searches to map the client certificate to a user entry.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The server will perform the search in all public naming
+ contexts.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-user-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubjectDNToUserAttributeCertificateMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubjectDNToUserAttributeCertificateMapperConfiguration.xml
new file mode 100644
index 0000000..f491a18
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubjectDNToUserAttributeCertificateMapperConfiguration.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object
+ name="subject-dn-to-user-attribute-certificate-mapper"
+ plural-name="subject-dn-to-user-attribute-certificate-mappers"
+ package="org.forgerock.opendj.server.config" extends="certificate-mapper"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ maps client certificates to user entries by looking for the
+ certificate subject DN in a specified attribute of user entries.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>
+ ds-cfg-subject-dn-to-user-attribute-certificate-mapper
+ </ldap:name>
+ <ldap:superior>ds-cfg-certificate-mapper</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SubjectDNToUserAttributeCertificateMapper
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="subject-attribute" mandatory="true">
+ <adm:synopsis>
+ Specifies the name or OID of the attribute whose value should
+ exactly match the certificate subject DN.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-subject-attribute</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="user-base-dn" multi-valued="true">
+ <adm:synopsis>
+ Specifies the base DNs that should be used when performing
+ searches to map the client certificate to a user entry.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The server will perform the search in all public naming
+ contexts.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-user-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubjectEqualsDNCertificateMapperConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubjectEqualsDNCertificateMapperConfiguration.xml
new file mode 100644
index 0000000..0bb4cb3
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubjectEqualsDNCertificateMapperConfiguration.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="subject-equals-dn-certificate-mapper"
+ plural-name="subject-equals-dn-certificate-mappers"
+ package="org.forgerock.opendj.server.config" extends="certificate-mapper"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ maps client certificates to user entries based on the assumption
+ that the certificate subject is the same as the DN of the target
+ user entry.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-subject-equals-dn-certificate-mapper</ldap:name>
+ <ldap:superior>ds-cfg-certificate-mapper</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SubjectEqualsDNCertificateMapper
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubschemaSubentryVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubschemaSubentryVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..5f9413f
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SubschemaSubentryVirtualAttributeConfiguration.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="subschema-subentry-virtual-attribute"
+ plural-name="subschema-subentry-virtual-attributes"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ generates a virtual attribute that specifies the location of the
+ subschemaSubentry with the schema definitions in effect for the
+ entry. This attribute is defined in RFC 4512.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-subschema-subentry-virtual-attribute</ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.SubschemaSubentryVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="conflict-behavior" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>virtual-overrides-real</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="attribute-type">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>subschemaSubentry</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SynchronizationProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SynchronizationProviderConfiguration.xml
new file mode 100644
index 0000000..e1e08d3
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SynchronizationProviderConfiguration.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="synchronization-provider"
+ plural-name="synchronization-providers"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for handling synchronization of the directory server
+ data with other <adm:product-name /> instances or other data repositories.
+ </adm:synopsis>
+ <adm:description>
+ The <adm:product-name /> directory server takes a centralized approach to
+ replication, rather than the point-to-point approach taken by Sun
+ Java System Directory Server. In <adm:product-name />, one or more replication
+ servers are created in the environment. The replication servers
+ typically do not store user data but keep a log of all changes made
+ within the topology. Each directory server instance in the topology
+ is pointed at the replication servers. This plan simplifies the
+ deployment and management of the environment. Although you can run
+ the replication server on the same system (or even in the same
+ instance) as the directory server, the two servers can be separated
+ onto different systems. This approach can provide better performance
+ or functionality in large environments.
+ </adm:description>
+ <adm:tag name="replication" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-synchronization-provider</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled for use.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.SynchronizationProvider
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SystemInfoMonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SystemInfoMonitorProviderConfiguration.xml
new file mode 100644
index 0000000..21762a7
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/SystemInfoMonitorProviderConfiguration.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="system-info-monitor-provider"
+ plural-name="system-info-monitor-providers"
+ package="org.forgerock.opendj.server.config" extends="monitor-provider"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ can be used to publish information about the system and virtual
+ machine on which the directory server is running.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-system-info-monitor-provider</ldap:name>
+ <ldap:superior>ds-cfg-monitor-provider</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.monitors.SystemInfoMonitorProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TaskBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TaskBackendConfiguration.xml
new file mode 100644
index 0000000..34198c1
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TaskBackendConfiguration.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="task-backend" plural-name="task-backends"
+ package="org.forgerock.opendj.server.config" extends="backend"
+ advanced="true" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The Task Backend provides a mechanism for scheduling tasks in the
+ <adm:product-name /> directory server. Tasks are intended to provide access to
+ certain types of administrative functions in the server that may not
+ be convenient to perform remotely.
+ </adm:synopsis>
+ <adm:description>
+ <adm:product-name /> supports tasks to backup and restore backends, to import and export LDIF
+ files, and to stop and restart the server. The details of a task are
+ in an entry that is below the root of the Task Backend. The Task Backend
+ is responsible for decoding that task entry and ensuring that it is processed
+ as requested. Tasks may be invoked immediately, but they may also be scheduled for execution at
+ some future time. The task backend can also process recurring tasks to
+ ensure that maintenance operations (for example, backups) are
+ performed automatically on a regular basis.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-task-backend</ldap:name>
+ <ldap:superior>ds-cfg-backend</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.backends.task.TaskBackend
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="writability-mode">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>enabled</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="task-backing-file" mandatory="true">
+ <adm:synopsis>
+ Specifies the path to the backing file for storing
+ information about the tasks configured in the server.
+ </adm:synopsis>
+ <adm:description>
+ It may be either an absolute path or a relative path to
+ the base of the <adm:product-name /> directory server instance.
+ </adm:description>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-task-backing-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="task-retention-time">
+ <adm:synopsis>
+ Specifies the length of time that task entries should be
+ retained after processing on the associated task has been
+ completed.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>24 hours</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:duration />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-task-retention-time</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="notification-sender-address">
+ <adm:synopsis>
+ Specifies the email address to use as the sender (that is,
+ the "From:" address) address for notification mail messages generated
+ when a task completes execution.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The default sender address used is
+ "opendj-task-notification@" followed by the canonical address
+ of the system on which the server is running.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-notification-sender-address</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TelephoneNumberAttributeSyntaxConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TelephoneNumberAttributeSyntaxConfiguration.xml
new file mode 100644
index 0000000..56bb656
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TelephoneNumberAttributeSyntaxConfiguration.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="telephone-number-attribute-syntax"
+ plural-name="telephone-number-attribute-syntaxes"
+ extends="attribute-syntax" package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ define an attribute syntax for storing telephone number information.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-telephone-number-attribute-syntax</ldap:name>
+ <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.schema.TelephoneNumberSyntax
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="strict-format" advanced="true">
+ <adm:synopsis>
+ Indicates whether to require telephone number values to strictly
+ comply with the standard definition for this syntax.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>false</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-strict-format</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TimeLimitLogRotationPolicyConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TimeLimitLogRotationPolicyConfiguration.xml
new file mode 100644
index 0000000..1266142
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TimeLimitLogRotationPolicyConfiguration.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="time-limit-log-rotation-policy"
+ plural-name="time-limit-log-rotation-policies"
+ package="org.forgerock.opendj.server.config" extends="log-rotation-policy"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ Rotation policy based on the time since last rotation.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-time-limit-log-rotation-policy</ldap:name>
+ <ldap:superior>ds-cfg-log-rotation-policy</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.loggers.TimeLimitRotationPolicy
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="rotation-interval" mandatory="true">
+ <adm:synopsis>
+ Specifies the time interval between rotations.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:duration base-unit="ms" lower-limit="1" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-rotation-interval</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TraditionalWorkQueueConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TraditionalWorkQueueConfiguration.xml
new file mode 100644
index 0000000..80e460c
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TraditionalWorkQueueConfiguration.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="traditional-work-queue"
+ plural-name="traditional-work-queues" extends="work-queue"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is a type of work queue that uses a number of worker threads that
+ watch a queue and pick up an operation to process whenever one
+ becomes available.
+ </adm:synopsis>
+ <adm:description>
+ The traditional work queue is a FIFO queue serviced by a fixed
+ number of worker threads. This fixed number of threads can be
+ changed on the fly, with the change taking effect as soon as
+ it is made. You can limit the size of the work queue to a specified
+ number of operations. When this many operations are in the
+ queue, waiting to be picked up by threads, any new requests are
+ rejected with an error message.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-traditional-work-queue</ldap:name>
+ <ldap:superior>ds-cfg-work-queue</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.TraditionalWorkQueue
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="num-worker-threads">
+ <adm:synopsis>
+ Specifies the number of worker threads to be used for processing
+ operations placed in the queue.
+ </adm:synopsis>
+ <adm:description>
+ If the value is increased,
+ the additional worker threads are created immediately. If the
+ value is reduced, the appropriate number of threads are destroyed
+ as operations complete processing.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Let the server decide.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="2147483647" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-num-worker-threads</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="max-work-queue-capacity">
+ <adm:synopsis>
+ Specifies the maximum number of queued operations that can be in the work
+ queue at any given time.
+ </adm:synopsis>
+ <adm:description>
+ If the work queue is already full and additional requests are
+ received by the server, then the server front end, and possibly the
+ client, will be blocked until the work queue has available capacity.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>1000</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:integer lower-limit="1" upper-limit="2147483647"/>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-max-work-queue-capacity</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TripleDESPasswordStorageSchemeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TripleDESPasswordStorageSchemeConfiguration.xml
new file mode 100644
index 0000000..1ad3068
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TripleDESPasswordStorageSchemeConfiguration.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="triple-des-password-storage-scheme"
+ plural-name="triple-des-password-storage-schemes"
+ package="org.forgerock.opendj.server.config"
+ extends="password-storage-scheme"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a mechanism for encoding user passwords using the
+ triple-DES (DES/EDE) reversible encryption mechanism.
+ </adm:synopsis>
+ <adm:description>
+ This scheme contains only an implementation for the user password
+ syntax, with a storage scheme name of "3DES".
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-triple-des-password-storage-scheme</ldap:name>
+ <ldap:superior>ds-cfg-password-storage-scheme</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.TripleDESPasswordStorageScheme
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TrustManagerProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TrustManagerProviderConfiguration.xml
new file mode 100644
index 0000000..d413f02
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TrustManagerProviderConfiguration.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="trust-manager-provider"
+ plural-name="trust-manager-providers"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ determine whether to trust presented
+ certificates.
+ </adm:synopsis>
+ <adm:tag name="security" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-trust-manager-provider</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicate whether the
+ <adm:user-friendly-name />
+ is enabled for use.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ The fully-qualified name of the Java class that provides
+ the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.TrustManagerProvider
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TrustStoreBackendConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TrustStoreBackendConfiguration.xml
new file mode 100644
index 0000000..bde8a1d
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/TrustStoreBackendConfiguration.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="trust-store-backend"
+ plural-name="trust-store-backends" extends="backend"
+ package="org.forgerock.opendj.server.config" advanced="true"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides an LDAP view of a file-based trust store. It is used by the
+ administrative cryptographic framework.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-trust-store-backend</ldap:name>
+ <ldap:superior>ds-cfg-backend</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.backends.TrustStoreBackend
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="writability-mode">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>enabled</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="trust-store-file" mandatory="true">
+ <adm:TODO>Should use a file-based property definition?</adm:TODO>
+ <adm:synopsis>
+ Specifies the path to the file that stores the trust information.
+ </adm:synopsis>
+ <adm:description>
+ It may be an absolute path, or a path that is relative to the
+ <adm:product-name />
+ instance root.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>config/ads-truststore</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-trust-store-file</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="trust-store-type">
+ <adm:TODO>
+ Can we restrict this to an enumeration? How can the client guess
+ which values are possible? What is the default value?
+ </adm:TODO>
+ <adm:synopsis>
+ Specifies the format for the data in the key store file.
+ </adm:synopsis>
+ <adm:description>
+ Valid values should always include 'JKS' and 'PKCS12', but
+ different implementations may allow other values as well.
+ </adm:description>
+ <adm:requires-admin-action>
+ <adm:none>
+ <adm:synopsis>
+ Changes to this property take effect the next time that
+ the key manager is accessed.
+ </adm:synopsis>
+ </adm:none>
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>The JVM default value is used.</adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-trust-store-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property-reference name="trust-store-pin" />
+ <adm:property-reference name="trust-store-pin-property" />
+ <adm:property-reference name="trust-store-pin-environment-variable" />
+ <adm:property-reference name="trust-store-pin-file" />
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/UniqueAttributePluginConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/UniqueAttributePluginConfiguration.xml
new file mode 100644
index 0000000..c0b4069
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/UniqueAttributePluginConfiguration.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="unique-attribute-plugin"
+ plural-name="unique-attribute-plugins"
+ package="org.forgerock.opendj.server.config" extends="plugin"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ enforces constraints on the value of an attribute within a
+ portion of the directory.
+ </adm:synopsis>
+ <adm:description>
+ The values for each attribute must be unique within each base DN
+ specified in the plugin's base-dn property or within all of the
+ server's public naming contexts if no base DNs were specified.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-unique-attribute-plugin</ldap:name>
+ <ldap:superior>ds-cfg-plugin</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.plugins.UniqueAttributePlugin
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property-override name="plugin-type" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>preoperationadd</adm:value>
+ <adm:value>preoperationmodify</adm:value>
+ <adm:value>preoperationmodifydn</adm:value>
+ <adm:value>postoperationadd</adm:value>
+ <adm:value>postoperationmodify</adm:value>
+ <adm:value>postoperationmodifydn</adm:value>
+ <adm:value>postsynchronizationadd</adm:value>
+ <adm:value>postsynchronizationmodify</adm:value>
+ <adm:value>postsynchronizationmodifydn</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="type" mandatory="true" multi-valued="true">
+ <adm:synopsis>
+ Specifies the type of attributes to check for value uniqueness.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="base-dn" multi-valued="true">
+ <adm:synopsis>
+ Specifies a base DN within which the attribute must be unique.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The plug-in uses the server's public naming contexts in the
+ searches.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/UniqueCharactersPasswordValidatorConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/UniqueCharactersPasswordValidatorConfiguration.xml
new file mode 100644
index 0000000..c4d07a4
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/UniqueCharactersPasswordValidatorConfiguration.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="unique-characters-password-validator"
+ plural-name="unique-characters-password-validators"
+ package="org.forgerock.opendj.server.config" extends="password-validator"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is used to determine whether a proposed password is acceptable based
+ on the number of unique characters that it contains.
+ </adm:synopsis>
+ <adm:description>
+ This validator can be used to prevent simple passwords that contain only
+ a few characters like "aabbcc" or "abcabc".
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-unique-characters-password-validator</ldap:name>
+ <ldap:superior>ds-cfg-password-validator</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.UniqueCharactersPasswordValidator
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="min-unique-characters" mandatory="true">
+ <adm:synopsis>
+ Specifies the minimum number of unique characters that a password
+ will be allowed to contain.
+ </adm:synopsis>
+ <adm:description>
+ A value of zero indicates that no minimum value is
+ enforced.
+ </adm:description>
+ <adm:syntax>
+ <adm:integer lower-limit="0" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-min-unique-characters</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="case-sensitive-validation" mandatory="true">
+ <adm:synopsis>
+ Indicates whether this password validator should treat password
+ characters in a case-sensitive manner.
+ </adm:synopsis>
+ <adm:description>
+ A value of true indicates that the validator does not consider
+ a capital letter to be the same as its lower-case counterpart.
+ A value of false indicates that the validator ignores
+ differences in capitalization when looking at the number of
+ unique characters in the password.
+ </adm:description>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-case-sensitive-validation</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/UserDefinedVirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/UserDefinedVirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..5202942
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/UserDefinedVirtualAttributeConfiguration.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="user-defined-virtual-attribute"
+ plural-name="user-defined-virtual-attributes"
+ package="org.forgerock.opendj.server.config" extends="virtual-attribute"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ creates virtual attributes with user-defined values in
+ entries that match the criteria defined in the plug-in's
+ configuration.
+ </adm:synopsis>
+ <adm:description>
+ The functionality of these attributes is similar to Class
+ of Service (CoS) in the Sun Java System Directory Server.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-user-defined-virtual-attribute</ldap:name>
+ <ldap:superior>ds-cfg-virtual-attribute</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.UserDefinedVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+ <adm:property name="value" mandatory="true" multi-valued="true">
+ <adm:synopsis>
+ Specifies the values to be included in the virtual
+ attribute.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:string />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-value</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/VersionMonitorProviderConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/VersionMonitorProviderConfiguration.xml
new file mode 100644
index 0000000..49b53ec
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/VersionMonitorProviderConfiguration.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="version-monitor-provider"
+ plural-name="version-monitor-providers"
+ package="org.forgerock.opendj.server.config" extends="monitor-provider"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ can be used to publish directory server version information.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-version-monitor-provider</ldap:name>
+ <ldap:superior>ds-cfg-monitor-provider</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.monitors.VersionMonitorProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/VirtualAttributeConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/VirtualAttributeConfiguration.xml
new file mode 100644
index 0000000..4e393b5
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/VirtualAttributeConfiguration.xml
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="virtual-attribute"
+ plural-name="virtual-attributes" package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ are responsible for dynamically generating attribute values that
+ appear in entries but are not persistently stored in the backend.
+ </adm:synopsis>
+ <adm:description>
+ Virtual attributes are associated with a virtual attribute
+ provider, which contains the logic for generating the value.
+ </adm:description>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-virtual-attribute</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the virtual attribute
+ provider class that generates the attribute values.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.VirtualAttributeProvider
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled for use.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="attribute-type" mandatory="true">
+ <adm:synopsis>
+ Specifies the attribute type for the attribute whose values are to
+ be dynamically assigned by the virtual attribute.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-attribute-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="base-dn" multi-valued="true">
+ <adm:synopsis>
+ Specifies the base DNs for the branches containing entries that
+ are eligible to use this virtual attribute.
+ </adm:synopsis>
+ <adm:description>
+ If no values are given, then the server generates virtual attributes
+ anywhere in the server.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ The location of the entry in the server is not taken into
+ account when determining whether an entry is eligible to use
+ this virtual attribute.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="scope">
+ <adm:synopsis>
+ Specifies the LDAP scope associated with base DNs for entries that are
+ eligible to use this virtual attribute.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>whole-subtree</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="base-object">
+ <adm:synopsis>Search the base object only.</adm:synopsis>
+ </adm:value>
+ <adm:value name="single-level">
+ <adm:synopsis>
+ Search the immediate children of the base object but do not
+ include any of their descendants or the base object itself.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="subordinate-subtree">
+ <adm:synopsis>
+ Search the entire subtree below the base object but do not
+ include the base object itself.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="whole-subtree">
+ <adm:synopsis>
+ Search the base object and the entire subtree below the base
+ object.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-scope</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="group-dn" multi-valued="true">
+ <adm:synopsis>
+ Specifies the DNs of the groups whose members can be eligible to
+ use this virtual attribute.
+ </adm:synopsis>
+ <adm:description>
+ If no values are given, then group
+ membership is not taken into account when generating the virtual
+ attribute. If one or more group DNs are specified, then only
+ members of those groups are allowed to have the virtual attribute.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:alias>
+ <adm:synopsis>
+ Group membership is not taken into account when
+ determining whether an entry is eligible to use this virtual
+ attribute.
+ </adm:synopsis>
+ </adm:alias>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-group-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="filter" multi-valued="true">
+ <adm:synopsis>
+ Specifies the search filters to be applied against entries to
+ determine if the virtual attribute is to be generated for those
+ entries.
+ </adm:synopsis>
+ <adm:description>
+ If no values are given, then any entry is eligible to
+ have the value generated. If one or more filters are specified,
+ then only entries that match at least one of those filters are
+ allowed to have the virtual attribute.
+ </adm:description>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>(objectClass=*)</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:string>
+ <adm:pattern>
+ <adm:regex>.*</adm:regex>
+ <adm:usage>STRING</adm:usage>
+ <adm:synopsis>
+ Any valid search filter string.
+ </adm:synopsis>
+ </adm:pattern>
+ </adm:string>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-filter</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="conflict-behavior">
+ <adm:synopsis>
+ Specifies the behavior that the server is to exhibit for entries
+ that already contain one or more real values for the associated
+ attribute.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>real-overrides-virtual</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:enumeration>
+ <adm:value name="real-overrides-virtual">
+ <adm:synopsis>
+ Indicates that any real values contained in the entry are
+ preserved and used, and virtual values are not generated.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="virtual-overrides-real">
+ <adm:synopsis>
+ Indicates that the virtual attribute provider suppresses
+ any real values contained in the entry
+ and generates virtual values and uses them.
+ </adm:synopsis>
+ </adm:value>
+ <adm:value name="merge-real-and-virtual">
+ <adm:synopsis>
+ Indicates that the virtual attribute provider
+ is to preserve any real values contained in the entry
+ and merge them with the set of generated virtual values
+ so that both the real and virtual values are used.
+ </adm:synopsis>
+ </adm:value>
+ </adm:enumeration>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-conflict-behavior</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/VirtualStaticGroupImplementationConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/VirtualStaticGroupImplementationConfiguration.xml
new file mode 100644
index 0000000..ae4efc1
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/VirtualStaticGroupImplementationConfiguration.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="virtual-static-group-implementation"
+ plural-name="virtual-static-group-implementations"
+ package="org.forgerock.opendj.server.config" extends="group-implementation"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides a grouping mechanism in which the membership for the
+ virtual static group is based on the membership for another group
+ defined within the server.
+ </adm:synopsis>
+ <adm:description>
+ The primary benefit of virtual static groups is that they make it
+ possible to present other types of groups (for example, dynamic groups) as
+ if they were static groups for the benefit of applications that do
+ not support alternate grouping mechanisms.
+ </adm:description>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-virtual-static-group-implementation</ldap:name>
+ <ldap:superior>ds-cfg-group-implementation</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.VirtualStaticGroup
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WhoAmIExtendedOperationHandlerConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WhoAmIExtendedOperationHandlerConfiguration.xml
new file mode 100644
index 0000000..71231ef
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WhoAmIExtendedOperationHandlerConfiguration.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="who-am-i-extended-operation-handler"
+ plural-name="who-am-i-extended-operation-handlers"
+ package="org.forgerock.opendj.server.config"
+ extends="extended-operation-handler"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides the ability for clients to request their authorization
+ identity using the "Who Am I?" extended operation as defined in RFC
+ 4532.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-who-am-i-extended-operation-handler</ldap:name>
+ <ldap:superior>ds-cfg-extended-operation-handler</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property-override name="java-class" advanced="true">
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.WhoAmIExtendedOperation
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ </adm:property-override>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WorkQueueConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WorkQueueConfiguration.xml
new file mode 100644
index 0000000..27e2696
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WorkQueueConfiguration.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="work-queue" plural-name="work-queues"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ provides the configuration for the server work queue and
+ is responsible for ensuring that requests received from clients are
+ processed in a timely manner.
+ </adm:synopsis>
+ <adm:description>
+ Only a single work queue can be defined in the server.
+ Whenever a connection handler receives a client request, it should
+ place the request in the work queue to be processed
+ appropriately.
+ </adm:description>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-work-queue</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:profile name="cli">
+ <cli:managed-object custom="true" />
+ </adm:profile>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:server-restart />
+ </adm:requires-admin-action>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.WorkQueue
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WorkflowConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WorkflowConfiguration.xml
new file mode 100644
index 0000000..dda42b1
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WorkflowConfiguration.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! Portions Copyright 2011 ForgeRock AS
+ ! -->
+<adm:managed-object name="workflow" plural-name="workflows"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ The
+ <adm:user-friendly-name />
+ is a list of processing steps (Work Flow Elements) that are applied
+ to data as it is retrieved from the directory server.
+ </adm:synopsis>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-workflow</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled for use in the server.
+ </adm:synopsis>
+ <adm:description>
+ If a
+ <adm:user-friendly-name />
+ is not enabled, then its contents are not accessible when
+ processing operations.
+ </adm:description>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="workflow-element" mandatory="true">
+ <adm:synopsis>
+ Specifies the root Workflow Element in the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:aggregation relation-name="workflow-element"
+ parent-path="/">
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced workflow element must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
+ </adm:aggregation>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-workflow-element</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="base-dn" mandatory="true" read-only="true">
+ <adm:synopsis>
+ Specifies the base DN of the data targeted by the
+ <adm:user-friendly-name />
+ .
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WorkflowElementConfiguration.xml b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WorkflowElementConfiguration.xml
new file mode 100644
index 0000000..2d48b17
--- /dev/null
+++ b/opendj-config/src/main/resources/definitions/org/forgerock/opendj/server/config/WorkflowElementConfiguration.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2007-2010 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="workflow-element"
+ plural-name="workflow-elements" package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ <adm:user-friendly-plural-name />
+ implement a single processing step in a Work Flow.
+ </adm:synopsis>
+ <adm:description>
+ A
+ <adm:user-friendly-name />
+ can perform a task such as mapping DNs, renaming attributes,
+ filtering attributes, joining data sources, proxying, or
+ load-balancing. The simplest
+ <adm:user-friendly-name />
+ is the Local Backend Work Flow Element, which routes data
+ to a Backend.
+ </adm:description>
+ <adm:tag name="core-server" />
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:name>ds-cfg-workflow-element</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="enabled" mandatory="true">
+ <adm:synopsis>
+ Indicates whether the
+ <adm:user-friendly-name />
+ is enabled for use in the server.
+ </adm:synopsis>
+ <adm:description>
+ If a
+ <adm:user-friendly-name />
+ is not enabled, then its contents are not accessible when
+ processing operations.
+ </adm:description>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="java-class" mandatory="true">
+ <adm:synopsis>
+ Specifies the fully-qualified name of the Java class that provides the
+ <adm:user-friendly-name />
+ implementation.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.workflowelement.WorkflowElement
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/main/resources/stylesheets/admin-cli.xsd b/opendj-config/src/main/resources/stylesheets/admin-cli.xsd
index f9f2d55..06edb88 100644
--- a/opendj-config/src/main/resources/stylesheets/admin-cli.xsd
+++ b/opendj-config/src/main/resources/stylesheets/admin-cli.xsd
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema targetNamespace="http://www.opends.org/admin-cli"
+<xsd:schema targetNamespace="http://opendj.forgerock.org/admin-cli"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified" xmlns:adm="http://www.opends.org/admin"
- xmlns:tns="http://www.opends.org/admin-cli">
- <xsd:import namespace="http://www.opends.org/admin"
+ elementFormDefault="qualified" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:tns="http://opendj.forgerock.org/admin-cli">
+ <xsd:import namespace="http://opendj.forgerock.org/admin"
schemaLocation="admin.xsd" />
<xsd:annotation>
<xsd:documentation>
diff --git a/opendj-config/src/main/resources/stylesheets/admin-ldap.xsd b/opendj-config/src/main/resources/stylesheets/admin-ldap.xsd
index 7bebcb7..dce6c30 100644
--- a/opendj-config/src/main/resources/stylesheets/admin-ldap.xsd
+++ b/opendj-config/src/main/resources/stylesheets/admin-ldap.xsd
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema targetNamespace="http://www.opends.org/admin-ldap"
+<xsd:schema targetNamespace="http://opendj.forgerock.org/admin-ldap"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
- xmlns:tns="http://www.opends.org/admin-ldap">
+ xmlns:tns="http://opendj.forgerock.org/admin-ldap">
<xsd:annotation>
<xsd:documentation>
This schema defines the elements and attributes of the "ldap"
diff --git a/opendj-config/src/main/resources/stylesheets/admin-preprocessor.xsd b/opendj-config/src/main/resources/stylesheets/admin-preprocessor.xsd
index 1049f00..2126ac8 100644
--- a/opendj-config/src/main/resources/stylesheets/admin-preprocessor.xsd
+++ b/opendj-config/src/main/resources/stylesheets/admin-preprocessor.xsd
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema targetNamespace="http://www.opends.org/admin-preprocessor"
+<xsd:schema targetNamespace="http://opendj.forgerock.org/admin-preprocessor"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:admin="http://www.opends.org/admin"
+ xmlns:admin="http://opendj.forgerock.org/admin"
elementFormDefault="qualified"
- xmlns:tns="http://www.opends.org/admin-preprocessor">
- <xsd:import namespace="http://www.opends.org/admin"
+ xmlns:tns="http://opendj.forgerock.org/admin-preprocessor">
+ <xsd:import namespace="http://opendj.forgerock.org/admin"
schemaLocation="admin.xsd" />
<xsd:annotation>
<xsd:documentation>
diff --git a/opendj-config/src/main/resources/stylesheets/admin.xsd b/opendj-config/src/main/resources/stylesheets/admin.xsd
index a0c813b..c764442 100644
--- a/opendj-config/src/main/resources/stylesheets/admin.xsd
+++ b/opendj-config/src/main/resources/stylesheets/admin.xsd
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema targetNamespace="http://www.opends.org/admin"
+<xsd:schema targetNamespace="http://opendj.forgerock.org/admin"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
- xmlns:tns="http://www.opends.org/admin">
- <xsd:import namespace="http://www.opends.org/admin-ldap"
+ xmlns:tns="http://opendj.forgerock.org/admin">
+ <xsd:import namespace="http://opendj.forgerock.org/admin-ldap"
schemaLocation="admin-ldap.xsd" />
- <xsd:import namespace="http://www.opends.org/admin-cli"
+ <xsd:import namespace="http://opendj.forgerock.org/admin-cli"
schemaLocation="admin-cli.xsd" />
- <xsd:import namespace="http://www.opends.org/admin-preprocessor"
+ <xsd:import namespace="http://opendj.forgerock.org/admin-preprocessor"
schemaLocation="admin-preprocessor.xsd" />
<xsd:annotation>
<xsd:documentation>
@@ -1933,11 +1933,11 @@
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="package" type="tns:package-type"
- fixed="org.forgerock.opendj.admin">
+ fixed="org.forgerock.opendj.server.config">
<xsd:annotation>
<xsd:documentation>
The package containing this root managed object, which
- is always "org.forgerock.opendj.admin".
+ is always "org.forgerock.opendj.server.config".
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
diff --git a/opendj-config/src/main/resources/stylesheets/cliMOProfile.xsl b/opendj-config/src/main/resources/stylesheets/cliMOProfile.xsl
index d05fed4..a492fb5 100644
--- a/opendj-config/src/main/resources/stylesheets/cliMOProfile.xsl
+++ b/opendj-config/src/main/resources/stylesheets/cliMOProfile.xsl
@@ -25,8 +25,8 @@
! -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:cli="http://www.opends.org/admin-cli">
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:cli="http://opendj.forgerock.org/admin-cli">
<xsl:import href="preprocessor.xsl" />
<xsl:output method="text" encoding="us-ascii" />
<!--
diff --git a/opendj-config/src/main/resources/stylesheets/clientMO.xsl b/opendj-config/src/main/resources/stylesheets/clientMO.xsl
index 0f16efb..c059c11 100644
--- a/opendj-config/src/main/resources/stylesheets/clientMO.xsl
+++ b/opendj-config/src/main/resources/stylesheets/clientMO.xsl
@@ -23,8 +23,8 @@
!
! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
- xmlns:admpp="http://www.opends.org/admin-preprocessor"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:admpp="http://opendj.forgerock.org/admin-preprocessor"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="java-utilities.xsl" />
<xsl:import href="preprocessor.xsl" />
@@ -386,26 +386,26 @@
<xsl:if
test="$this-local-properties[not(@monitoring='true')]">
<import>
- org.opends.server.admin.IllegalPropertyValueException
+ org.forgerock.opendj.config.IllegalPropertyValueException
</import>
</xsl:if>
<xsl:if test="$this-local-properties[@read-only='true']">
<import>
- org.opends.server.admin.PropertyIsReadOnlyException
+ org.forgerock.opendj.config.PropertyIsReadOnlyException
</import>
</xsl:if>
<xsl:if test="$this-local-relations">
<import>
- org.opends.server.admin.DefinitionDecodingException
+ org.forgerock.opendj.config.DefinitionDecodingException
</import>
<import>
- org.opends.server.admin.ManagedObjectNotFoundException
+ org.forgerock.opendj.config.ManagedObjectNotFoundException
</import>
<import>
- org.opends.server.admin.client.ManagedObjectDecodingException
+ org.forgerock.opendj.config.client.ManagedObjectDecodingException
</import>
<import>
- org.opends.server.admin.client.ConcurrentModificationException
+ org.forgerock.opendj.config.client.ConcurrentModificationException
</import>
<import>
org.forgerock.opendj.ldap.ErrorResultException
@@ -428,15 +428,15 @@
test="$this-local-relations/adm:one-to-zero-or-one|$this-local-relations/adm:one-to-many">
<import>java.util.Collection</import>
<import>
- org.opends.server.admin.DefaultBehaviorException
+ org.forgerock.opendj.config.DefaultBehaviorException
</import>
<import>
- org.opends.server.admin.client.OperationRejectedException
+ org.forgerock.opendj.config.client.OperationRejectedException
</import>
</xsl:if>
<xsl:if test="$this-local-relations/adm:one-to-many[not(@unique = 'true')]">
<import>
- org.opends.server.admin.client.IllegalManagedObjectNameException
+ org.forgerock.opendj.config.client.IllegalManagedObjectNameException
</import>
</xsl:if>
<xsl:choose>
@@ -449,14 +449,14 @@
</xsl:if>
</xsl:when>
<xsl:otherwise>
- <import>org.opends.server.admin.ConfigurationClient</import>
+ <import>org.forgerock.opendj.config.ConfigurationClient</import>
</xsl:otherwise>
</xsl:choose>
<xsl:element name="import">
<xsl:value-of
select="concat($this-package, '.server.', $this-java-class, 'Cfg')" />
</xsl:element>
- <import>org.opends.server.admin.ManagedObjectDefinition</import>
+ <import>org.forgerock.opendj.config.ManagedObjectDefinition</import>
</xsl:with-param>
</xsl:call-template>
<xsl:text>
</xsl:text>
diff --git a/opendj-config/src/main/resources/stylesheets/conditions.xsl b/opendj-config/src/main/resources/stylesheets/conditions.xsl
index b471f74..a4d418e 100644
--- a/opendj-config/src/main/resources/stylesheets/conditions.xsl
+++ b/opendj-config/src/main/resources/stylesheets/conditions.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
diff --git a/opendj-config/src/main/resources/stylesheets/ldapMOProfile.xsl b/opendj-config/src/main/resources/stylesheets/ldapMOProfile.xsl
index 486ebca..de1b66e 100644
--- a/opendj-config/src/main/resources/stylesheets/ldapMOProfile.xsl
+++ b/opendj-config/src/main/resources/stylesheets/ldapMOProfile.xsl
@@ -25,8 +25,8 @@
! -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
<xsl:import href="java-utilities.xsl" />
<xsl:import href="preprocessor.xsl" />
<xsl:import href="property-types.xsl" />
diff --git a/opendj-config/src/main/resources/stylesheets/manifestMO.xsl b/opendj-config/src/main/resources/stylesheets/manifestMO.xsl
index 4699897..a16c376 100644
--- a/opendj-config/src/main/resources/stylesheets/manifestMO.xsl
+++ b/opendj-config/src/main/resources/stylesheets/manifestMO.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="java-utilities.xsl" />
<xsl:output method="text" encoding="us-ascii" />
@@ -34,7 +34,7 @@
<xsl:choose>
<xsl:when test="adm:root-managed-object">
<xsl:value-of
- select="'org.forgerock.opendj.admin.meta.RootCfgDefn
'" />
+ select="'org.forgerock.opendj.server.config.meta.RootCfgDefn
'" />
</xsl:when>
<xsl:when test="adm:managed-object">
<xsl:value-of
diff --git a/opendj-config/src/main/resources/stylesheets/messagesMO.xsl b/opendj-config/src/main/resources/stylesheets/messagesMO.xsl
index afd676a..ce648c2 100644
--- a/opendj-config/src/main/resources/stylesheets/messagesMO.xsl
+++ b/opendj-config/src/main/resources/stylesheets/messagesMO.xsl
@@ -25,8 +25,8 @@
! -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
<xsl:import href="java-utilities.xsl" />
<xsl:import href="preprocessor.xsl" />
<xsl:import href="property-types.xsl" />
diff --git a/opendj-config/src/main/resources/stylesheets/metaMO.xsl b/opendj-config/src/main/resources/stylesheets/metaMO.xsl
index e0320b4..919d3e1 100644
--- a/opendj-config/src/main/resources/stylesheets/metaMO.xsl
+++ b/opendj-config/src/main/resources/stylesheets/metaMO.xsl
@@ -24,8 +24,8 @@
! Copyright 2007-2010 Sun Microsystems, Inc.
! Portions copyright 2011 ForgeRock AS.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
- xmlns:admpp="http://www.opends.org/admin-preprocessor"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:admpp="http://opendj.forgerock.org/admin-preprocessor"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common">
<xsl:import href="java-utilities.xsl" />
@@ -1745,11 +1745,11 @@
<xsl:call-template name="generate-import-statements">
<xsl:with-param name="imports">
<xsl:if test="not(boolean($this/@extends))">
- <import>org.opends.server.admin.TopCfgDefn</import>
+ <import>org.forgerock.opendj.config.TopCfgDefn</import>
</xsl:if>
<xsl:if test="$this/adm:constraint">
- <import>org.opends.server.admin.GenericConstraint</import>
- <import>org.opends.server.admin.condition.Conditions</import>
+ <import>org.forgerock.opendj.config.GenericConstraint</import>
+ <import>org.forgerock.opendj.config.conditions.Conditions</import>
</xsl:if>
<xsl:if
test="$this-local-properties[@multi-valued='true' or
@@ -1758,42 +1758,42 @@
@hidden='true' or
@advanced='true' or
@mandatory='true']">
- <import>org.opends.server.admin.PropertyOption</import>
+ <import>org.forgerock.opendj.config.PropertyOption</import>
</xsl:if>
<xsl:if test="$this-local-properties">
- <import>org.opends.server.admin.AdministratorAction</import>
+ <import>org.forgerock.opendj.config.AdministratorAction</import>
</xsl:if>
<xsl:if test="$this/adm:tag-definition or $this/adm:tag">
- <import>org.opends.server.admin.Tag</import>
+ <import>org.forgerock.opendj.config.Tag</import>
</xsl:if>
<xsl:if
test="$this-local-properties[adm:default-behavior/adm:undefined or not(adm:default-behavior)]">
<import>
- org.opends.server.admin.UndefinedDefaultBehaviorProvider
+ org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider
</import>
</xsl:if>
<xsl:if
test="$this-local-properties/adm:default-behavior/adm:alias">
<import>
- org.opends.server.admin.AliasDefaultBehaviorProvider
+ org.forgerock.opendj.config.AliasDefaultBehaviorProvider
</import>
</xsl:if>
<xsl:if
test="$this-local-properties/adm:default-behavior/adm:inherited/adm:absolute">
<import>
- org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider
+ org.forgerock.opendj.config.AbsoluteInheritedDefaultBehaviorProvider
</import>
<import>
- org.opends.server.admin.DefaultBehaviorProvider
+ org.forgerock.opendj.config.DefaultBehaviorProvider
</import>
</xsl:if>
<xsl:if
test="$this-local-properties/adm:default-behavior/adm:inherited/adm:relative">
<import>
- org.opends.server.admin.RelativeInheritedDefaultBehaviorProvider
+ org.forgerock.opendj.config.RelativeInheritedDefaultBehaviorProvider
</import>
<import>
- org.opends.server.admin.DefaultBehaviorProvider
+ org.forgerock.opendj.config.DefaultBehaviorProvider
</import>
<xsl:for-each
select="$this-local-properties/adm:default-behavior/adm:inherited/adm:relative">
@@ -1814,10 +1814,10 @@
<xsl:if
test="$this-local-properties/adm:default-behavior/adm:defined">
<import>
- org.opends.server.admin.DefinedDefaultBehaviorProvider
+ org.forgerock.opendj.config.DefinedDefaultBehaviorProvider
</import>
<import>
- org.opends.server.admin.DefaultBehaviorProvider
+ org.forgerock.opendj.config.DefaultBehaviorProvider
</import>
</xsl:if>
<xsl:element name="import">
@@ -1855,7 +1855,7 @@
</xsl:for-each>
<xsl:if
test="$this-local-relations/*/adm:default-managed-object">
- <import>org.opends.server.admin.DefaultManagedObject</import>
+ <import>org.forgerock.opendj.config.DefaultManagedObject</import>
</xsl:if>
<xsl:for-each
select="$this-local-relations/*/adm:default-managed-object">
@@ -1880,66 +1880,66 @@
</xsl:for-each>
<xsl:if
test="$this-local-relations[@advanced='true' or @hidden='true']">
- <import>org.opends.server.admin.RelationOption</import>
+ <import>org.forgerock.opendj.config.RelationOption</import>
</xsl:if>
<xsl:if test="$this-is-hidden or $this-is-advanced">
- <import>org.opends.server.admin.ManagedObjectOption</import>
+ <import>org.forgerock.opendj.config.ManagedObjectOption</import>
</xsl:if>
<xsl:if test="$this-all-relations/adm:one-to-many[not(@unique = 'true')]">
<import>
- org.opends.server.admin.InstantiableRelationDefinition
+ org.forgerock.opendj.config.InstantiableRelationDefinition
</import>
</xsl:if>
<xsl:if test="$this-all-relations/adm:one-to-many[@unique = 'true']">
<import>
- org.opends.server.admin.SetRelationDefinition
+ org.forgerock.opendj.config.SetRelationDefinition
</import>
</xsl:if>
<xsl:if test="$this-all-relations/adm:one-to-zero-or-one">
<import>
- org.opends.server.admin.OptionalRelationDefinition
+ org.forgerock.opendj.config.OptionalRelationDefinition
</import>
</xsl:if>
<xsl:if test="$this-all-relations/adm:one-to-one">
<import>
- org.opends.server.admin.SingletonRelationDefinition
+ org.forgerock.opendj.config.SingletonRelationDefinition
</import>
</xsl:if>
<xsl:choose>
<xsl:when test="$this-is-abstract">
<import>
- org.opends.server.admin.AbstractManagedObjectDefinition
+ org.forgerock.opendj.config.AbstractManagedObjectDefinition
</import>
</xsl:when>
<xsl:otherwise>
<import>
- org.opends.server.admin.ManagedObjectDefinition
+ org.forgerock.opendj.config.ManagedObjectDefinition
</import>
- <import>org.opends.server.admin.PropertyProvider</import>
+ <import>org.forgerock.opendj.config.PropertyProvider</import>
<import>
- org.opends.server.admin.client.MissingMandatoryPropertiesException
+ org.forgerock.opendj.config.client.MissingMandatoryPropertiesException
</import>
<import>
- org.opends.server.admin.ManagedObjectAlreadyExistsException
+ org.forgerock.opendj.config.ManagedObjectAlreadyExistsException
</import>
<import>
org.forgerock.opendj.ldap.ErrorResultException
</import>
<import>
- org.opends.server.admin.client.ConcurrentModificationException
+ org.forgerock.opendj.config.client.ConcurrentModificationException
</import>
<import>
- org.opends.server.admin.client.OperationRejectedException
+ org.forgerock.opendj.config.client.OperationRejectedException
</import>
<import>
- org.opends.server.admin.client.ManagedObject
+ org.forgerock.opendj.config.client.ManagedObject
</import>
<import>
- org.opends.server.admin.server.ServerManagedObject
+ org.forgerock.opendj.config.server.ServerManagedObject
</import>
<xsl:if test="not($this-is-root)">
<import>
- org.opends.server.admin.server.ConfigurationChangeListener
+ org.forgerock.opendj.config.server.ConfigurationChangeListener
</import>
<xsl:call-template
name="generate-change-listener-import-statements" />
@@ -1947,48 +1947,48 @@
<import>org.forgerock.opendj.ldap.DN</import>
<xsl:if test="$this-all-relations">
<import>
- org.opends.server.admin.DefinitionDecodingException
+ org.forgerock.opendj.config.DefinitionDecodingException
</import>
<import>
- org.opends.server.admin.ManagedObjectNotFoundException
+ org.forgerock.opendj.config.ManagedObjectNotFoundException
</import>
<import>
- org.opends.server.admin.client.ManagedObjectDecodingException
+ org.forgerock.opendj.config.client.ManagedObjectDecodingException
</import>
</xsl:if>
<xsl:if test="$this-all-relations/adm:one-to-many">
<import>java.util.Collection</import>
<xsl:if test="$this-all-relations/adm:one-to-many[not(@unique = 'true')]">
<import>
- org.opends.server.admin.client.IllegalManagedObjectNameException
+ org.forgerock.opendj.config.client.IllegalManagedObjectNameException
</import>
</xsl:if>
<import>
- org.opends.server.admin.DefaultBehaviorException
+ org.forgerock.opendj.config.DefaultBehaviorException
</import>
<import>
- org.opends.server.admin.server.ConfigurationAddListener
+ org.forgerock.opendj.config.server.ConfigurationAddListener
</import>
<import>
- org.opends.server.admin.server.ConfigurationDeleteListener
+ org.forgerock.opendj.config.server.ConfigurationDeleteListener
</import>
- <import>org.opends.server.config.ConfigException</import>
+ <import>org.forgerock.opendj.config.server.ConfigException</import>
</xsl:if>
<xsl:if test="$this-all-relations/adm:one-to-zero-or-one">
<import>java.util.Collection</import>
<import>
- org.opends.server.admin.DefaultBehaviorException
+ org.forgerock.opendj.config.DefaultBehaviorException
</import>
<import>
- org.opends.server.admin.server.ConfigurationAddListener
+ org.forgerock.opendj.config.server.ConfigurationAddListener
</import>
<import>
- org.opends.server.admin.server.ConfigurationDeleteListener
+ org.forgerock.opendj.config.server.ConfigurationDeleteListener
</import>
- <import>org.opends.server.config.ConfigException</import>
+ <import>org.forgerock.opendj.config.server.ConfigException</import>
</xsl:if>
<xsl:if test="$this-all-relations/adm:one-to-one">
- <import>org.opends.server.config.ConfigException</import>
+ <import>org.forgerock.opendj.config.server.ConfigException</import>
</xsl:if>
<xsl:if test="$this-all-properties[@multi-valued='true']">
<import>java.util.SortedSet</import>
@@ -1996,7 +1996,7 @@
</xsl:if>
<xsl:if test="$this-all-properties[@read-only='true']">
<import>
- org.opends.server.admin.PropertyIsReadOnlyException
+ org.forgerock.opendj.config.PropertyIsReadOnlyException
</import>
</xsl:if>
</xsl:otherwise>
diff --git a/opendj-config/src/main/resources/stylesheets/package-info.xsl b/opendj-config/src/main/resources/stylesheets/package-info.xsl
index 4bc9a26..59d4b8a 100644
--- a/opendj-config/src/main/resources/stylesheets/package-info.xsl
+++ b/opendj-config/src/main/resources/stylesheets/package-info.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="java-utilities.xsl" />
<xsl:output method="text" encoding="us-ascii" />
diff --git a/opendj-config/src/main/resources/stylesheets/preprocessor.xsl b/opendj-config/src/main/resources/stylesheets/preprocessor.xsl
index 2f40d7e..91dc928 100644
--- a/opendj-config/src/main/resources/stylesheets/preprocessor.xsl
+++ b/opendj-config/src/main/resources/stylesheets/preprocessor.xsl
@@ -24,8 +24,8 @@
! Copyright 2008-2010 Sun Microsystems, Inc.
! Portions copyright 2011 ForgeRock AS.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
- xmlns:admpp="http://www.opends.org/admin-preprocessor"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:admpp="http://opendj.forgerock.org/admin-preprocessor"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
xmlns:file="xalan://java.io.File">
@@ -273,7 +273,7 @@
<xsl:apply-templates mode="pre-process">
<xsl:with-param name="moname" select="'root'" />
<xsl:with-param name="mopackage"
- select="'org.forgerock.opendj.admin'" />
+ select="'org.forgerock.opendj.server.config'" />
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
@@ -310,7 +310,7 @@
<xsl:variable name="uri">
<xsl:call-template name="get-managed-object-uri">
<xsl:with-param name="package"
- select="'org.forgerock.opendj.admin'" />
+ select="'org.forgerock.opendj.server.config'" />
<xsl:with-param name="name" select="'root'" />
</xsl:call-template>
</xsl:variable>
@@ -1167,7 +1167,7 @@
<xsl:value-of select="$this/@package" />
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="'org.forgerock.opendj.admin'" />
+ <xsl:value-of select="'org.forgerock.opendj.server.config'" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
diff --git a/opendj-config/src/main/resources/stylesheets/property-types.xsl b/opendj-config/src/main/resources/stylesheets/property-types.xsl
index 272d89f..1e2fa57 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008-2010 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="java-utilities.xsl" />
<!--
@@ -108,13 +108,13 @@
required by the property's definition and its values.
By default assume that the definition type is in
- org.opends.server.admin and is derived directly from the
+ org.forgerock.opendj.config and is derived directly from the
java-definition-type (might not be the case for parameterized
types. In addition pull in the value imports.
-->
<xsl:template match="*" mode="java-definition-imports">
<xsl:element name="import">
- <xsl:value-of select="'org.opends.server.admin.'" />
+ <xsl:value-of select="'org.forgerock.opendj.config.'" />
<xsl:apply-templates select="." mode="java-definition-type" />
</xsl:element>
<xsl:apply-templates select="." mode="java-value-imports">
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/aci.xsl b/opendj-config/src/main/resources/stylesheets/property-types/aci.xsl
index 2bf2bde..b0f5b19 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/aci.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/aci.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing dseecompat ACI.
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/aggregation.xsl b/opendj-config/src/main/resources/stylesheets/property-types/aggregation.xsl
index a26c835..47bf072 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/aggregation.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/aggregation.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008-2010 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="../java-utilities.xsl" />
<xsl:include href="../conditions.xsl" />
@@ -46,13 +46,13 @@
<import>java.util.TreeSet</import>
</xsl:if>
<xsl:if test="adm:constraint/adm:target-needs-enabling-condition">
- <import>org.opends.server.admin.condition.Conditions</import>
+ <import>org.forgerock.opendj.config.conditions.Conditions</import>
</xsl:if>
<xsl:if test="adm:constraint/adm:target-is-enabled-condition">
- <import>org.opends.server.admin.condition.Conditions</import>
+ <import>org.forgerock.opendj.config.conditions.Conditions</import>
</xsl:if>
<import>
- org.opends.server.admin.AggregationPropertyDefinition
+ org.forgerock.opendj.config.AggregationPropertyDefinition
</import>
</xsl:template>
<xsl:template match="adm:aggregation" mode="java-value-type">
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/attribute-type.xsl b/opendj-config/src/main/resources/stylesheets/property-types/attribute-type.xsl
index 1093afd..0bd3e12 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/attribute-type.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/attribute-type.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing attribute type properties.
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/boolean.xsl b/opendj-config/src/main/resources/stylesheets/property-types/boolean.xsl
index 78fb109..83f196c 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/boolean.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/boolean.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing boolean properties.
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/dn.xsl b/opendj-config/src/main/resources/stylesheets/property-types/dn.xsl
index 5ad0e02..22a72e9 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/dn.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/dn.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing DN properties.
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/duration.xsl b/opendj-config/src/main/resources/stylesheets/property-types/duration.xsl
index 64aea1d..f1a4e58 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/duration.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/duration.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing duration properties.
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/enumeration.xsl b/opendj-config/src/main/resources/stylesheets/property-types/enumeration.xsl
index c318e4f..e9d4c4e 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/enumeration.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/enumeration.xsl
@@ -23,8 +23,8 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
- xmlns:admpp="http://www.opends.org/admin-preprocessor"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:admpp="http://opendj.forgerock.org/admin-preprocessor"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing enumeration properties.
@@ -64,7 +64,7 @@
mode="java-definition-imports">
<xsl:element name="import">
<xsl:value-of
- select="'org.opends.server.admin.EnumPropertyDefinition'" />
+ select="'org.forgerock.opendj.config.EnumPropertyDefinition'" />
</xsl:element>
<xsl:variable name="pp"
select="../../adm:profile[@name='preprocessor']" />
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/extensible-matching-rule-type.xsl b/opendj-config/src/main/resources/stylesheets/property-types/extensible-matching-rule-type.xsl
index cce9b93..b70778d 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/extensible-matching-rule-type.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/extensible-matching-rule-type.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2009 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing extensible matching rule type properties.
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/integer.xsl b/opendj-config/src/main/resources/stylesheets/property-types/integer.xsl
index 0fef6c6..174fe32 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/integer.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/integer.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing integer properties.
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/ip-address-mask.xsl b/opendj-config/src/main/resources/stylesheets/property-types/ip-address-mask.xsl
index 6984e31..b9ece9e 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/ip-address-mask.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/ip-address-mask.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing IP address mask properties.
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/ip-address.xsl b/opendj-config/src/main/resources/stylesheets/property-types/ip-address.xsl
index bacdb53..a2d3070 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/ip-address.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/ip-address.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing IP address properties.
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/java-class.xsl b/opendj-config/src/main/resources/stylesheets/property-types/java-class.xsl
index 7c474b6..6e5fec5 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/java-class.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/java-class.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing java class properties.
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/oid.xsl b/opendj-config/src/main/resources/stylesheets/property-types/oid.xsl
index d9c9a4b..73c9a5f 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/oid.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/oid.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing OID properties.
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/password.xsl b/opendj-config/src/main/resources/stylesheets/property-types/password.xsl
index 7b7be3d..f58389e 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/password.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/password.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing password properties.
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/size.xsl b/opendj-config/src/main/resources/stylesheets/property-types/size.xsl
index 9f0e1d7..446ccb7 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/size.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/size.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing size properties.
diff --git a/opendj-config/src/main/resources/stylesheets/property-types/string.xsl b/opendj-config/src/main/resources/stylesheets/property-types/string.xsl
index 99571ee..c60cf61 100644
--- a/opendj-config/src/main/resources/stylesheets/property-types/string.xsl
+++ b/opendj-config/src/main/resources/stylesheets/property-types/string.xsl
@@ -23,7 +23,7 @@
!
! Copyright 2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Templates for processing string properties.
diff --git a/opendj-config/src/main/resources/stylesheets/serverMO.xsl b/opendj-config/src/main/resources/stylesheets/serverMO.xsl
index f65c033..45e49a6 100644
--- a/opendj-config/src/main/resources/stylesheets/serverMO.xsl
+++ b/opendj-config/src/main/resources/stylesheets/serverMO.xsl
@@ -23,8 +23,8 @@
!
! Copyright 2007-2008 Sun Microsystems, Inc.
! -->
-<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
- xmlns:admpp="http://www.opends.org/admin-preprocessor"
+<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:admpp="http://opendj.forgerock.org/admin-preprocessor"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="java-utilities.xsl" />
<xsl:import href="preprocessor.xsl" />
@@ -363,24 +363,24 @@
</xsl:if>
</xsl:when>
<xsl:otherwise>
- <import>org.opends.server.admin.Configuration</import>
+ <import>org.forgerock.opendj.config.Configuration</import>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="not($this-is-root)">
<import>
- org.opends.server.admin.server.ConfigurationChangeListener
+ org.forgerock.opendj.config.server.ConfigurationChangeListener
</import>
</xsl:if>
<xsl:if test="$this-local-relations">
- <import>org.opends.server.config.ConfigException</import>
+ <import>org.forgerock.opendj.config.server.ConfigException</import>
</xsl:if>
<xsl:if
test="$this-local-relations/adm:one-to-zero-or-one|$this-local-relations/adm:one-to-many">
<import>
- org.opends.server.admin.server.ConfigurationAddListener
+ org.forgerock.opendj.config.server.ConfigurationAddListener
</import>
<import>
- org.opends.server.admin.server.ConfigurationDeleteListener
+ org.forgerock.opendj.config.server.ConfigurationDeleteListener
</import>
</xsl:if>
</xsl:with-param>
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/AbstractManagedObjectDefinitionTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/AbstractManagedObjectDefinitionTest.java
new file mode 100644
index 0000000..47c053a
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/AbstractManagedObjectDefinitionTest.java
@@ -0,0 +1,211 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import static org.fest.assertions.Assertions.*;
+import static org.testng.Assert.*;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.DefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.RelationDefinition;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings({ "javadoc", "unchecked", "rawtypes" })
+@Test(singleThreaded = true)
+public class AbstractManagedObjectDefinitionTest extends ConfigTestCase {
+
+ /** A test managed object definition. */
+ private static class ManagedObjectDef extends AbstractManagedObjectDefinition {
+
+ protected ManagedObjectDef(String name, AbstractManagedObjectDefinition parent) {
+ super(name, parent);
+ }
+ }
+
+ private ManagedObjectDef top = new ManagedObjectDef("topmost", null);
+
+ private ManagedObjectDef middle1 = new ManagedObjectDef("middle1", top);
+
+ private ManagedObjectDef middle2 = new ManagedObjectDef("middle2", top);
+
+ private ManagedObjectDef bottom1 = new ManagedObjectDef("bottom1", middle1);
+
+ private ManagedObjectDef bottom2 = new ManagedObjectDef("bottom2", middle1);
+
+ private ManagedObjectDef bottom3 = new ManagedObjectDef("bottom3", middle1);
+
+ @BeforeClass
+ public void setUp() throws Exception {
+ TestCfg.setUp();
+ }
+
+ @AfterClass
+ public void tearDown() {
+ TestCfg.cleanup();
+ }
+
+ @DataProvider(name = "isChildOf")
+ public Object[][] createIsChildOf() {
+ return new Object[][] {
+ // child def, parent def, is child of
+ { top, top, true },
+ { middle1, middle1, true },
+ { bottom1, bottom1, true },
+ { top, middle1, false },
+ { top, bottom1, false },
+ { middle1, top, true },
+ { bottom1, top, true },
+ { bottom1, middle1, true },
+ };
+ }
+
+ @Test(dataProvider = "isChildOf")
+ public void testIsChildOf(ManagedObjectDef childDef, ManagedObjectDef parentDef, boolean expectedIsChildOf) {
+ assertEquals(childDef.isChildOf(parentDef), expectedIsChildOf);
+ }
+
+ @DataProvider(name = "isParentOf")
+ public Object[][] createIsParentOf() {
+ return new Object[][] {
+ // parent def, child def, is parent of
+ { top, top, true },
+ { middle1, middle1, true },
+ { bottom1, bottom1, true },
+ { top, middle1, true },
+ { top, bottom1, true },
+ { middle1, top, false },
+ { bottom1, top, false },
+ { bottom1, middle1, false },
+ };
+ }
+
+ @Test(dataProvider = "isParentOf")
+ public void testIsParentOf(ManagedObjectDef parentDef, ManagedObjectDef childDef, boolean expectedIsParentOf) {
+ assertEquals(parentDef.isParentOf(childDef), expectedIsParentOf);
+ }
+
+ @Test
+ public void testGetAllChildrenOfTop() {
+ Collection<AbstractManagedObjectDefinition> children = top.getAllChildren();
+ assertThat(children).hasSize(5);
+ assertThat(children).containsOnly(middle1, middle2, bottom1, bottom2, bottom3);
+ }
+
+ @Test
+ public void testGetAllChildrenOfMiddle() {
+ Collection<AbstractManagedObjectDefinition> children = middle1.getAllChildren();
+ assertThat(children).hasSize(3);
+ assertThat(children).containsOnly(bottom1, bottom2, bottom3);
+ }
+
+ @Test
+ public void testGetAllChildrenNoChild() {
+ Collection<AbstractManagedObjectDefinition> children = middle2.getAllChildren();
+ assertThat(children).isEmpty();
+ }
+
+ @Test
+ public void testGetChildrenTop() {
+ Collection<AbstractManagedObjectDefinition> children = top.getChildren();
+ assertThat(children).hasSize(2);
+ assertThat(children).containsOnly(middle1, middle2);
+ }
+
+ @Test
+ public void testGetChildrenMiddleNoChild() {
+ Collection<AbstractManagedObjectDefinition> children = middle2.getChildren();
+ assertThat(children).isEmpty();
+ }
+
+ /** Check default value of "class" property provided for parent. */
+ @Test
+ public void testPropertyOverrideParent() {
+ AbstractManagedObjectDefinition<?, ?> def = TestParentCfgDefn.getInstance();
+ PropertyDefinition<?> propertyDef = def.getPropertyDefinition("mandatory-class-property");
+ DefaultBehaviorProvider<?> provider = propertyDef.getDefaultBehaviorProvider();
+ assertEquals(provider.getClass(), DefinedDefaultBehaviorProvider.class);
+
+ DefinedDefaultBehaviorProvider<?> definedProvider = (DefinedDefaultBehaviorProvider<?>) provider;
+ assertEquals(definedProvider.getDefaultValues(),
+ Collections.singleton("org.opends.server.extensions.SomeVirtualAttributeProvider"));
+ }
+
+ /** Check default value of "class" property provided for child. */
+ @Test
+ public void testPropertyOverrideChild() {
+ AbstractManagedObjectDefinition<?, ?> def = TestChildCfgDefn.getInstance();
+ PropertyDefinition<?> propertyDef = def.getPropertyDefinition("mandatory-class-property");
+ DefaultBehaviorProvider<?> provider = propertyDef.getDefaultBehaviorProvider();
+ assertEquals(provider.getClass(), DefinedDefaultBehaviorProvider.class);
+
+ DefinedDefaultBehaviorProvider<?> definedProvider = (DefinedDefaultBehaviorProvider<?>) provider;
+ assertEquals(definedProvider.getDefaultValues(),
+ Collections.singleton("org.opends.server.extensions.UserDefinedVirtualAttributeProvider"));
+ }
+
+ @Test
+ public void testGetReverseRelationDefinitions() {
+ Collection<RelationDefinition<TestParentCfgClient, TestParentCfg>> parentRelDef =
+ TestParentCfgDefn.getInstance().getReverseRelationDefinitions();
+
+ assertThat(parentRelDef).hasSize(2);
+ assertThat(parentRelDef).contains(TestCfg.getTestOneToManyParentRelationDefinition());
+ assertThat(parentRelDef).contains(TestCfg.getTestOneToZeroOrOneParentRelationDefinition());
+
+ Collection<RelationDefinition<TestChildCfgClient, TestChildCfg>> childRelDef = TestChildCfgDefn.getInstance()
+ .getReverseRelationDefinitions();
+
+ assertThat(childRelDef).hasSize(2);
+ assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getTestChildrenRelationDefinition());
+ assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getOptionalTestChildRelationDefinition());
+ }
+
+ @Test
+ public void testGetAllReverseRelationDefinitions() {
+ Collection<RelationDefinition<? super TestParentCfgClient, ? super TestParentCfg>> parentRelDef =
+ TestParentCfgDefn.getInstance().getAllReverseRelationDefinitions();
+
+ assertThat(parentRelDef).hasSize(2);
+ assertThat(parentRelDef).contains(TestCfg.getTestOneToManyParentRelationDefinition());
+ assertThat(parentRelDef).contains(TestCfg.getTestOneToZeroOrOneParentRelationDefinition());
+
+ Collection<RelationDefinition<? super TestChildCfgClient, ? super TestChildCfg>> childRelDef =
+ TestChildCfgDefn.getInstance().getAllReverseRelationDefinitions();
+
+ assertThat(childRelDef).hasSize(2);
+ assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getTestChildrenRelationDefinition());
+ assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getOptionalTestChildRelationDefinition());
+ }
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/AdminTestCase.java b/opendj-config/src/test/java/org/forgerock/opendj/config/AdminTestCase.java
new file mode 100644
index 0000000..c2797aa
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/AdminTestCase.java
@@ -0,0 +1,125 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static org.mockito.Mockito.*;
+
+import org.forgerock.opendj.server.config.server.RootCfg;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.config.server.ServerManagementContext;
+import org.forgerock.opendj.config.server.spi.ConfigurationRepository;
+import org.forgerock.opendj.ldap.Entry;
+import org.forgerock.opendj.ldif.LDIF;
+import org.testng.annotations.Test;
+
+/**
+ * An abstract class that all admin unit tests should extend.
+ */
+@SuppressWarnings("javadoc")
+@Test(groups = { "precommit", "admin" }, singleThreaded = true)
+public abstract class AdminTestCase extends ConfigTestCase {
+
+ /**
+ * Create a mock of ConfigurationRepository with provided entries registered.
+ */
+ protected final ConfigurationRepository createConfigRepositoryWithEntries(final Entry...entries) throws Exception {
+ ConfigurationRepository configRepository = mock(ConfigurationRepository.class);
+ for (Entry entry : entries) {
+ when(configRepository.getEntry(entry.getName())).thenReturn(entry);
+ when(configRepository.hasEntry(entry.getName())).thenReturn(true);
+ }
+ return configRepository;
+ }
+
+ /** Returns the name used for the provided entry (the value of the cn attribute) */
+ protected final String entryName(final Entry entry) {
+ return entry.getName().rdn().getFirstAVA().getAttributeValue().toString();
+ }
+
+ /** Gets the named parent configuration corresponding to the provided entry */
+ protected final TestParentCfg getParentCfg(final Entry entry, final ServerManagementContext serverContext)
+ throws Exception {
+ return getParentCfg(entryName(entry), serverContext);
+ }
+
+ /** Gets the named parent configuration corresponding to provided name. */
+ protected final TestParentCfg getParentCfg(final String name, final ServerManagementContext serverContext)
+ throws Exception {
+ ServerManagedObject<RootCfg> root = serverContext.getRootConfigurationManagedObject();
+ TestParentCfg parent = root.getChild(TestCfg.getTestOneToManyParentRelationDefinition(), name)
+ .getConfiguration();
+ return parent;
+ }
+
+ protected static final Entry CONFIG_ENTRY = LDIF.makeEntry(
+ "dn: cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: config");
+
+ protected static final Entry CONN_HANDLER_ENTRY = LDIF.makeEntry(
+ "dn: cn=Connection Handlers,cn=config",
+ "objectClass: top",
+ "objectClass: ds-cfg-branch",
+ "cn: Connection Handlers");
+
+ protected static final Entry LDAP_CONN_HANDLER_ENTRY = LDIF.makeEntry(
+ "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-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler",
+ "ds-cfg-enabled: true",
+ "ds-cfg-listen-address: 0.0.0.0", "ds-cfg-listen-port: 389");
+
+ protected static final Entry LDAPS_CONN_HANDLER_ENTRY = LDIF.makeEntry(
+ "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-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler",
+ "ds-cfg-enabled: false",
+ "ds-cfg-listen-address: 0.0.0.0",
+ "ds-cfg-listen-port: 636",
+ "ds-cfg-use-ssl: true",
+ "ds-cfg-ssl-client-auth-policy: optional",
+ "ds-cfg-ssl-cert-nickname: server-cert",
+ "ds-cfg-key-manager-provider: cn=JKS,cn=Key Manager Providers,cn=config",
+ "ds-cfg-trust-manager-provider: cn=JKS,cn=Trust Manager Providers,cn=config");
+
+ protected static final Entry JMX_CONN_HANDLER_ENTRY = LDIF.makeEntry(
+ "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-java-class: org.opends.server.protocols.jmx.JmxConnectionHandler",
+ "ds-cfg-enabled: false",
+ "ds-cfg-listen-port: 1689");
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/AggregationPropertyDefinitionTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/AggregationPropertyDefinitionTest.java
new file mode 100644
index 0000000..bd36637
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/AggregationPropertyDefinitionTest.java
@@ -0,0 +1,80 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import org.forgerock.opendj.config.AggregationPropertyDefinition;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.ldap.DN;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+@Test(singleThreaded = true)
+public class AggregationPropertyDefinitionTest extends ConfigTestCase {
+
+ @BeforeClass
+ public void setUp() throws Exception {
+ TestCfg.setUp();
+ }
+
+ @AfterClass
+ public void tearDown() {
+ TestCfg.cleanup();
+ }
+
+ /** Tests that the {@link AggregationPropertyDefinition#normalizeValue(String)} works. */
+ @Test
+ public void testNormalizeValue() throws Exception {
+ TestChildCfgDefn definition = TestChildCfgDefn.getInstance();
+ AggregationPropertyDefinition<?, ?> propertyDef = definition.getAggregationPropertyPropertyDefinition();
+ String nvalue = propertyDef.normalizeValue(" LDAP connection handler ");
+ Assert.assertEquals(nvalue, "ldap connection handler");
+ }
+
+ /** Tests that the {@link AggregationPropertyDefinition#getChildDN(String)} works. */
+ @Test
+ public void testGetChildDN() throws Exception {
+ TestChildCfgDefn definition = TestChildCfgDefn.getInstance();
+ AggregationPropertyDefinition<?, ?> propertyDef = definition.getAggregationPropertyPropertyDefinition();
+ DN expected = DN.valueOf("cn=ldap connection handler, cn=connection handlers, cn=config");
+ DN actual = propertyDef.getChildDN(" LDAP connection handler ");
+ Assert.assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testGetChildPath() throws Exception {
+ TestChildCfgDefn definition = TestChildCfgDefn.getInstance();
+ AggregationPropertyDefinition<?, ?> propertyDef = definition.getAggregationPropertyPropertyDefinition();
+ ManagedObjectPath<?, ?> path = propertyDef.getChildPath("LDAP connection handler");
+
+ Assert.assertSame(path.getManagedObjectDefinition(), propertyDef.getRelationDefinition().getChildDefinition());
+ Assert.assertSame(path.getRelationDefinition(), propertyDef.getRelationDefinition());
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/AttributeTypePropertyDefinitionTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/AttributeTypePropertyDefinitionTest.java
new file mode 100644
index 0000000..d401087
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/AttributeTypePropertyDefinitionTest.java
@@ -0,0 +1,91 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static org.testng.Assert.*;
+
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.AttributeTypePropertyDefinition;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.ldap.schema.AttributeType;
+import org.forgerock.opendj.ldap.schema.Schema;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class AttributeTypePropertyDefinitionTest extends ConfigTestCase {
+
+ @Test
+ public void testValidateValue() {
+ AttributeTypePropertyDefinition propertyDef = createPropertyDefinition();
+ propertyDef.validateValue(Schema.getDefaultSchema().getAttributeType("cn"), new PropertyDefinitionsOptions());
+ }
+
+ @DataProvider(name = "valueLegalData")
+ public Object[][] createValidateValueLegalData() {
+ return new Object[][] { { "cn" }, { "o" }, { "ou" } };
+ }
+
+ @Test(dataProvider = "valueLegalData")
+ public void testDecodeValue(String value) {
+ AttributeTypePropertyDefinition propertyDef = createPropertyDefinition();
+ AttributeType expected = Schema.getDefaultSchema().getAttributeType(value);
+ assertEquals(propertyDef.decodeValue(value, new PropertyDefinitionsOptions()), expected);
+ }
+
+ @Test(dataProvider = "valueLegalData")
+ public void testEncodeValue(String value) {
+ AttributeTypePropertyDefinition propertyDef = createPropertyDefinition();
+ assertEquals(propertyDef.encodeValue(propertyDef.decodeValue(value, new PropertyDefinitionsOptions())), value);
+ }
+
+ @DataProvider(name = "valueIllegalData")
+ public Object[][] createValidateValueIllegalData() {
+ return new Object[][] { { "dummy-type-xxx" } };
+ }
+
+ @Test(dataProvider = "valueIllegalData", expectedExceptions = { IllegalPropertyValueStringException.class })
+ public void testDecodeValueIllegal(String value) {
+ AttributeTypePropertyDefinition propertyDef = createPropertyDefinition();
+ propertyDef.decodeValue(value, new PropertyDefinitionsOptions());
+ }
+
+ @Test(dataProvider = "valueIllegalData")
+ public void testDecodeValueIllegalNoSchemaCheck(String value) {
+ AttributeTypePropertyDefinition propertyDef = createPropertyDefinition();
+ AttributeType type = propertyDef.decodeValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ assertEquals(type.getNameOrOID(), value);
+ }
+
+ // Create a new definition.
+ private AttributeTypePropertyDefinition createPropertyDefinition() {
+ AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(
+ RootCfgDefn.getInstance(), "test-property");
+ return builder.getInstance();
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/BooleanPropertyDefinitionTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/BooleanPropertyDefinitionTest.java
new file mode 100644
index 0000000..62f0bf8
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/BooleanPropertyDefinitionTest.java
@@ -0,0 +1,87 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static org.testng.Assert.*;
+
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.BooleanPropertyDefinition;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class BooleanPropertyDefinitionTest extends ConfigTestCase {
+
+ BooleanPropertyDefinition.Builder builder = null;
+
+ @BeforeClass
+ public void setUp() throws Exception {
+ builder = BooleanPropertyDefinition.createBuilder(RootCfgDefn.getInstance(), "test-property");
+ }
+
+ @Test
+ public void testValidateValue() {
+ BooleanPropertyDefinition def = createPropertyDefinition();
+ def.validateValue(Boolean.TRUE, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @Test(expectedExceptions = NullPointerException.class)
+ public void testValidateValueIllegal() {
+ BooleanPropertyDefinition def = createPropertyDefinition();
+ def.validateValue(null, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @DataProvider(name = "decodeValueData")
+ public Object[][] createValidateValueData() {
+ return new Object[][] { { "false", Boolean.FALSE }, { "true", Boolean.TRUE } };
+ }
+
+ @Test(dataProvider = "decodeValueData")
+ public void testDecodeValue(String value, Boolean expected) {
+ BooleanPropertyDefinition def = createPropertyDefinition();
+ assertEquals(def.decodeValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS), expected);
+ }
+
+ @DataProvider(name = "decodeValueDataIllegal")
+ public Object[][] createValidateValueDataIllegal() {
+ return new Object[][] { { null }, { "abc" } };
+ }
+
+ @Test(dataProvider = "decodeValueDataIllegal", expectedExceptions = { NullPointerException.class,
+ IllegalPropertyValueStringException.class })
+ public void testDecodeValueIllegal(String value) {
+ BooleanPropertyDefinition def = createPropertyDefinition();
+ def.decodeValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ private BooleanPropertyDefinition createPropertyDefinition() {
+ return builder.getInstance();
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/ClassPropertyDefinitionTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/ClassPropertyDefinitionTest.java
new file mode 100644
index 0000000..c08caec
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/ClassPropertyDefinitionTest.java
@@ -0,0 +1,146 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
+ */
+
+package org.forgerock.opendj.config;
+
+import static org.testng.Assert.*;
+
+import java.util.Comparator;
+import java.util.List;
+
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.ClassPropertyDefinition;
+import org.forgerock.opendj.config.IllegalPropertyValueException;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class ClassPropertyDefinitionTest extends ConfigTestCase {
+
+ // Dummy class used in tests.
+ public static final class Dummy {
+ public class X {
+ // no implementation
+ }
+
+ public Comparator<Dummy> comparator() {
+ return new Comparator<ClassPropertyDefinitionTest.Dummy>() {
+ public int compare(Dummy o1, Dummy o2) {
+ // No implementation required.
+ return 0;
+ }
+ };
+ }
+ }
+
+ ClassPropertyDefinition.Builder builder = null;
+
+ @DataProvider(name = "validClassNames")
+ public Object[][] createBuilderAddInstanceOfData() {
+ return new Object[][] {
+ { "org.forgerock.opendj.config.ClassPropertyDefinitionTest" },
+ { "org.forgerock.opendj.config.ClassPropertyDefinitionTest$Dummy" },
+ { "org.forgerock.opendj.config.ClassPropertyDefinitionTest$Dummy$X" },
+ { "org.forgerock.opendj.config.ClassPropertyDefinitionTest$Dummy$1" }, };
+ }
+
+ @Test(dataProvider = "validClassNames")
+ public void testBuilderAddInstanceOf(String classNameToAdd) {
+ ClassPropertyDefinition.Builder localBuilder = ClassPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
+ "test-property");
+ localBuilder.addInstanceOf(classNameToAdd);
+ ClassPropertyDefinition propertyDef = localBuilder.getInstance();
+ List<String> instances = propertyDef.getInstanceOfInterface();
+ assertTrue(instances.contains(classNameToAdd));
+ }
+
+ @DataProvider(name = "invalidClassNames")
+ public Object[][] createBuilderAddInstanceOfDataInvalid() {
+ return new Object[][] {
+ { "1" },
+ { "" },
+ { " " },
+ { " " },
+ { "abc." },
+ { "abc.123" },
+ { "abc.123$" },
+ };
+ }
+
+ @Test(dataProvider = "invalidClassNames", expectedExceptions = { IllegalArgumentException.class })
+ public void testBuilderAddInstanceInvalid(String className) {
+ ClassPropertyDefinition.Builder localBuilder = ClassPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
+ "test-property");
+ localBuilder.addInstanceOf(className);
+ ClassPropertyDefinition propertyDef = localBuilder.getInstance();
+ List<String> instances = propertyDef.getInstanceOfInterface();
+ assertTrue(instances.contains(className));
+ }
+
+ /**
+ * @return data for testing with illegal values
+ */
+ @DataProvider(name = "loadClasses")
+ public Object[][] createLoadData() {
+ return new Object[][] {
+ { "java.io.Serializable", "java.lang.String", Object.class, String.class },
+ { "java.io.Serializable", "java.lang.String", String.class, String.class },
+ // abstractclass
+ { "java.lang.Number", "java.lang.Long", Number.class, Long.class }, };
+ }
+
+ @Test(dataProvider = "loadClasses")
+ public <T> void testLoadClass(String interfaceName, String loadClassName, Class<T> instanceOfClass,
+ Class<?> expectedClass) {
+ ClassPropertyDefinition.Builder localBuilder = ClassPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
+ "test-property");
+ localBuilder.addInstanceOf(interfaceName);
+ ClassPropertyDefinition propertyDef = localBuilder.getInstance();
+ Class<?> clazz = propertyDef.loadClass(loadClassName, instanceOfClass);
+ assertEquals(clazz, expectedClass);
+ }
+
+ @DataProvider(name = "loadClassesIllegal")
+ public Object[][] createLoadDataIllegal() {
+ return new Object[][] {
+ { "java.lang.Runnable", "java.lang.String", Object.class, String.class },
+ { "java.lang.Runnable", "some.bogus.ClassName", Object.class, String.class },
+ { "java.lang.Runnable", "java.lang.String", Number.class, Number.class }, };
+ }
+
+ @Test(dataProvider = "loadClassesIllegal", expectedExceptions = { IllegalPropertyValueException.class })
+ public <T> void testLoadClassIllegal(String interfaceName, String loadClassName, Class<T> instanceOfClass,
+ Class<?> expectedClass) {
+ ClassPropertyDefinition.Builder localBuilder = ClassPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
+ "test-property");
+ localBuilder.addInstanceOf(interfaceName);
+ ClassPropertyDefinition propertyDef = localBuilder.getInstance();
+ Class<?> clazz = propertyDef.loadClass(loadClassName, instanceOfClass);
+ assertEquals(clazz, String.class);
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/ConfigurationMock.java b/opendj-config/src/test/java/org/forgerock/opendj/config/ConfigurationMock.java
index 32f2082..f255f9a 100644
--- a/opendj-config/src/test/java/org/forgerock/opendj/config/ConfigurationMock.java
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/ConfigurationMock.java
@@ -33,19 +33,19 @@
import java.util.SortedSet;
import java.util.TreeSet;
+import org.forgerock.opendj.config.AbsoluteInheritedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.AliasDefaultBehaviorProvider;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.DefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefaultBehaviorProviderVisitor;
+import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.PropertyOption;
+import org.forgerock.opendj.config.RelativeInheritedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider;
import org.mockito.invocation.InvocationOnMock;
-import org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider;
-import org.opends.server.admin.AliasDefaultBehaviorProvider;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.DefaultBehaviorProvider;
-import org.opends.server.admin.DefaultBehaviorProviderVisitor;
-import org.opends.server.admin.DefinedDefaultBehaviorProvider;
-import org.opends.server.admin.ManagedObjectDefinition;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.PropertyOption;
-import org.opends.server.admin.RelativeInheritedDefaultBehaviorProvider;
-import org.opends.server.admin.UndefinedDefaultBehaviorProvider;
/**
* Provides Mockito mocks for Configuration objects with default values
@@ -116,11 +116,12 @@
/**
* Retrieve class name of definition from class name of configuration.
* <p>
- * Convert class name "[package].admin.server.FooCfg" to
- * "[package].admin.meta.FooCfgDef"
+ * Convert class name "[package].server.FooCfg" to "[package].meta.FooCfgDef"
*/
private String toDefinitionClassName(String configClassName) {
- return configClassName.replaceAll("\\.admin\\.server", ".admin.meta") + "Defn";
+ int finalDot = configClassName.lastIndexOf('.');
+ return configClassName.substring(0, finalDot - 6) + "meta."
+ + configClassName.substring(finalDot + 1) + "Defn";
}
/**
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/ConfigurationMockTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/ConfigurationMockTest.java
index a6f1983..b34e62f 100644
--- a/opendj-config/src/test/java/org/forgerock/opendj/config/ConfigurationMockTest.java
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/ConfigurationMockTest.java
@@ -28,11 +28,11 @@
import static org.fest.assertions.Assertions.*;
import static org.forgerock.opendj.config.ConfigurationMock.*;
-import org.forgerock.opendj.admin.meta.PluginCfgDefn.PluginType;
-import org.forgerock.opendj.admin.server.AttributeCleanupPluginCfg;
-import org.forgerock.opendj.admin.server.CollectiveAttributeSubentriesVirtualAttributeCfg;
-import org.forgerock.opendj.admin.server.GoverningStructureRuleVirtualAttributeCfg;
-import org.forgerock.opendj.admin.server.LDAPConnectionHandlerCfg;
+import org.forgerock.opendj.server.config.meta.PluginCfgDefn.PluginType;
+import org.forgerock.opendj.server.config.server.AttributeCleanupPluginCfg;
+import org.forgerock.opendj.server.config.server.CollectiveAttributeSubentriesVirtualAttributeCfg;
+import org.forgerock.opendj.server.config.server.GoverningStructureRuleVirtualAttributeCfg;
+import org.forgerock.opendj.server.config.server.LDAPConnectionHandlerCfg;
import org.forgerock.opendj.ldap.schema.Schema;
import org.testng.annotations.Test;
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/DNPropertyDefinitionTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/DNPropertyDefinitionTest.java
new file mode 100644
index 0000000..711ecde
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/DNPropertyDefinitionTest.java
@@ -0,0 +1,131 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import static org.testng.Assert.assertEquals;
+
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.DNPropertyDefinition;
+import org.forgerock.opendj.config.IllegalPropertyValueException;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.ldap.DN;
+import org.opends.server.types.DirectoryException;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class DNPropertyDefinitionTest extends ConfigTestCase {
+
+ @DataProvider(name = "baseDN")
+ public Object[][] createBuilderSetBaseDN() {
+ return new Object[][] {
+ { null },
+ { "cn=key manager providers, cn=config" } };
+ }
+
+
+ @Test(dataProvider = "baseDN")
+ public void testBuilderSetBaseDN(String baseDN) throws DirectoryException {
+ DNPropertyDefinition.Builder localBuilder = DNPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
+ "test-property");
+ localBuilder.setBaseDN(baseDN);
+ DNPropertyDefinition propertyDef = localBuilder.getInstance();
+
+ DN actual = propertyDef.getBaseDN();
+ DN expected = baseDN == null ? null : DN.valueOf(baseDN);
+
+ assertEquals(actual, expected);
+ }
+
+ @DataProvider(name = "legalValues")
+ public Object[][] createLegalValues() {
+ return new Object[][] {
+ // base DN, value to validate
+ { null, "cn=config" },
+ { null, "dc=example,dc=com" },
+ { "", "cn=config" },
+ { "cn=config", "cn=key manager providers, cn=config" },
+ { "cn=key manager providers, cn=config", "cn=my provider, cn=key manager providers, cn=config" },
+ };
+ }
+
+ @DataProvider(name = "illegalValues")
+ public Object[][] createIllegalValues() {
+ return new Object[][] {
+ // Above base DN.
+ { "cn=config", "" },
+
+ // Same as base DN.
+ { "cn=config", "cn=config" },
+
+ // Same as base DN.
+ { "cn=key manager providers, cn=config", "cn=key manager providers, cn=config" },
+
+ // Too far beneath base DN.
+ { "cn=config", "cn=my provider, cn=key manager providers, cn=config" },
+
+ // Unrelated to base DN.
+ { "cn=config", "dc=example, dc=com" }, };
+ }
+
+ @Test(dataProvider = "legalValues")
+ public void testValidateLegalValues(String baseDN, String valueToValidate) throws DirectoryException {
+ DNPropertyDefinition.Builder localBuilder = DNPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
+ "test-property");
+ localBuilder.setBaseDN(baseDN);
+ DNPropertyDefinition propertyDef = localBuilder.getInstance();
+ propertyDef.validateValue(DN.valueOf(valueToValidate), PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @Test(dataProvider = "illegalValues", expectedExceptions = IllegalPropertyValueException.class)
+ public void testValidateIllegalValues(String baseDN, String valueToValidate) throws DirectoryException {
+ DNPropertyDefinition.Builder localBuilder = DNPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
+ "test-property");
+ localBuilder.setBaseDN(baseDN);
+ DNPropertyDefinition propertyDef = localBuilder.getInstance();
+ propertyDef.validateValue(DN.valueOf(valueToValidate), PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @Test(dataProvider = "legalValues")
+ public void testDecodeLegalValues(String baseDN, String valueToValidate) {
+ DNPropertyDefinition.Builder localBuilder = DNPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
+ "test-property");
+ localBuilder.setBaseDN(baseDN);
+ DNPropertyDefinition propertyDef = localBuilder.getInstance();
+ propertyDef.decodeValue(valueToValidate, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @Test(dataProvider = "illegalValues", expectedExceptions = IllegalPropertyValueStringException.class)
+ public void testDecodeIllegalValues(String baseDN, String valueToValidate) {
+ DNPropertyDefinition.Builder localBuilder = DNPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
+ "test-property");
+ localBuilder.setBaseDN(baseDN);
+ DNPropertyDefinition propertyDef = localBuilder.getInstance();
+ propertyDef.decodeValue(valueToValidate, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/DurationPropertyDefinitionTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/DurationPropertyDefinitionTest.java
new file mode 100644
index 0000000..49220d3
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/DurationPropertyDefinitionTest.java
@@ -0,0 +1,364 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import static org.fest.assertions.Assertions.*;
+import static org.testng.Assert.*;
+
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.DefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefaultBehaviorProviderVisitor;
+import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.DurationPropertyDefinition;
+import org.forgerock.opendj.config.DurationUnit;
+import org.forgerock.opendj.config.IllegalPropertyValueException;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyDefinitionVisitor;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.PropertyOption;
+import org.forgerock.opendj.config.UnknownPropertyDefinitionException;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class DurationPropertyDefinitionTest extends ConfigTestCase {
+
+ @Test
+ public void testCreateBuilder() {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ assertNotNull(builder);
+ }
+
+ /**
+ * Creates data for testing string-based limit values
+ *
+ * @return data
+ */
+ @DataProvider(name = "longLimitData")
+ Object[][] createLongLimitData() {
+ return new Object[][] {
+ { 1L, 1L },
+ };
+ }
+
+ /**
+ * Creates data for testing limit values
+ *
+ * @return data
+ */
+ @DataProvider(name = "illegalLongLimitData")
+ Object[][] createIllegalLongLimitData() {
+ return new Object[][] {
+ // lower, upper, lower first
+ { -1L, 0L, true },
+ { 0L, -1L, false },
+ { 2L, 1L, true },
+ { 2L, 1L, false } };
+ }
+
+ @DataProvider(name = "stringLimitData")
+ Object[][] createStringLimitData() {
+ return new Object[][] {
+ // unit, limit, expected value
+ { "ms", "123", 123 },
+ { "ms", "123s", 123000 },
+ { "s", "123", 123000 },
+ { "s", "123s", 123000 },
+ { "m", "10", 600000 },
+ { "m", "10s", 10000 } };
+ }
+
+ @Test(dataProvider = "longLimitData")
+ public void testLowerLimitWithLong(long lowerLimit, long expectedValue) {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setLowerLimit(lowerLimit);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ assertEquals(def.getLowerLimit(), expectedValue);
+ }
+
+ @Test(dataProvider = "stringLimitData")
+ public void testLowerLimitWithString(String unit, String limitValue, long expected) {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setBaseUnit(DurationUnit.getUnit(unit));
+ builder.setLowerLimit(limitValue);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ assertEquals(def.getLowerLimit(), expected);
+ }
+
+ @Test(dataProvider = "longLimitData")
+ public void testUpperLimitWithLong(long upperLimit, long expectedValue) {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setUpperLimit(upperLimit);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ assertEquals((long) def.getUpperLimit(), expectedValue);
+ }
+
+ @Test(dataProvider = "illegalLongLimitData", expectedExceptions = IllegalArgumentException.class)
+ public void testIllegalLimitsWithLong(long lowerLimit, long upperLimit, boolean isLowerFirst) {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ if (isLowerFirst) {
+ builder.setLowerLimit(lowerLimit);
+ builder.setUpperLimit(upperLimit);
+ } else {
+ builder.setUpperLimit(upperLimit);
+ builder.setLowerLimit(lowerLimit);
+ }
+ }
+
+ @Test
+ public void testAllowUnlimitedIsTrue() {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ def.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @Test(expectedExceptions = IllegalPropertyValueStringException.class)
+ public void testAllowUnlimitedIsFalse() {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(false);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ def.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @Test(expectedExceptions = IllegalPropertyValueException.class)
+ public void testAllowUnlimitedIsFalseNumValue() {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(false);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ def.validateValue(-1L, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @DataProvider(name = "validateValueData")
+ Object[][] createValidateValueData() {
+ return new Object[][] {
+ // low in ms, high in ms, allow unlimited, value in seconds
+ { 5000L, 10000L, false, 7L },
+ { 5000L, null, true, -1L },
+ { 5000L, 10000L, false, 5L },
+ { 5000L, 10000L, false, 10L },
+ { 5000L, null, false, 10000L }
+ };
+ }
+
+ @Test(dataProvider = "validateValueData")
+ public void testValidateValue(Long lowerLimitInMillis, Long higherLimitInMillis,
+ boolean isAllowUnlimited, Long valueInSeconds) {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setLowerLimit(lowerLimitInMillis);
+ builder.setUpperLimit(higherLimitInMillis);
+ builder.setAllowUnlimited(isAllowUnlimited);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ def.validateValue(valueInSeconds, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @DataProvider(name = "illegalValidateValueData")
+ Object[][] createIllegalValidateValueData() {
+ return new Object[][] {
+ // low in ms, high in ms, allow unlimited, value in seconds
+ { 5000L, 10000L, false, null },
+ { 5000L, 10000L, false, 1L },
+ { 5000L, 10000L, false, 11L },
+ { 5000L, 10000L, false, -1L } };
+ }
+
+ @Test(dataProvider = "illegalValidateValueData", expectedExceptions = { AssertionError.class,
+ NullPointerException.class, IllegalPropertyValueException.class })
+ public void testValidateValueIllegal(Long lowLimitInMillis, Long highLimitInMillis,
+ boolean isAllowUnlimited, Long valueInSeconds) {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setLowerLimit(lowLimitInMillis);
+ builder.setUpperLimit(highLimitInMillis);
+ builder.setAllowUnlimited(isAllowUnlimited);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ def.validateValue(valueInSeconds, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @DataProvider(name = "encodeValueData")
+ Object[][] createEncodeValueData() {
+ return new Object[][] {
+ { -1L, "unlimited" },
+ { 0L, "0 s" },
+ { 1L, "1 s" },
+ { 2L, "2 s" },
+ { 999L, "999 s" },
+ { 1000L, "1000 s" },
+ { 1001L, "1001 s" },
+ { 1023L, "1023 s" },
+ { 1024L, "1024 s" },
+ { 1025L, "1025 s" },
+ { 1000L * 1000L, "1000000 s" },
+ };
+ }
+
+ @Test(dataProvider = "encodeValueData")
+ public void testEncodeValue(Long valueToEncode, String expectedValue) {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ assertEquals(def.encodeValue(valueToEncode), expectedValue);
+ }
+
+ /** Test that accept doesn't throw and exception */
+ @Test
+ public void testAccept() {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ PropertyDefinitionVisitor<Boolean, Void> v = new PropertyDefinitionVisitor<Boolean, Void>() {
+ public Boolean visitDuration(DurationPropertyDefinition d, Void o) {
+ return true;
+ }
+ @SuppressWarnings("unused")
+ public Boolean visitUnknown(PropertyDefinition<?> d, Void o) throws UnknownPropertyDefinitionException {
+ return false;
+ }
+ };
+
+ assertEquals((boolean) def.accept(v, null), true);
+ }
+
+ /** Make sure toString doesn't barf */
+ @Test
+ public void testToString() {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ def.toString();
+ }
+
+ /** Make sure toString doesn't barf */
+ @Test
+ public void testToString2() {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setUpperLimit(10L);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ def.toString();
+ }
+
+ @Test
+ public void testCompare() {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ def.compare(1L, 2L);
+ }
+
+ @Test
+ public void testSetDefaultBehaviorProvider() {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ builder.setDefaultBehaviorProvider(new DefaultBehaviorProvider<Long>() {
+ public <R, P> R accept(DefaultBehaviorProviderVisitor<Long, R, P> v, P p) {
+ return null;
+ }
+ });
+ }
+
+ @Test
+ public void testSetPropertyOption() {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setOption(PropertyOption.HIDDEN);
+ }
+
+ @DataProvider(name = "decodeValueData")
+ Object[][] createDecodeValueData() {
+ return new Object[][] {
+ // syntax tests
+ { "unlimited", -1L },
+ { "0h", 0L },
+ { "0.0h", 0L },
+ { "0.00h", 0L },
+ { "0 h", 0L },
+ { "0.00 h", 0L },
+ { "1h", 1L },
+ { "1 h", 1L },
+ { "0ms", 0L },
+ { "1h60m", 2L },
+ { "1d10h", 34L },
+ { "4d600m", 106L },
+
+ // conversion tests
+ { "1 d", 24L }, { "2 d", 48L }, { "0.5 d", 12L } };
+ }
+
+ @Test(dataProvider = "decodeValueData")
+ public void testDecodeValue(String valueToDecode, Long expectedValue) {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ builder.setBaseUnit(DurationUnit.HOURS);
+ builder.setMaximumUnit(DurationUnit.DAYS);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+
+ assertThat(def.decodeValue(valueToDecode, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS)).
+ isEqualTo(expectedValue);
+ }
+
+ @DataProvider(name = "decodeValueDataIllegal")
+ Object[][] createDecodeValueDataIllegal() {
+ return new Object[][] { { "" }, { "0" }, // no unit
+ { "123" }, // no unit
+ { "a s" },
+ { "1 x" },
+ { "0.h" },
+ { "0. h" },
+ { "1.h" },
+ { "1. h" },
+ { "1.1 h" }, // too granular
+ { "30 m" }, // unit too small violation
+ { "60 m" }, // unit too small violation
+ { "1 w" }, // unit too big violation
+ { "7 w" }, // unit too big violation
+ { "1 x" }, { "1 d" }, // upper limit violation
+ { "2 h" }, // lower limit violation
+ { "-1 h" } // unlimited violation
+ };
+ }
+
+ @Test(dataProvider = "decodeValueDataIllegal", expectedExceptions = { IllegalPropertyValueStringException.class })
+ public void testDecodeValue(String valueToDecode) {
+ DurationPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(false);
+ builder.setBaseUnit(DurationUnit.HOURS);
+ builder.setMaximumUnit(DurationUnit.DAYS);
+ builder.setLowerLimit(5L);
+ builder.setUpperLimit(10L);
+ DurationPropertyDefinition def = buildTestDefinition(builder);
+ def.decodeValue(valueToDecode, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ private DurationPropertyDefinition.Builder createTestBuilder() {
+ return DurationPropertyDefinition.createBuilder(RootCfgDefn.getInstance(), "test-property-name");
+ }
+
+ private DurationPropertyDefinition buildTestDefinition(DurationPropertyDefinition.Builder builder) {
+ builder.setDefaultBehaviorProvider(new DefinedDefaultBehaviorProvider<Long>("0"));
+ return builder.getInstance();
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/DurationUnitTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/DurationUnitTest.java
new file mode 100644
index 0000000..a9fc959
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/DurationUnitTest.java
@@ -0,0 +1,90 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import static org.forgerock.opendj.config.DurationUnit.*;
+import static org.testng.Assert.*;
+
+import org.forgerock.opendj.config.DurationUnit;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class DurationUnitTest extends ConfigTestCase {
+
+ @DataProvider(name = "testGetUnitData")
+ public Object[][] createStringToSizeLimitData() {
+ return new Object[][] {
+ { "ms", MILLI_SECONDS },
+ { "milliseconds", MILLI_SECONDS },
+ { "s", SECONDS },
+ { "seconds", SECONDS },
+ { "m", MINUTES },
+ { "minutes", MINUTES },
+ { "h", HOURS },
+ { "hours", HOURS },
+ { "d", DAYS },
+ { "days", DAYS },
+ { "w", WEEKS },
+ { "weeks", WEEKS } };
+ }
+
+ @Test(dataProvider = "testGetUnitData")
+ public void testGetUnit(String unitString, DurationUnit unit) {
+ assertEquals(getUnit(unitString), unit);
+ }
+
+ @Test(expectedExceptions = IllegalArgumentException.class)
+ public void testGetUnitWithIllegalString() {
+ getUnit("xxx");
+ }
+
+ @DataProvider(name = "valueToStringData")
+ public Object[][] createValueToStringData() {
+ return new Object[][] {
+ { 0L, "0 ms" },
+ { 1L, "1 ms" },
+ { 999L, "999 ms" },
+ { 1000L, "1 s" },
+ { 1001L, "1 s 1 ms" },
+ { 59999L, "59 s 999 ms" },
+ { 60000L, "1 m" },
+ { 3599999L, "59 m 59 s 999 ms" },
+ { 3600000L, "1 h" } };
+ }
+
+ @Test(dataProvider = "valueToStringData")
+ public void testToString(long ordinalValue, String expectedString) {
+ assertEquals(DurationUnit.toString(ordinalValue), expectedString);
+ }
+
+ @Test(dataProvider = "valueToStringData")
+ public void testParseValue(long expectedOrdinal, String value) {
+ assertEquals(DurationUnit.parseValue(value), expectedOrdinal);
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/EnumPropertyDefinitionTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/EnumPropertyDefinitionTest.java
new file mode 100644
index 0000000..bf2edd2
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/EnumPropertyDefinitionTest.java
@@ -0,0 +1,143 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import static org.testng.Assert.*;
+
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.EnumPropertyDefinition;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class EnumPropertyDefinitionTest extends ConfigTestCase {
+
+ private enum TestEnum {
+ ONE, TWO, THREE
+ }
+
+ private EnumPropertyDefinition.Builder<TestEnum> builder = null;
+
+ @BeforeClass
+ public void setUp() {
+ builder = EnumPropertyDefinition.createBuilder(RootCfgDefn.getInstance(), "test-property");
+ builder.setEnumClass(TestEnum.class);
+ }
+
+ @Test
+ public void testCreateBuilder() {
+ assertNotNull(builder);
+ }
+
+ /**
+ * Tests that exception thrown when no enum class specified by builder
+ */
+ @Test
+ public void testBuildInstance() {
+ EnumPropertyDefinition<?> def = builder.getInstance();
+ assertEquals(def.getEnumClass(), TestEnum.class);
+ }
+
+ /**
+ * Tests that exception thrown when no enum class specified by builder
+ */
+ @Test(expectedExceptions = { IllegalStateException.class })
+ public void testBuildInstanceWithoutEnumClassSpecified() {
+ EnumPropertyDefinition.Builder<TestEnum> localBuilder = EnumPropertyDefinition.createBuilder(
+ RootCfgDefn.getInstance(), "test-property");
+ localBuilder.getInstance();
+ }
+
+ /**
+ * Creates data decodeValue test
+ *
+ * @return data
+ */
+ @DataProvider(name = "decodeValueData")
+ Object[][] createDecodeValueData() {
+ return new Object[][] { { "ONE", TestEnum.ONE } };
+ }
+
+ /**
+ * Tests decodeValue()
+ *
+ * @param value
+ * to decode
+ * @param expectedValue
+ * enum expected
+ */
+ @Test(dataProvider = "decodeValueData")
+ public void testDecodeValue(String value, TestEnum expectedValue) {
+ EnumPropertyDefinition<?> def = builder.getInstance();
+ assertEquals(def.decodeValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS), expectedValue);
+ }
+
+ /**
+ * Creates illegal data for decode value test
+ *
+ * @return data
+ */
+ @DataProvider(name = "decodeValueIllegalData")
+ Object[][] createDecodeValueIllegalData() {
+ return new Object[][] { { "xxx" }, { null } };
+ }
+
+ /**
+ * Tests decodeValue()
+ *
+ * @param value
+ * to decode
+ */
+ @Test(dataProvider = "decodeValueIllegalData", expectedExceptions = { NullPointerException.class,
+ IllegalPropertyValueStringException.class })
+ public void testDecodeValueIllegalData(String value) {
+ EnumPropertyDefinition<?> def = builder.getInstance();
+ def.decodeValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ /**
+ * Tests normalization
+ */
+ @Test
+ public void testNormalizeValue() {
+ EnumPropertyDefinition<TestEnum> def = builder.getInstance();
+ assertEquals(def.normalizeValue(TestEnum.ONE), "one");
+ }
+
+ /**
+ * Tests validation
+ */
+ @Test
+ public void testValidateValue() {
+ EnumPropertyDefinition<TestEnum> def = builder.getInstance();
+ def.validateValue(TestEnum.ONE, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/IntegerPropertyDefinitionTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/IntegerPropertyDefinitionTest.java
new file mode 100644
index 0000000..ac6eda3
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/IntegerPropertyDefinitionTest.java
@@ -0,0 +1,244 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static org.testng.Assert.*;
+
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.DefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefaultBehaviorProviderVisitor;
+import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.IllegalPropertyValueException;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.IntegerPropertyDefinition;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyDefinitionVisitor;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.PropertyOption;
+import org.forgerock.opendj.config.UnknownPropertyDefinitionException;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class IntegerPropertyDefinitionTest extends ConfigTestCase {
+
+ @Test
+ public void testCreateBuilder() {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ assertNotNull(builder);
+ }
+
+ @DataProvider(name = "limitData")
+ public Object[][] createlimitData() {
+ return new Object[][] { { 1, 1 },
+ // { null, 0 }
+ };
+ }
+
+ @DataProvider(name = "illegalLimitData")
+ public Object[][] createIllegalLimitData() {
+ return new Object[][] {
+ // lower, upper, is lower first ?
+ { -1, 0, true },
+ { 0, -1, false },
+ { 2, 1, true },
+ { 2, 1, false }
+ };
+ }
+
+ @Test(dataProvider = "limitData")
+ public void testLowerLimitWithInteger(int limit, int expectedValue) {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setLowerLimit(limit);
+ IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
+ assert propertyDef.getLowerLimit() == expectedValue;
+ }
+
+ @Test(dataProvider = "limitData")
+ public void testUpperLimitWithInteger(int limit, int expectedValue) {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setUpperLimit(limit);
+ IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
+ assert propertyDef.getUpperLimit().equals(expectedValue);
+ }
+
+ @Test(dataProvider = "illegalLimitData", expectedExceptions = IllegalArgumentException.class)
+ public void testIllegalLimits(int lower, int upper, boolean isLowerFirst) {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ if (isLowerFirst) {
+ builder.setLowerLimit(lower);
+ builder.setUpperLimit(upper);
+ } else {
+ builder.setUpperLimit(upper);
+ builder.setLowerLimit(lower);
+ }
+ }
+
+ @Test
+ public void testIsAllowUnlimitedTrue() {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
+ propertyDef.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @Test(expectedExceptions = IllegalPropertyValueStringException.class)
+ public void testIsAllowUnlimitedFalse() {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(false);
+ IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
+ propertyDef.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @Test(expectedExceptions = IllegalPropertyValueException.class)
+ public void testIsAllowUnlimitedInteger() {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(false);
+ IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
+ propertyDef.validateValue(-1, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @DataProvider(name = "validateValueData")
+ public Object[][] createvalidateValueData() {
+ return new Object[][] {
+ // low, high, allow unlimited ?, value to validate
+ { 5, 10, false, 7 },
+ { 5, null, true, -1 },
+ { 5, 10, true, -1 },
+ };
+ }
+
+ @Test(dataProvider = "validateValueData")
+ public void testValidateValue(Integer low, Integer high, boolean allowUnlimited, Integer valueToValidate) {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setLowerLimit(low);
+ builder.setUpperLimit(high);
+ builder.setAllowUnlimited(allowUnlimited);
+ IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
+ propertyDef.validateValue(valueToValidate, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @DataProvider(name = "illegalValidateValueData")
+ public Object[][] createIllegalValidateValueData() {
+ return new Object[][] {
+ // low, high, allow unlimited ?, value to validate
+ { 5, 10, false, null },
+ { 5, 10, false, 1 },
+ { 5, 10, false, 11 },
+ { 5, 10, false, -1 },
+ { 5, 10, true, 2 },
+ { 5, 10, true, 11 }
+ };
+ }
+
+ @Test(dataProvider = "illegalValidateValueData", expectedExceptions = { AssertionError.class,
+ NullPointerException.class, IllegalPropertyValueException.class })
+ public void testValidateValueIllegal(Integer low, Integer high, boolean allowUnlimited, Integer value) {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setLowerLimit(low);
+ builder.setUpperLimit(high);
+ builder.setAllowUnlimited(allowUnlimited);
+ IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
+ propertyDef.validateValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @DataProvider(name = "encodeValueData")
+ public Object[][] createEncodeValueData() {
+ return new Object[][] {
+ { -1, "unlimited" },
+ { 1, "1" }, };
+ }
+
+ @Test(dataProvider = "encodeValueData")
+ public void testEncodeValue(Integer value, String expectedValue) {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
+ assertEquals(propertyDef.encodeValue(value), expectedValue);
+ }
+
+ @Test
+ public void testAccept() {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
+ PropertyDefinitionVisitor<Boolean, Void> v = new PropertyDefinitionVisitor<Boolean, Void>() {
+ public Boolean visitInteger(IntegerPropertyDefinition d, Void o) {
+ return true;
+ }
+
+ @SuppressWarnings("unused")
+ public Boolean visitUnknown(PropertyDefinition<?> d, Void o) throws UnknownPropertyDefinitionException {
+ return false;
+ }
+ };
+
+ assertEquals((boolean) propertyDef.accept(v, null), true);
+ }
+
+ @Test
+ public void testToString() {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
+ propertyDef.toString();
+ }
+
+ @Test
+ public void testCompare() {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
+ propertyDef.compare(1, 2);
+ }
+
+ @Test
+ public void testSetDefaultBehaviorProvider() {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ builder.setDefaultBehaviorProvider(new DefaultBehaviorProvider<Integer>() {
+ public <R, P> R accept(DefaultBehaviorProviderVisitor<Integer, R, P> v, P p) {
+ return null;
+ }
+ });
+ }
+
+ @Test
+ public void testSetOption() {
+ IntegerPropertyDefinition.Builder builder = createTestBuilder();
+ builder.setOption(PropertyOption.HIDDEN);
+ }
+
+ private IntegerPropertyDefinition.Builder createTestBuilder() {
+ return IntegerPropertyDefinition.createBuilder(RootCfgDefn.getInstance(), "test-property-name");
+ }
+
+ private IntegerPropertyDefinition buildTestDefinition(IntegerPropertyDefinition.Builder builder) {
+ builder.setDefaultBehaviorProvider(new DefinedDefaultBehaviorProvider<Integer>("0"));
+ return builder.getInstance();
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/LDAPProfileTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/LDAPProfileTest.java
new file mode 100644
index 0000000..dd4f5a3
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/LDAPProfileTest.java
@@ -0,0 +1,47 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static org.testng.Assert.*;
+
+import java.util.List;
+
+import org.forgerock.opendj.server.config.meta.GlobalCfgDefn;
+import org.forgerock.opendj.config.LDAPProfile;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class LDAPProfileTest extends ConfigTestCase {
+
+ /** Makes sure the returned list contains "top" */
+ @Test
+ public void testGetObjectClasses() {
+ LDAPProfile ldapProfile = LDAPProfile.getInstance();
+ List<String> objectClasses = ldapProfile.getObjectClasses(GlobalCfgDefn.getInstance());
+ assertTrue(objectClasses.contains("top"));
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/ManagedObjectDefinitionI18NResourceTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/ManagedObjectDefinitionI18NResourceTest.java
new file mode 100644
index 0000000..f608877
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/ManagedObjectDefinitionI18NResourceTest.java
@@ -0,0 +1,56 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static org.testng.Assert.*;
+
+import java.util.Locale;
+
+import org.forgerock.opendj.server.config.meta.GlobalCfgDefn;
+import org.forgerock.opendj.config.ManagedObjectDefinitionI18NResource;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class ManagedObjectDefinitionI18NResourceTest extends ConfigTestCase {
+
+ ManagedObjectDefinitionI18NResource definitionI18NResource = null;
+
+ @BeforeClass
+ public void setUp() {
+ definitionI18NResource = ManagedObjectDefinitionI18NResource.getInstanceForProfile("ldap");
+ }
+
+ @Test
+ public void testGetMessage() {
+ // Ideally we should test getting messages with arguments
+ // but I couldn't find any existing properties files with
+ // args
+ assertNotNull(definitionI18NResource.getMessage(GlobalCfgDefn.getInstance(), "objectclass",
+ Locale.getDefault()));
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/ManagedObjectPathTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/ManagedObjectPathTest.java
new file mode 100644
index 0000000..657086b
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/ManagedObjectPathTest.java
@@ -0,0 +1,235 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static org.testng.Assert.*;
+
+import org.forgerock.opendj.server.config.client.ConnectionHandlerCfgClient;
+import org.forgerock.opendj.server.config.client.GlobalCfgClient;
+import org.forgerock.opendj.server.config.client.LDAPConnectionHandlerCfgClient;
+import org.forgerock.opendj.server.config.meta.ConnectionHandlerCfgDefn;
+import org.forgerock.opendj.server.config.meta.GlobalCfgDefn;
+import org.forgerock.opendj.server.config.meta.LDAPConnectionHandlerCfgDefn;
+import org.forgerock.opendj.server.config.meta.ReplicationDomainCfgDefn;
+import org.forgerock.opendj.server.config.meta.ReplicationSynchronizationProviderCfgDefn;
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.server.config.server.ConnectionHandlerCfg;
+import org.forgerock.opendj.server.config.server.GlobalCfg;
+import org.forgerock.opendj.server.config.server.LDAPConnectionHandlerCfg;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.ldap.DN;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class ManagedObjectPathTest extends ConfigTestCase {
+
+ @Test
+ public void testEmptyPathIsEmpty() {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
+ assertTrue(path.isEmpty());
+ }
+
+ @Test
+ public void testEmptyPathHasZeroElements() {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
+ assertEquals(path.size(), 0);
+ }
+
+ @Test(expectedExceptions = IllegalArgumentException.class)
+ public void testEmptyPathHasNoParent() {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
+ path.parent();
+ }
+
+ @Test
+ public void testEmptyPathIsRootConfiguration() {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
+ assertEquals(path.getManagedObjectDefinition(), RootCfgDefn.getInstance());
+ }
+
+ @Test
+ public void testEmptyPathHasNoRelation() {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
+ assertEquals(path.getRelationDefinition(), null);
+ }
+
+ @Test
+ public void testEmptyPathHasNoName() {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
+ assertNull(path.getName());
+ }
+
+ @Test
+ public void testEmptyPathString() {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
+ assertEquals(path.toString(), "/");
+ }
+
+ @Test
+ public void testEmptyPathDecode() {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.valueOf("/");
+ assertEquals(path, ManagedObjectPath.emptyPath());
+ }
+
+ @Test
+ public void testSingletonChild() {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
+ ManagedObjectPath<GlobalCfgClient, GlobalCfg> child = path.child(RootCfgDefn.getInstance()
+ .getGlobalConfigurationRelationDefinition());
+
+ assertFalse(child.isEmpty());
+ assertEquals(child.size(), 1);
+ assertEquals(child.parent(), path);
+ assertNull(child.getName());
+ assertEquals(child.getManagedObjectDefinition(), GlobalCfgDefn.getInstance());
+ assertEquals(child.getRelationDefinition(), RootCfgDefn.getInstance()
+ .getGlobalConfigurationRelationDefinition());
+ assertEquals(child.toString(), "/relation=global-configuration");
+ assertEquals(child, ManagedObjectPath.valueOf("/relation=global-configuration"));
+ }
+
+ @Test
+ public void testInstantiableChild() {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
+ ManagedObjectPath<ConnectionHandlerCfgClient, ConnectionHandlerCfg> child = path.child(RootCfgDefn
+ .getInstance().getConnectionHandlersRelationDefinition(), "LDAP connection handler");
+
+ assertFalse(child.isEmpty());
+ assertEquals(child.size(), 1);
+ assertEquals(child.parent(), path);
+ assertEquals(child.getName(), "LDAP connection handler");
+ assertEquals(child.getManagedObjectDefinition(), ConnectionHandlerCfgDefn.getInstance());
+ assertEquals(child.getRelationDefinition(), RootCfgDefn.getInstance()
+ .getConnectionHandlersRelationDefinition());
+ assertEquals(child.toString(), "/relation=connection-handler+name=LDAP connection handler");
+ assertEquals(child, ManagedObjectPath.valueOf("/relation=connection-handler+name=LDAP connection handler"));
+ }
+
+ @Test
+ public void testInstantiableChildWithSubtype() {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
+ ManagedObjectPath<LDAPConnectionHandlerCfgClient, LDAPConnectionHandlerCfg> child = path.child(RootCfgDefn
+ .getInstance().getConnectionHandlersRelationDefinition(), LDAPConnectionHandlerCfgDefn.getInstance(),
+ "LDAP connection handler");
+
+ assertFalse(child.isEmpty());
+ assertEquals(child.size(), 1);
+ assertEquals(child.parent(), path);
+ assertEquals(child.getManagedObjectDefinition(), LDAPConnectionHandlerCfgDefn.getInstance());
+ assertEquals(child.getRelationDefinition(), RootCfgDefn.getInstance()
+ .getConnectionHandlersRelationDefinition());
+ String childAsString =
+ "/relation=connection-handler+type=ldap-connection-handler+name=LDAP connection handler";
+ assertEquals(child.toString(), childAsString);
+ assertEquals(child, ManagedObjectPath.valueOf(childAsString));
+ }
+
+ @Test
+ public void testInstantiableChildMultipleLevels() {
+ ManagedObjectPath<?, ?> root = ManagedObjectPath.emptyPath();
+ ManagedObjectPath<?, ?> mmr = root.child(RootCfgDefn.getInstance()
+ .getSynchronizationProvidersRelationDefinition(), ReplicationSynchronizationProviderCfgDefn
+ .getInstance(), "MMR");
+ ManagedObjectPath<?, ?> domain = mmr.child(ReplicationSynchronizationProviderCfgDefn.getInstance()
+ .getReplicationDomainsRelationDefinition(), "Domain");
+ assertFalse(domain.isEmpty());
+ assertEquals(domain.size(), 2);
+ assertEquals(domain.parent(), mmr);
+ assertEquals(domain.parent(2), root);
+ assertEquals(domain.getManagedObjectDefinition(), ReplicationDomainCfgDefn.getInstance());
+ assertEquals(domain.getRelationDefinition(), ReplicationSynchronizationProviderCfgDefn.getInstance()
+ .getReplicationDomainsRelationDefinition());
+ String domainAsString = "/relation=synchronization-provider+type=replication-synchronization-provider"
+ + "+name=MMR/relation=replication-domain+name=Domain";
+ assertEquals(domain.toString(), domainAsString);
+ assertEquals(domain, ManagedObjectPath.valueOf(domainAsString));
+ }
+
+ @Test
+ public void testMatchesAndEqualsBehavior() {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
+
+ ManagedObjectPath<ConnectionHandlerCfgClient, ConnectionHandlerCfg> child1 = path.child(RootCfgDefn
+ .getInstance().getConnectionHandlersRelationDefinition(), "LDAP connection handler");
+
+ ManagedObjectPath<LDAPConnectionHandlerCfgClient, LDAPConnectionHandlerCfg> child2 = path.child(RootCfgDefn
+ .getInstance().getConnectionHandlersRelationDefinition(), LDAPConnectionHandlerCfgDefn.getInstance(),
+ "LDAP connection handler");
+
+ ManagedObjectPath<LDAPConnectionHandlerCfgClient, LDAPConnectionHandlerCfg> child3 = path.child(RootCfgDefn
+ .getInstance().getConnectionHandlersRelationDefinition(), LDAPConnectionHandlerCfgDefn.getInstance(),
+ "Another LDAP connection handler");
+
+ // child 1 and child2 matches each other
+ assertTrue(child1.matches(child1));
+ assertTrue(child2.matches(child2));
+ assertTrue(child1.matches(child2));
+ assertTrue(child2.matches(child1));
+
+ // child 1 and child2 are not equal to each other
+ assertTrue(child1.equals(child1));
+ assertTrue(child2.equals(child2));
+ assertFalse(child1.equals(child2));
+ assertFalse(child2.equals(child1));
+
+ // child 1/2 does not match nor equals child3
+ assertFalse(child1.matches(child3));
+ assertFalse(child2.matches(child3));
+ assertFalse(child3.matches(child1));
+ assertFalse(child3.matches(child2));
+
+ assertFalse(child1.equals(child3));
+ assertFalse(child2.equals(child3));
+ assertFalse(child3.equals(child1));
+ assertFalse(child3.equals(child2));
+ }
+
+ @Test
+ public void testToDN() throws Exception {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
+
+ ManagedObjectPath<ConnectionHandlerCfgClient, ConnectionHandlerCfg> child1 = path.child(RootCfgDefn
+ .getInstance().getConnectionHandlersRelationDefinition(), "LDAP connection handler");
+
+ ManagedObjectPath<LDAPConnectionHandlerCfgClient, LDAPConnectionHandlerCfg> child2 = path.child(RootCfgDefn
+ .getInstance().getConnectionHandlersRelationDefinition(), LDAPConnectionHandlerCfgDefn.getInstance(),
+ "LDAP connection handler");
+
+ ManagedObjectPath<LDAPConnectionHandlerCfgClient, LDAPConnectionHandlerCfg> child3 = path.child(RootCfgDefn
+ .getInstance().getConnectionHandlersRelationDefinition(), LDAPConnectionHandlerCfgDefn.getInstance(),
+ "Another LDAP connection handler");
+
+ DN expectedEmpty = DN.rootDN();
+ DN expectedChild1 = DN.valueOf("cn=LDAP connection handler,cn=connection handlers,cn=config");
+ DN expectedChild2 = DN.valueOf("cn=LDAP connection handler,cn=connection handlers,cn=config");
+ DN expectedChild3 = DN.valueOf("cn=Another LDAP connection handler,cn=connection handlers,cn=config");
+
+ assertEquals(path.toDN(), expectedEmpty);
+ assertEquals(child1.toDN(), expectedChild1);
+ assertEquals(child2.toDN(), expectedChild2);
+ assertEquals(child3.toDN(), expectedChild3);
+ }
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/MockLDAPProfile.java b/opendj-config/src/test/java/org/forgerock/opendj/config/MockLDAPProfile.java
new file mode 100644
index 0000000..b3a5b3f
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/MockLDAPProfile.java
@@ -0,0 +1,136 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008-2010 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.InstantiableRelationDefinition;
+import org.forgerock.opendj.config.LDAPProfile;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.RelationDefinition;
+
+/**
+ * A mock LDAP profile wrapper for testing purposes.
+ */
+public final class MockLDAPProfile extends LDAPProfile.Wrapper {
+
+ /**
+ * Creates a new mock LDAP profile.
+ */
+ public MockLDAPProfile() {
+ // No implementation required.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getAttributeName(AbstractManagedObjectDefinition<?, ?> d, PropertyDefinition<?> pd) {
+
+ if (d == TestParentCfgDefn.getInstance()) {
+ TestParentCfgDefn td = TestParentCfgDefn.getInstance();
+
+ if (pd == (PropertyDefinition<?>) td.getMandatoryBooleanPropertyPropertyDefinition()) {
+ return "ds-cfg-enabled";
+ } else if (pd == (PropertyDefinition<?>) td.getMandatoryClassPropertyPropertyDefinition()) {
+ return "ds-cfg-java-class";
+ } else if (pd == (PropertyDefinition<?>) td.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition()) {
+ return "ds-cfg-attribute-type";
+ } else if (pd == (PropertyDefinition<?>) td.getOptionalMultiValuedDNPropertyPropertyDefinition()) {
+ return "ds-cfg-base-dn";
+ } else {
+ throw new RuntimeException("Unexpected test-parent property" + pd.getName());
+ }
+ } else if (d == TestChildCfgDefn.getInstance()) {
+ TestChildCfgDefn td = TestChildCfgDefn.getInstance();
+
+ if (pd == (PropertyDefinition<?>) td.getMandatoryBooleanPropertyPropertyDefinition()) {
+ return "ds-cfg-enabled";
+ } else if (pd == (PropertyDefinition<?>) td.getMandatoryClassPropertyPropertyDefinition()) {
+ return "ds-cfg-java-class";
+ } else if (pd == (PropertyDefinition<?>) td.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition()) {
+ return "ds-cfg-attribute-type";
+ } else if (pd == (PropertyDefinition<?>) td.getOptionalMultiValuedDNProperty1PropertyDefinition()) {
+ return "ds-cfg-base-dn";
+ } else if (pd == (PropertyDefinition<?>) td.getOptionalMultiValuedDNProperty2PropertyDefinition()) {
+ return "ds-cfg-group-dn";
+ } else if (pd.getName().equals("aggregation-property")) {
+ return "ds-cfg-rotation-policy";
+ } else {
+ throw new RuntimeException("Unexpected test-child property" + pd.getName());
+ }
+ }
+
+ // Not known.
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getRelationChildRDNType(InstantiableRelationDefinition<?, ?> r) {
+ if (r == TestCfg.getTestOneToManyParentRelationDefinition()
+ || r == TestParentCfgDefn.getInstance().getTestChildrenRelationDefinition()) {
+ return "cn";
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getObjectClass(AbstractManagedObjectDefinition<?, ?> d) {
+ if (d == TestParentCfgDefn.getInstance()) {
+ return "ds-cfg-test-parent-dummy";
+ } else if (d == TestChildCfgDefn.getInstance()) {
+ return "ds-cfg-test-child-dummy";
+ } else {
+ // Not known.
+ return null;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getRelationRDNSequence(RelationDefinition<?, ?> r) {
+ if (r == TestCfg.getTestOneToManyParentRelationDefinition()) {
+ return "cn=test parents,cn=config";
+ } else if (r == TestCfg.getTestOneToZeroOrOneParentRelationDefinition()) {
+ return "cn=optional test parent,cn=config";
+ } else if (r == TestParentCfgDefn.getInstance().getTestChildrenRelationDefinition()) {
+ return "cn=test children";
+ } else if (r == TestParentCfgDefn.getInstance().getOptionalTestChildRelationDefinition()) {
+ return "cn=optional test child";
+ } else {
+ return null;
+ }
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/RelativeInheritedDefaultBehaviorProviderTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/RelativeInheritedDefaultBehaviorProviderTest.java
new file mode 100644
index 0000000..c1efeef
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/RelativeInheritedDefaultBehaviorProviderTest.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import static org.testng.Assert.*;
+
+import org.forgerock.opendj.config.AbsoluteInheritedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.AliasDefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefaultBehaviorProviderVisitor;
+import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.RelativeInheritedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class RelativeInheritedDefaultBehaviorProviderTest extends ConfigTestCase {
+
+ private static final int OFFSET = 0;
+
+ private TestParentCfgDefn parentDefinition;
+
+ private RelativeInheritedDefaultBehaviorProvider<Boolean> defaultBehaviorProvider = null;
+
+ @BeforeClass
+ public void setUp() {
+ parentDefinition = TestParentCfgDefn.getInstance();
+ this.defaultBehaviorProvider = new RelativeInheritedDefaultBehaviorProvider<Boolean>(
+ parentDefinition,
+ parentDefinition.getMandatoryBooleanPropertyPropertyDefinition().getName(),
+ OFFSET);
+ }
+
+ @Test
+ @SuppressWarnings("rawtypes")
+ public void testAccept() {
+ defaultBehaviorProvider.accept(new DefaultBehaviorProviderVisitor<Boolean, Object, Object>() {
+
+ public Object visitAbsoluteInherited(AbsoluteInheritedDefaultBehaviorProvider d, Object o) {
+ return null;
+ }
+
+ public Object visitAlias(AliasDefaultBehaviorProvider d, Object o) {
+ return null;
+ }
+
+ public Object visitDefined(DefinedDefaultBehaviorProvider d, Object o) {
+ return null;
+ }
+
+ public Object visitRelativeInherited(RelativeInheritedDefaultBehaviorProvider d, Object o) {
+ return null;
+ }
+
+ public Object visitUndefined(UndefinedDefaultBehaviorProvider d, Object o) {
+ return null;
+ }
+ }, new Object());
+ }
+
+ @Test
+ public void testGetManagedObjectPath() {
+ assertEquals(defaultBehaviorProvider.getManagedObjectPath(ManagedObjectPath.emptyPath()),
+ ManagedObjectPath.emptyPath());
+ }
+
+ @Test
+ public void testGetPropertyDefinition() {
+ assertEquals(defaultBehaviorProvider.getPropertyName(),
+ parentDefinition.getMandatoryBooleanPropertyPropertyDefinition().getName());
+ }
+
+ @Test
+ public void testGetRelativeOffset() {
+ assertEquals(defaultBehaviorProvider.getRelativeOffset(), OFFSET);
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/SizePropertyDefinitionTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/SizePropertyDefinitionTest.java
new file mode 100644
index 0000000..2048b33
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/SizePropertyDefinitionTest.java
@@ -0,0 +1,263 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static org.testng.Assert.*;
+
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.DefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefaultBehaviorProviderVisitor;
+import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.IllegalPropertyValueException;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyDefinitionVisitor;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.PropertyOption;
+import org.forgerock.opendj.config.SizePropertyDefinition;
+import org.forgerock.opendj.config.UnknownPropertyDefinitionException;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class SizePropertyDefinitionTest extends ConfigTestCase {
+
+ @Test
+ public void testCreateBuilder() {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ assertNotNull(builder);
+ }
+
+ @Test
+ public void testLowerLimit() {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setLowerLimit(1);
+ SizePropertyDefinition propertyDef = buildTestDefinition(builder);
+ assert propertyDef.getLowerLimit() == 1;
+ }
+
+ @DataProvider(name = "stringLimitData")
+ public Object[][] createStringLimitData() {
+ return new Object[][] {
+ { "1 b", 1L },
+ };
+ }
+
+ @DataProvider(name = "illegalLimitData")
+ public Object[][] createIllegalLimitData() {
+ return new Object[][] {
+ // lower, upper, is lower first
+ { -1L, 0L, true },
+ { 0L, -1L, false },
+ { 2L, 1L, true },
+ { 2L, 1L, false } };
+ }
+
+ @Test(dataProvider = "stringLimitData")
+ public void testLowerLimitString(String unitLimit, Long expectedValue) {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setLowerLimit(unitLimit);
+ SizePropertyDefinition propertyDef = buildTestDefinition(builder);
+ assert propertyDef.getLowerLimit() == expectedValue;
+ }
+
+ @Test(dataProvider = "stringLimitData")
+ public void testUpperLimitString(String limit, long expectedValue) {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setUpperLimit(limit);
+ SizePropertyDefinition propertyDef = buildTestDefinition(builder);
+ assert propertyDef.getUpperLimit().equals(expectedValue);
+ }
+
+ @Test(dataProvider = "illegalLimitData", expectedExceptions = IllegalArgumentException.class)
+ public void testIllegalLimits(long lower, long upper, boolean lowerFirst) {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ if (lowerFirst) {
+ builder.setLowerLimit(lower);
+ builder.setUpperLimit(upper);
+ } else {
+ builder.setUpperLimit(upper);
+ builder.setLowerLimit(lower);
+ }
+ }
+
+ @Test
+ public void testIsAllowUnlimitedTrue() {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ SizePropertyDefinition propertyDef = buildTestDefinition(builder);
+ propertyDef.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @Test(expectedExceptions = IllegalPropertyValueStringException.class)
+ public void testIsAllowUnlimitedFalse() {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(false);
+ SizePropertyDefinition propertyDef = buildTestDefinition(builder);
+ propertyDef.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @Test(expectedExceptions = IllegalPropertyValueException.class)
+ public void testIsAllowUnlimitedNumeric() {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(false);
+ SizePropertyDefinition propertyDef = buildTestDefinition(builder);
+ propertyDef.validateValue(-1L, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @DataProvider(name = "validateValueData")
+ public Object[][] createvalidateValueData() {
+ return new Object[][] {
+ // low, high, is allow unlimited, value
+ { 5L, 10L, false, 7L },
+ { 5L, null, true, -1L },
+ { 5L, 10L, true, -1L },
+ };
+ }
+
+ @Test(dataProvider = "validateValueData")
+ public void testValidateValue(Long low, Long high, boolean isAllowUnlimited, Long valueToValidate) {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setLowerLimit(low);
+ builder.setUpperLimit(high);
+ builder.setAllowUnlimited(isAllowUnlimited);
+ SizePropertyDefinition propertyDef = buildTestDefinition(builder);
+ propertyDef.validateValue(valueToValidate, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @DataProvider(name = "illegalValidateValueData")
+ public Object[][] createIllegalValidateValueData() {
+ return new Object[][] {
+ // low, high, is allow unlimited, value
+ { 5L, 10L, false, null },
+ { 5L, 10L, false, 1L },
+ { 5L, 10L, false, 11L },
+ { 5L, 10L, false, -1L },
+ { 5L, 10L, true, 2L },
+ { 5L, 10L, true, 11L }
+ };
+ }
+
+ @Test(dataProvider = "illegalValidateValueData", expectedExceptions = { AssertionError.class,
+ NullPointerException.class, IllegalPropertyValueException.class })
+ public void testValidateValueIllegal(Long low, Long high, boolean allowUnlimited, Long valueToValidate) {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setLowerLimit(low);
+ builder.setUpperLimit(high);
+ builder.setAllowUnlimited(allowUnlimited);
+ SizePropertyDefinition propertyDef = buildTestDefinition(builder);
+ propertyDef.validateValue(valueToValidate, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @DataProvider(name = "encodeValueData")
+ public Object[][] createEncodeValueData() {
+ return new Object[][] {
+ { -1L, "unlimited" },
+ { 0L, "0 b" },
+ { 1L, "1 b" },
+ { 2L, "2 b" },
+ { 999L, "999 b" },
+ { 1000L, "1 kb" },
+ { 1001L, "1001 b" },
+ { 1023L, "1023 b" },
+ { 1024L, "1 kib" },
+ { 1025L, "1025 b" },
+ { 1000L * 1000L, "1 mb" },
+ { 1000L * 1000L * 1000L, "1 gb" },
+ { 1024L * 1024L * 1024L, "1 gib" },
+ { 1000L * 1000L * 1000L * 1000L, "1 tb" }
+ };
+ }
+
+ @Test(dataProvider = "encodeValueData")
+ public void testEncodeValue(Long value, String expectedValue) {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ SizePropertyDefinition propertyDef = buildTestDefinition(builder);
+ assertEquals(propertyDef.encodeValue(value), expectedValue);
+ }
+
+ @Test
+ public void testAccept() {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ SizePropertyDefinition propertyDef = buildTestDefinition(builder);
+ PropertyDefinitionVisitor<Boolean, Void> v = new PropertyDefinitionVisitor<Boolean, Void>() {
+ public Boolean visitSize(SizePropertyDefinition d, Void o) {
+ return true;
+ }
+ @SuppressWarnings("unused")
+ public Boolean visitUnknown(PropertyDefinition<?> d, Void o) throws UnknownPropertyDefinitionException {
+ return false;
+ }
+ };
+
+ assertEquals((boolean) propertyDef.accept(v, null), true);
+ }
+
+ @Test
+ public void testToString() {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ SizePropertyDefinition propertyDef = buildTestDefinition(builder);
+ propertyDef.toString();
+ }
+
+ @Test
+ public void testCompare() {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ SizePropertyDefinition propertyDef = buildTestDefinition(builder);
+ assertEquals(propertyDef.compare(1L, 2L), -1);
+ }
+
+ @Test
+ public void testSetDefaultBehaviorProvider() {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setAllowUnlimited(true);
+ builder.setDefaultBehaviorProvider(new DefaultBehaviorProvider<Long>() {
+ public <R, P> R accept(DefaultBehaviorProviderVisitor<Long, R, P> v, P p) {
+ return null;
+ }
+ });
+ }
+
+ @Test
+ public void testSetOption() {
+ SizePropertyDefinition.Builder builder = createTestBuilder();
+ builder.setOption(PropertyOption.HIDDEN);
+ }
+
+ private SizePropertyDefinition.Builder createTestBuilder() {
+ return SizePropertyDefinition.createBuilder(RootCfgDefn.getInstance(), "test-property-name");
+ }
+
+ private SizePropertyDefinition buildTestDefinition(SizePropertyDefinition.Builder builder) {
+ builder.setDefaultBehaviorProvider(new DefinedDefaultBehaviorProvider<Long>("0"));
+ return builder.getInstance();
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/SizeUnitTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/SizeUnitTest.java
new file mode 100644
index 0000000..79e09a9
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/SizeUnitTest.java
@@ -0,0 +1,278 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import static org.testng.Assert.*;
+
+import org.forgerock.opendj.config.SizeUnit;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class SizeUnitTest extends ConfigTestCase {
+
+ @DataProvider(name = "stringToSizeLimitData")
+ public Object[][] createStringToSizeLimitData() {
+ return new Object[][] {
+ { "b", SizeUnit.BYTES },
+ { "kb", SizeUnit.KILO_BYTES },
+ { "kib", SizeUnit.KIBI_BYTES },
+ { "mb", SizeUnit.MEGA_BYTES },
+ { "mib", SizeUnit.MEBI_BYTES },
+ { "gb", SizeUnit.GIGA_BYTES },
+ { "gib", SizeUnit.GIBI_BYTES },
+ { "tb", SizeUnit.TERA_BYTES },
+ { "tib", SizeUnit.TEBI_BYTES } };
+ }
+
+ @Test(dataProvider = "stringToSizeLimitData")
+ public void testGetUnit(String name, SizeUnit expectedUnit) {
+ SizeUnit unit = SizeUnit.getUnit(name);
+ assertEquals(unit, expectedUnit);
+ }
+
+ @DataProvider(name = "parseValueData")
+ public Object[][] createParseValueData() {
+ return new Object[][] {
+ { "1.0 b", 1L },
+ { "1.0 kb", 1000L },
+ { "1.0 kib", 1024L },
+ { "0b", 0L },
+ { "0 b", 0L },
+ { "0 bytes", 0L },
+ { "0kb", 0L },
+ { "0 kilobytes", 0L },
+ { "0 KILOBYTES", 0L },
+ { "0 KB", 0L },
+ { "1b", 1L },
+ { "1 b", 1L },
+ { "1 bytes", 1L },
+ { "1kb", 1000L },
+ { "1 kilobytes", 1000L },
+ { "1 KILOBYTES", 1000L },
+ { "1 KB", 1000L },
+ { "1000b", 1000L },
+ { "1000 b", 1000L },
+ { "1000 bytes", 1000L },
+ { "1000kb", 1000000L },
+ { "1000 kilobytes", 1000000L },
+ { "1000 KILOBYTES", 1000000L },
+ { "1000 KB", 1000000L } };
+ }
+
+ @Test(dataProvider = "parseValueData")
+ public void testParseValue(String valueToParse, long expectedValue) {
+ assertEquals(SizeUnit.parseValue(valueToParse), expectedValue);
+ }
+
+ @DataProvider(name = "parseValueIllegalData")
+ public Object[][] createParseValueIllegalData() {
+ return new Object[][] {
+ { "a.0 b" },
+ { "1.a kb" },
+ { "1.0 xx" },
+ { "" },
+ { "hello" },
+ { "-1" },
+ { "-1b" },
+ { "1" },
+ { "1x" },
+ { "1.1y" }
+ };
+ }
+
+
+ @Test(dataProvider = "parseValueIllegalData", expectedExceptions = NumberFormatException.class)
+ public void testParseValueIllegal(String value) {
+ SizeUnit.parseValue(value);
+ }
+
+ @DataProvider(name = "valuesToKiloBytes")
+ public Object[][] createConversionData() {
+ return new Object[][] {
+ { "1.0 b", 1L },
+ { "1.0 kb", 1000L },
+ { "1.0 kib", 1024L },
+ { "1.0", 1000L },
+ { "1000", 1000000L },
+ { "1MB", 1000000L }
+ };
+ }
+
+ @Test(dataProvider = "valuesToKiloBytes")
+ public void testParseValueWithUnit(String value, long expectedValueInKB) {
+ assertEquals(SizeUnit.parseValue(value, SizeUnit.KILO_BYTES), expectedValueInKB);
+ }
+
+ @DataProvider(name = "parseValueIllegalDataKB")
+ public Object[][] createParseValueIllegalDataKB() {
+ return new Object[][] {
+ { "a.0 b" },
+ { "1.a kb" },
+ { "1.0 xx" },
+ { "" },
+ { "hello" },
+ { "-1" },
+ { "-1b" },
+ { "1x" },
+ { "1.1y" }
+ };
+ }
+
+ @Test(dataProvider = "parseValueIllegalDataKB", expectedExceptions = NumberFormatException.class)
+ public void testParseValueIllegalWithUnit(String value) {
+ SizeUnit.parseValue(value, SizeUnit.KILO_BYTES);
+ }
+
+ @DataProvider(name = "fromBytesTestData")
+ public Object[][] createFromBytesTestData() {
+ return new Object[][] {
+ { SizeUnit.BYTES, 1L, 1D }
+ // TODO: more data
+ };
+ }
+
+ @Test(dataProvider = "fromBytesTestData")
+ public void testFromBytes(SizeUnit unit, long value, double expected) {
+ assertEquals(unit.fromBytes(value), expected);
+ }
+
+ @DataProvider(name = "bestFitUnitExactData")
+ public Object[][] createBestFitExactData() {
+ return new Object[][] {
+ { 0, SizeUnit.BYTES },
+ { 999, SizeUnit.BYTES },
+ { 1000, SizeUnit.KILO_BYTES },
+ { 1024, SizeUnit.KIBI_BYTES },
+ { 1025, SizeUnit.BYTES },
+ { 999999, SizeUnit.BYTES },
+ { 1000000, SizeUnit.MEGA_BYTES },
+ { 1000001, SizeUnit.BYTES } };
+ }
+
+
+ @Test(dataProvider = "bestFitUnitExactData")
+ public void testGetBestFitUnitExact(long valueForWhichBestFitSought, SizeUnit expectedUnit) {
+ assertEquals(SizeUnit.getBestFitUnitExact(valueForWhichBestFitSought), expectedUnit);
+ }
+
+ @DataProvider(name = "bestFitUnitData")
+ public Object[][] createBestFitData() {
+ return new Object[][] {
+ { 0, SizeUnit.BYTES },
+ { 999, SizeUnit.BYTES },
+ { 1000, SizeUnit.KILO_BYTES },
+ { 1024, SizeUnit.KIBI_BYTES },
+ { 1025, SizeUnit.KILO_BYTES },
+ { 999999, SizeUnit.KILO_BYTES },
+ { 1000000, SizeUnit.MEGA_BYTES },
+ { 1000001, SizeUnit.MEGA_BYTES } };
+ }
+
+ @Test(dataProvider = "bestFitUnitData")
+ public void testGetBestFitUnit(long valueForWhichBestFitSought, SizeUnit expectedUnit) {
+ assertEquals(SizeUnit.getBestFitUnit(valueForWhichBestFitSought), expectedUnit);
+ }
+
+ @DataProvider(name = "longNameData")
+ public Object[][] createLongNameData() {
+ return new Object[][] {
+ { SizeUnit.BYTES, "bytes" },
+ { SizeUnit.KILO_BYTES, "kilobytes" },
+ { SizeUnit.KIBI_BYTES, "kibibytes" },
+ { SizeUnit.MEGA_BYTES, "megabytes" },
+ { SizeUnit.MEBI_BYTES, "mebibytes" },
+ { SizeUnit.GIGA_BYTES, "gigabytes" },
+ { SizeUnit.GIBI_BYTES, "gibibytes" },
+ { SizeUnit.TERA_BYTES, "terabytes" },
+ { SizeUnit.TEBI_BYTES, "tebibytes" }
+ };
+ }
+
+ @Test(dataProvider = "longNameData")
+ public void testGetLongName(SizeUnit unit, String expectedName) {
+ assertEquals(unit.getLongName(), expectedName);
+ }
+
+ @DataProvider(name = "shortNameData")
+ public Object[][] createShortNameData() {
+ return new Object[][] {
+ { SizeUnit.BYTES, "b" },
+ { SizeUnit.KILO_BYTES, "kb" },
+ { SizeUnit.KIBI_BYTES, "kib" },
+ { SizeUnit.MEGA_BYTES, "mb" },
+ { SizeUnit.MEBI_BYTES, "mib" },
+ { SizeUnit.GIGA_BYTES, "gb" },
+ { SizeUnit.GIBI_BYTES, "gib" },
+ { SizeUnit.TERA_BYTES, "tb" },
+ { SizeUnit.TEBI_BYTES, "tib" }
+ };
+ }
+
+ @Test(dataProvider = "shortNameData")
+ public void testGetShortName(SizeUnit unit, String expectedShortName) {
+ assertEquals(unit.getShortName(), expectedShortName);
+ }
+
+ @DataProvider(name = "sizeData")
+ public Object[][] createSizeData() {
+ return new Object[][] {
+ { SizeUnit.BYTES, 1L },
+ { SizeUnit.KILO_BYTES, 1000L },
+ { SizeUnit.KIBI_BYTES, 1024L },
+ { SizeUnit.MEGA_BYTES, (long) 1000 * 1000 },
+ { SizeUnit.MEBI_BYTES, (long) 1024 * 1024 },
+ { SizeUnit.GIGA_BYTES, (long) 1000 * 1000 * 1000 },
+ { SizeUnit.GIBI_BYTES, (long) 1024 * 1024 * 1024 },
+ { SizeUnit.TERA_BYTES, (long) 1000 * 1000 * 1000 * 1000 },
+ { SizeUnit.TEBI_BYTES, (long) 1024 * 1024 * 1024 * 1024 }
+ };
+ }
+
+ @Test(dataProvider = "sizeData")
+ public void testGetSize(SizeUnit unit, long expectedSize) {
+ assertEquals(unit.getSize(), expectedSize);
+ }
+
+ @DataProvider(name = "toBytesData")
+ public Object[][] createToBytesData() {
+ return new Object[][] {
+ // unit to test, amount of unit in bytes, expected
+ { SizeUnit.BYTES, 1D, 1L } };
+ }
+
+ @Test(dataProvider = "toBytesData")
+ public void testToBytes(SizeUnit unit, double amountOfUnitInBytes, long expected) {
+ assertEquals(unit.toBytes(amountOfUnitInBytes), expected);
+ }
+
+ @Test(dataProvider = "shortNameData")
+ public void testToString(SizeUnit unit, String expected) {
+ assertEquals(unit.toString(), expected);
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/StringPropertyDefinitionTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/StringPropertyDefinitionTest.java
new file mode 100644
index 0000000..2ba1a09
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/StringPropertyDefinitionTest.java
@@ -0,0 +1,80 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import static org.testng.Assert.*;
+
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.IllegalPropertyValueException;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.StringPropertyDefinition;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public class StringPropertyDefinitionTest extends ConfigTestCase {
+
+ @Test
+ public void testValidateValueNoPattern() {
+ StringPropertyDefinition d = getDefinition(true, null);
+ d.validateValue("abc", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @Test
+ public void testValidateValuePatternMatches() {
+ StringPropertyDefinition d = getDefinition(true, "^[a-z]+$");
+ d.validateValue("abc", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ // TODO : I18N problem
+ @Test(enabled = false, expectedExceptions = IllegalPropertyValueException.class)
+ public void testValidateValuePatternDoesNotMatch() {
+ StringPropertyDefinition d = getDefinition(true, "^[a-z]+$");
+ d.validateValue("abc123", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ @Test
+ public void testDecodeValuePatternMatches() {
+ StringPropertyDefinition d = getDefinition(true, "^[a-z]+$");
+ assertEquals(d.decodeValue("abc", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS), "abc");
+ }
+
+ // TODO : I18N problem
+ @Test(enabled = false, expectedExceptions = IllegalPropertyValueStringException.class)
+ public void testDecodeValuePatternDoesNotMatch() {
+ StringPropertyDefinition d = getDefinition(true, "^[a-z]+$");
+ d.decodeValue("abc123", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ }
+
+ // Create a string property definition.
+ private StringPropertyDefinition getDefinition(boolean isCaseInsensitive, String pattern) {
+ StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
+ "test-property");
+ builder.setCaseInsensitive(isCaseInsensitive);
+ builder.setPattern(pattern, "STRING");
+ return builder.getInstance();
+ }
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/TestCfg.java b/opendj-config/src/test/java/org/forgerock/opendj/config/TestCfg.java
new file mode 100644
index 0000000..bc1ea1d
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/TestCfg.java
@@ -0,0 +1,203 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.ResourceBundle;
+
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.Constraint;
+import org.forgerock.opendj.config.InstantiableRelationDefinition;
+import org.forgerock.opendj.config.LDAPProfile;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.ManagedObjectDefinitionI18NResource;
+import org.forgerock.opendj.config.OptionalRelationDefinition;
+import org.forgerock.opendj.config.PropertyDefinition;
+
+/**
+ * Common methods for hooking in the test components.
+ */
+public final class TestCfg {
+
+ /**
+ * A one-to-many relation between the root and test-parent components.
+ */
+ private static final InstantiableRelationDefinition<TestParentCfgClient, TestParentCfg> RD_TEST_ONE_TO_MANY_PARENT;
+
+ /**
+ * A one-to-zero-or-one relation between the root and a test-parent
+ * component.
+ */
+ // @Checkstyle:off
+ private static final OptionalRelationDefinition<TestParentCfgClient, TestParentCfg>
+ RD_TEST_ONE_TO_ZERO_OR_ONE_PARENT;
+ // @Checkstyle:on
+
+ // Create a one-to-many relation for test-parent components.
+ static {
+ InstantiableRelationDefinition.Builder<TestParentCfgClient, TestParentCfg> builder =
+ new InstantiableRelationDefinition.Builder<TestParentCfgClient, TestParentCfg>(
+ RootCfgDefn.getInstance(), "test-one-to-many-parent", "test-one-to-many-parents",
+ TestParentCfgDefn.getInstance());
+ RD_TEST_ONE_TO_MANY_PARENT = builder.getInstance();
+ }
+
+ // Create a one-to-many relation for test-parent components.
+ static {
+ OptionalRelationDefinition.Builder<TestParentCfgClient, TestParentCfg> builder =
+ new OptionalRelationDefinition.Builder<TestParentCfgClient, TestParentCfg>(
+ RootCfgDefn.getInstance(), "test-one-to-zero-or-one-parent", TestParentCfgDefn.getInstance());
+ RD_TEST_ONE_TO_ZERO_OR_ONE_PARENT = builder.getInstance();
+ }
+ /**
+ * Registers test parent and child object class definitions and any required
+ * resource bundles.
+ * <p>
+ * Unit tests which call this method <b>must</b> call {@link #cleanup()} on
+ * completion.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ public synchronized static void setUp() throws Exception {
+ initializeAndRegisterBundle(TestParentCfgDefn.getInstance());
+ initializeAndRegisterBundle(TestChildCfgDefn.getInstance());
+
+ // Ensure that the relations are registered (do this after things
+ // that can fail and leave tests in a bad state).
+ RootCfgDefn.getInstance().registerRelationDefinition(RD_TEST_ONE_TO_MANY_PARENT);
+ RootCfgDefn.getInstance().registerRelationDefinition(RD_TEST_ONE_TO_ZERO_OR_ONE_PARENT);
+ LDAPProfile.getInstance().pushWrapper(new MockLDAPProfile());
+ }
+
+ private static void initializeAndRegisterBundle(ManagedObjectDefinition<?, ?> definition) throws Exception {
+ definition.initialize();
+ String baseName = definition.getClass().getName();
+ ResourceBundle resourceBundle = ResourceBundle.getBundle(baseName);
+ ManagedObjectDefinitionI18NResource.getInstance().setResourceBundle(definition, resourceBundle);
+ }
+
+ /**
+ * Deregisters the test configurations from the administration framework.
+ */
+ public synchronized static void cleanup() {
+ LDAPProfile.getInstance().popWrapper();
+
+ AbstractManagedObjectDefinition<?, ?> root = RootCfgDefn.getInstance();
+ root.deregisterRelationDefinition(RD_TEST_ONE_TO_MANY_PARENT);
+ root.deregisterRelationDefinition(RD_TEST_ONE_TO_ZERO_OR_ONE_PARENT);
+
+ TestParentCfgDefn parentDef = TestParentCfgDefn.getInstance();
+ ManagedObjectDefinitionI18NResource.getInstance().removeResourceBundle(parentDef);
+
+ TestChildCfgDefn childDef = TestChildCfgDefn.getInstance();
+ ManagedObjectDefinitionI18NResource.getInstance().removeResourceBundle(childDef);
+ }
+
+ /**
+ * Gets the one-to-many relation between the root and test-parent
+ * components.
+ * <p>
+ * Unit tests which call this method <b>must</b> have already called
+ * {@link #setUp()}.
+ *
+ * @return Returns the one-to-many relation between the root and test-parent
+ * components.
+ */
+ // @Checkstyle:off
+ public static InstantiableRelationDefinition<TestParentCfgClient, TestParentCfg>
+ getTestOneToManyParentRelationDefinition() {
+ return RD_TEST_ONE_TO_MANY_PARENT;
+ }
+ // @Checkstyle:on
+
+ /**
+ * Gets the one-to-zero-or-one relation between the root and a test-parent
+ * component.
+ * <p>
+ * Unit tests which call this method <b>must</b> have already called
+ * {@link #setUp()}.
+ *
+ * @return Returns the one-to-zero-or-one relation between the root and a
+ * test-parent component.
+ */
+ // @Checkstyle:off
+ public static OptionalRelationDefinition<TestParentCfgClient, TestParentCfg>
+ getTestOneToZeroOrOneParentRelationDefinition() {
+ return RD_TEST_ONE_TO_ZERO_OR_ONE_PARENT;
+ }
+ // @Checkstyle:on
+
+ /**
+ * Initializes a property definition and its default behavior.
+ *
+ * @param propertyDef
+ * The property definition to be initialized.
+ * @throws Exception
+ * If the property definition could not be initialized.
+ */
+ public static void initializePropertyDefinition(PropertyDefinition<?> propertyDef) throws Exception {
+ propertyDef.initialize();
+ propertyDef.getDefaultBehaviorProvider().initialize();
+ }
+
+ /**
+ * Adds a constraint temporarily with test child definition.
+ *
+ * @param constraint
+ * The constraint.
+ */
+ public static void addConstraint(Constraint constraint) {
+ TestChildCfgDefn.getInstance().registerConstraint(constraint);
+ }
+
+ /**
+ * Adds a property definition temporarily with test child definition,
+ * replacing any existing property definition with the same name.
+ *
+ * @param pd
+ * The property definition.
+ */
+ public static void addPropertyDefinition(PropertyDefinition<?> pd) {
+ TestChildCfgDefn.getInstance().registerPropertyDefinition(pd);
+ }
+
+ /**
+ * Removes a constraint from the test child definition.
+ *
+ * @param constraint
+ * The constraint.
+ */
+ public static void removeConstraint(Constraint constraint) {
+ TestChildCfgDefn.getInstance().deregisterConstraint(constraint);
+ }
+
+ // Prevent instantiation.
+ private TestCfg() {
+ // No implementation required.
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/TestChildCfg.java b/opendj-config/src/test/java/org/forgerock/opendj/config/TestChildCfg.java
new file mode 100644
index 0000000..68b96f8
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/TestChildCfg.java
@@ -0,0 +1,125 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.SortedSet;
+
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.server.ConfigurationChangeListener;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.schema.AttributeType;
+
+/**
+ * A server-side interface for querying Test Child settings.
+ * <p>
+ * A configuration for testing components that are subordinate to a parent
+ * component. It re-uses the virtual-attribute configuration LDAP profile.
+ */
+public interface TestChildCfg extends Configuration {
+
+ /**
+ * Get the configuration class associated with this Test Child.
+ *
+ * @return Returns the configuration class associated with this Test Child.
+ */
+ Class<? extends TestChildCfg> configurationClass();
+
+ /**
+ * Register to be notified when this Test Child is changed.
+ *
+ * @param listener
+ * The Test Child configuration change listener.
+ */
+ void addChangeListener(ConfigurationChangeListener<TestChildCfg> listener);
+
+ /**
+ * Deregister an existing Test Child configuration change listener.
+ *
+ * @param listener
+ * The Test Child configuration change listener.
+ */
+ void removeChangeListener(ConfigurationChangeListener<TestChildCfg> listener);
+
+ /**
+ * Get the "aggregation-property" property.
+ * <p>
+ * An aggregation property which references connection handlers.
+ *
+ * @return Returns the values of the "aggregation-property" property.
+ */
+ SortedSet<String> getAggregationProperty();
+
+ /**
+ * Get the "mandatory-boolean-property" property.
+ * <p>
+ * A mandatory boolean property.
+ *
+ * @return Returns the value of the "mandatory-boolean-property" property.
+ */
+ boolean isMandatoryBooleanProperty();
+
+ /**
+ * Get the "mandatory-class-property" property.
+ * <p>
+ * A mandatory Java-class property requiring a component restart.
+ *
+ * @return Returns the value of the "mandatory-class-property" property.
+ */
+ String getMandatoryClassProperty();
+
+ /**
+ * Get the "mandatory-read-only-attribute-type-property" property.
+ * <p>
+ * A mandatory read-only attribute type property.
+ *
+ * @return Returns the value of the
+ * "mandatory-read-only-attribute-type-property" property.
+ */
+ AttributeType getMandatoryReadOnlyAttributeTypeProperty();
+
+ /**
+ * Get the "optional-multi-valued-dn-property1" property.
+ * <p>
+ * An optional multi-valued DN property which inherits its values from
+ * optional-multi-valued-dn-property in the parent.
+ *
+ * @return Returns the values of the "optional-multi-valued-dn-property1"
+ * property.
+ */
+ SortedSet<DN> getOptionalMultiValuedDNProperty1();
+
+ /**
+ * Get the "optional-multi-valued-dn-property2" property.
+ * <p>
+ * An optional multi-valued DN property which inherits its values from
+ * optional-multi-valued-dn-property1.
+ *
+ * @return Returns the values of the "optional-multi-valued-dn-property2"
+ * property.
+ */
+ SortedSet<DN> getOptionalMultiValuedDNProperty2();
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/TestChildCfgClient.java b/opendj-config/src/test/java/org/forgerock/opendj/config/TestChildCfgClient.java
new file mode 100644
index 0000000..29aa392
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/TestChildCfgClient.java
@@ -0,0 +1,196 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.Collection;
+import java.util.SortedSet;
+
+import org.forgerock.opendj.config.ConfigurationClient;
+import org.forgerock.opendj.config.IllegalPropertyValueException;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.PropertyIsReadOnlyException;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.schema.AttributeType;
+
+/**
+ * A client-side interface for reading and modifying Test Child settings.
+ * <p>
+ * A configuration for testing components that are subordinate to a parent
+ * component. It re-uses the virtual-attribute configuration LDAP profile.
+ */
+public interface TestChildCfgClient extends ConfigurationClient {
+
+ /**
+ * Get the configuration definition associated with this Test Child.
+ *
+ * @return Returns the configuration definition associated with this Test
+ * Child.
+ */
+ ManagedObjectDefinition<? extends TestChildCfgClient, ? extends TestChildCfg> definition();
+
+ /**
+ * Get the "aggregation-property" property.
+ * <p>
+ * An aggregation property which references connection handlers.
+ *
+ * @return Returns the values of the "aggregation-property" property.
+ */
+ SortedSet<String> getAggregationProperty();
+
+ /**
+ * Set the "aggregation-property" property.
+ * <p>
+ * An aggregation property which references connection handlers.
+ *
+ * @param values
+ * The values of the "aggregation-property" property.
+ * @throws IllegalPropertyValueException
+ * If one or more of the new values are invalid.
+ */
+ void setAggregationProperty(Collection<String> values) throws IllegalPropertyValueException;
+
+ /**
+ * Get the "mandatory-boolean-property" property.
+ * <p>
+ * A mandatory boolean property.
+ *
+ * @return Returns the value of the "mandatory-boolean-property" property.
+ */
+ Boolean isMandatoryBooleanProperty();
+
+ /**
+ * Set the "mandatory-boolean-property" property.
+ * <p>
+ * A mandatory boolean property.
+ *
+ * @param value
+ * The value of the "mandatory-boolean-property" property.
+ * @throws IllegalPropertyValueException
+ * If the new value is invalid.
+ */
+ void setMandatoryBooleanProperty(boolean value) throws IllegalPropertyValueException;
+
+ /**
+ * Get the "mandatory-class-property" property.
+ * <p>
+ * A mandatory Java-class property requiring a component restart.
+ *
+ * @return Returns the value of the "mandatory-class-property" property.
+ */
+ String getMandatoryClassProperty();
+
+ /**
+ * Set the "mandatory-class-property" property.
+ * <p>
+ * A mandatory Java-class property requiring a component restart.
+ *
+ * @param value
+ * The value of the "mandatory-class-property" property.
+ * @throws IllegalPropertyValueException
+ * If the new value is invalid.
+ */
+ void setMandatoryClassProperty(String value) throws IllegalPropertyValueException;
+
+ /**
+ * Get the "mandatory-read-only-attribute-type-property" property.
+ * <p>
+ * A mandatory read-only attribute type property.
+ *
+ * @return Returns the value of the
+ * "mandatory-read-only-attribute-type-property" property.
+ */
+ AttributeType getMandatoryReadOnlyAttributeTypeProperty();
+
+ /**
+ * Set the "mandatory-read-only-attribute-type-property" property.
+ * <p>
+ * A mandatory read-only attribute type property.
+ * <p>
+ * This property is read-only and can only be modified during creation of a
+ * Test Child.
+ *
+ * @param value
+ * The value of the "mandatory-read-only-attribute-type-property"
+ * property.
+ * @throws IllegalPropertyValueException
+ * If the new value is invalid.
+ * @throws PropertyIsReadOnlyException
+ * If this Test Child is not being initialized.
+ */
+ void setMandatoryReadOnlyAttributeTypeProperty(AttributeType value) throws IllegalPropertyValueException,
+ PropertyIsReadOnlyException;
+
+ /**
+ * Get the "optional-multi-valued-dn-property1" property.
+ * <p>
+ * An optional multi-valued DN property which inherits its values from
+ * optional-multi-valued-dn-property in the parent.
+ *
+ * @return Returns the values of the "optional-multi-valued-dn-property1"
+ * property.
+ */
+ SortedSet<DN> getOptionalMultiValuedDNProperty1();
+
+ /**
+ * Set the "optional-multi-valued-dn-property1" property.
+ * <p>
+ * An optional multi-valued DN property which inherits its values from
+ * optional-multi-valued-dn-property in the parent.
+ *
+ * @param values
+ * The values of the "optional-multi-valued-dn-property1"
+ * property.
+ * @throws IllegalPropertyValueException
+ * If one or more of the new values are invalid.
+ */
+ void setOptionalMultiValuedDNProperty1(Collection<DN> values) throws IllegalPropertyValueException;
+
+ /**
+ * Get the "optional-multi-valued-dn-property2" property.
+ * <p>
+ * An optional multi-valued DN property which inherits its values from
+ * optional-multi-valued-dn-property1.
+ *
+ * @return Returns the values of the "optional-multi-valued-dn-property2"
+ * property.
+ */
+ SortedSet<DN> getOptionalMultiValuedDNProperty2();
+
+ /**
+ * Set the "optional-multi-valued-dn-property2" property.
+ * <p>
+ * An optional multi-valued DN property which inherits its values from
+ * optional-multi-valued-dn-property1.
+ *
+ * @param values
+ * The values of the "optional-multi-valued-dn-property2"
+ * property.
+ * @throws IllegalPropertyValueException
+ * If one or more of the new values are invalid.
+ */
+ void setOptionalMultiValuedDNProperty2(Collection<DN> values) throws IllegalPropertyValueException;
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/TestChildCfgDefn.java b/opendj-config/src/test/java/org/forgerock/opendj/config/TestChildCfgDefn.java
new file mode 100644
index 0000000..0bc288b
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/TestChildCfgDefn.java
@@ -0,0 +1,492 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.Collection;
+import java.util.SortedSet;
+
+import org.forgerock.opendj.server.config.client.ConnectionHandlerCfgClient;
+import org.forgerock.opendj.server.config.server.ConnectionHandlerCfg;
+import org.forgerock.opendj.config.AdministratorAction;
+import org.forgerock.opendj.config.AggregationPropertyDefinition;
+import org.forgerock.opendj.config.AttributeTypePropertyDefinition;
+import org.forgerock.opendj.config.BooleanPropertyDefinition;
+import org.forgerock.opendj.config.ClassPropertyDefinition;
+import org.forgerock.opendj.config.DNPropertyDefinition;
+import org.forgerock.opendj.config.DefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.PropertyIsReadOnlyException;
+import org.forgerock.opendj.config.PropertyOption;
+import org.forgerock.opendj.config.PropertyProvider;
+import org.forgerock.opendj.config.RelativeInheritedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.client.ConcurrentModificationException;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException;
+import org.forgerock.opendj.config.client.OperationRejectedException;
+import org.forgerock.opendj.config.server.ConfigurationChangeListener;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.opendj.ldap.schema.AttributeType;
+
+/**
+ * An interface for querying the Test Child managed object definition meta
+ * information.
+ * <p>
+ * A configuration for testing components that are subordinate to a parent
+ * component. It re-uses the virtual-attribute configuration LDAP profile.
+ */
+public final class TestChildCfgDefn extends ManagedObjectDefinition<TestChildCfgClient, TestChildCfg> {
+
+ // The singleton configuration definition instance.
+ private static final TestChildCfgDefn INSTANCE = new TestChildCfgDefn();
+
+ // The "aggregation-property" property definition.
+ // @Checkstyle:off
+ private static final AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg>
+ PROPDEF_AGGREGATION_PROPERTY;
+ // @Checkstyle:on
+
+ // The "mandatory-boolean-property" property definition.
+ private static final BooleanPropertyDefinition PROPDEF_MANDATORY_BOOLEAN_PROPERTY;
+
+ // The "mandatory-class-property" property definition.
+ private static final ClassPropertyDefinition PROPDEF_MANDATORY_CLASS_PROPERTY;
+
+ // The "mandatory-read-only-attribute-type-property" property definition.
+ private static final AttributeTypePropertyDefinition PROPDEF_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY;
+
+ // The "optional-multi-valued-dn-property1" property definition.
+ private static final DNPropertyDefinition PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY1;
+
+ // The "optional-multi-valued-dn-property2" property definition.
+ private static final DNPropertyDefinition PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY2;
+
+ // Build the "aggregation-property" property definition.
+ static {
+ AggregationPropertyDefinition.Builder<ConnectionHandlerCfgClient, ConnectionHandlerCfg> builder =
+ AggregationPropertyDefinition.createBuilder(INSTANCE, "aggregation-property");
+ builder.setOption(PropertyOption.MULTI_VALUED);
+ builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
+ "aggregation-property"));
+ builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
+ builder.setParentPath("/");
+ builder.setRelationDefinition("connection-handler");
+ PROPDEF_AGGREGATION_PROPERTY = builder.getInstance();
+ INSTANCE.registerPropertyDefinition(PROPDEF_AGGREGATION_PROPERTY);
+ INSTANCE.registerConstraint(PROPDEF_AGGREGATION_PROPERTY.getSourceConstraint());
+ }
+
+ // Build the "mandatory-boolean-property" property definition.
+ static {
+ BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE,
+ "mandatory-boolean-property");
+ builder.setOption(PropertyOption.MANDATORY);
+ builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
+ "mandatory-boolean-property"));
+ builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<Boolean>());
+ PROPDEF_MANDATORY_BOOLEAN_PROPERTY = builder.getInstance();
+ INSTANCE.registerPropertyDefinition(PROPDEF_MANDATORY_BOOLEAN_PROPERTY);
+ }
+
+ // Build the "mandatory-class-property" property definition.
+ static {
+ ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE,
+ "mandatory-class-property");
+ builder.setOption(PropertyOption.MANDATORY);
+ builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE,
+ "mandatory-class-property"));
+ DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>(
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ builder.setDefaultBehaviorProvider(provider);
+ builder.addInstanceOf("org.opends.server.api.VirtualAttributeProvider");
+ PROPDEF_MANDATORY_CLASS_PROPERTY = builder.getInstance();
+ INSTANCE.registerPropertyDefinition(PROPDEF_MANDATORY_CLASS_PROPERTY);
+ }
+
+ // Build the "mandatory-read-only-attribute-type-property" property
+ // definition.
+ static {
+ AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(INSTANCE,
+ "mandatory-read-only-attribute-type-property");
+ builder.setOption(PropertyOption.READ_ONLY);
+ builder.setOption(PropertyOption.MANDATORY);
+ builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
+ "mandatory-read-only-attribute-type-property"));
+ builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<AttributeType>());
+ PROPDEF_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY = builder.getInstance();
+ INSTANCE.registerPropertyDefinition(PROPDEF_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY);
+ }
+
+ // Build the "optional-multi-valued-dn-property1" property definition.
+ static {
+ DNPropertyDefinition.Builder builder = DNPropertyDefinition.createBuilder(INSTANCE,
+ "optional-multi-valued-dn-property1");
+ builder.setOption(PropertyOption.MULTI_VALUED);
+ builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
+ "optional-multi-valued-dn-property1"));
+ DefaultBehaviorProvider<DN> provider = new RelativeInheritedDefaultBehaviorProvider<DN>(
+ TestParentCfgDefn.getInstance(), "optional-multi-valued-dn-property", 1);
+ builder.setDefaultBehaviorProvider(provider);
+ PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY1 = builder.getInstance();
+ INSTANCE.registerPropertyDefinition(PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY1);
+ }
+
+ // Build the "optional-multi-valued-dn-property2" property definition.
+ static {
+ DNPropertyDefinition.Builder builder = DNPropertyDefinition.createBuilder(INSTANCE,
+ "optional-multi-valued-dn-property2");
+ builder.setOption(PropertyOption.MULTI_VALUED);
+ builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
+ "optional-multi-valued-dn-property2"));
+ DefaultBehaviorProvider<DN> provider = new RelativeInheritedDefaultBehaviorProvider<DN>(
+ TestChildCfgDefn.getInstance(), "optional-multi-valued-dn-property1", 0);
+ builder.setDefaultBehaviorProvider(provider);
+ PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY2 = builder.getInstance();
+ INSTANCE.registerPropertyDefinition(PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY2);
+ }
+
+ /**
+ * Get the Test Child configuration definition singleton.
+ *
+ * @return Returns the Test Child configuration definition singleton.
+ */
+ public static TestChildCfgDefn getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Private constructor.
+ */
+ private TestChildCfgDefn() {
+ super("test-child", null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public TestChildCfgClient createClientConfiguration(ManagedObject<? extends TestChildCfgClient> impl) {
+ return new TestChildCfgClientImpl(impl);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public TestChildCfg createServerConfiguration(ServerManagedObject<? extends TestChildCfg> impl) {
+ return new TestChildCfgServerImpl(impl);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Class<TestChildCfg> getServerConfigurationClass() {
+ return TestChildCfg.class;
+ }
+
+ /**
+ * Get the "aggregation-property" property definition.
+ * <p>
+ * An aggregation property which references connection handlers.
+ *
+ * @return Returns the "aggregation-property" property definition.
+ */
+ // @Checkstyle:off
+ public AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg>
+ getAggregationPropertyPropertyDefinition() {
+ return PROPDEF_AGGREGATION_PROPERTY;
+ }
+ // @Checkstyle:on
+
+ /**
+ * Get the "mandatory-boolean-property" property definition.
+ * <p>
+ * A mandatory boolean property.
+ *
+ * @return Returns the "mandatory-boolean-property" property definition.
+ */
+ public BooleanPropertyDefinition getMandatoryBooleanPropertyPropertyDefinition() {
+ return PROPDEF_MANDATORY_BOOLEAN_PROPERTY;
+ }
+
+ /**
+ * Get the "mandatory-class-property" property definition.
+ * <p>
+ * A mandatory Java-class property requiring a component restart.
+ *
+ * @return Returns the "mandatory-class-property" property definition.
+ */
+ public ClassPropertyDefinition getMandatoryClassPropertyPropertyDefinition() {
+ return PROPDEF_MANDATORY_CLASS_PROPERTY;
+ }
+
+ /**
+ * Get the "mandatory-read-only-attribute-type-property" property
+ * definition.
+ * <p>
+ * A mandatory read-only attribute type property.
+ *
+ * @return Returns the "mandatory-read-only-attribute-type-property"
+ * property definition.
+ */
+ public AttributeTypePropertyDefinition getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition() {
+ return PROPDEF_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY;
+ }
+
+ /**
+ * Get the "optional-multi-valued-dn-property1" property definition.
+ * <p>
+ * An optional multi-valued DN property which inherits its values from
+ * optional-multi-valued-dn-property in the parent.
+ *
+ * @return Returns the "optional-multi-valued-dn-property1" property
+ * definition.
+ */
+ public DNPropertyDefinition getOptionalMultiValuedDNProperty1PropertyDefinition() {
+ return PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY1;
+ }
+
+ /**
+ * Get the "optional-multi-valued-dn-property2" property definition.
+ * <p>
+ * An optional multi-valued DN property which inherits its values from
+ * optional-multi-valued-dn-property1.
+ *
+ * @return Returns the "optional-multi-valued-dn-property2" property
+ * definition.
+ */
+ public DNPropertyDefinition getOptionalMultiValuedDNProperty2PropertyDefinition() {
+ return PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY2;
+ }
+
+ /**
+ * Managed object client implementation.
+ */
+ private static class TestChildCfgClientImpl implements TestChildCfgClient {
+
+ // Private implementation.
+ private ManagedObject<? extends TestChildCfgClient> impl;
+
+ // Private constructor.
+ private TestChildCfgClientImpl(ManagedObject<? extends TestChildCfgClient> impl) {
+ this.impl = impl;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SortedSet<String> getAggregationProperty() {
+ return impl.getPropertyValues(INSTANCE.getAggregationPropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setAggregationProperty(Collection<String> values) {
+ impl.setPropertyValues(INSTANCE.getAggregationPropertyPropertyDefinition(), values);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Boolean isMandatoryBooleanProperty() {
+ return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setMandatoryBooleanProperty(boolean value) {
+ impl.setPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition(), value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getMandatoryClassProperty() {
+ return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setMandatoryClassProperty(String value) {
+ impl.setPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition(), value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public AttributeType getMandatoryReadOnlyAttributeTypeProperty() {
+ return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setMandatoryReadOnlyAttributeTypeProperty(AttributeType value) throws PropertyIsReadOnlyException {
+ impl.setPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition(), value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SortedSet<DN> getOptionalMultiValuedDNProperty1() {
+ return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty1PropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setOptionalMultiValuedDNProperty1(Collection<DN> values) {
+ impl.setPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty1PropertyDefinition(), values);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SortedSet<DN> getOptionalMultiValuedDNProperty2() {
+ return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty2PropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setOptionalMultiValuedDNProperty2(Collection<DN> values) {
+ impl.setPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty2PropertyDefinition(), values);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ManagedObjectDefinition<? extends TestChildCfgClient, ? extends TestChildCfg> definition() {
+ return INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PropertyProvider properties() {
+ return impl;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void commit() throws ManagedObjectAlreadyExistsException, MissingMandatoryPropertiesException,
+ ConcurrentModificationException, OperationRejectedException, ErrorResultException {
+ impl.commit();
+ }
+
+ }
+
+ /**
+ * Managed object server implementation.
+ */
+ private static class TestChildCfgServerImpl implements TestChildCfg {
+
+ // Private implementation.
+ private ServerManagedObject<? extends TestChildCfg> impl;
+
+ // Private constructor.
+ private TestChildCfgServerImpl(ServerManagedObject<? extends TestChildCfg> impl) {
+ this.impl = impl;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addChangeListener(ConfigurationChangeListener<TestChildCfg> listener) {
+ impl.registerChangeListener(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removeChangeListener(ConfigurationChangeListener<TestChildCfg> listener) {
+ impl.deregisterChangeListener(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SortedSet<String> getAggregationProperty() {
+ return impl.getPropertyValues(INSTANCE.getAggregationPropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isMandatoryBooleanProperty() {
+ return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getMandatoryClassProperty() {
+ return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public AttributeType getMandatoryReadOnlyAttributeTypeProperty() {
+ return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SortedSet<DN> getOptionalMultiValuedDNProperty1() {
+ return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty1PropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SortedSet<DN> getOptionalMultiValuedDNProperty2() {
+ return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty2PropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Class<? extends TestChildCfg> configurationClass() {
+ return TestChildCfg.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DN dn() {
+ return impl.getDN();
+ }
+
+ }
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/TestParentCfg.java b/opendj-config/src/test/java/org/forgerock/opendj/config/TestParentCfg.java
new file mode 100644
index 0000000..e971ae4
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/TestParentCfg.java
@@ -0,0 +1,216 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.SortedSet;
+
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.server.ConfigException;
+import org.forgerock.opendj.config.server.ConfigurationAddListener;
+import org.forgerock.opendj.config.server.ConfigurationChangeListener;
+import org.forgerock.opendj.config.server.ConfigurationDeleteListener;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.schema.AttributeType;
+
+/**
+ * A server-side interface for querying Test Parent settings.
+ * <p>
+ * A configuration for testing components that have child components. It re-uses
+ * the virtual-attribute configuration LDAP profile.
+ */
+public interface TestParentCfg extends Configuration {
+
+ /**
+ * Get the configuration class associated with this Test Parent.
+ *
+ * @return Returns the configuration class associated with this Test Parent.
+ */
+ Class<? extends TestParentCfg> configurationClass();
+
+ /**
+ * Register to be notified when this Test Parent is changed.
+ *
+ * @param listener
+ * The Test Parent configuration change listener.
+ */
+ void addChangeListener(ConfigurationChangeListener<TestParentCfg> listener);
+
+ /**
+ * Deregister an existing Test Parent configuration change listener.
+ *
+ * @param listener
+ * The Test Parent configuration change listener.
+ */
+ void removeChangeListener(ConfigurationChangeListener<TestParentCfg> listener);
+
+ /**
+ * Get the "mandatory-boolean-property" property.
+ * <p>
+ * A mandatory boolean property.
+ *
+ * @return Returns the value of the "mandatory-boolean-property" property.
+ */
+ boolean isMandatoryBooleanProperty();
+
+ /**
+ * Get the "mandatory-class-property" property.
+ * <p>
+ * A mandatory Java-class property requiring a component restart.
+ *
+ * @return Returns the value of the "mandatory-class-property" property.
+ */
+ String getMandatoryClassProperty();
+
+ /**
+ * Get the "mandatory-read-only-attribute-type-property" property.
+ * <p>
+ * A mandatory read-only attribute type property.
+ *
+ * @return Returns the value of the
+ * "mandatory-read-only-attribute-type-property" property.
+ */
+ AttributeType getMandatoryReadOnlyAttributeTypeProperty();
+
+ /**
+ * Get the "optional-multi-valued-dn-property" property.
+ * <p>
+ * An optional multi-valued DN property with a defined default behavior.
+ *
+ * @return Returns the values of the "optional-multi-valued-dn-property"
+ * property.
+ */
+ SortedSet<DN> getOptionalMultiValuedDNProperty();
+
+ /**
+ * Lists the Test Children.
+ *
+ * @return Returns an array containing the names of the Test Children.
+ */
+ String[] listTestChildren();
+
+ /**
+ * Gets the named Test Child.
+ *
+ * @param name
+ * The name of the Test Child to retrieve.
+ * @return Returns the named Test Child.
+ * @throws ConfigException
+ * If the Test Child could not be found or it could not be
+ * successfully decoded.
+ */
+ TestChildCfg getTestChild(String name) throws ConfigException;
+
+ /**
+ * Registers to be notified when new Test Children are added.
+ *
+ * @param listener
+ * The Test Child configuration add listener.
+ * @throws ConfigException
+ * If the add listener could not be registered.
+ */
+ void addTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener) throws ConfigException;
+
+ /**
+ * Deregisters an existing Test Child configuration add listener.
+ *
+ * @param listener
+ * The Test Child configuration add listener.
+ */
+ void removeTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener);
+
+ /**
+ * Registers to be notified when existing Test Children are deleted.
+ *
+ * @param listener
+ * The Test Child configuration delete listener.
+ * @throws ConfigException
+ * If the delete listener could not be registered.
+ */
+ void addTestChildDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener) throws ConfigException;
+
+ /**
+ * Deregisters an existing Test Child configuration delete listener.
+ *
+ * @param listener
+ * The Test Child configuration delete listener.
+ */
+ void removeTestChildDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener);
+
+ /**
+ * Determines whether or not the Optional Test Child exists.
+ *
+ * @return Returns <true> if the Optional Test Child exists.
+ */
+ boolean hasOptionalTestChild();
+
+ /**
+ * Gets the Optional Test Child if it is present.
+ *
+ * @return Returns the Optional Test Child if it is present.
+ * @throws ConfigException
+ * If the Optional Test Child does not exist or it could not be
+ * successfully decoded.
+ */
+ TestChildCfg getOptionalTestChild() throws ConfigException;
+
+ /**
+ * Registers to be notified when the Optional Test Child is added.
+ *
+ * @param listener
+ * The Optional Test Child configuration add listener.
+ * @throws ConfigException
+ * If the add listener could not be registered.
+ */
+ void addOptionalTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener) throws ConfigException;
+
+ /**
+ * Deregisters an existing Optional Test Child configuration add listener.
+ *
+ * @param listener
+ * The Optional Test Child configuration add listener.
+ */
+ void removeOptionalTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener);
+
+ /**
+ * Registers to be notified the Optional Test Child is deleted.
+ *
+ * @param listener
+ * The Optional Test Child configuration delete listener.
+ * @throws ConfigException
+ * If the delete listener could not be registered.
+ */
+ void addOptionalChildTestDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener) throws ConfigException;
+
+ /**
+ * Deregisters an existing Optional Test Child configuration delete
+ * listener.
+ *
+ * @param listener
+ * The Optional Test Child configuration delete listener.
+ */
+ void removeOptionalTestChildDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener);
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/TestParentCfgClient.java b/opendj-config/src/test/java/org/forgerock/opendj/config/TestParentCfgClient.java
new file mode 100644
index 0000000..38552a5
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/TestParentCfgClient.java
@@ -0,0 +1,306 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.Collection;
+import java.util.SortedSet;
+
+import org.forgerock.opendj.config.ConfigurationClient;
+import org.forgerock.opendj.config.DefaultBehaviorException;
+import org.forgerock.opendj.config.DefinitionDecodingException;
+import org.forgerock.opendj.config.IllegalPropertyValueException;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.ManagedObjectNotFoundException;
+import org.forgerock.opendj.config.PropertyIsReadOnlyException;
+import org.forgerock.opendj.config.client.ConcurrentModificationException;
+import org.forgerock.opendj.config.client.IllegalManagedObjectNameException;
+import org.forgerock.opendj.config.client.ManagedObjectDecodingException;
+import org.forgerock.opendj.config.client.OperationRejectedException;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.opendj.ldap.schema.AttributeType;
+
+/**
+ * A client-side interface for reading and modifying Test Parent settings.
+ * <p>
+ * A configuration for testing components that have child components. It re-uses
+ * the virtual-attribute configuration LDAP profile.
+ */
+public interface TestParentCfgClient extends ConfigurationClient {
+
+ /**
+ * Get the configuration definition associated with this Test Parent.
+ *
+ * @return Returns the configuration definition associated with this Test
+ * Parent.
+ */
+ ManagedObjectDefinition<? extends TestParentCfgClient, ? extends TestParentCfg> definition();
+
+ /**
+ * Get the "mandatory-boolean-property" property.
+ * <p>
+ * A mandatory boolean property.
+ *
+ * @return Returns the value of the "mandatory-boolean-property" property.
+ */
+ Boolean isMandatoryBooleanProperty();
+
+ /**
+ * Set the "mandatory-boolean-property" property.
+ * <p>
+ * A mandatory boolean property.
+ *
+ * @param value
+ * The value of the "mandatory-boolean-property" property.
+ * @throws IllegalPropertyValueException
+ * If the new value is invalid.
+ */
+ void setMandatoryBooleanProperty(boolean value) throws IllegalPropertyValueException;
+
+ /**
+ * Get the "mandatory-class-property" property.
+ * <p>
+ * A mandatory Java-class property requiring a component restart.
+ *
+ * @return Returns the value of the "mandatory-class-property" property.
+ */
+ String getMandatoryClassProperty();
+
+ /**
+ * Set the "mandatory-class-property" property.
+ * <p>
+ * A mandatory Java-class property requiring a component restart.
+ *
+ * @param value
+ * The value of the "mandatory-class-property" property.
+ * @throws IllegalPropertyValueException
+ * If the new value is invalid.
+ */
+ void setMandatoryClassProperty(String value) throws IllegalPropertyValueException;
+
+ /**
+ * Get the "mandatory-read-only-attribute-type-property" property.
+ * <p>
+ * A mandatory read-only attribute type property.
+ *
+ * @return Returns the value of the
+ * "mandatory-read-only-attribute-type-property" property.
+ */
+ AttributeType getMandatoryReadOnlyAttributeTypeProperty();
+
+ /**
+ * Set the "mandatory-read-only-attribute-type-property" property.
+ * <p>
+ * A mandatory read-only attribute type property.
+ * <p>
+ * This property is read-only and can only be modified during creation of a
+ * Test Parent.
+ *
+ * @param value
+ * The value of the "mandatory-read-only-attribute-type-property"
+ * property.
+ * @throws IllegalPropertyValueException
+ * If the new value is invalid.
+ * @throws PropertyIsReadOnlyException
+ * If this Test Parent is not being initialized.
+ */
+ void setMandatoryReadOnlyAttributeTypeProperty(AttributeType value) throws IllegalPropertyValueException,
+ PropertyIsReadOnlyException;
+
+ /**
+ * Get the "optional-multi-valued-dn-property" property.
+ * <p>
+ * An optional multi-valued DN property with a defined default behavior.
+ *
+ * @return Returns the values of the "optional-multi-valued-dn-property"
+ * property.
+ */
+ SortedSet<DN> getOptionalMultiValuedDNProperty();
+
+ /**
+ * Set the "optional-multi-valued-dn-property" property.
+ * <p>
+ * An optional multi-valued DN property with a defined default behavior.
+ *
+ * @param values
+ * The values of the "optional-multi-valued-dn-property"
+ * property.
+ * @throws IllegalPropertyValueException
+ * If one or more of the new values are invalid.
+ */
+ void setOptionalMultiValuedDNProperty(Collection<DN> values) throws IllegalPropertyValueException;
+
+ /**
+ * Lists the Test Children.
+ *
+ * @return Returns an array containing the names of the Test Children.
+ * @throws ConcurrentModificationException
+ * If this Test Parent has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If an error occurs
+ */
+ String[] listTestChildren() throws ConcurrentModificationException, ErrorResultException;
+
+ /**
+ * Gets the named Test Child.
+ *
+ * @param name
+ * The name of the Test Child to retrieve.
+ * @return Returns the named Test Child.
+ * @throws DefinitionDecodingException
+ * If the named Test Child was found but its type could not be
+ * determined.
+ * @throws ManagedObjectDecodingException
+ * If the named Test Child was found but one or more of its
+ * properties could not be decoded.
+ * @throws ManagedObjectNotFoundException
+ * If the named Test Child was not found on the server.
+ * @throws ConcurrentModificationException
+ * If this Test Parent has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If an error occurs.
+ */
+ TestChildCfgClient getTestChild(String name) throws DefinitionDecodingException, ManagedObjectDecodingException,
+ ManagedObjectNotFoundException, ConcurrentModificationException, ErrorResultException;
+
+ /**
+ * Creates a new Test Child. The new Test Child will initially not contain
+ * any property values (including mandatory properties). Once the Test Child
+ * has been configured it can be added to the server using the
+ * {@link #commit()} method.
+ *
+ * @param <C>
+ * The type of the Test Child being created.
+ * @param d
+ * The definition of the Test Child to be created.
+ * @param name
+ * The name of the new Test Child.
+ * @param exceptions
+ * An optional collection in which to place any
+ * {@link DefaultBehaviorException}s that occurred whilst
+ * attempting to determine the default values of the Test Child.
+ * This argument can be <code>null<code>.
+ * @return Returns a new Test Child configuration instance.
+ * @throws IllegalManagedObjectNameException
+ * If the name is invalid.
+ */
+ <C extends TestChildCfgClient> C createTestChild(ManagedObjectDefinition<C, ? extends TestChildCfg> d, String name,
+ Collection<DefaultBehaviorException> exceptions) throws IllegalManagedObjectNameException;
+
+ /**
+ * Removes the named Test Child.
+ *
+ * @param name
+ * The name of the Test Child to remove.
+ * @throws ManagedObjectNotFoundException
+ * If the Test Child does not exist.
+ * @throws OperationRejectedException
+ * If the server refuses to remove the Test Child due to some
+ * server-side constraint which cannot be satisfied (for
+ * example, if it is referenced by another managed object).
+ * @throws ConcurrentModificationException
+ * If this Test Parent has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If an errors occurs.
+ */
+ void removeTestChild(String name) throws ManagedObjectNotFoundException, OperationRejectedException,
+ ConcurrentModificationException, ErrorResultException;
+
+ /**
+ * Determines whether or not the Optional Test Child exists.
+ *
+ * @return Returns <true> if the Optional Test Child exists.
+ * @throws ConcurrentModificationException
+ * If this Test Parent has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If an errors occurs.
+ */
+ boolean hasOptionalTestChild() throws ConcurrentModificationException, ErrorResultException;
+
+ /**
+ * Gets the Optional Test Child if it is present.
+ *
+ * @return Returns the Optional Test Child if it is present.
+ * @throws DefinitionDecodingException
+ * If the Optional Test Child was found but its type could not
+ * be determined.
+ * @throws ManagedObjectDecodingException
+ * If the Optional Test Child was found but one or more of its
+ * properties could not be decoded.
+ * @throws ManagedObjectNotFoundException
+ * If the Optional Test Child is not present.
+ * @throws ConcurrentModificationException
+ * If this Test Parent has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If an errors occurs.
+ */
+ TestChildCfgClient getOptionalChild() throws DefinitionDecodingException, ManagedObjectDecodingException,
+ ManagedObjectNotFoundException, ConcurrentModificationException, ErrorResultException;
+
+ /**
+ * Creates a new Optional Test Child. The new Optional Test Child will
+ * initially not contain any property values (including mandatory
+ * properties). Once the Optional Test Child has been configured it can be
+ * added to the server using the {@link #commit()} method.
+ *
+ * @param <C>
+ * The type of the Optional Test Child being created.
+ * @param d
+ * The definition of the Optional Test Child to be created.
+ * @param exceptions
+ * An optional collection in which to place any
+ * {@link DefaultBehaviorException}s that occurred whilst
+ * attempting to determine the default values of the Optional
+ * Test Child. This argument can be <code>null<code>.
+ * @return Returns a new Optional Test Child configuration instance.
+ */
+ <C extends TestChildCfgClient> C createOptionalTestChild(ManagedObjectDefinition<C, ? extends TestChildCfg> d,
+ Collection<DefaultBehaviorException> exceptions);
+
+ /**
+ * Removes the Optional Test Child if it exists.
+ *
+ * @throws ManagedObjectNotFoundException
+ * If the Optional Test Child does not exist.
+ * @throws OperationRejectedException
+ * If the server refuses to remove the Optional Test Child due
+ * to some server-side constraint which cannot be satisfied (for
+ * example, if it is referenced by another managed object).
+ * @throws ConcurrentModificationException
+ * If this Test Parent has been removed from the server by
+ * another client.
+ * @throws ErrorResultException
+ * If an errors occurs.
+ */
+ void removeOptionalTestChild() throws ManagedObjectNotFoundException, OperationRejectedException,
+ ConcurrentModificationException, ErrorResultException;
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/TestParentCfgDefn.java b/opendj-config/src/test/java/org/forgerock/opendj/config/TestParentCfgDefn.java
new file mode 100644
index 0000000..6ce4e8d
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/TestParentCfgDefn.java
@@ -0,0 +1,585 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config;
+
+import java.util.Collection;
+import java.util.SortedSet;
+
+import org.forgerock.opendj.config.AdministratorAction;
+import org.forgerock.opendj.config.AttributeTypePropertyDefinition;
+import org.forgerock.opendj.config.BooleanPropertyDefinition;
+import org.forgerock.opendj.config.ClassPropertyDefinition;
+import org.forgerock.opendj.config.DNPropertyDefinition;
+import org.forgerock.opendj.config.DefaultBehaviorException;
+import org.forgerock.opendj.config.DefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.DefinitionDecodingException;
+import org.forgerock.opendj.config.InstantiableRelationDefinition;
+import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException;
+import org.forgerock.opendj.config.ManagedObjectDefinition;
+import org.forgerock.opendj.config.ManagedObjectNotFoundException;
+import org.forgerock.opendj.config.OptionalRelationDefinition;
+import org.forgerock.opendj.config.PropertyIsReadOnlyException;
+import org.forgerock.opendj.config.PropertyOption;
+import org.forgerock.opendj.config.PropertyProvider;
+import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.client.ConcurrentModificationException;
+import org.forgerock.opendj.config.client.IllegalManagedObjectNameException;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagedObjectDecodingException;
+import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException;
+import org.forgerock.opendj.config.client.OperationRejectedException;
+import org.forgerock.opendj.config.server.ConfigException;
+import org.forgerock.opendj.config.server.ConfigurationAddListener;
+import org.forgerock.opendj.config.server.ConfigurationChangeListener;
+import org.forgerock.opendj.config.server.ConfigurationDeleteListener;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.opendj.ldap.schema.AttributeType;
+
+/**
+ * An interface for querying the Test Parent managed object definition meta
+ * information.
+ * <p>
+ * A configuration for testing components that have child components. It re-uses
+ * the virtual-attribute configuration LDAP profile.
+ */
+public final class TestParentCfgDefn extends ManagedObjectDefinition<TestParentCfgClient, TestParentCfg> {
+
+ // The singleton configuration definition instance.
+ private static final TestParentCfgDefn INSTANCE = new TestParentCfgDefn();
+
+ // The "mandatory-boolean-property" property definition.
+ private static final BooleanPropertyDefinition PD_MANDATORY_BOOLEAN_PROPERTY;
+
+ // The "mandatory-class-property" property definition.
+ private static final ClassPropertyDefinition PD_MANDATORY_CLASS_PROPERTY;
+
+ // The "mandatory-read-only-attribute-type-property" property definition.
+ private static final AttributeTypePropertyDefinition PD_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY;
+
+ // The "optional-multi-valued-dn-property" property definition.
+ private static final DNPropertyDefinition PD_OPTIONAL_MULTI_VALUED_DN_PROPERTY;
+
+ // The "test-children" relation definition.
+ private static final InstantiableRelationDefinition<TestChildCfgClient, TestChildCfg> RD_TEST_CHILDREN;
+
+ // The "optional-test-child" relation definition.
+ private static final OptionalRelationDefinition<TestChildCfgClient, TestChildCfg> RD_OPTIONAL_TEST_CHILD;
+
+ // Build the "mandatory-boolean-property" property definition.
+ static {
+ BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE,
+ "mandatory-boolean-property");
+ builder.setOption(PropertyOption.MANDATORY);
+ builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
+ "mandatory-boolean-property"));
+ builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<Boolean>());
+ PD_MANDATORY_BOOLEAN_PROPERTY = builder.getInstance();
+ INSTANCE.registerPropertyDefinition(PD_MANDATORY_BOOLEAN_PROPERTY);
+ }
+
+ // Build the "mandatory-class-property" property definition.
+ static {
+ ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE,
+ "mandatory-class-property");
+ builder.setOption(PropertyOption.MANDATORY);
+ builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE,
+ "mandatory-class-property"));
+ DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>(
+ "org.opends.server.extensions.SomeVirtualAttributeProvider");
+ builder.setDefaultBehaviorProvider(provider);
+ builder.addInstanceOf("org.opends.server.api.VirtualAttributeProvider");
+ PD_MANDATORY_CLASS_PROPERTY = builder.getInstance();
+ INSTANCE.registerPropertyDefinition(PD_MANDATORY_CLASS_PROPERTY);
+ }
+
+ // Build the "mandatory-read-only-attribute-type-property" property
+ // definition.
+ static {
+ AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(INSTANCE,
+ "mandatory-read-only-attribute-type-property");
+ builder.setOption(PropertyOption.READ_ONLY);
+ builder.setOption(PropertyOption.MANDATORY);
+ builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
+ "mandatory-read-only-attribute-type-property"));
+ builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<AttributeType>());
+ PD_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY = builder.getInstance();
+ INSTANCE.registerPropertyDefinition(PD_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY);
+ }
+
+ // Build the "optional-multi-valued-dn-property" property definition.
+ static {
+ DNPropertyDefinition.Builder builder = DNPropertyDefinition.createBuilder(INSTANCE,
+ "optional-multi-valued-dn-property");
+ builder.setOption(PropertyOption.MULTI_VALUED);
+ builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
+ "optional-multi-valued-dn-property"));
+ DefaultBehaviorProvider<DN> provider = new DefinedDefaultBehaviorProvider<DN>("dc=domain1,dc=com",
+ "dc=domain2,dc=com", "dc=domain3,dc=com");
+ builder.setDefaultBehaviorProvider(provider);
+ PD_OPTIONAL_MULTI_VALUED_DN_PROPERTY = builder.getInstance();
+ INSTANCE.registerPropertyDefinition(PD_OPTIONAL_MULTI_VALUED_DN_PROPERTY);
+ }
+
+ // Build the "test-children" relation definition.
+ static {
+ InstantiableRelationDefinition.Builder<TestChildCfgClient, TestChildCfg> builder =
+ new InstantiableRelationDefinition.Builder<TestChildCfgClient, TestChildCfg>(
+ INSTANCE, "multiple-children", "test-children", TestChildCfgDefn.getInstance());
+ RD_TEST_CHILDREN = builder.getInstance();
+ INSTANCE.registerRelationDefinition(RD_TEST_CHILDREN);
+ }
+
+ // Build the "optional-test-child" relation definition.
+ static {
+ OptionalRelationDefinition.Builder<TestChildCfgClient, TestChildCfg> builder =
+ new OptionalRelationDefinition.Builder<TestChildCfgClient, TestChildCfg>(
+ INSTANCE, "optional-test-child", TestChildCfgDefn.getInstance());
+ RD_OPTIONAL_TEST_CHILD = builder.getInstance();
+ INSTANCE.registerRelationDefinition(RD_OPTIONAL_TEST_CHILD);
+ }
+
+ /**
+ * Get the Test Parent configuration definition singleton.
+ *
+ * @return Returns the Test Parent configuration definition singleton.
+ */
+ public static TestParentCfgDefn getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Private constructor.
+ */
+ private TestParentCfgDefn() {
+ super("test-parent", null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public TestParentCfgClient createClientConfiguration(ManagedObject<? extends TestParentCfgClient> impl) {
+ return new TestParentCfgClientImpl(impl);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public TestParentCfg createServerConfiguration(ServerManagedObject<? extends TestParentCfg> impl) {
+ return new TestParentCfgServerImpl(impl);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Class<TestParentCfg> getServerConfigurationClass() {
+ return TestParentCfg.class;
+ }
+
+ /**
+ * Get the "mandatory-boolean-property" property definition.
+ * <p>
+ * A mandatory boolean property.
+ *
+ * @return Returns the "mandatory-boolean-property" property definition.
+ */
+ public BooleanPropertyDefinition getMandatoryBooleanPropertyPropertyDefinition() {
+ return PD_MANDATORY_BOOLEAN_PROPERTY;
+ }
+
+ /**
+ * Get the "mandatory-class-property" property definition.
+ * <p>
+ * A mandatory Java-class property requiring a component restart.
+ *
+ * @return Returns the "mandatory-class-property" property definition.
+ */
+ public ClassPropertyDefinition getMandatoryClassPropertyPropertyDefinition() {
+ return PD_MANDATORY_CLASS_PROPERTY;
+ }
+
+ /**
+ * Get the "mandatory-read-only-attribute-type-property" property
+ * definition.
+ * <p>
+ * A mandatory read-only attribute type property.
+ *
+ * @return Returns the "mandatory-read-only-attribute-type-property"
+ * property definition.
+ */
+ public AttributeTypePropertyDefinition getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition() {
+ return PD_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY;
+ }
+
+ /**
+ * Get the "optional-multi-valued-dn-property" property definition.
+ * <p>
+ * An optional multi-valued DN property with a defined default behavior.
+ *
+ * @return Returns the "optional-multi-valued-dn-property" property
+ * definition.
+ */
+ public DNPropertyDefinition getOptionalMultiValuedDNPropertyPropertyDefinition() {
+ return PD_OPTIONAL_MULTI_VALUED_DN_PROPERTY;
+ }
+
+ /**
+ * Get the "test-children" relation definition.
+ *
+ * @return Returns the "test-children" relation definition.
+ */
+ public InstantiableRelationDefinition<TestChildCfgClient, TestChildCfg> getTestChildrenRelationDefinition() {
+ return RD_TEST_CHILDREN;
+ }
+
+ /**
+ * Get the "optional-test-child" relation definition.
+ *
+ * @return Returns the "optional-test-child" relation definition.
+ */
+ public OptionalRelationDefinition<TestChildCfgClient, TestChildCfg> getOptionalTestChildRelationDefinition() {
+ return RD_OPTIONAL_TEST_CHILD;
+ }
+
+ /**
+ * Managed object client implementation.
+ */
+ private static class TestParentCfgClientImpl implements TestParentCfgClient {
+
+ // Private implementation.
+ private ManagedObject<? extends TestParentCfgClient> impl;
+
+ // Private constructor.
+ private TestParentCfgClientImpl(ManagedObject<? extends TestParentCfgClient> impl) {
+ this.impl = impl;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Boolean isMandatoryBooleanProperty() {
+ return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setMandatoryBooleanProperty(boolean value) {
+ impl.setPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition(), value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getMandatoryClassProperty() {
+ return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setMandatoryClassProperty(String value) {
+ impl.setPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition(), value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public AttributeType getMandatoryReadOnlyAttributeTypeProperty() {
+ return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setMandatoryReadOnlyAttributeTypeProperty(AttributeType value) throws PropertyIsReadOnlyException {
+ impl.setPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition(), value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SortedSet<DN> getOptionalMultiValuedDNProperty() {
+ return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNPropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setOptionalMultiValuedDNProperty(Collection<DN> values) {
+ impl.setPropertyValues(INSTANCE.getOptionalMultiValuedDNPropertyPropertyDefinition(), values);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String[] listTestChildren() throws ConcurrentModificationException, ErrorResultException {
+ return impl.listChildren(INSTANCE.getTestChildrenRelationDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public TestChildCfgClient getTestChild(String name) throws DefinitionDecodingException,
+ ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
+ ErrorResultException {
+ return impl.getChild(INSTANCE.getTestChildrenRelationDefinition(), name).getConfiguration();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <M extends TestChildCfgClient> M createTestChild(ManagedObjectDefinition<M, ? extends TestChildCfg> d,
+ String name, Collection<DefaultBehaviorException> exceptions) throws IllegalManagedObjectNameException {
+ return impl.createChild(INSTANCE.getTestChildrenRelationDefinition(), d, name, exceptions)
+ .getConfiguration();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removeTestChild(String name) throws ManagedObjectNotFoundException,
+ ConcurrentModificationException, OperationRejectedException, ErrorResultException {
+ impl.removeChild(INSTANCE.getTestChildrenRelationDefinition(), name);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean hasOptionalTestChild() throws ConcurrentModificationException, ErrorResultException {
+ return impl.hasChild(INSTANCE.getOptionalTestChildRelationDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public TestChildCfgClient getOptionalChild() throws DefinitionDecodingException,
+ ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
+ ErrorResultException {
+ return impl.getChild(INSTANCE.getOptionalTestChildRelationDefinition()).getConfiguration();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <M extends TestChildCfgClient> M createOptionalTestChild(
+ ManagedObjectDefinition<M, ? extends TestChildCfg> d, Collection<DefaultBehaviorException> exceptions) {
+ return impl.createChild(INSTANCE.getOptionalTestChildRelationDefinition(), d, exceptions)
+ .getConfiguration();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removeOptionalTestChild() throws ManagedObjectNotFoundException, ConcurrentModificationException,
+ OperationRejectedException, ErrorResultException {
+ impl.removeChild(INSTANCE.getOptionalTestChildRelationDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ManagedObjectDefinition<? extends TestParentCfgClient, ? extends TestParentCfg> definition() {
+ return INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PropertyProvider properties() {
+ return impl;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void commit() throws ManagedObjectAlreadyExistsException, MissingMandatoryPropertiesException,
+ ConcurrentModificationException, OperationRejectedException, ErrorResultException {
+ impl.commit();
+ }
+
+ }
+
+ /**
+ * Managed object server implementation.
+ */
+ private static class TestParentCfgServerImpl implements TestParentCfg {
+
+ // Private implementation.
+ private ServerManagedObject<? extends TestParentCfg> impl;
+
+ // Private constructor.
+ private TestParentCfgServerImpl(ServerManagedObject<? extends TestParentCfg> impl) {
+ this.impl = impl;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addChangeListener(ConfigurationChangeListener<TestParentCfg> listener) {
+ impl.registerChangeListener(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removeChangeListener(ConfigurationChangeListener<TestParentCfg> listener) {
+ impl.deregisterChangeListener(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isMandatoryBooleanProperty() {
+ return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getMandatoryClassProperty() {
+ return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public AttributeType getMandatoryReadOnlyAttributeTypeProperty() {
+ return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SortedSet<DN> getOptionalMultiValuedDNProperty() {
+ return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNPropertyPropertyDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String[] listTestChildren() {
+ return impl.listChildren(INSTANCE.getTestChildrenRelationDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public TestChildCfg getTestChild(String name) throws ConfigException {
+ return impl.getChild(INSTANCE.getTestChildrenRelationDefinition(), name).getConfiguration();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener) throws ConfigException {
+ impl.registerAddListener(INSTANCE.getTestChildrenRelationDefinition(), listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removeTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener) {
+ impl.deregisterAddListener(INSTANCE.getTestChildrenRelationDefinition(), listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addTestChildDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener)
+ throws ConfigException {
+ impl.registerDeleteListener(INSTANCE.getTestChildrenRelationDefinition(), listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removeTestChildDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener) {
+ impl.deregisterDeleteListener(INSTANCE.getTestChildrenRelationDefinition(), listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean hasOptionalTestChild() {
+ return impl.hasChild(INSTANCE.getOptionalTestChildRelationDefinition());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public TestChildCfg getOptionalTestChild() throws ConfigException {
+ return impl.getChild(INSTANCE.getOptionalTestChildRelationDefinition()).getConfiguration();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addOptionalTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener)
+ throws ConfigException {
+ impl.registerAddListener(INSTANCE.getOptionalTestChildRelationDefinition(), listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removeOptionalTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener) {
+ impl.deregisterAddListener(INSTANCE.getOptionalTestChildRelationDefinition(), listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addOptionalChildTestDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener)
+ throws ConfigException {
+ impl.registerDeleteListener(INSTANCE.getOptionalTestChildRelationDefinition(), listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removeOptionalTestChildDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener) {
+ impl.deregisterDeleteListener(INSTANCE.getOptionalTestChildRelationDefinition(), listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Class<? extends TestParentCfg> configurationClass() {
+ return TestParentCfg.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DN dn() {
+ return impl.getDN();
+ }
+
+ }
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/TestTopCfgDefnTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/TestTopCfgDefnTest.java
new file mode 100644
index 0000000..af21b91
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/TestTopCfgDefnTest.java
@@ -0,0 +1,108 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+
+package org.forgerock.opendj.config;
+
+import static org.fest.assertions.Assertions.*;
+import static org.testng.Assert.*;
+
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.TopCfgDefn;
+import org.testng.annotations.Test;
+
+
+@SuppressWarnings("javadoc")
+@Test(singleThreaded = true)
+public class TestTopCfgDefnTest extends ConfigTestCase {
+
+ @Test
+ public void testGetInstance() {
+ assertNotNull(TopCfgDefn.getInstance());
+ }
+
+ @Test
+ public void testGetName() {
+ assertEquals(TopCfgDefn.getInstance().getName(), "top");
+ }
+
+ @Test
+ public void testGetAllPropertyDefinitionsIsEmpty() {
+ assertTrue(TopCfgDefn.getInstance().getAllPropertyDefinitions().isEmpty());
+ }
+
+ @Test
+ public void testGetAllRelationDefinitionsIsEmpty() {
+ assertTrue(TopCfgDefn.getInstance().getAllRelationDefinitions().isEmpty());
+ }
+
+ @Test
+ public void testGetAllConstraintsIsEmpty() {
+ assertTrue(TopCfgDefn.getInstance().getAllConstraints().isEmpty());
+ }
+
+ @Test
+ public void testGetAllTagsIsEmpty() {
+ assertTrue(TopCfgDefn.getInstance().getAllTags().isEmpty());
+ }
+
+ @Test
+ public void testGetParentReturnNull() {
+ assertNull(TopCfgDefn.getInstance().getParent());
+ }
+
+ @Test
+ public void testIsTop() {
+ assertTrue(TopCfgDefn.getInstance().isTop());
+ }
+
+ @Test(expectedExceptions = UnsupportedOperationException.class)
+ public void testGetSynopsis() {
+ assertNotNull(TopCfgDefn.getInstance().getSynopsis());
+ }
+
+ @Test(expectedExceptions = UnsupportedOperationException.class)
+ public void testGetDescription() {
+ assertNotNull(TopCfgDefn.getInstance().getDescription());
+ }
+
+ @Test(expectedExceptions = UnsupportedOperationException.class)
+ public void testGetUserFriendlyName() {
+ assertNotNull(TopCfgDefn.getInstance().getUserFriendlyName());
+ }
+
+ @Test(expectedExceptions = UnsupportedOperationException.class)
+ public void testGetUserFriendlyPluralName() {
+ assertNotNull(TopCfgDefn.getInstance().getUserFriendlyPluralName());
+ }
+
+ @Test
+ public void testGetAllChildren() {
+ // load RootCfgDef as child of TopCfgDef, and load all children of RootCfgDef as well
+ RootCfgDefn.getInstance();
+ assertThat(TopCfgDefn.getInstance().getAllChildren()).isNotEmpty();
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/ValidateConfigDefinitionsTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/ValidateConfigDefinitionsTest.java
new file mode 100644
index 0000000..3cec3b8
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/ValidateConfigDefinitionsTest.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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ * Portions copyright 2011 ForgeRock AS
+ */
+package org.forgerock.opendj.config;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.LDAPProfile;
+import org.forgerock.opendj.config.PropertyDefinition;
+import org.forgerock.opendj.config.PropertyOption;
+import org.forgerock.opendj.config.TopCfgDefn;
+import org.forgerock.opendj.ldap.schema.AttributeType;
+import org.forgerock.opendj.ldap.schema.ObjectClass;
+import org.forgerock.opendj.ldap.schema.Schema;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+@Test(singleThreaded = true)
+public class ValidateConfigDefinitionsTest extends ConfigTestCase {
+
+ private static final String EOL = System.getProperty("line.separator");
+
+ @BeforeClass
+ public void setup() throws Exception {
+ TestCfg.setUp();
+ }
+
+ @AfterClass
+ public void tearDown() {
+ TestCfg.cleanup();
+ }
+
+ @DataProvider
+ Object[][] enumerateManageObjectDefns() throws Exception {
+ TopCfgDefn topCfgDefn = TopCfgDefn.getInstance();
+ List<AbstractManagedObjectDefinition<?, ?>> allCfgDefns =
+ new ArrayList<AbstractManagedObjectDefinition<?, ?>>(topCfgDefn.getAllChildren());
+
+ Object[][] params = new Object[allCfgDefns.size()][];
+ for (int i = 0; i < params.length; i++) {
+ params[i] = new Object[] { allCfgDefns.get(i) };
+ }
+ System.out.println(params.length);
+ return params;
+ }
+
+ // Exceptions to config objects having a different objectclass
+ private static final List<String> CLASS_OBJECT_CLASS_EXCEPTIONS = Arrays.asList(new String[] {
+ "org.forgerock.opendj.config.std.meta.RootCfgDefn", "org.forgerock.opendj.config.std.meta.GlobalCfgDefn", });
+
+ // TODO : does not work because can't retrieve object class objects
+ @Test(enabled = false, dataProvider = "enumerateManageObjectDefns")
+ public void validateConfigObjectDefinitions(AbstractManagedObjectDefinition<?, ?> objectDef) {
+ String objName = objectDef.getName();
+ StringBuilder errors = new StringBuilder();
+ Collection<PropertyDefinition<?>> allPropertyDefs = objectDef.getAllPropertyDefinitions();
+
+ LDAPProfile ldapProfile = LDAPProfile.getInstance();
+ String ldapObjectclassName = ldapProfile.getObjectClass(objectDef);
+ if (ldapObjectclassName == null) {
+ errors.append("There is no objectclass definition for configuration object " + objName);
+ } else {
+ String expectedObjectClass = "ds-cfg-" + objName;
+ if (!ldapObjectclassName.equals(expectedObjectClass)
+ && !CLASS_OBJECT_CLASS_EXCEPTIONS.contains(objectDef.getClass().getName())) {
+ errors.append(
+ "For config object " + objName + ", the LDAP objectclass must be " + expectedObjectClass
+ + " instead of " + ldapObjectclassName).append(EOL + EOL);
+ }
+ }
+ ObjectClass configObjectClass =
+ Schema.getDefaultSchema().asNonStrictSchema().getObjectClass(ldapObjectclassName.toLowerCase());
+
+ for (PropertyDefinition<?> propDef : allPropertyDefs) {
+ validatePropertyDefinition(objectDef, configObjectClass, propDef, errors);
+ }
+
+ if (errors.length() > 0) {
+ Assert.fail("The configuration definition for " + objectDef.getName() + " has the following problems: "
+ + EOL + errors.toString());
+ }
+ }
+
+ // Exceptions to properties ending in -class being exactly 'java-class'.
+ private static final List<String> CLASS_PROPERTY_EXCEPTIONS = Arrays.asList(new String[] {
+ // e.g. "prop-name-ending-with-class"
+ });
+
+ // Exceptions to properties ending in -enabled being exactly 'enabled'.
+ private static final List<String> ENABLED_PROPERTY_EXCEPTIONS = Arrays.asList(new String[] {
+ "index-filter-analyzer-enabled", "subordinate-indexes-enabled"
+ // e.g. "prop-name-ending-with-enabled"
+ });
+
+ // Exceptions to properties not starting with the name of their config
+ // object
+ private static final List<String> OBJECT_PREFIX_PROPERTY_EXCEPTIONS = Arrays.asList(new String[] { "backend-id",
+ "plugin-type", "replication-server-id", "network-group-id", "workflow-id", "workflow-element-id",
+ "workflow-element"
+ // e.g. "prop-name-starting-with-object-prefix"
+ });
+
+ private void validatePropertyDefinition(AbstractManagedObjectDefinition<?, ?> objectDef,
+ ObjectClass configObjectClass, PropertyDefinition<?> propDef, StringBuilder errors) {
+ String objName = objectDef.getName();
+ String propName = propDef.getName();
+
+ // We want class properties to be exactly java-class
+ if (propName.endsWith("-class") && !propName.equals("java-class")
+ && !CLASS_PROPERTY_EXCEPTIONS.contains(propName)) {
+ errors.append("The " + propName + " property on config object " + objName
+ + " should probably be java-class. If not, then add " + propName
+ + " to the CLASS_PROPERTY_EXCEPTIONS array in " + ValidateConfigDefinitionsTest.class.getName()
+ + " to suppress" + " this warning.");
+ }
+
+ // We want enabled properties to be exactly enabled
+ if (propName.endsWith("-enabled") && !ENABLED_PROPERTY_EXCEPTIONS.contains(propName)) {
+ errors.append("The " + propName + " property on config object " + objName
+ + " should probably be just 'enabled'. If not, then add " + propName
+ + " to the ENABLED_PROPERTY_EXCEPTIONS array in " + ValidateConfigDefinitionsTest.class.getName()
+ + " to suppress" + " this warning.");
+ }
+
+ // It's redundant for properties to be prefixed with the name of their
+ // objecty
+ if (propName.startsWith(objName) && !propName.equals(objName)
+ && !OBJECT_PREFIX_PROPERTY_EXCEPTIONS.contains(propName)) {
+ errors.append("The " + propName + " property on config object " + objName
+ + " should not be prefixed with the name of the config object because"
+ + " this is redundant. If you disagree, then add " + propName
+ + " to the OBJECT_PREFIX_PROPERTY_EXCEPTIONS array in "
+ + ValidateConfigDefinitionsTest.class.getName() + " to suppress" + " this warning.");
+ }
+
+ LDAPProfile ldapProfile = LDAPProfile.getInstance();
+ String ldapAttrName = ldapProfile.getAttributeName(objectDef, propDef);
+
+ // LDAP attribute name is consistent with the property name
+ String expectedLdapAttr = "ds-cfg-" + propName;
+ if (!ldapAttrName.equals(expectedLdapAttr)) {
+ errors.append(
+ "For the " + propName + " property on config object " + objName + ", the LDAP attribute must be "
+ + expectedLdapAttr + " instead of " + ldapAttrName).append(EOL + EOL);
+ }
+
+ Schema schema = Schema.getDefaultSchema();
+ AttributeType attrType = schema.getAttributeType(ldapAttrName.toLowerCase());
+
+ // LDAP attribute exists
+ if (attrType == null) {
+ errors.append(
+ propName + " property on config object " + objName + " is declared" + " to use ldap attribute "
+ + ldapAttrName + ", but this attribute is not in the schema ").append(EOL + EOL);
+ } else {
+
+ // LDAP attribute is multivalued if the property is multivalued
+ if (propDef.hasOption(PropertyOption.MULTI_VALUED) && attrType.isSingleValue()) {
+ errors.append(
+ propName + " property on config object " + objName + " is declared"
+ + " as multi-valued, but the corresponding ldap attribute " + ldapAttrName
+ + " is declared as single-valued.").append(EOL + EOL);
+ }
+
+ if (configObjectClass != null) {
+ // If it's mandatory in the schema, it must be mandatory on the
+ // config property
+ Set<AttributeType> mandatoryAttributes = configObjectClass.getRequiredAttributes();
+ if (mandatoryAttributes.contains(attrType) && !propDef.hasOption(PropertyOption.MANDATORY)) {
+ errors.append(
+ propName + " property on config object " + objName + " is not declared"
+ + " as mandatory even though the corresponding ldap attribute " + ldapAttrName
+ + " is declared as mandatory in the schema.").append(EOL + EOL);
+ }
+
+ Set<AttributeType> allowedAttributes = new HashSet<AttributeType>(mandatoryAttributes);
+ allowedAttributes.addAll(configObjectClass.getOptionalAttributes());
+ if (!allowedAttributes.contains(attrType)) {
+ errors.append(
+ propName + " property on config object " + objName + " has"
+ + " the corresponding ldap attribute " + ldapAttrName
+ + ", but this attribute is not an allowed attribute on the configuration "
+ + " object's objectclass " + configObjectClass.getNameOrOID()).append(EOL + EOL);
+ }
+ }
+ }
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/AggregationClientTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/AggregationClientTest.java
new file mode 100644
index 0000000..6ea7032
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/AggregationClientTest.java
@@ -0,0 +1,338 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client.ldap;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.forgerock.opendj.server.config.client.RootCfgClient;
+import org.forgerock.opendj.config.AdminTestCase;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.LDAPProfile;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.PropertyException;
+import org.forgerock.opendj.config.TestCfg;
+import org.forgerock.opendj.config.TestChildCfgClient;
+import org.forgerock.opendj.config.TestChildCfgDefn;
+import org.forgerock.opendj.config.TestParentCfgClient;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagedObjectDecodingException;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.client.ldap.LDAPManagementContext;
+import org.opends.server.core.DirectoryServer;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+@Test(singleThreaded = true)
+public class AggregationClientTest extends AdminTestCase {
+
+ // Test LDIF.
+ private static final String[] TEST_LDIF = new String[] {
+ // Base entries.
+ "dn: cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: config",
+ "",
+ "dn: cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: test-parents",
+ "",
+ // Parent 1 - uses default values for
+ // optional-multi-valued-dn-property.
+ "dn: cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-parent-dummy",
+ "cn: test parent 1",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "",
+ // Child base entry.
+ "dn:cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: multiple children",
+ "",
+ // Child 1 has no references.
+ "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 1",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "",
+ // Child 2 has a single valid reference.
+ "dn: cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 2",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=connection handlers, cn=config",
+ "",
+ // Child 3 has a multiple valid references.
+ "dn: cn=test child 3,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 3",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=connection handlers, cn=config",
+ "ds-cfg-rotation-policy: cn=LDAPS Connection Handler, cn=connection handlers, cn=config",
+ "",
+ // Child 4 has a single bad reference.
+ "dn: cn=test child 4,cn=test children,cn=test parent 1,cn=test parents,cn=config", "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy", "cn: test child 4", "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=bad rdn, cn=config",
+ "",
+ "dn: cn=Connection Handlers,cn=config",
+ "objectClass: top",
+ "objectClass: ds-cfg-branch",
+ "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-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler",
+ "ds-cfg-enabled: true",
+ "ds-cfg-listen-address: 0.0.0.0", "ds-cfg-listen-port: 389",
+ "",
+ "dn: cn=HTTP Connection Handler,cn=Connection Handlers,cn=config",
+ "objectClass: top",
+ "objectClass: ds-cfg-connection-handler",
+ "objectClass: ds-cfg-http-connection-handler",
+ "cn: HTTP Connection Handler",
+ "ds-cfg-java-class: org.opends.server.protocols.http.HTTPConnectionHandler",
+ "ds-cfg-enabled: false",
+ "ds-cfg-listen-address: 0.0.0.0",
+ "ds-cfg-listen-port: 8080",
+ "",
+ "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-java-class: org.opends.server.protocols.jmx.JmxConnectionHandler",
+ "ds-cfg-enabled: false",
+ "ds-cfg-listen-port: 1689",
+ "" };
+
+ @BeforeClass
+ public void setUp() throws Exception {
+ TestCfg.setUp();
+ }
+
+ /**
+ * Tears down test environment.
+ */
+ @AfterClass
+ public void tearDown() {
+ TestCfg.cleanup();
+ }
+
+ /**
+ * Tests that aggregation contains no values when it contains does not
+ * contain any DN attribute values.
+ *
+ * @throws Exception
+ * If the test unexpectedly fails.
+ */
+ @Test
+ public void testAggregationEmpty() throws Exception {
+ MockLDAPConnection c = new MockLDAPConnection();
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.getTestChild("test child 1");
+ assertSetEquals(child.getAggregationProperty(), new String[0]);
+ }
+
+ /**
+ * Tests that aggregation contains single valid value when it contains a
+ * single valid DN attribute values.
+ *
+ * @throws Exception
+ * If the test unexpectedly fails.
+ */
+ @Test
+ public void testAggregationSingle() throws Exception {
+ MockLDAPConnection c = new MockLDAPConnection();
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.getTestChild("test child 2");
+
+ // Test normalization.
+ assertSetEquals(child.getAggregationProperty(), "LDAP Connection Handler");
+ assertSetEquals(child.getAggregationProperty(), " LDAP Connection Handler ");
+ assertSetEquals(child.getAggregationProperty(), " ldap connection HANDLER ");
+ }
+
+ /**
+ * Tests that aggregation contains multiple valid values when it contains a
+ * multiple valid DN attribute values.
+ *
+ * @throws Exception
+ * If the test unexpectedly fails.
+ */
+ @Test
+ public void testAggregationMultiple() throws Exception {
+ MockLDAPConnection c = new MockLDAPConnection();
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.getTestChild("test child 3");
+ assertSetEquals(child.getAggregationProperty(), "LDAPS Connection Handler", "LDAP Connection Handler");
+ }
+
+ /**
+ * Tests that aggregation is rejected when the LDAP DN contains a valid RDN
+ * but an invalid parent DN.
+ *
+ * @throws Exception
+ * If the test unexpectedly fails.
+ */
+ @Test
+ public void testAggregationBadBaseDN() throws Exception {
+ MockLDAPConnection c = new MockLDAPConnection();
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+
+ try {
+ parent.getTestChild("test child 4");
+ Assert.fail("Unexpectedly retrieved test child 4" + " when it had a bad aggregation value");
+ } catch (ManagedObjectDecodingException e) {
+ Collection<PropertyException> causes = e.getCauses();
+ Assert.assertEquals(causes.size(), 1);
+
+ Throwable cause = causes.iterator().next();
+ if (cause instanceof IllegalPropertyValueStringException) {
+ IllegalPropertyValueStringException pe = (IllegalPropertyValueStringException) cause;
+ Assert.assertEquals(pe.getPropertyDefinition(), TestChildCfgDefn.getInstance()
+ .getAggregationPropertyPropertyDefinition());
+ Assert.assertEquals(pe.getIllegalValueString(), "cn=LDAP Connection Handler, cn=bad rdn, cn=config");
+ } else {
+ // Got an unexpected cause.
+ throw e;
+ }
+ }
+ }
+
+ /**
+ * Tests creation of a child managed object with a single reference.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testCreateChildManagedObject() throws Exception {
+ CreateEntryMockLDAPConnection c = new CreateEntryMockLDAPConnection(
+ "cn=test child new,cn=test children,cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ c.addExpectedAttribute("cn", "test child new");
+ c.addExpectedAttribute("objectClass", "top", "ds-cfg-test-child-dummy");
+ c.addExpectedAttribute("ds-cfg-enabled", "true");
+ c.addExpectedAttribute("ds-cfg-java-class",
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ c.addExpectedAttribute("ds-cfg-attribute-type", "description");
+ c.addExpectedAttribute("ds-cfg-rotation-policy",
+ "cn=LDAP Connection Handler,cn=connection handlers, cn=config");
+
+ ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
+ child.setMandatoryBooleanProperty(true);
+ child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
+ child.setAggregationProperty(Collections.singleton("LDAP Connection Handler"));
+ child.commit();
+
+ c.assertEntryIsCreated();
+ }
+
+ /**
+ * Tests modification of a child managed object so that it has a different
+ * reference.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testModifyChildManagedObject() throws Exception {
+ ModifyEntryMockLDAPConnection c = new ModifyEntryMockLDAPConnection(
+ "cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ c.addExpectedModification("ds-cfg-rotation-policy",
+ "cn=HTTP Connection Handler,cn=connection handlers, cn=config",
+ "cn=JMX Connection Handler,cn=connection handlers, cn=config");
+ ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.getTestChild("test child 2");
+ child.setAggregationProperty(Arrays.asList("JMX Connection Handler", "HTTP Connection Handler"));
+ child.commit();
+ Assert.assertTrue(c.isEntryModified());
+ }
+
+ // Retrieve the named test parent managed object.
+ private TestParentCfgClient getTestParent(ManagementContext context, String name) throws Exception {
+ ManagedObject<RootCfgClient> root = context.getRootConfigurationManagedObject();
+ return root.getChild(TestCfg.getTestOneToManyParentRelationDefinition(), name).getConfiguration();
+ }
+
+ // Asserts that the actual set of DNs contains the expected values.
+ private void assertSetEquals(SortedSet<String> actual, String... expected) {
+ SortedSet<String> values = new TreeSet<String>(TestChildCfgDefn.getInstance()
+ .getAggregationPropertyPropertyDefinition());
+ if (expected != null) {
+ for (String value : expected) {
+ values.add(value);
+ }
+ }
+ Assert.assertEquals((Object) actual, (Object) values);
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/CreateEntryMockLDAPConnection.java b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/CreateEntryMockLDAPConnection.java
new file mode 100644
index 0000000..65e9e62
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/CreateEntryMockLDAPConnection.java
@@ -0,0 +1,111 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client.ldap;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.forgerock.opendj.ldap.Attribute;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.Entry;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.util.Reject;
+import org.testng.Assert;
+
+/**
+ * A mock LDAP connection which is used to verify that an add operation was
+ * requested and that it has the correct parameters.
+ */
+public final class CreateEntryMockLDAPConnection extends MockLDAPConnection {
+
+ // Detect multiple calls.
+ private boolean alreadyAdded = false;
+
+ // The expected set of attributes (attribute name -> list of
+ // values).
+ private final Map<String, List<String>> attributes = new HashMap<String, List<String>>();
+
+ // The expected DN.
+ private final DN expectedDN;
+
+ /**
+ * Create a new mock ldap connection for detecting add operations.
+ *
+ * @param dn
+ * The expected DN of the entry to be added.
+ */
+ public CreateEntryMockLDAPConnection(String dn) {
+ this.expectedDN = DN.valueOf(dn);
+ }
+
+ /**
+ * Add an attribute which should be part of the add operation.
+ *
+ * @param expectedName
+ * The name of the expected attribute.
+ * @param expectedValues
+ * The attribute's expected values (never empty).
+ */
+ public void addExpectedAttribute(String expectedName, String... expectedValues) {
+ Reject.ifNull(expectedName);
+ Reject.ifNull(expectedValues);
+ Reject.ifFalse(expectedValues.length > 0, "should have at least one expected value");
+ attributes.put(expectedName, Arrays.asList(expectedValues));
+ }
+
+ /**
+ * Asserts that the entry was created.
+ */
+ public void assertEntryIsCreated() {
+ Assert.assertTrue(alreadyAdded);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void createEntry(Entry entry) throws ErrorResultException {
+ Assert.assertFalse(alreadyAdded);
+ Assert.assertEquals(entry.getName(), expectedDN);
+
+ Map<String, List<String>> expected = new HashMap<String, List<String>>(this.attributes);
+ for (Attribute attribute : entry.getAllAttributes()) {
+ String attrName = attribute.getAttributeDescription().getAttributeType().getNameOrOID();
+ List<String> values = expected.remove(attrName);
+ if (values == null) {
+ Assert.fail("Unexpected attribute " + attrName);
+ }
+ assertAttributeEquals(attribute, values);
+ }
+ if (!expected.isEmpty()) {
+ Assert.fail("Missing expected attributes: " + expected.keySet());
+ }
+
+ alreadyAdded = true;
+ }
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/DeleteSubtreeMockLDAPConnection.java b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/DeleteSubtreeMockLDAPConnection.java
new file mode 100644
index 0000000..a25cb58
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/DeleteSubtreeMockLDAPConnection.java
@@ -0,0 +1,70 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client.ldap;
+
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.testng.Assert;
+
+/**
+ * A mock LDAP connection which is used to verify that a delete subtree takes
+ * place.
+ */
+public final class DeleteSubtreeMockLDAPConnection extends MockLDAPConnection {
+
+ // Detect multiple calls.
+ private boolean alreadyDeleted = false;
+
+ // The expected DN.
+ private final DN expectedDN;
+
+ /**
+ * Create a new mock ldap connection for detecting subtree deletes.
+ *
+ * @param dn
+ * The expected subtree DN.
+ */
+ public DeleteSubtreeMockLDAPConnection(String dn) {
+ this.expectedDN = DN.valueOf(dn);
+ }
+
+ /**
+ * Asserts that the subtree was deleted.
+ */
+ public void assertSubtreeIsDeleted() {
+ Assert.assertTrue(alreadyDeleted);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void deleteSubtree(DN dn) throws ErrorResultException {
+ Assert.assertFalse(alreadyDeleted);
+ Assert.assertEquals(dn, expectedDN);
+ alreadyDeleted = true;
+ }
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/LDAPClientTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/LDAPClientTest.java
new file mode 100644
index 0000000..15d4287
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/LDAPClientTest.java
@@ -0,0 +1,944 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client.ldap;
+
+import static org.fest.assertions.Assertions.*;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.SortedSet;
+
+import org.forgerock.opendj.server.config.client.RootCfgClient;
+import org.forgerock.opendj.config.AdminTestCase;
+import org.forgerock.opendj.config.Constraint;
+import org.forgerock.opendj.config.LDAPProfile;
+import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException;
+import org.forgerock.opendj.config.ManagedObjectNotFoundException;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.TestCfg;
+import org.forgerock.opendj.config.TestChildCfgClient;
+import org.forgerock.opendj.config.TestChildCfgDefn;
+import org.forgerock.opendj.config.TestParentCfgClient;
+import org.forgerock.opendj.config.TestParentCfgDefn;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.client.OperationRejectedException;
+import org.forgerock.opendj.config.client.ldap.LDAPManagementContext;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.Entry;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.opendj.ldap.ResultCode;
+import org.forgerock.opendj.ldap.responses.SearchResultEntry;
+import org.opends.server.core.DirectoryServer;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+@Test(singleThreaded = true)
+public final class LDAPClientTest extends AdminTestCase {
+
+ // @Checkstyle:off
+ private static final String[] TEST_LDIF = new String[] {
+ // Base entries.
+ "dn: cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: config",
+ "",
+ "dn: cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: test-parents",
+ "",
+ // Parent 1 - uses default values for
+ // optional-multi-valued-dn-property.
+ "dn: cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-parent-dummy",
+ "cn: test parent 1",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "",
+ // Parent 2 - overrides default values for
+ // optional-multi-valued-dn-property.
+ "dn: cn=test parent 2,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-parent-dummy",
+ "cn: test parent 2",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-base-dn: dc=default value p2v1,dc=com",
+ "ds-cfg-base-dn: dc=default value p2v2,dc=com",
+ "",
+ // Parent 3 - overrides default values for
+ // optional-multi-valued-dn-property.
+ "dn: cn=test parent 3,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-parent-dummy",
+ "cn: test parent 3",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-base-dn: dc=default value p3v1,dc=com",
+ "ds-cfg-base-dn: dc=default value p3v2,dc=com",
+ "",
+ // Child base entries.
+ "dn:cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: multiple children",
+ "",
+ "dn:cn=test children,cn=test parent 2,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: multiple children",
+ "",
+ // Child 1 inherits defaults for both
+ // optional-multi-valued-dn-property1 and
+ // optional-multi-valued-dn-property2.
+ "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 1",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "",
+ // Child 2 inherits defaults for
+ // optional-multi-valued-dn-property2.
+ "dn: cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 2",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-base-dn: dc=default value c2v1,dc=com",
+ "ds-cfg-base-dn: dc=default value c2v2,dc=com",
+ "",
+ // Child 3 overrides defaults for
+ // optional-multi-valued-dn-property1 and
+ // optional-multi-valued-dn-property2.
+ "dn: cn=test child 3,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 3",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-base-dn: dc=default value c3v1,dc=com",
+ "ds-cfg-base-dn: dc=default value c3v2,dc=com",
+ "ds-cfg-group-dn: dc=default value c3v3,dc=com",
+ "ds-cfg-group-dn: dc=default value c3v4,dc=com",
+ "",
+ // Child 4 inherits overridden defaults for both
+ // optional-multi-valued-dn-property1 and
+ // optional-multi-valued-dn-property2.
+ "dn: cn=test child 1,cn=test children,cn=test parent 2,cn=test parents,cn=config", "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy", "cn: test child 1", "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description", "", };
+ // @Checkstyle:on
+
+ /**
+ * Provide valid naming exception to client API exception mappings.
+ *
+ * @return Returns valid naming exception to client API exception mappings.
+ */
+ @DataProvider(name = "createManagedObjectExceptions")
+ public Object[][] createManagedObjectExceptions() {
+ return new Object[][] {
+ // result code corresponding to exception thrown, expected
+ // exception, expected code result
+ { ResultCode.PROTOCOL_ERROR, ErrorResultException.class, ResultCode.PROTOCOL_ERROR },
+ { ResultCode.UNAVAILABLE, ErrorResultException.class, ResultCode.UNAVAILABLE },
+ { ResultCode.ENTRY_ALREADY_EXISTS, ManagedObjectAlreadyExistsException.class, null },
+ { ResultCode.INSUFFICIENT_ACCESS_RIGHTS, ErrorResultException.class,
+ ResultCode.INSUFFICIENT_ACCESS_RIGHTS },
+ { ResultCode.UNWILLING_TO_PERFORM, OperationRejectedException.class, null } };
+ }
+
+ /**
+ * Provide valid naming exception to client API exception mappings.
+ *
+ * @return Returns valid naming exception to client API exception mappings.
+ */
+ @DataProvider(name = "getManagedObjectExceptions")
+ public Object[][] getManagedObjectExceptions() {
+ return new Object[][] {
+ // result code corresponding to exception thrown, expected
+ // exception, expected code result
+ { ResultCode.PROTOCOL_ERROR, ErrorResultException.class, ResultCode.PROTOCOL_ERROR },
+ { ResultCode.UNAVAILABLE, ErrorResultException.class, ResultCode.UNAVAILABLE },
+ { ResultCode.NO_SUCH_OBJECT, ManagedObjectNotFoundException.class, null },
+ { ResultCode.INSUFFICIENT_ACCESS_RIGHTS, ErrorResultException.class,
+ ResultCode.INSUFFICIENT_ACCESS_RIGHTS },
+ { ResultCode.UNWILLING_TO_PERFORM, ErrorResultException.class, ResultCode.UNWILLING_TO_PERFORM } };
+ }
+
+ @BeforeClass
+ public void setUp() throws Exception {
+ TestCfg.setUp();
+ }
+
+ @AfterClass
+ public void tearDown() {
+ TestCfg.cleanup();
+ }
+
+ /**
+ * Tests creation of a child managed object.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testCreateChildManagedObject() throws Exception {
+ CreateEntryMockLDAPConnection c =
+ new CreateEntryMockLDAPConnection(
+ "cn=test child new,cn=test children,cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ c.addExpectedAttribute("cn", "test child new");
+ c.addExpectedAttribute("objectClass", "top", "ds-cfg-test-child-dummy");
+ c.addExpectedAttribute("ds-cfg-enabled", "true");
+ c.addExpectedAttribute("ds-cfg-java-class",
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ c.addExpectedAttribute("ds-cfg-attribute-type", "description");
+
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
+ child.setMandatoryBooleanProperty(true);
+ child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
+ child.commit();
+
+ c.assertEntryIsCreated();
+ }
+
+ /**
+ * Tests creation of a top-level managed object using fails when an
+ * underlying exception occurs.
+ */
+ @Test(dataProvider = "createManagedObjectExceptions")
+ public void testCreateManagedObjectException(final ResultCode resultCodeOfThrownException,
+ Class<? extends Exception> expectedExceptionClass, ResultCode expectedCode) {
+ MockLDAPConnection conn = new MockLDAPConnection() {
+
+ @Override
+ public void createEntry(Entry entry) throws ErrorResultException {
+ throw ErrorResultException.newErrorResult(resultCodeOfThrownException);
+ }
+
+ };
+ conn.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(conn, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ try {
+ TestParentCfgClient parent = createTestParent(ctx, "test parent new");
+ parent.setMandatoryBooleanProperty(true);
+ parent.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
+ parent.commit();
+ } catch (Exception e) {
+ if (expectedExceptionClass.equals(ErrorResultException.class)) {
+ assertThat(e).isInstanceOf(ErrorResultException.class);
+ assertThat(((ErrorResultException) e).getResult().getResultCode()).isEqualTo(expectedCode);
+ } else {
+ assertThat(e).isInstanceOf(expectedExceptionClass);
+ }
+ }
+ }
+
+ /**
+ * Tests creation of a top-level managed object.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testCreateTopLevelManagedObject() throws Exception {
+ CreateEntryMockLDAPConnection c =
+ new CreateEntryMockLDAPConnection("cn=test parent new,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ c.addExpectedAttribute("cn", "test parent new");
+ c.addExpectedAttribute("objectClass", "top", "ds-cfg-test-parent-dummy");
+ c.addExpectedAttribute("ds-cfg-enabled", "true");
+ c.addExpectedAttribute("ds-cfg-java-class", "org.opends.server.extensions.SomeVirtualAttributeProvider");
+ c.addExpectedAttribute("ds-cfg-attribute-type", "description");
+
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = createTestParent(ctx, "test parent new");
+ parent.setMandatoryBooleanProperty(true);
+ parent.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
+ parent.commit();
+ c.assertEntryIsCreated();
+ }
+
+ /**
+ * Tests retrieval of a child managed object with non-default values.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testGetChildManagedObject() throws Exception {
+ MockLDAPConnection c = new MockLDAPConnection();
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.getTestChild("test child 3");
+ Assert.assertEquals(child.isMandatoryBooleanProperty(), Boolean.TRUE);
+ Assert.assertEquals(child.getMandatoryClassProperty(),
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
+ DirectoryServer.getAttributeType("description"));
+ assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(), "dc=default value c3v1,dc=com",
+ "dc=default value c3v2,dc=com");
+ assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(), "dc=default value c3v3,dc=com",
+ "dc=default value c3v4,dc=com");
+ }
+
+ /**
+ * Tests retrieval of a child managed object with default values.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testGetChildManagedObjectDefault() throws Exception {
+ MockLDAPConnection c = new MockLDAPConnection();
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.getTestChild("test child 1");
+ Assert.assertEquals(child.isMandatoryBooleanProperty(), Boolean.TRUE);
+ Assert.assertEquals(child.getMandatoryClassProperty(),
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
+ DirectoryServer.getAttributeType("description"));
+ assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(), "dc=domain1,dc=com", "dc=domain2,dc=com",
+ "dc=domain3,dc=com");
+ assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(), "dc=domain1,dc=com", "dc=domain2,dc=com",
+ "dc=domain3,dc=com");
+ Assert.assertEquals(child.isMandatoryBooleanProperty(), Boolean.TRUE);
+ }
+
+ /**
+ * Tests retrieval of a top-level managed object fails when an underlying
+ * ErrorResultException occurs.
+ *
+ * @param cause
+ * The ErrorResultException cause of the failure.
+ * @param expected
+ * The expected client API exception class.
+ */
+ @Test(dataProvider = "getManagedObjectExceptions")
+ public void testGetManagedObjectException(final ResultCode resultCodeOfThrownException,
+ final Class<? extends Exception> expectedExceptionClass, final ResultCode expectedCode) {
+ MockLDAPConnection c = new MockLDAPConnection() {
+
+ @Override
+ public SearchResultEntry readEntry(DN dn, Collection<String> attrIds) throws ErrorResultException {
+ throw ErrorResultException.newErrorResult(resultCodeOfThrownException);
+ }
+
+ };
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ try {
+ getTestParent(ctx, "test parent 2");
+ } catch (Exception e) {
+ if (expectedExceptionClass.equals(ErrorResultException.class)) {
+ assertThat(e).isInstanceOf(ErrorResultException.class);
+ assertThat(((ErrorResultException) e).getResult().getResultCode()).isEqualTo(expectedCode);
+ } else {
+ assertThat(e).isInstanceOf(expectedExceptionClass);
+ }
+ }
+ }
+
+ /**
+ * Tests retrieval of a top-level managed object with non-default values.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testGetTopLevelManagedObject() throws Exception {
+ MockLDAPConnection c = new MockLDAPConnection();
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 2");
+ Assert.assertEquals(parent.isMandatoryBooleanProperty(), Boolean.TRUE);
+ Assert.assertEquals(parent.getMandatoryClassProperty(),
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ Assert.assertEquals(parent.getMandatoryReadOnlyAttributeTypeProperty(),
+ DirectoryServer.getAttributeType("description"));
+ assertDNSetEquals(parent.getOptionalMultiValuedDNProperty(), "dc=default value p2v1,dc=com",
+ "dc=default value p2v2,dc=com");
+ }
+
+ /**
+ * Tests retrieval of a top-level managed object with default values.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testGetTopLevelManagedObjectDefault() throws Exception {
+ MockLDAPConnection c = new MockLDAPConnection();
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ Assert.assertEquals(parent.isMandatoryBooleanProperty(), Boolean.TRUE);
+ Assert.assertEquals(parent.getMandatoryClassProperty(),
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ Assert.assertEquals(parent.getMandatoryReadOnlyAttributeTypeProperty(),
+ DirectoryServer.getAttributeType("description"));
+ assertDNSetEquals(parent.getOptionalMultiValuedDNProperty(), "dc=domain1,dc=com", "dc=domain2,dc=com",
+ "dc=domain3,dc=com");
+ }
+
+ /**
+ * Tests retrieval of relative inherited default values.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testInheritedDefaultValues1() throws Exception {
+ CreateEntryMockLDAPConnection c =
+ new CreateEntryMockLDAPConnection(
+ "cn=test child new,cn=test children,cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ c.addExpectedAttribute("cn", "test child new");
+ c.addExpectedAttribute("objectClass", "top", "ds-cfg-test-child-dummy");
+ c.addExpectedAttribute("ds-cfg-enabled", "true");
+ c.addExpectedAttribute("ds-cfg-java-class",
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ c.addExpectedAttribute("ds-cfg-attribute-type", "description");
+
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
+
+ // Check pre-commit values.
+ Assert.assertEquals(child.isMandatoryBooleanProperty(), null);
+ Assert.assertEquals(child.getMandatoryClassProperty(),
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(), null);
+ assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(), "dc=domain1,dc=com", "dc=domain2,dc=com",
+ "dc=domain3,dc=com");
+ assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(), "dc=domain1,dc=com", "dc=domain2,dc=com",
+ "dc=domain3,dc=com");
+
+ // Check that the default values are not committed.
+ child.setMandatoryBooleanProperty(true);
+ child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
+ child.commit();
+
+ c.assertEntryIsCreated();
+ }
+
+ /**
+ * Tests retrieval of relative inherited default values.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testInheritedDefaultValues2() throws Exception {
+ CreateEntryMockLDAPConnection c =
+ new CreateEntryMockLDAPConnection(
+ "cn=test child new,cn=test children,cn=test parent 2,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ c.addExpectedAttribute("cn", "test child new");
+ c.addExpectedAttribute("objectClass", "top", "ds-cfg-test-child-dummy");
+ c.addExpectedAttribute("ds-cfg-enabled", "true");
+ c.addExpectedAttribute("ds-cfg-java-class",
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ c.addExpectedAttribute("ds-cfg-attribute-type", "description");
+
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 2");
+ TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
+
+ // Check pre-commit values.
+ Assert.assertEquals(child.isMandatoryBooleanProperty(), null);
+ Assert.assertEquals(child.getMandatoryClassProperty(),
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(), null);
+ assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(), "dc=default value p2v1,dc=com",
+ "dc=default value p2v2,dc=com");
+ assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(), "dc=default value p2v1,dc=com",
+ "dc=default value p2v2,dc=com");
+
+ // Check that the default values are not committed.
+ child.setMandatoryBooleanProperty(true);
+ child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
+ child.commit();
+
+ c.assertEntryIsCreated();
+ }
+
+ /**
+ * Tests listing of child managed objects.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testListChildManagedObjects() throws Exception {
+ MockLDAPConnection c = new MockLDAPConnection();
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ String[] actual = parent.listTestChildren();
+ String[] expected = new String[] { "test child 1", "test child 2", "test child 3" };
+ Assert.assertEqualsNoOrder(actual, expected);
+ }
+
+ /**
+ * Tests listing of child managed objects when their are not any.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testListChildManagedObjectsEmpty() throws Exception {
+ MockLDAPConnection c = new MockLDAPConnection();
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 3");
+ String[] actual = parent.listTestChildren();
+ String[] expected = new String[] {};
+ Assert.assertEqualsNoOrder(actual, expected);
+ }
+
+ /**
+ * Tests listing of top level managed objects.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testListTopLevelManagedObjects() throws Exception {
+ MockLDAPConnection c = new MockLDAPConnection();
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ String[] actual = listTestParents(ctx);
+ String[] expected = new String[] { "test parent 1", "test parent 2", "test parent 3" };
+ Assert.assertEqualsNoOrder(actual, expected);
+ }
+
+ /**
+ * Tests listing of top level managed objects when their are not any.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testListTopLevelManagedObjectsEmpty() throws Exception {
+ MockLDAPConnection c = new MockLDAPConnection();
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ String[] actual = listTestParents(ctx);
+ String[] expected = new String[] {};
+ Assert.assertEqualsNoOrder(actual, expected);
+ }
+
+ /**
+ * Tests modification of a child managed object.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testModifyChildManagedObjectResetToDefault() throws Exception {
+ ModifyEntryMockLDAPConnection c =
+ new ModifyEntryMockLDAPConnection(
+ "cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ c.addExpectedModification("ds-cfg-base-dn");
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.getTestChild("test child 2");
+ child.setOptionalMultiValuedDNProperty1(Collections.<DN> emptySet());
+ child.commit();
+ Assert.assertTrue(c.isEntryModified());
+ }
+
+ /**
+ * Tests modification of a top-level managed object.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testModifyTopLevelManagedObjectNoChanges() throws Exception {
+ ModifyEntryMockLDAPConnection c =
+ new ModifyEntryMockLDAPConnection("cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ parent.commit();
+ Assert.assertFalse(c.isEntryModified());
+ }
+
+ /**
+ * Tests modification of a top-level managed object.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testModifyTopLevelManagedObjectWithChanges() throws Exception {
+ ModifyEntryMockLDAPConnection c =
+ new ModifyEntryMockLDAPConnection("cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ c.addExpectedModification("ds-cfg-enabled", "false");
+ c.addExpectedModification("ds-cfg-base-dn", "dc=mod1,dc=com", "dc=mod2,dc=com");
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ parent.setMandatoryBooleanProperty(false);
+ parent.setOptionalMultiValuedDNProperty(Arrays.asList(DN.valueOf("dc=mod1,dc=com"),
+ DN.valueOf("dc=mod2,dc=com")));
+ parent.commit();
+ Assert.assertTrue(c.isEntryModified());
+ }
+
+ /**
+ * Tests removal of a child managed object.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testRemoveChildManagedObject() throws Exception {
+ DeleteSubtreeMockLDAPConnection c =
+ new DeleteSubtreeMockLDAPConnection(
+ "cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ parent.removeTestChild("test child 1");
+ c.assertSubtreeIsDeleted();
+ }
+
+ /**
+ * Tests removal of a top-level managed object.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testRemoveTopLevelManagedObject() throws Exception {
+ DeleteSubtreeMockLDAPConnection c =
+ new DeleteSubtreeMockLDAPConnection("cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ removeTestParent(ctx, "test parent 1");
+ c.assertSubtreeIsDeleted();
+ }
+
+ /**
+ * Tests creation of a child managed object succeeds when registered add
+ * constraints succeed.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testAddConstraintSuccess() throws Exception {
+ Constraint constraint = new MockConstraint(true, false, false);
+ TestCfg.addConstraint(constraint);
+
+ try {
+ CreateEntryMockLDAPConnection c =
+ new CreateEntryMockLDAPConnection(
+ "cn=test child new,cn=test children,cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ c.addExpectedAttribute("cn", "test child new");
+ c.addExpectedAttribute("objectClass", "top", "ds-cfg-test-child-dummy");
+ c.addExpectedAttribute("ds-cfg-enabled", "true");
+ c.addExpectedAttribute("ds-cfg-java-class",
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ c.addExpectedAttribute("ds-cfg-attribute-type", "description");
+
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
+ child.setMandatoryBooleanProperty(true);
+ child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
+ child.commit();
+
+ c.assertEntryIsCreated();
+ } finally {
+ // Clean up.
+ TestCfg.removeConstraint(constraint);
+ }
+ }
+
+ /**
+ * Tests creation of a child managed object fails when registered add
+ * constraints fail.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test(expectedExceptions = OperationRejectedException.class)
+ public void testAddConstraintFail() throws Exception {
+ Constraint constraint = new MockConstraint(false, true, true);
+ TestCfg.addConstraint(constraint);
+
+ try {
+ CreateEntryMockLDAPConnection conn =
+ new CreateEntryMockLDAPConnection(
+ "cn=test child new,cn=test children,cn=test parent 1,cn=test parents,cn=config");
+ conn.importLDIF(TEST_LDIF);
+ conn.addExpectedAttribute("cn", "test child new");
+ conn.addExpectedAttribute("objectClass", "top", "ds-cfg-test-child-dummy");
+ conn.addExpectedAttribute("ds-cfg-enabled", "true");
+ conn.addExpectedAttribute("ds-cfg-java-class",
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ conn.addExpectedAttribute("ds-cfg-attribute-type", "description");
+
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(conn, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
+ child.setMandatoryBooleanProperty(true);
+ child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
+ child.commit();
+ Assert.fail("The add constraint failed to prevent creation of the managed object");
+ } finally {
+ // Clean up.
+ TestCfg.removeConstraint(constraint);
+ }
+ }
+
+ /**
+ * Tests removal of a child managed object succeeds when registered remove
+ * constraints succeed.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testRemoveConstraintSuccess() throws Exception {
+ Constraint constraint = new MockConstraint(false, false, true);
+ TestCfg.addConstraint(constraint);
+
+ try {
+ DeleteSubtreeMockLDAPConnection c =
+ new DeleteSubtreeMockLDAPConnection(
+ "cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ parent.removeTestChild("test child 1");
+ c.assertSubtreeIsDeleted();
+ } finally {
+ // Clean up.
+ TestCfg.removeConstraint(constraint);
+ }
+ }
+
+ /**
+ * Tests removal of a child managed object fails when registered remove
+ * constraints fails.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test(expectedExceptions = OperationRejectedException.class)
+ public void testRemoveConstraintFail() throws Exception {
+ Constraint constraint = new MockConstraint(true, true, false);
+ TestCfg.addConstraint(constraint);
+
+ try {
+ DeleteSubtreeMockLDAPConnection c =
+ new DeleteSubtreeMockLDAPConnection(
+ "cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ parent.removeTestChild("test child 1");
+ Assert.fail("The remove constraint failed to prevent removal of the managed object");
+ } finally {
+ // Clean up.
+ TestCfg.removeConstraint(constraint);
+ }
+ }
+
+ /**
+ * Tests modification of a child managed object succeeds when registered
+ * remove constraints succeed.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test
+ public void testModifyConstraintSuccess() throws Exception {
+ Constraint constraint = new MockConstraint(false, true, false);
+ TestCfg.addConstraint(constraint);
+
+ try {
+ ModifyEntryMockLDAPConnection c =
+ new ModifyEntryMockLDAPConnection(
+ "cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ c.addExpectedModification("ds-cfg-base-dn");
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.getTestChild("test child 2");
+ child.setOptionalMultiValuedDNProperty1(Collections.<DN> emptySet());
+ child.commit();
+ Assert.assertTrue(c.isEntryModified());
+ } finally {
+ // Clean up.
+ TestCfg.removeConstraint(constraint);
+ }
+ }
+
+ /**
+ * Tests modification of a child managed object fails when registered remove
+ * constraints fails.
+ *
+ * @throws Exception
+ * If an unexpected error occurred.
+ */
+ @Test(expectedExceptions = OperationRejectedException.class)
+ public void testModifyConstraintFail() throws Exception {
+ Constraint constraint = new MockConstraint(true, false, true);
+ TestCfg.addConstraint(constraint);
+
+ try {
+ ModifyEntryMockLDAPConnection c =
+ new ModifyEntryMockLDAPConnection(
+ "cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config");
+ c.importLDIF(TEST_LDIF);
+ c.addExpectedModification("ds-cfg-base-dn");
+ ManagementContext ctx =
+ LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+ PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
+ TestChildCfgClient child = parent.getTestChild("test child 2");
+ child.setOptionalMultiValuedDNProperty1(Collections.<DN> emptySet());
+ child.commit();
+ Assert.fail("The modify constraint failed to prevent modification of the managed object");
+ } finally {
+ // Clean up.
+ TestCfg.removeConstraint(constraint);
+ }
+ }
+
+ // Asserts that the actual set of DNs contains the expected values.
+ private void assertDNSetEquals(SortedSet<DN> actual, String... expected) {
+ String[] actualStrings = new String[actual.size()];
+ int i = 0;
+ for (DN dn : actual) {
+ actualStrings[i] = dn.toString();
+ i++;
+ }
+ Assert.assertEqualsNoOrder(actualStrings, expected);
+ }
+
+ // Create the named test parent managed object.
+ private TestParentCfgClient createTestParent(ManagementContext context, String name) throws Exception {
+ ManagedObject<RootCfgClient> root = context.getRootConfigurationManagedObject();
+ return root.createChild(TestCfg.getTestOneToManyParentRelationDefinition(), TestParentCfgDefn.getInstance(),
+ name, null).getConfiguration();
+ }
+
+ // Retrieve the named test parent managed object.
+ private TestParentCfgClient getTestParent(ManagementContext context, String name) throws Exception {
+ ManagedObject<RootCfgClient> root = context.getRootConfigurationManagedObject();
+ return root.getChild(TestCfg.getTestOneToManyParentRelationDefinition(), name).getConfiguration();
+ }
+
+ // List test parent managed objects.
+ private String[] listTestParents(ManagementContext context) throws Exception {
+ ManagedObject<RootCfgClient> root = context.getRootConfigurationManagedObject();
+ return root.listChildren(TestCfg.getTestOneToManyParentRelationDefinition());
+ }
+
+ // Remove the named test parent managed object.
+ private void removeTestParent(ManagementContext context, String name) throws Exception {
+ ManagedObject<RootCfgClient> root = context.getRootConfigurationManagedObject();
+ root.removeChild(TestCfg.getTestOneToManyParentRelationDefinition(), name);
+ }
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/MockConstraint.java b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/MockConstraint.java
new file mode 100644
index 0000000..e7c338a
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/MockConstraint.java
@@ -0,0 +1,131 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client.ldap;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.Constraint;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.client.ClientConstraintHandler;
+import org.forgerock.opendj.config.client.ManagedObject;
+import org.forgerock.opendj.config.client.ManagementContext;
+import org.forgerock.opendj.config.server.ServerConstraintHandler;
+import org.forgerock.opendj.ldap.ErrorResultException;
+
+/**
+ * A mock constraint which can be configured to refuse various types of
+ * operation.
+ */
+public final class MockConstraint extends Constraint {
+
+ /**
+ * Mock client constraint handler.
+ */
+ private class Handler extends ClientConstraintHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAddAcceptable(ManagementContext context, ManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
+ if (!allowAdds) {
+ unacceptableReasons.add(LocalizableMessage.raw("Adds not allowed"));
+ }
+
+ return allowAdds;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isDeleteAcceptable(ManagementContext context, ManagedObjectPath<?, ?> path,
+ Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
+ if (!allowDeletes) {
+ unacceptableReasons.add(LocalizableMessage.raw("Deletes not allowed"));
+ }
+
+ return allowDeletes;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isModifyAcceptable(ManagementContext context, ManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
+ if (!allowModifies) {
+ unacceptableReasons.add(LocalizableMessage.raw("Modifies not allowed"));
+ }
+
+ return allowModifies;
+ }
+
+ }
+
+ // Determines if add operations are allowed.
+ private final boolean allowAdds;
+
+ // Determines if modify operations are allowed.
+ private final boolean allowModifies;
+
+ // Determines if delete operations are allowed.
+ private final boolean allowDeletes;
+
+ /**
+ * Creates a new mock constraint.
+ *
+ * @param allowAdds
+ * Determines if add operations are allowed.
+ * @param allowModifies
+ * Determines if modify operations are allowed.
+ * @param allowDeletes
+ * Determines if delete operations are allowed.
+ */
+ public MockConstraint(boolean allowAdds, boolean allowModifies, boolean allowDeletes) {
+ this.allowAdds = allowAdds;
+ this.allowModifies = allowModifies;
+ this.allowDeletes = allowDeletes;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<ClientConstraintHandler> getClientConstraintHandlers() {
+ return Collections.<ClientConstraintHandler> singleton(new Handler());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<ServerConstraintHandler> getServerConstraintHandlers() {
+ return Collections.emptySet();
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/MockLDAPConnection.java b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/MockLDAPConnection.java
new file mode 100644
index 0000000..7e34700
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/MockLDAPConnection.java
@@ -0,0 +1,388 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client.ldap;
+
+import static org.fest.assertions.Assertions.*;
+import static org.forgerock.opendj.ldif.LDIF.*;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.forgerock.opendj.config.client.ldap.LDAPConnection;
+import org.forgerock.opendj.ldap.Attribute;
+import org.forgerock.opendj.ldap.AttributeDescription;
+import org.forgerock.opendj.ldap.AttributeParser;
+import org.forgerock.opendj.ldap.ByteString;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.DecodeException;
+import org.forgerock.opendj.ldap.DecodeOptions;
+import org.forgerock.opendj.ldap.Entry;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.opendj.ldap.LinkedHashMapEntry;
+import org.forgerock.opendj.ldap.RDN;
+import org.forgerock.opendj.ldap.ResultCode;
+import org.forgerock.opendj.ldap.controls.Control;
+import org.forgerock.opendj.ldap.controls.ControlDecoder;
+import org.forgerock.opendj.ldap.requests.ModifyRequest;
+import org.forgerock.opendj.ldap.responses.SearchResultEntry;
+
+/**
+ * A mock LDAP connection which fakes up search results based on some LDIF
+ * content. Implementations should override the modify operations in order to
+ * get provide the correct fake behavior.
+ */
+public class MockLDAPConnection extends LDAPConnection {
+
+ /**
+ * A mock entry.
+ */
+ private static final class MockEntry {
+
+ private final Entry entry;
+
+ private final List<MockEntry> children;
+
+ private final DN dn;
+
+ public MockEntry(DN dn, Entry entry) {
+ this.dn = dn;
+ this.entry = entry;
+ this.children = new LinkedList<MockEntry>();
+ }
+
+ public Entry getEntry() {
+ return entry;
+ }
+
+ public List<MockEntry> getChildren() {
+ return children;
+ }
+
+ public DN getDN() {
+ return dn;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("dn:");
+ builder.append(dn);
+ builder.append(", attributes:");
+ builder.append(entry.getAllAttributes());
+ return builder.toString();
+ }
+ }
+
+ /** All the entries. */
+ private final Map<DN, MockEntry> entries;
+
+ /** The single root entry. */
+ private final MockEntry rootEntry;
+
+ /**
+ * Create a mock connection.
+ */
+ public MockLDAPConnection() {
+ this.rootEntry = new MockEntry(DN.rootDN(), new LinkedHashMapEntry(DN.rootDN()));
+ this.entries = new HashMap<DN, MockEntry>();
+ this.entries.put(DN.rootDN(), this.rootEntry);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void createEntry(Entry entry) throws ErrorResultException {
+ throw new UnsupportedOperationException("createEntry");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void deleteSubtree(DN dn) throws ErrorResultException {
+ throw new UnsupportedOperationException("deleteSubtree");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean entryExists(DN dn) throws ErrorResultException {
+ return getEntry(dn) != null;
+ }
+
+ /**
+ * Imports the provided LDIF into this mock connection.
+ *
+ * @param lines
+ * The LDIF.
+ */
+ public final void importLDIF(String... lines) {
+ try {
+ for (Entry entry : makeEntries(lines)) {
+ addEntry(entry);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<DN> listEntries(DN dn, String filter) throws ErrorResultException {
+ MockEntry entry = getEntry(dn);
+
+ if (entry == null) {
+ throw ErrorResultException.newErrorResult(ResultCode.NO_SUCH_OBJECT, "Could not find entry: " + dn);
+ } else {
+ List<DN> names = new LinkedList<DN>();
+ for (MockEntry child : entry.children) {
+ names.add(DN.valueOf(child.getDN().toString()));
+ }
+ return names;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void modifyEntry(ModifyRequest request) throws ErrorResultException {
+ throw new UnsupportedOperationException("modifyEntry");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public SearchResultEntry readEntry(DN dn, Collection<String> attrIds) throws ErrorResultException {
+ final MockEntry entry = getEntry(dn);
+ return new SearchResultEntry() {
+
+ public AttributeParser parseAttribute(String attributeDescription) {
+ throw new RuntimeException("not implemented");
+ }
+
+ public AttributeParser parseAttribute(AttributeDescription attributeDescription) {
+ throw new RuntimeException("not implemented");
+ }
+
+ public boolean containsControl(String oid) {
+ return false;
+ }
+
+ public SearchResultEntry setName(String dn) {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public SearchResultEntry setName(DN dn) {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public SearchResultEntry replaceAttribute(String attributeDescription, Object... values) {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public boolean replaceAttribute(Attribute attribute) {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public SearchResultEntry removeAttribute(String attributeDescription, Object... values) {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public boolean removeAttribute(AttributeDescription attributeDescription) {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public boolean removeAttribute(Attribute attribute, Collection<? super ByteString> missingValues) {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public DN getName() {
+ return entry.getDN();
+ }
+
+ @Override
+ public List<Control> getControls() {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public <C extends Control> C getControl(ControlDecoder<C> decoder, DecodeOptions options)
+ throws DecodeException {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public int getAttributeCount() {
+ return entry.getEntry().getAttributeCount();
+ }
+
+ @Override
+ public Attribute getAttribute(String attributeDescription) {
+ return entry.getEntry().getAttribute(attributeDescription);
+ }
+
+ @Override
+ public Attribute getAttribute(AttributeDescription attributeDescription) {
+ return entry.getEntry().getAttribute(attributeDescription);
+ }
+
+ @Override
+ public Iterable<Attribute> getAllAttributes(String attributeDescription) {
+ return entry.getEntry().getAllAttributes(attributeDescription);
+ }
+
+ @Override
+ public Iterable<Attribute> getAllAttributes(AttributeDescription attributeDescription) {
+ return entry.getEntry().getAllAttributes(attributeDescription);
+ }
+
+ @Override
+ public Iterable<Attribute> getAllAttributes() {
+ return entry.getEntry().getAllAttributes();
+ }
+
+ @Override
+ public boolean containsAttribute(String attributeDescription, Object... values) {
+ return entry.getEntry().containsAttribute(attributeDescription, values);
+ }
+
+ @Override
+ public boolean containsAttribute(Attribute attribute, Collection<? super ByteString> missingValues) {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public SearchResultEntry clearAttributes() {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public SearchResultEntry addControl(Control control) {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public SearchResultEntry addAttribute(String attributeDescription, Object... values) {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public boolean addAttribute(Attribute attribute, Collection<? super ByteString> duplicateValues) {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public boolean addAttribute(Attribute attribute) {
+ throw new RuntimeException("not implemented");
+ }
+ };
+ }
+
+ /**
+ * Asserts whether the provided attribute contains exactly the set of values
+ * contained in the provided collection.
+ *
+ * @param attr
+ * The attribute.
+ * @param values
+ * The expected values.
+ * @throws ErrorResultException
+ * If an unexpected problem occurred.
+ */
+ protected final void assertAttributeEquals(Attribute attr, Collection<String> values) throws ErrorResultException {
+ List<String> actualValues = new LinkedList<String>();
+ for (ByteString actualValue : attr) {
+ actualValues.add(actualValue.toString());
+ }
+
+ assertThat(actualValues).hasSize(values.size());
+ assertThat(actualValues).containsOnly(values.toArray());
+ }
+
+ /**
+ * Create a new mock entry.
+ *
+ * @param entry
+ * The entry to be added.
+ */
+ private void addEntry(Entry entry) {
+ MockEntry parent = rootEntry;
+ DN entryDN = entry.getName();
+
+ // Create required glue entries.
+ for (int i = 0; i < entryDN.size() - 1; i++) {
+ RDN rdn = entryDN.parent(entryDN.size() - i - 1).rdn();
+ DN dn = parent.getDN().child(rdn);
+
+ if (!entries.containsKey(dn)) {
+ MockEntry glue = new MockEntry(dn, new LinkedHashMapEntry(dn));
+ parent.getChildren().add(glue);
+ entries.put(dn, glue);
+ }
+
+ parent = entries.get(dn);
+ }
+
+ // We now have the parent entry - so construct the new entry.
+ MockEntry child = new MockEntry(entryDN, LinkedHashMapEntry.deepCopyOfEntry(entry));
+ parent.getChildren().add(child);
+ entries.put(entryDN, child);
+ }
+
+ /**
+ * Gets the named entry.
+ *
+ * @param dn
+ * The name of the entry.
+ * @return Returns the mock entry or <code>null</code> if it does not exist.
+ */
+ private MockEntry getEntry(DN dn) {
+ DN name = DN.valueOf(dn.toString());
+ return entries.get(name);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void unbind() {
+ // nothing to do
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/ModifyEntryMockLDAPConnection.java b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/ModifyEntryMockLDAPConnection.java
new file mode 100644
index 0000000..b6a3aee
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/client/ldap/ModifyEntryMockLDAPConnection.java
@@ -0,0 +1,115 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.client.ldap;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.forgerock.opendj.ldap.Attribute;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.ErrorResultException;
+import org.forgerock.opendj.ldap.Modification;
+import org.forgerock.opendj.ldap.requests.ModifyRequest;
+import org.testng.Assert;
+
+import org.forgerock.util.Reject;
+
+/**
+ * A mock LDAP connection which is used to verify that a modify operation was
+ * requested and that it has the correct parameters.
+ */
+public final class ModifyEntryMockLDAPConnection extends MockLDAPConnection {
+
+ // Detect multiple calls.
+ private boolean alreadyModified = false;
+
+ private final DN expectedDN;
+
+ // The expected set of modifications (attribute name -> list of
+ // values).
+ private final Map<String, List<String>> modifications = new HashMap<String, List<String>>();
+
+ /**
+ * Create a new mock ldap connection for detecting modify operations.
+ *
+ * @param dn
+ * The expected DN of the entry to be added.
+ */
+ public ModifyEntryMockLDAPConnection(String dn) {
+ this.expectedDN = DN.valueOf(dn);
+ }
+
+ /**
+ * Add a modification which should be part of the modify operation.
+ *
+ * @param expectedName
+ * The name of the expected attribute.
+ * @param expectedValues
+ * The attribute's expected new values (possibly empty if
+ * deleted).
+ */
+ public void addExpectedModification(String expectedName, String... expectedValues) {
+ Reject.ifNull(expectedName);
+ Reject.ifNull(expectedValues);
+ modifications.put(expectedName, Arrays.asList(expectedValues));
+ }
+
+ /**
+ * Determines whether or not the entry was modified.
+ *
+ * @return Returns <code>true</code> if it was modified.
+ */
+ public boolean isEntryModified() {
+ return alreadyModified;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void modifyEntry(ModifyRequest request) throws ErrorResultException {
+ Assert.assertFalse(alreadyModified);
+ Assert.assertEquals(request.getName(), expectedDN);
+
+ Map<String, List<String>> expected = new HashMap<String, List<String>>(modifications);
+ for (Modification modification : request.getModifications()) {
+ Attribute attribute = modification.getAttribute();
+ String attrName = attribute.getAttributeDescription().getAttributeType().getNameOrOID();
+ List<String> values = expected.remove(attrName);
+ if (values == null) {
+ Assert.fail("Unexpected modification to attribute " + attrName);
+ }
+ assertAttributeEquals(attribute, values);
+ }
+ if (!expected.isEmpty()) {
+ Assert.fail("Missing modifications to: " + expected.keySet());
+ }
+
+ alreadyModified = true;
+ }
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/server/AdminTestCaseUtils.java b/opendj-config/src/test/java/org/forgerock/opendj/config/server/AdminTestCaseUtils.java
new file mode 100644
index 0000000..cb0c636
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/server/AdminTestCaseUtils.java
@@ -0,0 +1,120 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import org.forgerock.opendj.server.config.meta.RootCfgDefn;
+import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
+import org.forgerock.opendj.config.Configuration;
+import org.forgerock.opendj.config.ConfigurationClient;
+import org.forgerock.opendj.config.DefinitionDecodingException;
+import org.forgerock.opendj.config.LDAPProfile;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.RelationDefinition;
+import org.forgerock.opendj.config.SingletonRelationDefinition;
+import org.forgerock.opendj.config.server.ConfigExceptionFactory;
+import org.forgerock.opendj.config.server.ConstraintViolationException;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.config.server.ServerManagedObjectDecodingException;
+import org.forgerock.opendj.config.server.ServerManagementContext;
+import org.forgerock.opendj.ldap.Entry;
+
+/**
+ * This class defines some utility functions which can be used by test cases
+ * which interact with the admin framework.
+ */
+public final class AdminTestCaseUtils {
+
+ // The relation name which will be used for dummy configurations. A
+ // deliberately obfuscated name is chosen to avoid clashes.
+ private static final String DUMMY_TEST_RELATION = "*dummy*test*relation*";
+
+ // Indicates if the dummy relation profile has been registered.
+ private static boolean isProfileRegistered = false;
+
+ // Prevent instantiation.
+ private AdminTestCaseUtils() {
+ // No implementation required.
+ }
+
+ /**
+ * Decodes a configuration entry into the required type of server
+ * configuration.
+ *
+ * @param <S>
+ * The type of server configuration to be decoded.
+ * @param context The server management context.
+ * @param definition
+ * The required definition of the required managed object.
+ * @param entry
+ * An entry containing the configuration to be decoded.
+ * @return Returns the new server-side configuration.
+ * @throws ConfigException
+ * If the entry could not be decoded.
+ */
+ public static <S extends Configuration> S getConfiguration(ServerManagementContext context,
+ AbstractManagedObjectDefinition<?, S> definition, Entry entry) throws ConfigException {
+ try {
+ ServerManagedObject<? extends S> managedObject = context.decode(getPath(definition), entry);
+
+ // Ensure constraints are satisfied.
+ managedObject.ensureIsUsable();
+
+ return managedObject.getConfiguration();
+ } catch (DefinitionDecodingException e) {
+ throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(entry.getName(), e);
+ } catch (ServerManagedObjectDecodingException e) {
+ throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(e);
+ } catch (ConstraintViolationException e) {
+ throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(e);
+ }
+ }
+
+ /** Construct a dummy path. */
+ // @Checkstyle:off
+ private synchronized static <C extends ConfigurationClient, S extends Configuration> ManagedObjectPath<C, S>
+ getPath(AbstractManagedObjectDefinition<C, S> d) {
+ // @Checkstyle:on
+ if (!isProfileRegistered) {
+ LDAPProfile.Wrapper profile = new LDAPProfile.Wrapper() {
+ @Override
+ public String getRelationRDNSequence(RelationDefinition<?, ?> r) {
+ if (r.getName().equals(DUMMY_TEST_RELATION)) {
+ return "cn=dummy configuration,cn=config";
+ } else {
+ return null;
+ }
+ }
+
+ };
+ LDAPProfile.getInstance().pushWrapper(profile);
+ isProfileRegistered = true;
+ }
+ SingletonRelationDefinition.Builder<C, S> builder =
+ new SingletonRelationDefinition.Builder<C, S>(RootCfgDefn.getInstance(), DUMMY_TEST_RELATION, d);
+ ManagedObjectPath<?, ?> root = ManagedObjectPath.emptyPath();
+ return root.child(builder.getInstance());
+ }
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/server/AggregationServerTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/server/AggregationServerTest.java
new file mode 100644
index 0000000..7a96b6e0
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/server/AggregationServerTest.java
@@ -0,0 +1,642 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ * Portions copyright 2013 ForgeRock AS
+ */
+package org.forgerock.opendj.config.server;
+
+import static org.fest.assertions.Assertions.*;
+import static org.forgerock.opendj.ldif.LDIF.*;
+import static org.mockito.Matchers.*;
+import static org.mockito.Mockito.*;
+import static org.testng.Assert.*;
+
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.opendj.server.config.client.ConnectionHandlerCfgClient;
+import org.forgerock.opendj.server.config.server.ConnectionHandlerCfg;
+import org.forgerock.opendj.config.AdminTestCase;
+import org.forgerock.opendj.config.AdministratorAction;
+import org.forgerock.opendj.config.AggregationPropertyDefinition;
+import org.forgerock.opendj.config.IllegalPropertyValueStringException;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.PropertyException;
+import org.forgerock.opendj.config.PropertyOption;
+import org.forgerock.opendj.config.TestCfg;
+import org.forgerock.opendj.config.TestChildCfg;
+import org.forgerock.opendj.config.TestChildCfgDefn;
+import org.forgerock.opendj.config.TestParentCfg;
+import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider;
+import org.forgerock.opendj.config.conditions.Conditions;
+import org.forgerock.opendj.config.server.ConfigChangeResult;
+import org.forgerock.opendj.config.server.ConfigurationChangeListener;
+import org.forgerock.opendj.config.server.ConfigurationDeleteListener;
+import org.forgerock.opendj.config.server.ConstraintViolationException;
+import org.forgerock.opendj.config.server.ServerManagedObjectDecodingException;
+import org.forgerock.opendj.config.server.ServerManagementContext;
+import org.forgerock.opendj.config.server.spi.ConfigChangeListener;
+import org.forgerock.opendj.config.server.spi.ConfigDeleteListener;
+import org.forgerock.opendj.config.server.spi.ConfigurationRepository;
+import org.forgerock.opendj.ldap.Entry;
+import org.forgerock.opendj.ldap.ResultCode;
+import org.forgerock.opendj.ldap.schema.Schema;
+import org.forgerock.opendj.ldif.LDIF;
+import org.mockito.ArgumentCaptor;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+/**
+ * Test cases for aggregations on the server-side.
+ */
+@Test(singleThreaded = true)
+@SuppressWarnings("javadoc")
+public final class AggregationServerTest extends AdminTestCase {
+
+ /**
+ * Dummy change listener for triggering change constraint call-backs.
+ */
+ private static final class DummyChangeListener implements ConfigurationChangeListener<TestChildCfg> {
+
+ public ConfigChangeResult applyConfigurationChange(TestChildCfg configuration) {
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+
+ public boolean isConfigurationChangeAcceptable(TestChildCfg configuration,
+ List<LocalizableMessage> unacceptableReasons) {
+ return true;
+ }
+ }
+
+ /**
+ * Dummy delete listener for triggering delete constraint call-backs.
+ */
+ private static final class DummyDeleteListener implements ConfigurationDeleteListener<TestChildCfg> {
+
+ public ConfigChangeResult applyConfigurationDelete(TestChildCfg configuration) {
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+
+ public boolean isConfigurationDeleteAcceptable(TestChildCfg configuration,
+ List<LocalizableMessage> unacceptableReasons) {
+ return true;
+ }
+ }
+
+ // @Checkstyle:off
+ private static final Entry TEST_CHILD_1 = makeEntry(
+ "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 1",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real");
+
+ private static final Entry TEST_CHILD_2 = makeEntry(
+ "dn: cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 2",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real",
+ "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=connection handlers, cn=config");
+
+ /** Has an invalid handler reference. */
+ private static final Entry TEST_CHILD_3 = makeEntry(
+ "dn: cn=test child 3,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 3", "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real",
+ "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=bad rdn, cn=config");
+
+ private static final Entry TEST_CHILD_4 = makeEntry(
+ "dn: cn=test child 4,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 4", "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real",
+ "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=connection handlers, cn=config",
+ "ds-cfg-rotation-policy: cn=LDAPS Connection Handler, cn=connection handlers, cn=config");
+
+ private static final Entry TEST_CHILD_5 = makeEntry(
+ "dn: cn=test child 5,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 5", "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real",
+ "ds-cfg-rotation-policy: cn=BAD Connection Handler 1, cn=connection handlers, cn=config",
+ "ds-cfg-rotation-policy: cn=BAD Connection Handler 2, cn=connection handlers, cn=config",
+ "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=connection handlers, cn=config");
+
+ private static final Entry TEST_CHILD_6 = makeEntry(
+ "dn: cn=test child 6,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 6", "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real",
+ "ds-cfg-rotation-policy: cn=Test Connection Handler, cn=connection handlers, cn=config");
+
+ private static final Entry TEST_CHILD_7 = makeEntry(
+ "dn: cn=test child 7,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 7", "ds-cfg-enabled: false",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real",
+ "ds-cfg-rotation-policy: cn=Test Connection Handler, cn=connection handlers, cn=config");
+
+ static final Entry TEST_PARENTS = makeEntry(
+ "dn: cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: test parents");
+
+ static final Entry TEST_PARENT_1 = makeEntry(
+ "dn: cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-parent-dummy",
+ "cn: test parent 1",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real");
+
+ private static final Entry TEST_BASE_CHILD = LDIF.makeEntry(
+ "dn:cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: test children");
+
+ /** this handler is disabled - see ds-cfg-enabled property */
+ protected static final Entry TEST_CONNECTION_HANDLER_ENTRY_DISABLED = LDIF.makeEntry(
+ "dn: cn=" + "Test 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-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler",
+ "ds-cfg-enabled: false",
+ "ds-cfg-listen-address: 0.0.0.0", "ds-cfg-listen-port: 389");
+
+ /** this handler is enabled - see ds-cfg-enabled property */
+ protected static final Entry TEST_CONNECTION_HANDLER_ENTRY_ENABLED = LDIF.makeEntry(
+ "dn: cn=" + "Test 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-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler",
+ "ds-cfg-enabled: true",
+ "ds-cfg-listen-address: 0.0.0.0", "ds-cfg-listen-port: 389");
+ // @Checkstyle:on
+
+ // @Checkstyle:off
+ /**
+ * The default test child configuration "aggregation-property" property
+ * definition.
+ */
+ private AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg>
+ aggregationPropertyDefinitionDefault = null;
+
+ /**
+ * An aggregation where the target must be enabled if the source is enabled.
+ */
+ private AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg>
+ aggregationPropertyDefinitionTargetAndSourceMustBeEnabled = null;
+
+ /** An aggregation where the target must be enabled. */
+ private AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg>
+ aggregationPropertyDefinitionTargetMustBeEnabled = null;
+ // @Checkstyle:on
+
+ @BeforeClass
+ public void setUp() throws Exception {
+ TestCfg.setUp();
+
+ // Save the aggregation property definition so that it can be
+ // replaced and restored later.
+ aggregationPropertyDefinitionDefault =
+ TestChildCfgDefn.getInstance().getAggregationPropertyPropertyDefinition();
+
+ // Create the two test aggregation properties.
+ AggregationPropertyDefinition.Builder<ConnectionHandlerCfgClient, ConnectionHandlerCfg> builder;
+ TestChildCfgDefn d = TestChildCfgDefn.getInstance();
+ builder = AggregationPropertyDefinition.createBuilder(d, "aggregation-property");
+ builder.setOption(PropertyOption.MULTI_VALUED);
+ builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, d,
+ "aggregation-property"));
+ builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
+ builder.setParentPath("/");
+ builder.setRelationDefinition("connection-handler");
+ builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true"));
+ aggregationPropertyDefinitionTargetMustBeEnabled = builder.getInstance();
+ TestCfg.initializePropertyDefinition(aggregationPropertyDefinitionTargetMustBeEnabled);
+
+ builder = AggregationPropertyDefinition.createBuilder(d, "aggregation-property");
+ builder.setOption(PropertyOption.MULTI_VALUED);
+ builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, d,
+ "aggregation-property"));
+ builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
+ builder.setParentPath("/");
+ builder.setRelationDefinition("connection-handler");
+ builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true"));
+ builder.setTargetNeedsEnablingCondition(Conditions.contains("mandatory-boolean-property", "true"));
+ aggregationPropertyDefinitionTargetAndSourceMustBeEnabled = builder.getInstance();
+ TestCfg.initializePropertyDefinition(aggregationPropertyDefinitionTargetAndSourceMustBeEnabled);
+ }
+
+ @AfterClass
+ public void tearDown() throws Exception {
+ TestCfg.cleanup();
+
+ // Restore the test child aggregation definition.
+ TestCfg.addPropertyDefinition(aggregationPropertyDefinitionDefault);
+ }
+
+ /**
+ * Tests that aggregation is rejected when the LDAP DN contains a valid RDN
+ * but an invalid parent DN.
+ */
+ @Test
+ public void testAggregationBadBaseDN() throws Exception {
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_3, LDAP_CONN_HANDLER_ENTRY);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
+ try {
+ parentCfg.getTestChild(entryName(TEST_CHILD_3));
+ fail("Unexpectedly added test child 3 when it had a bad aggregation value");
+ } catch (ConfigException e) {
+ assertThat(e.getCause()).isNotNull().isInstanceOf(ServerManagedObjectDecodingException.class);
+ ServerManagedObjectDecodingException de = (ServerManagedObjectDecodingException) e.getCause();
+ assertThat(de.getCauses()).hasSize(1);
+ PropertyException propertyException = de.getCauses().iterator().next();
+ assertThat(propertyException).isInstanceOf(IllegalPropertyValueStringException.class);
+ IllegalPropertyValueStringException pe = (IllegalPropertyValueStringException) propertyException;
+ assertEquals(pe.getPropertyDefinition(), TestChildCfgDefn.getInstance()
+ .getAggregationPropertyPropertyDefinition());
+ assertEquals(pe.getIllegalValueString(), "cn=LDAP Connection Handler, cn=bad rdn, cn=config");
+ }
+ }
+
+ /**
+ * Tests that aggregation is rejected by a constraint violation when the DN
+ * values are dangling.
+ */
+ @Test
+ public void testAggregationDanglingReference() throws Exception {
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_5, LDAP_CONN_HANDLER_ENTRY);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
+
+ try {
+ parentCfg.getTestChild(entryName(TEST_CHILD_5));
+ fail("Unexpectedly added test child 5 when it had a dangling reference");
+ } catch (ConfigException e) {
+ assertThat(e.getCause()).isNotNull().isInstanceOf(ConstraintViolationException.class);
+ ConstraintViolationException cve = (ConstraintViolationException) e.getCause();
+ assertThat(cve.getMessages()).isNotNull().hasSize(2);
+ }
+ }
+
+ /**
+ * Tests that aggregation is REJECTED by a constraint violation when an
+ * enabled component references a disabled component and the referenced
+ * component must always be enabled.
+ */
+ @Test
+ public void testAggregationDisabledReference1() throws Exception {
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_6, TEST_CONNECTION_HANDLER_ENTRY_DISABLED);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+
+ registerAggregationDefinitionWithTargetEnabled();
+
+ try {
+ TestParentCfg parent = getParentCfg(TEST_PARENT_1, context);
+ parent.getTestChild(entryName(TEST_CHILD_6));
+ fail("Unexpectedly added test child 6 when it had a disabled reference");
+ } catch (ConfigException e) {
+ assertThat(e.getCause()).isNotNull().isInstanceOf(ConstraintViolationException.class);
+ ConstraintViolationException cve = (ConstraintViolationException) e.getCause();
+ assertThat(cve.getMessages()).isNotNull().hasSize(1);
+ } finally {
+ putBackDefaultAggregationDefinitionFromTargetEnabled();
+ }
+ }
+
+ /**
+ * Tests that aggregation is REJECTED by a constraint violation when a
+ * disabled component references a disabled component and the referenced
+ * component must always be enabled.
+ */
+ @Test
+ public void testAggregationDisabledReference2() throws Exception {
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_7, TEST_CONNECTION_HANDLER_ENTRY_DISABLED);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+
+ registerAggregationDefinitionWithTargetEnabled();
+
+ try {
+ TestParentCfg parent = getParentCfg(TEST_PARENT_1, context);
+ parent.getTestChild(entryName(TEST_CHILD_7));
+ fail("Unexpectedly added test child 7 when it had a disabled reference");
+ } catch (ConfigException e) {
+ assertThat(e.getCause()).isNotNull().isInstanceOf(ConstraintViolationException.class);
+ ConstraintViolationException cve = (ConstraintViolationException) e.getCause();
+ assertThat(cve.getMessages()).isNotNull().hasSize(1);
+ } finally {
+ putBackDefaultAggregationDefinitionFromTargetEnabled();
+ }
+ }
+
+ /**
+ * Tests that aggregation is REJECTED by a constraint violation when an
+ * enabled component references a disabled component and the referenced
+ * component must always be enabled when the referencing component is
+ * enabled.
+ */
+ @Test
+ public void testAggregationDisabledReference3() throws Exception {
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_6, TEST_CONNECTION_HANDLER_ENTRY_DISABLED);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+
+ registerAggregationDefinitionWithTargetAndSourceEnabled();
+
+ try {
+ TestParentCfg parent = getParentCfg(TEST_PARENT_1, context);
+ parent.getTestChild(entryName(TEST_CHILD_6));
+ fail("Unexpectedly added test child 6 when it had a disabled reference");
+ } catch (ConfigException e) {
+ assertThat(e.getCause()).isNotNull().isInstanceOf(ConstraintViolationException.class);
+ ConstraintViolationException cve = (ConstraintViolationException) e.getCause();
+ assertThat(cve.getMessages()).isNotNull().hasSize(1);
+ } finally {
+ putBackDefaultAggregationDefinitionFromTargetAndSourceEnabled();
+ }
+ }
+
+ /**
+ * Tests that aggregation is ALLOWED when a disabled component references a
+ * disabled component and the referenced component must always be enabled
+ * when the referencing component is enabled.
+ */
+ @Test
+ public void testAggregationDisabledReference4() throws Exception {
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_7, TEST_CONNECTION_HANDLER_ENTRY_DISABLED);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+
+ registerAggregationDefinitionWithTargetAndSourceEnabled();
+
+ try {
+ TestParentCfg parent = getParentCfg(TEST_PARENT_1, context);
+ parent.getTestChild(entryName(TEST_CHILD_7));
+ } finally {
+ putBackDefaultAggregationDefinitionFromTargetAndSourceEnabled();
+ }
+ }
+
+ /**
+ * Tests that aggregation contains no values when it contains does not
+ * contain any DN attribute values.
+ */
+ @Test
+ public void testAggregationEmpty() throws Exception {
+ ConfigurationRepository configRepository = createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_1);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
+ TestChildCfg testChildCfg = parentCfg.getTestChild(entryName(TEST_CHILD_1));
+
+ assertEquals(testChildCfg.getMandatoryClassProperty(),
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ assertEquals(testChildCfg.getMandatoryReadOnlyAttributeTypeProperty(), Schema.getDefaultSchema()
+ .getAttributeType("description"));
+ assertSetEquals(testChildCfg.getAggregationProperty(), new String[0]);
+ }
+
+ /**
+ * Tests that aggregation contains multiple valid values when it contains a
+ * multiple valid DN attribute values.
+ */
+ @Test
+ public void testAggregationMultipleValues() throws Exception {
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_4, LDAP_CONN_HANDLER_ENTRY,
+ LDAPS_CONN_HANDLER_ENTRY);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
+ TestChildCfg testChildCfg = parentCfg.getTestChild(entryName(TEST_CHILD_4));
+
+ assertEquals(testChildCfg.getMandatoryClassProperty(),
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ assertEquals(testChildCfg.getMandatoryReadOnlyAttributeTypeProperty(), Schema.getDefaultSchema()
+ .getAttributeType("description"));
+ assertSetEquals(testChildCfg.getAggregationProperty(), "LDAPS Connection Handler", "LDAP Connection Handler");
+ }
+
+ /**
+ * Tests that aggregation contains single valid value when it contains a
+ * single valid DN attribute values.
+ */
+ @Test
+ public void testAggregationSingle() throws Exception {
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_2, LDAP_CONN_HANDLER_ENTRY);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
+ TestChildCfg testChildCfg = parentCfg.getTestChild(entryName(TEST_CHILD_2));
+
+ assertEquals(testChildCfg.getMandatoryClassProperty(),
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ assertEquals(testChildCfg.getMandatoryReadOnlyAttributeTypeProperty(), Schema.getDefaultSchema()
+ .getAttributeType("description"));
+
+ // Test normalization.
+ assertSetEquals(testChildCfg.getAggregationProperty(), "LDAP Connection Handler");
+ assertSetEquals(testChildCfg.getAggregationProperty(), " LDAP Connection Handler ");
+ assertSetEquals(testChildCfg.getAggregationProperty(), " ldap connection HANDLER ");
+ }
+
+ /**
+ * Tests that it is impossible to delete a referenced component when the
+ * referenced component must always exist regardless of whether the
+ * referencing component is enabled or not.
+ */
+ @Test
+ public void testCannotDeleteReferencedComponent() throws Exception {
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENTS, TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_7,
+ CONN_HANDLER_ENTRY, TEST_CONNECTION_HANDLER_ENTRY_ENABLED);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+
+ registerAggregationDefinitionWithTargetEnabled();
+
+ ConfigurationDeleteListener<TestChildCfg> deleteListener = new DummyDeleteListener();
+ try {
+ // Retrieve the parent and child managed objects and register
+ // delete and change listeners respectively in order to trigger
+ // the constraint call-backs.
+ TestParentCfg parentCfg = getParentCfg(entryName(TEST_PARENT_1), context);
+ parentCfg.addTestChildDeleteListener(deleteListener);
+
+ ArgumentCaptor<ConfigDeleteListener> registeredListener =
+ ArgumentCaptor.forClass(ConfigDeleteListener.class);
+ verify(configRepository).registerDeleteListener(eq(TEST_BASE_CHILD.getName()),
+ registeredListener.capture());
+
+ // Now simulate the delete ofthe referenced connection handler.
+ assertThat(
+ registeredListener.getValue().configDeleteIsAcceptable(TEST_CONNECTION_HANDLER_ENTRY_ENABLED,
+ new LocalizableMessageBuilder())).isFalse();
+
+ } finally {
+ putBackDefaultAggregationDefinitionFromTargetEnabled();
+ }
+ }
+
+ /**
+ * Tests that it is impossible to disable a referenced component when the
+ * referenced component must always be enabled regardless of whether the
+ * referencing component is enabled or not.
+ */
+ @Test
+ public void testCannotDisableReferencedComponent() throws Exception {
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENTS, TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_7,
+ CONN_HANDLER_ENTRY, TEST_CONNECTION_HANDLER_ENTRY_ENABLED);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+
+ registerAggregationDefinitionWithTargetEnabled();
+
+ ConfigurationChangeListener<TestChildCfg> changeListener = new DummyChangeListener();
+ try {
+ // Retrieve the parent and child managed objects and register
+ // delete and change listeners respectively in order to trigger
+ // the constraint call-backs.
+ TestParentCfg parentCfg = getParentCfg(entryName(TEST_PARENT_1), context);
+ TestChildCfg testChildCfg = parentCfg.getTestChild(entryName(TEST_CHILD_7));
+ testChildCfg.addChangeListener(changeListener);
+
+ ArgumentCaptor<ConfigChangeListener> registeredListener =
+ ArgumentCaptor.forClass(ConfigChangeListener.class);
+ verify(configRepository).registerChangeListener(eq(TEST_CHILD_7.getName()), registeredListener.capture());
+
+ // Now simulate the disabling ofthe referenced connection handler.
+ assertThat(
+ registeredListener.getValue().configChangeIsAcceptable(TEST_CONNECTION_HANDLER_ENTRY_DISABLED,
+ new LocalizableMessageBuilder())).isFalse();
+
+ } finally {
+ putBackDefaultAggregationDefinitionFromTargetEnabled();
+ }
+ }
+
+ /**
+ * Register the temporary aggregation definition to be used in test. You
+ * must call
+ * {@code putBackDefaultAggregationDefinitionFromTargetAndSourceEnabled}
+ * method at end of test.
+ */
+ private void registerAggregationDefinitionWithTargetAndSourceEnabled() {
+ TestCfg.removeConstraint(aggregationPropertyDefinitionDefault.getSourceConstraint());
+ TestCfg.addPropertyDefinition(aggregationPropertyDefinitionTargetAndSourceMustBeEnabled);
+ TestCfg.addConstraint(aggregationPropertyDefinitionTargetAndSourceMustBeEnabled.getSourceConstraint());
+ }
+
+ /**
+ * Put back the default aggregation definition.
+ */
+ private void putBackDefaultAggregationDefinitionFromTargetAndSourceEnabled() {
+ TestCfg.removeConstraint(aggregationPropertyDefinitionTargetAndSourceMustBeEnabled.getSourceConstraint());
+ TestCfg.addPropertyDefinition(aggregationPropertyDefinitionDefault);
+ TestCfg.addConstraint(aggregationPropertyDefinitionDefault.getSourceConstraint());
+ }
+
+ /**
+ * Register the temporary aggregation definition to be used in test. You
+ * must call {@code putBackDefaultAggregationDefinitionFromTargetEnabled}
+ * method at end of test.
+ */
+ private void registerAggregationDefinitionWithTargetEnabled() {
+ TestCfg.removeConstraint(aggregationPropertyDefinitionDefault.getSourceConstraint());
+ TestCfg.addPropertyDefinition(aggregationPropertyDefinitionTargetMustBeEnabled);
+ TestCfg.addConstraint(aggregationPropertyDefinitionTargetMustBeEnabled.getSourceConstraint());
+ }
+
+ /**
+ * Put back the default aggregation definition.
+ */
+ private void putBackDefaultAggregationDefinitionFromTargetEnabled() {
+ TestCfg.removeConstraint(aggregationPropertyDefinitionTargetMustBeEnabled.getSourceConstraint());
+ TestCfg.addPropertyDefinition(aggregationPropertyDefinitionDefault);
+ TestCfg.addConstraint(aggregationPropertyDefinitionDefault.getSourceConstraint());
+ }
+
+ /** Asserts that the actual set of DNs contains the expected values. */
+ private void assertSetEquals(SortedSet<String> actual, String... expected) {
+ SortedSet<String> values =
+ new TreeSet<String>(TestChildCfgDefn.getInstance().getAggregationPropertyPropertyDefinition());
+ if (expected != null) {
+ for (String value : expected) {
+ values.add(value);
+ }
+ }
+ Assert.assertEquals((Object) actual, (Object) values);
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/server/ConstraintTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/server/ConstraintTest.java
new file mode 100644
index 0000000..a6c75f0
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/server/ConstraintTest.java
@@ -0,0 +1,319 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import static org.fest.assertions.Assertions.*;
+import static org.mockito.Matchers.*;
+import static org.mockito.Mockito.*;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.opendj.config.AdminTestCase;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.TestCfg;
+import org.forgerock.opendj.config.TestChildCfg;
+import org.forgerock.opendj.config.TestChildCfgDefn;
+import org.forgerock.opendj.config.TestParentCfg;
+import org.forgerock.opendj.config.server.ConfigChangeResult;
+import org.forgerock.opendj.config.server.ConfigurationAddListener;
+import org.forgerock.opendj.config.server.ConfigurationChangeListener;
+import org.forgerock.opendj.config.server.ConfigurationDeleteListener;
+import org.forgerock.opendj.config.server.ConstraintViolationException;
+import org.forgerock.opendj.config.server.ServerManagementContext;
+import org.forgerock.opendj.config.server.spi.ConfigAddListener;
+import org.forgerock.opendj.config.server.spi.ConfigChangeListener;
+import org.forgerock.opendj.config.server.spi.ConfigDeleteListener;
+import org.forgerock.opendj.config.server.spi.ConfigurationRepository;
+import org.forgerock.opendj.ldap.Entry;
+import org.forgerock.opendj.ldap.ResultCode;
+import org.forgerock.opendj.ldif.LDIF;
+import org.mockito.ArgumentCaptor;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test cases for constraints on the server-side.
+ */
+@SuppressWarnings("javadoc")
+public final class ConstraintTest extends AdminTestCase {
+
+ private static class AddListener implements ConfigurationAddListener<TestChildCfg> {
+
+ public ConfigChangeResult applyConfigurationAdd(TestChildCfg configuration) {
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+
+ public boolean isConfigurationAddAcceptable(TestChildCfg configuration,
+ List<LocalizableMessage> unacceptableReasons) {
+ return true;
+ }
+ }
+
+ private static class DeleteListener implements ConfigurationDeleteListener<TestChildCfg> {
+
+ public ConfigChangeResult applyConfigurationDelete(TestChildCfg configuration) {
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+
+ public boolean isConfigurationDeleteAcceptable(TestChildCfg configuration,
+ List<LocalizableMessage> unacceptableReasons) {
+ return true;
+ }
+
+ }
+
+ private static class ChangeListener implements ConfigurationChangeListener<TestChildCfg> {
+
+ public ConfigChangeResult applyConfigurationChange(TestChildCfg configuration) {
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+
+ public boolean isConfigurationChangeAcceptable(TestChildCfg configuration,
+ List<LocalizableMessage> unacceptableReasons) {
+ return true;
+ }
+
+ }
+
+ // @Checkstyle:off
+ private static final Entry TEST_CHILD_1 = LDIF.makeEntry(
+ "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 1",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real");
+
+ private static final Entry TEST_BASE_CHILD = LDIF.makeEntry(
+ "dn:cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: test children");
+
+ // Parent 1 - uses default values for
+ // optional-multi-valued-dn-property.
+ private static final Entry TEST_PARENT_1 = LDIF.makeEntry(
+ "dn: cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-parent-dummy",
+ "cn: test parent 1",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real");
+
+ // @Checkstyle:on
+
+ @BeforeClass
+ public void setUp() throws Exception {
+ TestCfg.setUp();
+ }
+
+ @AfterClass
+ public void tearDown() throws Exception {
+ TestCfg.cleanup();
+ }
+
+ /** Success just ensure there is no exception raised */
+ @Test
+ public void testGetManagedObjectSuccess() throws Exception {
+ // arrange
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_1);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ MockConstraint constraint = new MockConstraint(true, false, configRepository);
+ try {
+ TestCfg.addConstraint(constraint);
+ TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
+
+ // act
+ parentCfg.getTestChild(entryName(TEST_CHILD_1));
+ } finally {
+ TestCfg.removeConstraint(constraint);
+ }
+ }
+
+ @Test
+ public void testGetManagedObjectFail() throws Exception {
+ // arrange
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_1);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ MockConstraint constraint = new MockConstraint(false, true, configRepository);
+ try {
+ TestCfg.addConstraint(constraint);
+ TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
+
+ // act
+ parentCfg.getTestChild(entryName(TEST_CHILD_1));
+
+ failWasExpected(ConfigException.class);
+ } catch (ConfigException e) {
+ // assert
+ Throwable cause = e.getCause();
+ assertThat(e.getCause()).isNotNull().isInstanceOf(ConstraintViolationException.class);
+ ConstraintViolationException cve = (ConstraintViolationException) cause;
+ assertThat(cve.getMessages().size()).isEqualTo(1);
+ assertThat(cve.getManagedObject().getManagedObjectDefinition()).isSameAs(TestChildCfgDefn.getInstance());
+ } finally {
+ TestCfg.removeConstraint(constraint);
+ }
+ }
+
+ @DataProvider
+ Object[][] constraintValues() {
+ return new Object[][] {
+ // value of constraint used
+ { true }, // success
+ { false } // failure
+ };
+ }
+
+ @Test(dataProvider = "constraintValues")
+ public void testAddConstraint(boolean isUsableConstraint) throws Exception {
+ // arrange
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_1);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
+ parentCfg.addTestChildAddListener(new AddListener());
+ MockConstraint constraint = new MockConstraint(isUsableConstraint, false, configRepository);
+ try {
+ TestCfg.addConstraint(constraint);
+
+ // act
+ boolean isAcceptable = simulateEntryAdd(TEST_CHILD_1, configRepository);
+
+ // assert : success depends on constraint used
+ assertThat(isAcceptable).isEqualTo(isUsableConstraint);
+ } finally {
+ TestCfg.removeConstraint(constraint);
+ }
+ }
+
+ @Test(dataProvider = "constraintValues")
+ public void testDeleteConstraint(boolean isDeleteAllowedConstraint) throws Exception {
+ // arrange
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_1);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
+ parentCfg.addTestChildDeleteListener(new DeleteListener());
+ MockConstraint constraint = new MockConstraint(false, isDeleteAllowedConstraint, configRepository);
+ try {
+ TestCfg.addConstraint(constraint);
+
+ // act
+ boolean isAcceptable = simulateEntryDelete(TEST_CHILD_1, configRepository);
+
+ // assert : success depends on constraint used
+ assertThat(isAcceptable).isEqualTo(isDeleteAllowedConstraint);
+ } finally {
+ TestCfg.removeConstraint(constraint);
+ }
+ }
+
+ @Test(dataProvider = "constraintValues")
+ public void testChangeConstraint(boolean isUsableConstraint) throws Exception {
+ // arrange
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_1);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ MockConstraint constraint = new MockConstraint(isUsableConstraint, false, configRepository);
+ TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
+ TestChildCfg childCfg = parentCfg.getTestChild(entryName(TEST_CHILD_1));
+
+ try {
+ TestCfg.addConstraint(constraint);
+ childCfg.addChangeListener(new ChangeListener());
+
+ // act
+ // It is not an issue to use the same child entry here
+ // as we're only interested in constraint checking
+ boolean isAcceptable = simulateEntryChange(TEST_CHILD_1, configRepository);
+
+ // assert : success depends on constraint used
+ assertThat(isAcceptable).isEqualTo(isUsableConstraint);
+ } finally {
+ TestCfg.removeConstraint(constraint);
+ }
+ }
+
+ /**
+ * Simulate an entry add by triggering configAddIsAcceptable method of last
+ * registered add listener.
+ *
+ * @return true if add is acceptable, false otherwise.
+ */
+ private boolean simulateEntryAdd(Entry entry, ConfigurationRepository configRepository) throws IOException {
+ // use argument capture to retrieve the actual listener
+ ArgumentCaptor<ConfigAddListener> registeredListener = ArgumentCaptor.forClass(ConfigAddListener.class);
+ verify(configRepository).registerAddListener(eq(entry.getName().parent()), registeredListener.capture());
+
+ return registeredListener.getValue().configAddIsAcceptable(entry, new LocalizableMessageBuilder());
+ }
+
+ /**
+ * Simulate an entry delete by triggering configDeleteIsAcceptable method of
+ * last registered add listener.
+ *
+ * @return true if delete is acceptable, false otherwise.
+ */
+ private boolean simulateEntryDelete(Entry entry, ConfigurationRepository configRepository) throws IOException {
+ // use argument capture to retrieve the actual listener
+ ArgumentCaptor<ConfigDeleteListener> registeredListener = ArgumentCaptor.forClass(ConfigDeleteListener.class);
+ verify(configRepository).registerDeleteListener(eq(entry.getName().parent()), registeredListener.capture());
+
+ return registeredListener.getValue().configDeleteIsAcceptable(entry, new LocalizableMessageBuilder());
+ }
+
+ /**
+ * Simulate an entry change by triggering configChangeIsAcceptable method on
+ * last registered change listener.
+ *
+ * @return true if change is acceptable, false otherwise.
+ */
+ private boolean simulateEntryChange(Entry newEntry, ConfigurationRepository configRepository) {
+ // use argument capture to retrieve the actual listener
+ ArgumentCaptor<ConfigChangeListener> registeredListener = ArgumentCaptor.forClass(ConfigChangeListener.class);
+ verify(configRepository).registerChangeListener(eq(newEntry.getName()), registeredListener.capture());
+
+ return registeredListener.getValue().configChangeIsAcceptable(newEntry, new LocalizableMessageBuilder());
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/server/DNBuilderTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/server/DNBuilderTest.java
new file mode 100644
index 0000000..489ca3b
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/server/DNBuilderTest.java
@@ -0,0 +1,114 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import static org.testng.Assert.*;
+
+import org.forgerock.opendj.config.AdminTestCase;
+import org.forgerock.opendj.config.LDAPProfile;
+import org.forgerock.opendj.config.ManagedObjectPath;
+import org.forgerock.opendj.config.RelationDefinition;
+import org.forgerock.opendj.config.SingletonRelationDefinition;
+import org.forgerock.opendj.config.TestCfg;
+import org.forgerock.opendj.config.TestChildCfg;
+import org.forgerock.opendj.config.TestChildCfgClient;
+import org.forgerock.opendj.config.TestChildCfgDefn;
+import org.forgerock.opendj.config.TestParentCfgDefn;
+import org.forgerock.opendj.config.server.DNBuilder;
+import org.forgerock.opendj.ldap.DN;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+public final class DNBuilderTest extends AdminTestCase {
+
+ @BeforeClass
+ public void setUp() throws Exception {
+ TestCfg.setUp();
+ }
+
+ @AfterClass
+ public void tearDown() {
+ TestCfg.cleanup();
+ }
+
+ @Test
+ public void createWithInstantiableRelationDefinition() throws Exception {
+ ManagedObjectPath<?, ?> parentPath = ManagedObjectPath.emptyPath().
+ child(TestCfg.getTestOneToManyParentRelationDefinition(), "test-parent-1");
+ ManagedObjectPath<?, ?> childPath = parentPath.child(TestParentCfgDefn.getInstance().
+ getTestChildrenRelationDefinition(), "test-child-1");
+
+ assertEquals(
+ DNBuilder.create(childPath),
+ DN.valueOf("cn=test-child-1,cn=test children,cn=test-parent-1,cn=test parents,cn=config"));
+ }
+
+ @Test
+ public void createWithSingletonRelationDefinition() throws Exception {
+ SingletonRelationDefinition.Builder<TestChildCfgClient, TestChildCfg> builder =
+ new SingletonRelationDefinition.Builder<TestChildCfgClient, TestChildCfg>(
+ TestParentCfgDefn.getInstance(), "singleton-test-child", TestChildCfgDefn.getInstance());
+ final SingletonRelationDefinition<TestChildCfgClient, TestChildCfg> relationDef = builder.getInstance();
+
+ LDAPProfile.Wrapper wrapper = new LDAPProfile.Wrapper() {
+ public String getRelationRDNSequence(RelationDefinition<?, ?> r) {
+ return (r == relationDef) ? "cn=singleton-test-child" : null;
+ }
+ };
+
+ ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath().
+ child(TestCfg.getTestOneToManyParentRelationDefinition(), "test-parent-1");
+ ManagedObjectPath<?, ?> childPath = path.child(relationDef);
+
+ LDAPProfile.getInstance().pushWrapper(wrapper);
+ try {
+ assertEquals(
+ DNBuilder.create(childPath),
+ DN.valueOf("cn=singleton-test-child,cn=test-parent-1,cn=test parents,cn=config"));
+ } finally {
+ LDAPProfile.getInstance().popWrapper();
+ }
+ }
+
+ /**
+ * Tests construction of a DN from a managed object path containing a
+ * subordinate one-to-zero-or-one relationship.
+ */
+ @Test
+ public void createWithOptionalRelationDefinition() throws Exception {
+ ManagedObjectPath<?, ?> path = ManagedObjectPath
+ .emptyPath().child(TestCfg.getTestOneToManyParentRelationDefinition(), "test-parent-1");
+ ManagedObjectPath<?, ?> childPath =
+ path.child(TestParentCfgDefn.getInstance().getOptionalTestChildRelationDefinition());
+
+ assertEquals(
+ DNBuilder.create(childPath),
+ DN.valueOf("cn=optional test child,cn=test-parent-1,cn=test parents,cn=config"));
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/server/DefaultBehaviorTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/server/DefaultBehaviorTest.java
new file mode 100644
index 0000000..82f720f
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/server/DefaultBehaviorTest.java
@@ -0,0 +1,429 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import static org.fest.assertions.Assertions.*;
+import static org.forgerock.opendj.ldif.LDIF.*;
+import static org.mockito.Matchers.*;
+import static org.mockito.Mockito.*;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.SortedSet;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.opendj.config.AdminTestCase;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.TestCfg;
+import org.forgerock.opendj.config.TestChildCfg;
+import org.forgerock.opendj.config.TestParentCfg;
+import org.forgerock.opendj.config.server.ConfigChangeResult;
+import org.forgerock.opendj.config.server.ConfigurationAddListener;
+import org.forgerock.opendj.config.server.ConfigurationChangeListener;
+import org.forgerock.opendj.config.server.ServerManagementContext;
+import org.forgerock.opendj.config.server.spi.ConfigAddListener;
+import org.forgerock.opendj.config.server.spi.ConfigChangeListener;
+import org.forgerock.opendj.config.server.spi.ConfigurationRepository;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.Entry;
+import org.forgerock.opendj.ldap.ResultCode;
+import org.forgerock.opendj.ldap.schema.Schema;
+import org.mockito.ArgumentCaptor;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@SuppressWarnings("javadoc")
+/**
+ * Test default behavior on the server side, by checking values of configuration objects.
+ */
+public final class DefaultBehaviorTest extends AdminTestCase {
+
+ private static class TestConfigurationAddListener implements ConfigurationAddListener<TestChildCfg> {
+
+ private TestChildCfg childCfg;
+
+ public ConfigChangeResult applyConfigurationAdd(TestChildCfg configuration) {
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+
+ /** Gets the child configuration checking that it has the expected name. */
+ public TestChildCfg getChildCfg(String expectedName) {
+ Assert.assertNotNull(childCfg);
+ Assert.assertEquals(childCfg.dn().rdn().getFirstAVA().getAttributeValue().toString(), expectedName);
+ return childCfg;
+ }
+
+ public boolean isConfigurationAddAcceptable(TestChildCfg configuration,
+ List<LocalizableMessage> unacceptableReasons) {
+ childCfg = configuration;
+ return true;
+ }
+ }
+
+ private static class TestConfigurationChangeListener implements ConfigurationChangeListener<TestChildCfg> {
+
+ private TestChildCfg childCfg;
+
+ public ConfigChangeResult applyConfigurationChange(TestChildCfg configuration) {
+ return new ConfigChangeResult(ResultCode.SUCCESS, false);
+ }
+
+ /** Gets the child configuration checking that it has the expected name. */
+ public TestChildCfg getChildCfg(String expectedName) {
+ Assert.assertNotNull(childCfg);
+ Assert.assertEquals(childCfg.dn().rdn().getFirstAVA().getAttributeValue().toString(), expectedName);
+ return childCfg;
+ }
+
+ public boolean isConfigurationChangeAcceptable(TestChildCfg configuration,
+ List<LocalizableMessage> unacceptableReasons) {
+ childCfg = configuration;
+ return true;
+ }
+ }
+
+ // @Checkstyle:off
+ static final Entry CONFIG = makeEntry(
+ "dn: cn=config",
+ "objectClass: top",
+ "objectClass: ds-cfg-root-config",
+ "cn: config");
+
+ static final Entry TEST_PARENTS = makeEntry(
+ "dn: cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: test parents");
+
+ // Parent 1 - uses default values for optional-multi-valued-dn-property.
+ static final List<String> LDIF_TEST_PARENT_1 = Arrays.asList(
+ "dn: cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-parent-dummy",
+ "cn: test parent 1",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real");
+
+ static final Entry TEST_PARENT_1 = makeEntry(LDIF_TEST_PARENT_1);
+
+ // Parent 2 - overrides default values for optional-multi-valued-dn-property.
+ static final Entry TEST_PARENT_2 = makeEntry(
+ "dn: cn=test parent 2,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-parent-dummy",
+ "cn: test parent 2",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real",
+ "ds-cfg-base-dn: dc=default value p2v1,dc=com",
+ "ds-cfg-base-dn: dc=default value p2v2,dc=com");
+
+ static final Entry TEST_CHILD_BASE_1 = makeEntry(
+ "dn:cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: test children");
+
+ static final Entry TEST_CHILD_BASE_2 = makeEntry(
+ "dn:cn=test children,cn=test parent 2,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-branch",
+ "cn: test children");
+
+ private static final List<String> LDIF_TEST_CHILD_1 = Arrays.asList(
+ "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 1",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real");
+
+ private static final Entry TEST_CHILD_1 = makeEntry(LDIF_TEST_CHILD_1);
+
+ private static final List<String> NEW_ATTRS_1 = Arrays.asList(
+ "ds-cfg-base-dn: dc=new value 1,dc=com",
+ "ds-cfg-base-dn: dc=new value 2,dc=com",
+ "ds-cfg-group-dn: dc=new value 3,dc=com",
+ "ds-cfg-group-dn: dc=new value 4,dc=com");
+
+ private static final List<String> NEW_ATTRS_2 = Arrays.asList(
+ "ds-cfg-base-dn: dc=new value 1,dc=com",
+ "ds-cfg-base-dn: dc=new value 2,dc=com");
+
+ private static final List<String> NEW_ATTRS_3 = Arrays.asList(
+ "ds-cfg-group-dn: dc=new value 1,dc=com",
+ "ds-cfg-group-dn: dc=new value 2,dc=com");
+
+ private static final Entry TEST_CHILD_2 = makeEntry(
+ "dn: cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 2",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real",
+ "ds-cfg-base-dn: dc=default value c2v1,dc=com",
+ "ds-cfg-base-dn: dc=default value c2v2,dc=com");
+
+ private static final Entry TEST_CHILD_3 = makeEntry(
+ "dn: cn=test child 3,cn=test children,cn=test parent 1,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 3",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real",
+ "ds-cfg-base-dn: dc=default value c3v1,dc=com",
+ "ds-cfg-base-dn: dc=default value c3v2,dc=com",
+ "ds-cfg-group-dn: dc=default value c3v3,dc=com",
+ "ds-cfg-group-dn: dc=default value c3v4,dc=com");
+
+ private static final Entry TEST_CHILD_4 = makeEntry(
+ "dn: cn=test child 4,cn=test children,cn=test parent 2,cn=test parents,cn=config",
+ "objectclass: top",
+ "objectclass: ds-cfg-test-child-dummy",
+ "cn: test child 4",
+ "ds-cfg-enabled: true",
+ "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
+ "ds-cfg-attribute-type: description",
+ "ds-cfg-conflict-behavior: virtual-overrides-real");
+
+ // @Checkstyle:on
+
+ @BeforeClass
+ public void setUp() throws Exception {
+ TestCfg.setUp();
+ }
+
+ @AfterClass
+ public void tearDown() throws Exception {
+ TestCfg.cleanup();
+ }
+
+ @DataProvider
+ Object[][] childConfigurationsValues() {
+ return new Object[][] {
+ // parent entry, child base entry, child entry,
+ // expected first dn property values,
+ // expected second dn property values
+ { TEST_PARENT_1, TEST_CHILD_BASE_1, TEST_CHILD_1,
+ Arrays.asList("dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com"),
+ Arrays.asList("dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com") },
+
+ { TEST_PARENT_1, TEST_CHILD_BASE_1, TEST_CHILD_2,
+ Arrays.asList("dc=default value c2v1,dc=com", "dc=default value c2v2,dc=com"),
+ Arrays.asList("dc=default value c2v1,dc=com", "dc=default value c2v2,dc=com") },
+
+ { TEST_PARENT_1, TEST_CHILD_BASE_1, TEST_CHILD_3,
+ Arrays.asList("dc=default value c3v1,dc=com", "dc=default value c3v2,dc=com"),
+ Arrays.asList("dc=default value c3v3,dc=com", "dc=default value c3v4,dc=com") },
+
+ { TEST_PARENT_2, TEST_CHILD_BASE_2, TEST_CHILD_4,
+ Arrays.asList("dc=default value p2v1,dc=com", "dc=default value p2v2,dc=com"),
+ Arrays.asList("dc=default value p2v1,dc=com", "dc=default value p2v2,dc=com") } };
+ }
+
+ /**
+ * Test that a child config have correct values when accessed from its
+ * parent config.
+ */
+ @Test(dataProvider = "childConfigurationsValues")
+ public void testChildValues(Entry testParent, Entry testBaseChild, Entry testChild,
+ List<String> valuesForOptionalDNProperty1, List<String> valuesForOptionalDNProperty2) throws Exception {
+ // arrange
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(testParent, testBaseChild, testChild);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfg parentCfg = getParentCfg(testParent, context);
+
+ // assert
+ assertChildHasCorrectValues(parentCfg.getTestChild(entryName(testChild)), valuesForOptionalDNProperty1,
+ valuesForOptionalDNProperty2);
+ }
+
+ /**
+ * Test that a child config have correct values when accessed through an add
+ * listener.
+ */
+ @Test(dataProvider = "childConfigurationsValues")
+ public void testAddListenerChildValues(Entry testParent, Entry testBaseChild, Entry testChild,
+ List<String> valuesForOptionalDNProperty1, List<String> valuesForOptionalDNProperty2) throws Exception {
+ // arrange
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(testParent, testBaseChild, testChild);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfg parentCfg = getParentCfg(testParent, context);
+ TestConfigurationAddListener addListener = new TestConfigurationAddListener();
+ parentCfg.addTestChildAddListener(addListener);
+
+ // act
+ simulateEntryAdd(testChild, configRepository);
+
+ // assert
+ assertChildHasCorrectValues(addListener.getChildCfg(entryName(testChild)), valuesForOptionalDNProperty1,
+ valuesForOptionalDNProperty2);
+ }
+
+ @DataProvider
+ Object[][] childConfigurationsValuesForChangeListener() {
+ return new Object[][] {
+ // new entry after change, expected first dn property values,
+ // expected second dn property values
+ { makeEntryFrom(LDIF_TEST_CHILD_1, NEW_ATTRS_1),
+ Arrays.asList("dc=new value 1,dc=com", "dc=new value 2,dc=com"),
+ Arrays.asList("dc=new value 3,dc=com", "dc=new value 4,dc=com") },
+
+ { makeEntryFrom(LDIF_TEST_CHILD_1, NEW_ATTRS_2),
+ Arrays.asList("dc=new value 1,dc=com", "dc=new value 2,dc=com"),
+ Arrays.asList("dc=new value 1,dc=com", "dc=new value 2,dc=com") },
+
+ { makeEntryFrom(LDIF_TEST_CHILD_1, NEW_ATTRS_3),
+ Arrays.asList("dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com"),
+ Arrays.asList("dc=new value 1,dc=com", "dc=new value 2,dc=com") },
+
+ { makeEntryFrom(LDIF_TEST_PARENT_1, NEW_ATTRS_2),
+ Arrays.asList("dc=new value 1,dc=com", "dc=new value 2,dc=com"),
+ Arrays.asList("dc=new value 1,dc=com", "dc=new value 2,dc=com") } };
+ }
+
+ /**
+ * Tests that a child config have correct values when accessed through an
+ * change listener. The defaulted properties are replaced with some real
+ * values.
+ */
+ @Test(dataProvider = "childConfigurationsValuesForChangeListener")
+ public void testChangeListenerChildValues(Entry newEntry, List<String> valuesForOptionalDNProperty1,
+ List<String> valuesForOptionalDNProperty2) throws Exception {
+ // arrange
+ ConfigurationRepository configRepository =
+ createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_BASE_1, TEST_CHILD_1);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
+ TestChildCfg childCfg = parentCfg.getTestChild(entryName(TEST_CHILD_1));
+ TestConfigurationChangeListener changeListener = new TestConfigurationChangeListener();
+ childCfg.addChangeListener(changeListener);
+
+ // act
+ simulateEntryChange(newEntry, configRepository);
+
+ // assert
+ assertChildHasCorrectValues(changeListener.getChildCfg(entryName(TEST_CHILD_1)),
+ valuesForOptionalDNProperty1, valuesForOptionalDNProperty2);
+ }
+
+ @DataProvider
+ Object[][] parentConfigurationsValues() {
+ return new Object[][] {
+ // parent entry, expected first dn property values, expected second
+ // dn property values
+ { TEST_PARENT_1, Arrays.asList("dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com") },
+ { TEST_PARENT_2, Arrays.asList("dc=default value p2v1,dc=com", "dc=default value p2v2,dc=com") } };
+ }
+
+ /**
+ * Tests that parent configuration has correct values.
+ */
+ @Test(dataProvider = "parentConfigurationsValues")
+ public void testParentValues(Entry parentEntry, List<String> valuesForOptionalDNProperty) throws Exception {
+ ConfigurationRepository configRepository = createConfigRepositoryWithEntries(parentEntry);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ TestParentCfg parent = getParentCfg(parentEntry, context);
+
+ assertThat(parent.getMandatoryClassProperty()).isEqualTo(
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ assertThat(parent.getMandatoryReadOnlyAttributeTypeProperty()).isEqualTo(
+ Schema.getDefaultSchema().getAttributeType("description"));
+ assertDNSetEquals(parent.getOptionalMultiValuedDNProperty(), valuesForOptionalDNProperty);
+ }
+
+ /**
+ * Simulate an entry add by triggering configAddIsAcceptable method of last
+ * registered add listener.
+ */
+ private void simulateEntryAdd(Entry entry, ConfigurationRepository configRepository) throws IOException {
+ // use argument capture to retrieve the actual listener
+ ArgumentCaptor<ConfigAddListener> registeredListener = ArgumentCaptor.forClass(ConfigAddListener.class);
+ verify(configRepository).registerAddListener(eq(entry.getName().parent()), registeredListener.capture());
+
+ registeredListener.getValue().configAddIsAcceptable(entry, new LocalizableMessageBuilder());
+ }
+
+ /**
+ * Simulate an entry change by triggering configChangeIsAcceptable method on
+ * last registered change listener.
+ */
+ private void simulateEntryChange(Entry newEntry, ConfigurationRepository configRepository) {
+ // use argument capture to retrieve the actual listener
+ ArgumentCaptor<ConfigChangeListener> registeredListener = ArgumentCaptor.forClass(ConfigChangeListener.class);
+ verify(configRepository).registerChangeListener(eq(newEntry.getName()), registeredListener.capture());
+
+ registeredListener.getValue().configChangeIsAcceptable(newEntry, new LocalizableMessageBuilder());
+ }
+
+ private void assertChildHasCorrectValues(TestChildCfg child, List<String> dnProperty1, List<String> dnProperty2) {
+ assertThat(child.getMandatoryClassProperty()).isEqualTo(
+ "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
+ assertThat(child.getMandatoryReadOnlyAttributeTypeProperty()).isEqualTo(
+ Schema.getDefaultSchema().getAttributeType("description"));
+ assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(), dnProperty1);
+ assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(), dnProperty2);
+ }
+
+ /** Asserts that the actual set of DNs contains the expected values */
+ private void assertDNSetEquals(SortedSet<DN> actualDNs, List<String> expectedDNs) {
+ String[] actualStrings = new String[actualDNs.size()];
+ int i = 0;
+ for (DN dn : actualDNs) {
+ actualStrings[i] = dn.toString();
+ i++;
+ }
+ assertThat(actualStrings).containsOnly(expectedDNs.toArray(new Object[expectedDNs.size()]));
+ }
+
+ /** Make an entry by combining two lists */
+ static Entry makeEntryFrom(List<String> base, List<String> attrs) {
+ List<String> ldif = new ArrayList<String>(base);
+ ldif.addAll(attrs);
+ return makeEntry(ldif.toArray(new String[0]));
+ }
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/server/ListenerTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/server/ListenerTest.java
new file mode 100644
index 0000000..3f5b936
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/server/ListenerTest.java
@@ -0,0 +1,292 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import static org.fest.assertions.Assertions.*;
+import static org.forgerock.opendj.ldif.LDIF.*;
+import static org.mockito.Mockito.*;
+
+import java.util.Arrays;
+
+import org.forgerock.opendj.server.config.server.RootCfg;
+import org.forgerock.opendj.config.AdminTestCase;
+import org.forgerock.opendj.config.PropertyDefinitionsOptions;
+import org.forgerock.opendj.config.TestCfg;
+import org.forgerock.opendj.config.TestParentCfg;
+import org.forgerock.opendj.config.server.ConfigAddListenerAdaptor;
+import org.forgerock.opendj.config.server.ConfigDeleteListenerAdaptor;
+import org.forgerock.opendj.config.server.ConfigurationAddListener;
+import org.forgerock.opendj.config.server.ConfigurationChangeListener;
+import org.forgerock.opendj.config.server.ConfigurationDeleteListener;
+import org.forgerock.opendj.config.server.DelayedConfigAddListener;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.config.server.ServerManagedObjectAddListenerAdaptor;
+import org.forgerock.opendj.config.server.ServerManagedObjectDeleteListenerAdaptor;
+import org.forgerock.opendj.config.server.ServerManagementContext;
+import org.forgerock.opendj.config.server.spi.ConfigAddListener;
+import org.forgerock.opendj.config.server.spi.ConfigChangeListener;
+import org.forgerock.opendj.config.server.spi.ConfigDeleteListener;
+import org.forgerock.opendj.config.server.spi.ConfigurationRepository;
+import org.forgerock.opendj.ldap.DN;
+import org.forgerock.opendj.ldap.Entry;
+import org.mockito.ArgumentCaptor;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+@SuppressWarnings({ "javadoc", "rawtypes", "unchecked" })
+public class ListenerTest extends AdminTestCase {
+
+ private static final DN ROOT_CONFIG_DN = DN.valueOf("cn=config");
+ private static final DN TEST_PARENTS_DN = DN.valueOf("cn=test parents,cn=config");
+
+ @BeforeClass
+ public void setUp() throws Exception {
+ TestCfg.setUp();
+ }
+
+ @AfterClass
+ public void tearDown() throws Exception {
+ TestCfg.cleanup();
+ }
+
+ private Entry getTestParentEntry() throws Exception {
+ return makeEntry("dn: cn=test parents,cn=config", "objectclass: top", "objectclass: ds-cfg-branch",
+ "cn: test parents");
+ }
+
+ /**
+ * Create a mock of ConfigurationRepository with provided DNs registered.
+ */
+ private ConfigurationRepository createConfigRepositoryWithDNs(DN... dns) throws ConfigException {
+ ConfigurationRepository configRepository = mock(ConfigurationRepository.class);
+ for (DN dn : dns) {
+ when(configRepository.hasEntry(dn)).thenReturn(true);
+ }
+ return configRepository;
+ }
+
+ /**
+ * Register a listener for test parent entry and return the actual
+ * registered listener
+ */
+ private ConfigAddListener registerAddListenerForTestParent(ConfigurationRepository configRepository,
+ ServerManagedObject<RootCfg> root, ConfigurationAddListener<TestParentCfg> parentListener) throws Exception {
+ root.registerAddListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
+
+ ArgumentCaptor<ConfigAddListener> registered = ArgumentCaptor.forClass(ConfigAddListener.class);
+ verify(configRepository).registerAddListener(eq(TEST_PARENTS_DN), registered.capture());
+ return registered.getValue();
+ }
+
+ /**
+ * Register a listener for test parent entry in delayed scenario and return
+ * the actual registered listener
+ */
+ private DelayedConfigAddListener registerAddListenerForTestParentDelayed(
+ ConfigurationRepository configRepository, ServerManagedObject<RootCfg> root,
+ ConfigurationAddListener<TestParentCfg> parentListener) throws Exception {
+ root.registerAddListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
+
+ ArgumentCaptor<DelayedConfigAddListener> registered = ArgumentCaptor.forClass(DelayedConfigAddListener.class);
+ verify(configRepository).registerAddListener(eq(ROOT_CONFIG_DN), registered.capture());
+ return registered.getValue();
+ }
+
+ @Test
+ public void testRegisterAddListenerWithInstantiableRelationImmediate() throws Exception {
+ ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN, TEST_PARENTS_DN);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
+
+ root.registerAddListener(TestCfg.getTestOneToManyParentRelationDefinition(),
+ mock(ConfigurationAddListener.class));
+
+ verify(configRepository).registerAddListener(eq(TEST_PARENTS_DN), isA(ConfigAddListener.class));
+ }
+
+ @Test
+ public void testRegisterAddListenerWithInstantiableRelationDelayed() throws Exception {
+ ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
+
+ ConfigurationAddListener<TestParentCfg> parentListener = mock(ConfigurationAddListener.class);
+ root.registerAddListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
+
+ ArgumentCaptor<DelayedConfigAddListener> registered = ArgumentCaptor.forClass(DelayedConfigAddListener.class);
+ verify(configRepository).registerAddListener(eq(ROOT_CONFIG_DN), registered.capture());
+ // check that actual listener is the one provided to the root
+ ConfigurationAddListener<?> actualListener =
+ ((ServerManagedObjectAddListenerAdaptor<?>)
+ ((ConfigAddListenerAdaptor<?>) registered.getValue().getDelayedAddListener()).
+ getServerManagedObjectAddListener()).getConfigurationAddListener();
+ assertThat(actualListener).isEqualTo(parentListener);
+ }
+
+ @Test
+ public void testRegisterAddListenerWithInstantiableRelationDelayedThenActualized() throws Exception {
+ ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
+
+ // register a listener to root
+ ConfigurationAddListener<TestParentCfg> parentListener = mock(ConfigurationAddListener.class);
+ root.registerAddListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
+
+ // get the delayed listener registered to configuration repository
+ ArgumentCaptor<DelayedConfigAddListener> registered = ArgumentCaptor.forClass(DelayedConfigAddListener.class);
+ verify(configRepository).registerAddListener(eq(ROOT_CONFIG_DN), registered.capture());
+
+ // now simulate the add of target entry
+ String parentDN = "cn=test parents,cn=config";
+ when(configRepository.hasEntry(DN.valueOf(parentDN))).thenReturn(true);
+ registered.getValue().applyConfigurationAdd(getTestParentEntry());
+
+ // check that listener is added for target entry and deleted for its
+ // parent entry
+ ConfigAddListenerAdaptor listener =
+ (ConfigAddListenerAdaptor<?>) registered.getValue().getDelayedAddListener();
+ verify(configRepository).registerAddListener(DN.valueOf(parentDN), listener);
+ verify(configRepository).deregisterAddListener(ROOT_CONFIG_DN, registered.getValue());
+ }
+
+ @Test
+ public void testRegisterAddListenerWithOptionalRelation() throws Exception {
+ ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
+
+ root.registerAddListener(TestCfg.getTestOneToZeroOrOneParentRelationDefinition(),
+ mock(ConfigurationAddListener.class));
+
+ verify(configRepository).registerAddListener(eq(ROOT_CONFIG_DN), isA(ConfigAddListener.class));
+ }
+
+ @Test
+ public void testRegisterDeleteListenerWithInstantiableRelationImmediate() throws Exception {
+ ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN, TEST_PARENTS_DN);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
+
+ root.registerDeleteListener(TestCfg.getTestOneToManyParentRelationDefinition(),
+ mock(ConfigurationDeleteListener.class));
+
+ verify(configRepository).registerDeleteListener(eq(TEST_PARENTS_DN), isA(ConfigDeleteListener.class));
+ }
+
+ @Test
+ public void testRegisterDeleteListenerWithInstantiableRelationDelayed() throws Exception {
+ ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
+
+ ConfigurationDeleteListener<TestParentCfg> parentListener = mock(ConfigurationDeleteListener.class);
+ root.registerDeleteListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
+
+ ArgumentCaptor<DelayedConfigAddListener> argument = ArgumentCaptor.forClass(DelayedConfigAddListener.class);
+ verify(configRepository).registerAddListener(eq(ROOT_CONFIG_DN), argument.capture());
+ // check that actual listener is the one provided to the root
+ ConfigurationDeleteListener actualListener =
+ ((ServerManagedObjectDeleteListenerAdaptor)
+ ((ConfigDeleteListenerAdaptor) argument.getValue().getDelayedDeleteListener()).
+ getServerManagedObjectDeleteListener()).getConfigurationDeleteListener();
+ assertThat(actualListener).isEqualTo(parentListener);
+ }
+
+ @Test
+ public void testRegisterDeleteListenerWithOptionalRelation() throws Exception {
+ ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
+
+ root.registerDeleteListener(TestCfg.getTestOneToZeroOrOneParentRelationDefinition(),
+ mock(ConfigurationDeleteListener.class));
+
+ verify(configRepository).registerDeleteListener(eq(ROOT_CONFIG_DN), isA(ConfigDeleteListener.class));
+ }
+
+ @Test
+ public void testRegisterChangeListener() throws Exception {
+ ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
+ root.setConfigDN(ROOT_CONFIG_DN);
+
+ root.registerChangeListener(mock(ConfigurationChangeListener.class));
+
+ verify(configRepository).registerChangeListener(eq(ROOT_CONFIG_DN), isA(ConfigChangeListener.class));
+ }
+
+ @Test
+ public void testDeregisterAddListenerWithInstantiableRelationImmediate() throws Exception {
+ // arrange
+ ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN, TEST_PARENTS_DN);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
+
+ ConfigurationAddListener<TestParentCfg> parentListener = mock(ConfigurationAddListener.class);
+ ConfigAddListener registeredListener =
+ registerAddListenerForTestParent(configRepository, root, parentListener);
+ when(configRepository.getAddListeners(TEST_PARENTS_DN)).thenReturn(Arrays.asList(registeredListener));
+
+ // act
+ root.deregisterAddListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
+
+ // assert
+ verify(configRepository).deregisterAddListener(eq(TEST_PARENTS_DN), same(registeredListener));
+ }
+
+ @Test
+ public void testDeregisterAddListenerWithInstantiableRelationDelayed() throws Exception {
+ // arrange
+ ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
+ ServerManagementContext context =
+ new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
+ ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
+
+ ConfigurationAddListener<TestParentCfg> parentListener = mock(ConfigurationAddListener.class);
+ ConfigAddListener registeredListener =
+ registerAddListenerForTestParentDelayed(configRepository, root, parentListener);
+ when(configRepository.getAddListeners(ROOT_CONFIG_DN)).thenReturn(Arrays.asList(registeredListener));
+
+ // act
+ root.deregisterAddListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
+
+ // assert
+ verify(configRepository).deregisterAddListener(eq(ROOT_CONFIG_DN), same(registeredListener));
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/server/MockConstraint.java b/opendj-config/src/test/java/org/forgerock/opendj/config/server/MockConstraint.java
new file mode 100644
index 0000000..2df1526
--- /dev/null
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/server/MockConstraint.java
@@ -0,0 +1,147 @@
+/*
+ * 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 legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * 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 legal-notices/CDDLv1_0.txt.
+ * 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
+ *
+ *
+ * Copyright 2008 Sun Microsystems, Inc.
+ */
+package org.forgerock.opendj.config.server;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.Constraint;
+import org.forgerock.opendj.config.client.ClientConstraintHandler;
+import org.forgerock.opendj.config.server.ServerConstraintHandler;
+import org.forgerock.opendj.config.server.ServerManagedObject;
+import org.forgerock.opendj.config.server.spi.ConfigurationRepository;
+import org.forgerock.opendj.ldap.DN;
+import org.testng.Assert;
+
+/**
+ * A mock constraint which can be configured to refuse various types of
+ * operation.
+ */
+public final class MockConstraint extends Constraint {
+
+ /**
+ * Mock server constraint handler.
+ */
+ private class MockConstraintHandler extends ServerConstraintHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isDeleteAllowed(ServerManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ConfigException {
+ if (!isDeleteAllowed) {
+ unacceptableReasons.add(LocalizableMessage.raw("Configuration cannot be deleted."));
+ }
+
+ return isDeleteAllowed;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isUsable(ServerManagedObject<?> managedObject,
+ Collection<LocalizableMessage> unacceptableReasons) throws ConfigException {
+ if (!isUsable) {
+ unacceptableReasons.add(LocalizableMessage.raw("Configuration is not usable."));
+ }
+
+ return isUsable;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void performPostAdd(ServerManagedObject<?> managedObject) throws ConfigException {
+ // Make sure that the associated config entry exists.
+ DN targetDN = managedObject.getDN();
+ Assert.assertTrue(configRepository.hasEntry(targetDN));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void performPostDelete(ServerManagedObject<?> managedObject) throws ConfigException {
+ // Make sure that the associated config entry does not exist.
+ DN targetDN = managedObject.getDN();
+ Assert.assertTrue(configRepository.hasEntry(targetDN));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void performPostModify(ServerManagedObject<?> managedObject) throws ConfigException {
+ // Make sure that the associated config entry exists.
+ DN targetDN = managedObject.getDN();
+ Assert.assertTrue(configRepository.hasEntry(targetDN));
+ }
+
+ }
+
+ // Determines if delete operations are allowed.
+ private final boolean isDeleteAllowed;
+
+ // Determines if configurations can be decoded.
+ private final boolean isUsable;
+
+ private final ConfigurationRepository configRepository;
+
+ /**
+ * Creates a new mock constraint.
+ *
+ * @param isUsable
+ * Determines if configurations can be decoded.
+ * @param isDeleteAllowed
+ * Determines if delete operations are allowed.
+ * @param configRepository
+ * Configuration entries.
+ */
+ public MockConstraint(boolean isUsable, boolean isDeleteAllowed, ConfigurationRepository configRepository) {
+ this.isUsable = isUsable;
+ this.isDeleteAllowed = isDeleteAllowed;
+ this.configRepository = configRepository;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<ClientConstraintHandler> getClientConstraintHandlers() {
+ return Collections.emptySet();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<ServerConstraintHandler> getServerConstraintHandlers() {
+ return Collections.<ServerConstraintHandler> singleton(new MockConstraintHandler());
+ }
+
+}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/AbstractManagedObjectDefinitionTest.java b/opendj-config/src/test/java/org/opends/server/admin/AbstractManagedObjectDefinitionTest.java
deleted file mode 100644
index 27c136d2..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/AbstractManagedObjectDefinitionTest.java
+++ /dev/null
@@ -1,207 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import static org.fest.assertions.Assertions.*;
-import static org.testng.Assert.*;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings({ "javadoc", "unchecked", "rawtypes" })
-@Test(singleThreaded = true)
-public class AbstractManagedObjectDefinitionTest extends ConfigTestCase {
-
- /** A test managed object definition. */
- private static class ManagedObjectDef extends AbstractManagedObjectDefinition {
-
- protected ManagedObjectDef(String name, AbstractManagedObjectDefinition parent) {
- super(name, parent);
- }
- }
-
- private ManagedObjectDef top = new ManagedObjectDef("topmost", null);
-
- private ManagedObjectDef middle1 = new ManagedObjectDef("middle1", top);
-
- private ManagedObjectDef middle2 = new ManagedObjectDef("middle2", top);
-
- private ManagedObjectDef bottom1 = new ManagedObjectDef("bottom1", middle1);
-
- private ManagedObjectDef bottom2 = new ManagedObjectDef("bottom2", middle1);
-
- private ManagedObjectDef bottom3 = new ManagedObjectDef("bottom3", middle1);
-
- @BeforeClass
- public void setUp() throws Exception {
- TestCfg.setUp();
- }
-
- @AfterClass
- public void tearDown() {
- TestCfg.cleanup();
- }
-
- @DataProvider(name = "isChildOf")
- public Object[][] createIsChildOf() {
- return new Object[][] {
- // child def, parent def, is child of
- { top, top, true },
- { middle1, middle1, true },
- { bottom1, bottom1, true },
- { top, middle1, false },
- { top, bottom1, false },
- { middle1, top, true },
- { bottom1, top, true },
- { bottom1, middle1, true },
- };
- }
-
- @Test(dataProvider = "isChildOf")
- public void testIsChildOf(ManagedObjectDef childDef, ManagedObjectDef parentDef, boolean expectedIsChildOf) {
- assertEquals(childDef.isChildOf(parentDef), expectedIsChildOf);
- }
-
- @DataProvider(name = "isParentOf")
- public Object[][] createIsParentOf() {
- return new Object[][] {
- // parent def, child def, is parent of
- { top, top, true },
- { middle1, middle1, true },
- { bottom1, bottom1, true },
- { top, middle1, true },
- { top, bottom1, true },
- { middle1, top, false },
- { bottom1, top, false },
- { bottom1, middle1, false },
- };
- }
-
- @Test(dataProvider = "isParentOf")
- public void testIsParentOf(ManagedObjectDef parentDef, ManagedObjectDef childDef, boolean expectedIsParentOf) {
- assertEquals(parentDef.isParentOf(childDef), expectedIsParentOf);
- }
-
- @Test
- public void testGetAllChildrenOfTop() {
- Collection<AbstractManagedObjectDefinition> children = top.getAllChildren();
- assertThat(children).hasSize(5);
- assertThat(children).containsOnly(middle1, middle2, bottom1, bottom2, bottom3);
- }
-
- @Test
- public void testGetAllChildrenOfMiddle() {
- Collection<AbstractManagedObjectDefinition> children = middle1.getAllChildren();
- assertThat(children).hasSize(3);
- assertThat(children).containsOnly(bottom1, bottom2, bottom3);
- }
-
- @Test
- public void testGetAllChildrenNoChild() {
- Collection<AbstractManagedObjectDefinition> children = middle2.getAllChildren();
- assertThat(children).isEmpty();
- }
-
- @Test
- public void testGetChildrenTop() {
- Collection<AbstractManagedObjectDefinition> children = top.getChildren();
- assertThat(children).hasSize(2);
- assertThat(children).containsOnly(middle1, middle2);
- }
-
- @Test
- public void testGetChildrenMiddleNoChild() {
- Collection<AbstractManagedObjectDefinition> children = middle2.getChildren();
- assertThat(children).isEmpty();
- }
-
- /** Check default value of "class" property provided for parent. */
- @Test
- public void testPropertyOverrideParent() {
- AbstractManagedObjectDefinition<?, ?> def = TestParentCfgDefn.getInstance();
- PropertyDefinition<?> propertyDef = def.getPropertyDefinition("mandatory-class-property");
- DefaultBehaviorProvider<?> provider = propertyDef.getDefaultBehaviorProvider();
- assertEquals(provider.getClass(), DefinedDefaultBehaviorProvider.class);
-
- DefinedDefaultBehaviorProvider<?> definedProvider = (DefinedDefaultBehaviorProvider<?>) provider;
- assertEquals(definedProvider.getDefaultValues(),
- Collections.singleton("org.opends.server.extensions.SomeVirtualAttributeProvider"));
- }
-
- /** Check default value of "class" property provided for child. */
- @Test
- public void testPropertyOverrideChild() {
- AbstractManagedObjectDefinition<?, ?> def = TestChildCfgDefn.getInstance();
- PropertyDefinition<?> propertyDef = def.getPropertyDefinition("mandatory-class-property");
- DefaultBehaviorProvider<?> provider = propertyDef.getDefaultBehaviorProvider();
- assertEquals(provider.getClass(), DefinedDefaultBehaviorProvider.class);
-
- DefinedDefaultBehaviorProvider<?> definedProvider = (DefinedDefaultBehaviorProvider<?>) provider;
- assertEquals(definedProvider.getDefaultValues(),
- Collections.singleton("org.opends.server.extensions.UserDefinedVirtualAttributeProvider"));
- }
-
- @Test
- public void testGetReverseRelationDefinitions() {
- Collection<RelationDefinition<TestParentCfgClient, TestParentCfg>> parentRelDef =
- TestParentCfgDefn.getInstance().getReverseRelationDefinitions();
-
- assertThat(parentRelDef).hasSize(2);
- assertThat(parentRelDef).contains(TestCfg.getTestOneToManyParentRelationDefinition());
- assertThat(parentRelDef).contains(TestCfg.getTestOneToZeroOrOneParentRelationDefinition());
-
- Collection<RelationDefinition<TestChildCfgClient, TestChildCfg>> childRelDef = TestChildCfgDefn.getInstance()
- .getReverseRelationDefinitions();
-
- assertThat(childRelDef).hasSize(2);
- assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getTestChildrenRelationDefinition());
- assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getOptionalTestChildRelationDefinition());
- }
-
- @Test
- public void testGetAllReverseRelationDefinitions() {
- Collection<RelationDefinition<? super TestParentCfgClient, ? super TestParentCfg>> parentRelDef =
- TestParentCfgDefn.getInstance().getAllReverseRelationDefinitions();
-
- assertThat(parentRelDef).hasSize(2);
- assertThat(parentRelDef).contains(TestCfg.getTestOneToManyParentRelationDefinition());
- assertThat(parentRelDef).contains(TestCfg.getTestOneToZeroOrOneParentRelationDefinition());
-
- Collection<RelationDefinition<? super TestChildCfgClient, ? super TestChildCfg>> childRelDef =
- TestChildCfgDefn.getInstance().getAllReverseRelationDefinitions();
-
- assertThat(childRelDef).hasSize(2);
- assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getTestChildrenRelationDefinition());
- assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getOptionalTestChildRelationDefinition());
- }
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/AdminTestCase.java b/opendj-config/src/test/java/org/opends/server/admin/AdminTestCase.java
deleted file mode 100644
index 52a1f79..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/AdminTestCase.java
+++ /dev/null
@@ -1,126 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static org.mockito.Mockito.*;
-
-import org.forgerock.opendj.admin.server.RootCfg;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.forgerock.opendj.ldap.Entry;
-import org.forgerock.opendj.ldif.LDIF;
-import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.admin.server.ServerManagementContext;
-import org.opends.server.config.spi.ConfigurationRepository;
-import org.testng.annotations.Test;
-
-/**
- * An abstract class that all admin unit tests should extend.
- */
-@SuppressWarnings("javadoc")
-@Test(groups = { "precommit", "admin" }, singleThreaded = true)
-public abstract class AdminTestCase extends ConfigTestCase {
-
- /**
- * Create a mock of ConfigurationRepository with provided entries registered.
- */
- protected final ConfigurationRepository createConfigRepositoryWithEntries(final Entry...entries) throws Exception {
- ConfigurationRepository configRepository = mock(ConfigurationRepository.class);
- for (Entry entry : entries) {
- when(configRepository.getEntry(entry.getName())).thenReturn(entry);
- when(configRepository.hasEntry(entry.getName())).thenReturn(true);
- }
- return configRepository;
- }
-
- /** Returns the name used for the provided entry (the value of the cn attribute) */
- protected final String entryName(final Entry entry) {
- return entry.getName().rdn().getFirstAVA().getAttributeValue().toString();
- }
-
- /** Gets the named parent configuration corresponding to the provided entry */
- protected final TestParentCfg getParentCfg(final Entry entry, final ServerManagementContext serverContext)
- throws Exception {
- return getParentCfg(entryName(entry), serverContext);
- }
-
- /** Gets the named parent configuration corresponding to provided name. */
- protected final TestParentCfg getParentCfg(final String name, final ServerManagementContext serverContext)
- throws Exception {
- ServerManagedObject<RootCfg> root = serverContext.getRootConfigurationManagedObject();
- TestParentCfg parent = root.getChild(TestCfg.getTestOneToManyParentRelationDefinition(), name)
- .getConfiguration();
- return parent;
- }
-
- protected static final Entry CONFIG_ENTRY = LDIF.makeEntry(
- "dn: cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: config");
-
- protected static final Entry CONN_HANDLER_ENTRY = LDIF.makeEntry(
- "dn: cn=Connection Handlers,cn=config",
- "objectClass: top",
- "objectClass: ds-cfg-branch",
- "cn: Connection Handlers");
-
- protected static final Entry LDAP_CONN_HANDLER_ENTRY = LDIF.makeEntry(
- "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-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler",
- "ds-cfg-enabled: true",
- "ds-cfg-listen-address: 0.0.0.0", "ds-cfg-listen-port: 389");
-
- protected static final Entry LDAPS_CONN_HANDLER_ENTRY = LDIF.makeEntry(
- "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-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler",
- "ds-cfg-enabled: false",
- "ds-cfg-listen-address: 0.0.0.0",
- "ds-cfg-listen-port: 636",
- "ds-cfg-use-ssl: true",
- "ds-cfg-ssl-client-auth-policy: optional",
- "ds-cfg-ssl-cert-nickname: server-cert",
- "ds-cfg-key-manager-provider: cn=JKS,cn=Key Manager Providers,cn=config",
- "ds-cfg-trust-manager-provider: cn=JKS,cn=Trust Manager Providers,cn=config");
-
- protected static final Entry JMX_CONN_HANDLER_ENTRY = LDIF.makeEntry(
- "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-java-class: org.opends.server.protocols.jmx.JmxConnectionHandler",
- "ds-cfg-enabled: false",
- "ds-cfg-listen-port: 1689");
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/AggregationPropertyDefinitionTest.java b/opendj-config/src/test/java/org/opends/server/admin/AggregationPropertyDefinitionTest.java
deleted file mode 100644
index 606831d..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/AggregationPropertyDefinitionTest.java
+++ /dev/null
@@ -1,79 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.forgerock.opendj.ldap.DN;
-import org.testng.Assert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-@Test(singleThreaded = true)
-public class AggregationPropertyDefinitionTest extends ConfigTestCase {
-
- @BeforeClass
- public void setUp() throws Exception {
- TestCfg.setUp();
- }
-
- @AfterClass
- public void tearDown() {
- TestCfg.cleanup();
- }
-
- /** Tests that the {@link AggregationPropertyDefinition#normalizeValue(String)} works. */
- @Test
- public void testNormalizeValue() throws Exception {
- TestChildCfgDefn definition = TestChildCfgDefn.getInstance();
- AggregationPropertyDefinition<?, ?> propertyDef = definition.getAggregationPropertyPropertyDefinition();
- String nvalue = propertyDef.normalizeValue(" LDAP connection handler ");
- Assert.assertEquals(nvalue, "ldap connection handler");
- }
-
- /** Tests that the {@link AggregationPropertyDefinition#getChildDN(String)} works. */
- @Test
- public void testGetChildDN() throws Exception {
- TestChildCfgDefn definition = TestChildCfgDefn.getInstance();
- AggregationPropertyDefinition<?, ?> propertyDef = definition.getAggregationPropertyPropertyDefinition();
- DN expected = DN.valueOf("cn=ldap connection handler, cn=connection handlers, cn=config");
- DN actual = propertyDef.getChildDN(" LDAP connection handler ");
- Assert.assertEquals(actual, expected);
- }
-
- @Test
- public void testGetChildPath() throws Exception {
- TestChildCfgDefn definition = TestChildCfgDefn.getInstance();
- AggregationPropertyDefinition<?, ?> propertyDef = definition.getAggregationPropertyPropertyDefinition();
- ManagedObjectPath<?, ?> path = propertyDef.getChildPath("LDAP connection handler");
-
- Assert.assertSame(path.getManagedObjectDefinition(), propertyDef.getRelationDefinition().getChildDefinition());
- Assert.assertSame(path.getRelationDefinition(), propertyDef.getRelationDefinition());
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java b/opendj-config/src/test/java/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java
deleted file mode 100644
index ba5bd10..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java
+++ /dev/null
@@ -1,89 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static org.testng.Assert.*;
-
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.forgerock.opendj.ldap.schema.Schema;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class AttributeTypePropertyDefinitionTest extends ConfigTestCase {
-
- @Test
- public void testValidateValue() {
- AttributeTypePropertyDefinition propertyDef = createPropertyDefinition();
- propertyDef.validateValue(Schema.getDefaultSchema().getAttributeType("cn"), new PropertyDefinitionsOptions());
- }
-
- @DataProvider(name = "valueLegalData")
- public Object[][] createValidateValueLegalData() {
- return new Object[][] { { "cn" }, { "o" }, { "ou" } };
- }
-
- @Test(dataProvider = "valueLegalData")
- public void testDecodeValue(String value) {
- AttributeTypePropertyDefinition propertyDef = createPropertyDefinition();
- AttributeType expected = Schema.getDefaultSchema().getAttributeType(value);
- assertEquals(propertyDef.decodeValue(value, new PropertyDefinitionsOptions()), expected);
- }
-
- @Test(dataProvider = "valueLegalData")
- public void testEncodeValue(String value) {
- AttributeTypePropertyDefinition propertyDef = createPropertyDefinition();
- assertEquals(propertyDef.encodeValue(propertyDef.decodeValue(value, new PropertyDefinitionsOptions())), value);
- }
-
- @DataProvider(name = "valueIllegalData")
- public Object[][] createValidateValueIllegalData() {
- return new Object[][] { { "dummy-type-xxx" } };
- }
-
- @Test(dataProvider = "valueIllegalData", expectedExceptions = { IllegalPropertyValueStringException.class })
- public void testDecodeValueIllegal(String value) {
- AttributeTypePropertyDefinition propertyDef = createPropertyDefinition();
- propertyDef.decodeValue(value, new PropertyDefinitionsOptions());
- }
-
- @Test(dataProvider = "valueIllegalData")
- public void testDecodeValueIllegalNoSchemaCheck(String value) {
- AttributeTypePropertyDefinition propertyDef = createPropertyDefinition();
- AttributeType type = propertyDef.decodeValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- assertEquals(type.getNameOrOID(), value);
- }
-
- // Create a new definition.
- private AttributeTypePropertyDefinition createPropertyDefinition() {
- AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(
- RootCfgDefn.getInstance(), "test-property");
- return builder.getInstance();
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/BooleanPropertyDefinitionTest.java b/opendj-config/src/test/java/org/opends/server/admin/BooleanPropertyDefinitionTest.java
deleted file mode 100644
index 30cf14c..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/BooleanPropertyDefinitionTest.java
+++ /dev/null
@@ -1,85 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static org.testng.Assert.*;
-
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class BooleanPropertyDefinitionTest extends ConfigTestCase {
-
- BooleanPropertyDefinition.Builder builder = null;
-
- @BeforeClass
- public void setUp() throws Exception {
- builder = BooleanPropertyDefinition.createBuilder(RootCfgDefn.getInstance(), "test-property");
- }
-
- @Test
- public void testValidateValue() {
- BooleanPropertyDefinition def = createPropertyDefinition();
- def.validateValue(Boolean.TRUE, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @Test(expectedExceptions = NullPointerException.class)
- public void testValidateValueIllegal() {
- BooleanPropertyDefinition def = createPropertyDefinition();
- def.validateValue(null, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @DataProvider(name = "decodeValueData")
- public Object[][] createValidateValueData() {
- return new Object[][] { { "false", Boolean.FALSE }, { "true", Boolean.TRUE } };
- }
-
- @Test(dataProvider = "decodeValueData")
- public void testDecodeValue(String value, Boolean expected) {
- BooleanPropertyDefinition def = createPropertyDefinition();
- assertEquals(def.decodeValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS), expected);
- }
-
- @DataProvider(name = "decodeValueDataIllegal")
- public Object[][] createValidateValueDataIllegal() {
- return new Object[][] { { null }, { "abc" } };
- }
-
- @Test(dataProvider = "decodeValueDataIllegal", expectedExceptions = { NullPointerException.class,
- IllegalPropertyValueStringException.class })
- public void testDecodeValueIllegal(String value) {
- BooleanPropertyDefinition def = createPropertyDefinition();
- def.decodeValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- private BooleanPropertyDefinition createPropertyDefinition() {
- return builder.getInstance();
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/ClassPropertyDefinitionTest.java b/opendj-config/src/test/java/org/opends/server/admin/ClassPropertyDefinitionTest.java
deleted file mode 100644
index c3fa2e8..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/ClassPropertyDefinitionTest.java
+++ /dev/null
@@ -1,145 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.opends.server.admin;
-
-import static org.testng.Assert.*;
-
-import java.util.Comparator;
-import java.util.List;
-
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class ClassPropertyDefinitionTest extends ConfigTestCase {
-
- // Dummy class used in tests.
- public static final class Dummy {
- public class X {
- // no implementation
- }
-
- public Comparator<Dummy> comparator() {
- return new Comparator<ClassPropertyDefinitionTest.Dummy>() {
- public int compare(Dummy o1, Dummy o2) {
- // No implementation required.
- return 0;
- }
- };
- }
- }
-
- ClassPropertyDefinition.Builder builder = null;
-
- @DataProvider(name = "validClassNames")
- public Object[][] createBuilderAddInstanceOfData() {
- return new Object[][] {
- { "org.opends.server.admin.ClassPropertyDefinitionTest" },
- { "org.opends.server.admin.ClassPropertyDefinitionTest$Dummy" },
- { "org.opends.server.admin.ClassPropertyDefinitionTest$Dummy$X" },
- { "org.opends.server.admin.ClassPropertyDefinitionTest$Dummy$1" }, };
- }
-
- @Test(dataProvider = "validClassNames")
- public void testBuilderAddInstanceOf(String classNameToAdd) {
- ClassPropertyDefinition.Builder localBuilder = ClassPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
- "test-property");
- localBuilder.addInstanceOf(classNameToAdd);
- ClassPropertyDefinition propertyDef = localBuilder.getInstance();
- List<String> instances = propertyDef.getInstanceOfInterface();
- assertTrue(instances.contains(classNameToAdd));
- }
-
- @DataProvider(name = "invalidClassNames")
- public Object[][] createBuilderAddInstanceOfDataInvalid() {
- return new Object[][] {
- { "1" },
- { "" },
- { " " },
- { " " },
- { "abc." },
- { "abc.123" },
- { "abc.123$" },
- };
- }
-
- @Test(dataProvider = "invalidClassNames", expectedExceptions = { IllegalArgumentException.class })
- public void testBuilderAddInstanceInvalid(String className) {
- ClassPropertyDefinition.Builder localBuilder = ClassPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
- "test-property");
- localBuilder.addInstanceOf(className);
- ClassPropertyDefinition propertyDef = localBuilder.getInstance();
- List<String> instances = propertyDef.getInstanceOfInterface();
- assertTrue(instances.contains(className));
- }
-
- /**
- * @return data for testing with illegal values
- */
- @DataProvider(name = "loadClasses")
- public Object[][] createLoadData() {
- return new Object[][] {
- { "java.io.Serializable", "java.lang.String", Object.class, String.class },
- { "java.io.Serializable", "java.lang.String", String.class, String.class },
- // abstractclass
- { "java.lang.Number", "java.lang.Long", Number.class, Long.class }, };
- }
-
- @Test(dataProvider = "loadClasses")
- public <T> void testLoadClass(String interfaceName, String loadClassName, Class<T> instanceOfClass,
- Class<?> expectedClass) {
- ClassPropertyDefinition.Builder localBuilder = ClassPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
- "test-property");
- localBuilder.addInstanceOf(interfaceName);
- ClassPropertyDefinition propertyDef = localBuilder.getInstance();
- Class<?> clazz = propertyDef.loadClass(loadClassName, instanceOfClass);
- assertEquals(clazz, expectedClass);
- }
-
- @DataProvider(name = "loadClassesIllegal")
- public Object[][] createLoadDataIllegal() {
- return new Object[][] {
- { "java.lang.Runnable", "java.lang.String", Object.class, String.class },
- { "java.lang.Runnable", "some.bogus.ClassName", Object.class, String.class },
- { "java.lang.Runnable", "java.lang.String", Number.class, Number.class }, };
- }
-
- @Test(dataProvider = "loadClassesIllegal", expectedExceptions = { IllegalPropertyValueException.class })
- public <T> void testLoadClassIllegal(String interfaceName, String loadClassName, Class<T> instanceOfClass,
- Class<?> expectedClass) {
- ClassPropertyDefinition.Builder localBuilder = ClassPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
- "test-property");
- localBuilder.addInstanceOf(interfaceName);
- ClassPropertyDefinition propertyDef = localBuilder.getInstance();
- Class<?> clazz = propertyDef.loadClass(loadClassName, instanceOfClass);
- assertEquals(clazz, String.class);
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/DNPropertyDefinitionTest.java b/opendj-config/src/test/java/org/opends/server/admin/DNPropertyDefinitionTest.java
deleted file mode 100644
index 2a23773..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/DNPropertyDefinitionTest.java
+++ /dev/null
@@ -1,128 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import static org.testng.Assert.assertEquals;
-
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.forgerock.opendj.ldap.DN;
-import org.opends.server.types.DirectoryException;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class DNPropertyDefinitionTest extends ConfigTestCase {
-
- @DataProvider(name = "baseDN")
- public Object[][] createBuilderSetBaseDN() {
- return new Object[][] {
- { null },
- { "cn=key manager providers, cn=config" } };
- }
-
-
- @Test(dataProvider = "baseDN")
- public void testBuilderSetBaseDN(String baseDN) throws DirectoryException {
- DNPropertyDefinition.Builder localBuilder = DNPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
- "test-property");
- localBuilder.setBaseDN(baseDN);
- DNPropertyDefinition propertyDef = localBuilder.getInstance();
-
- DN actual = propertyDef.getBaseDN();
- DN expected = baseDN == null ? null : DN.valueOf(baseDN);
-
- assertEquals(actual, expected);
- }
-
- @DataProvider(name = "legalValues")
- public Object[][] createLegalValues() {
- return new Object[][] {
- // base DN, value to validate
- { null, "cn=config" },
- { null, "dc=example,dc=com" },
- { "", "cn=config" },
- { "cn=config", "cn=key manager providers, cn=config" },
- { "cn=key manager providers, cn=config", "cn=my provider, cn=key manager providers, cn=config" },
- };
- }
-
- @DataProvider(name = "illegalValues")
- public Object[][] createIllegalValues() {
- return new Object[][] {
- // Above base DN.
- { "cn=config", "" },
-
- // Same as base DN.
- { "cn=config", "cn=config" },
-
- // Same as base DN.
- { "cn=key manager providers, cn=config", "cn=key manager providers, cn=config" },
-
- // Too far beneath base DN.
- { "cn=config", "cn=my provider, cn=key manager providers, cn=config" },
-
- // Unrelated to base DN.
- { "cn=config", "dc=example, dc=com" }, };
- }
-
- @Test(dataProvider = "legalValues")
- public void testValidateLegalValues(String baseDN, String valueToValidate) throws DirectoryException {
- DNPropertyDefinition.Builder localBuilder = DNPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
- "test-property");
- localBuilder.setBaseDN(baseDN);
- DNPropertyDefinition propertyDef = localBuilder.getInstance();
- propertyDef.validateValue(DN.valueOf(valueToValidate), PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @Test(dataProvider = "illegalValues", expectedExceptions = IllegalPropertyValueException.class)
- public void testValidateIllegalValues(String baseDN, String valueToValidate) throws DirectoryException {
- DNPropertyDefinition.Builder localBuilder = DNPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
- "test-property");
- localBuilder.setBaseDN(baseDN);
- DNPropertyDefinition propertyDef = localBuilder.getInstance();
- propertyDef.validateValue(DN.valueOf(valueToValidate), PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @Test(dataProvider = "legalValues")
- public void testDecodeLegalValues(String baseDN, String valueToValidate) {
- DNPropertyDefinition.Builder localBuilder = DNPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
- "test-property");
- localBuilder.setBaseDN(baseDN);
- DNPropertyDefinition propertyDef = localBuilder.getInstance();
- propertyDef.decodeValue(valueToValidate, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @Test(dataProvider = "illegalValues", expectedExceptions = IllegalPropertyValueStringException.class)
- public void testDecodeIllegalValues(String baseDN, String valueToValidate) {
- DNPropertyDefinition.Builder localBuilder = DNPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
- "test-property");
- localBuilder.setBaseDN(baseDN);
- DNPropertyDefinition propertyDef = localBuilder.getInstance();
- propertyDef.decodeValue(valueToValidate, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/DurationPropertyDefinitionTest.java b/opendj-config/src/test/java/org/opends/server/admin/DurationPropertyDefinitionTest.java
deleted file mode 100644
index 398b597..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/DurationPropertyDefinitionTest.java
+++ /dev/null
@@ -1,353 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import static org.fest.assertions.Assertions.*;
-import static org.testng.Assert.*;
-
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class DurationPropertyDefinitionTest extends ConfigTestCase {
-
- @Test
- public void testCreateBuilder() {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- assertNotNull(builder);
- }
-
- /**
- * Creates data for testing string-based limit values
- *
- * @return data
- */
- @DataProvider(name = "longLimitData")
- Object[][] createLongLimitData() {
- return new Object[][] {
- { 1L, 1L },
- };
- }
-
- /**
- * Creates data for testing limit values
- *
- * @return data
- */
- @DataProvider(name = "illegalLongLimitData")
- Object[][] createIllegalLongLimitData() {
- return new Object[][] {
- // lower, upper, lower first
- { -1L, 0L, true },
- { 0L, -1L, false },
- { 2L, 1L, true },
- { 2L, 1L, false } };
- }
-
- @DataProvider(name = "stringLimitData")
- Object[][] createStringLimitData() {
- return new Object[][] {
- // unit, limit, expected value
- { "ms", "123", 123 },
- { "ms", "123s", 123000 },
- { "s", "123", 123000 },
- { "s", "123s", 123000 },
- { "m", "10", 600000 },
- { "m", "10s", 10000 } };
- }
-
- @Test(dataProvider = "longLimitData")
- public void testLowerLimitWithLong(long lowerLimit, long expectedValue) {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setLowerLimit(lowerLimit);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- assertEquals(def.getLowerLimit(), expectedValue);
- }
-
- @Test(dataProvider = "stringLimitData")
- public void testLowerLimitWithString(String unit, String limitValue, long expected) {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setBaseUnit(DurationUnit.getUnit(unit));
- builder.setLowerLimit(limitValue);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- assertEquals(def.getLowerLimit(), expected);
- }
-
- @Test(dataProvider = "longLimitData")
- public void testUpperLimitWithLong(long upperLimit, long expectedValue) {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setUpperLimit(upperLimit);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- assertEquals((long) def.getUpperLimit(), expectedValue);
- }
-
- @Test(dataProvider = "illegalLongLimitData", expectedExceptions = IllegalArgumentException.class)
- public void testIllegalLimitsWithLong(long lowerLimit, long upperLimit, boolean isLowerFirst) {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- if (isLowerFirst) {
- builder.setLowerLimit(lowerLimit);
- builder.setUpperLimit(upperLimit);
- } else {
- builder.setUpperLimit(upperLimit);
- builder.setLowerLimit(lowerLimit);
- }
- }
-
- @Test
- public void testAllowUnlimitedIsTrue() {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- def.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @Test(expectedExceptions = IllegalPropertyValueStringException.class)
- public void testAllowUnlimitedIsFalse() {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(false);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- def.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @Test(expectedExceptions = IllegalPropertyValueException.class)
- public void testAllowUnlimitedIsFalseNumValue() {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(false);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- def.validateValue(-1L, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @DataProvider(name = "validateValueData")
- Object[][] createValidateValueData() {
- return new Object[][] {
- // low in ms, high in ms, allow unlimited, value in seconds
- { 5000L, 10000L, false, 7L },
- { 5000L, null, true, -1L },
- { 5000L, 10000L, false, 5L },
- { 5000L, 10000L, false, 10L },
- { 5000L, null, false, 10000L }
- };
- }
-
- @Test(dataProvider = "validateValueData")
- public void testValidateValue(Long lowerLimitInMillis, Long higherLimitInMillis,
- boolean isAllowUnlimited, Long valueInSeconds) {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setLowerLimit(lowerLimitInMillis);
- builder.setUpperLimit(higherLimitInMillis);
- builder.setAllowUnlimited(isAllowUnlimited);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- def.validateValue(valueInSeconds, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @DataProvider(name = "illegalValidateValueData")
- Object[][] createIllegalValidateValueData() {
- return new Object[][] {
- // low in ms, high in ms, allow unlimited, value in seconds
- { 5000L, 10000L, false, null },
- { 5000L, 10000L, false, 1L },
- { 5000L, 10000L, false, 11L },
- { 5000L, 10000L, false, -1L } };
- }
-
- @Test(dataProvider = "illegalValidateValueData", expectedExceptions = { AssertionError.class,
- NullPointerException.class, IllegalPropertyValueException.class })
- public void testValidateValueIllegal(Long lowLimitInMillis, Long highLimitInMillis,
- boolean isAllowUnlimited, Long valueInSeconds) {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setLowerLimit(lowLimitInMillis);
- builder.setUpperLimit(highLimitInMillis);
- builder.setAllowUnlimited(isAllowUnlimited);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- def.validateValue(valueInSeconds, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @DataProvider(name = "encodeValueData")
- Object[][] createEncodeValueData() {
- return new Object[][] {
- { -1L, "unlimited" },
- { 0L, "0 s" },
- { 1L, "1 s" },
- { 2L, "2 s" },
- { 999L, "999 s" },
- { 1000L, "1000 s" },
- { 1001L, "1001 s" },
- { 1023L, "1023 s" },
- { 1024L, "1024 s" },
- { 1025L, "1025 s" },
- { 1000L * 1000L, "1000000 s" },
- };
- }
-
- @Test(dataProvider = "encodeValueData")
- public void testEncodeValue(Long valueToEncode, String expectedValue) {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- assertEquals(def.encodeValue(valueToEncode), expectedValue);
- }
-
- /** Test that accept doesn't throw and exception */
- @Test
- public void testAccept() {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- PropertyDefinitionVisitor<Boolean, Void> v = new PropertyDefinitionVisitor<Boolean, Void>() {
- public Boolean visitDuration(DurationPropertyDefinition d, Void o) {
- return true;
- }
- @SuppressWarnings("unused")
- public Boolean visitUnknown(PropertyDefinition<?> d, Void o) throws UnknownPropertyDefinitionException {
- return false;
- }
- };
-
- assertEquals((boolean) def.accept(v, null), true);
- }
-
- /** Make sure toString doesn't barf */
- @Test
- public void testToString() {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- def.toString();
- }
-
- /** Make sure toString doesn't barf */
- @Test
- public void testToString2() {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setUpperLimit(10L);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- def.toString();
- }
-
- @Test
- public void testCompare() {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- def.compare(1L, 2L);
- }
-
- @Test
- public void testSetDefaultBehaviorProvider() {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- builder.setDefaultBehaviorProvider(new DefaultBehaviorProvider<Long>() {
- public <R, P> R accept(DefaultBehaviorProviderVisitor<Long, R, P> v, P p) {
- return null;
- }
- });
- }
-
- @Test
- public void testSetPropertyOption() {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setOption(PropertyOption.HIDDEN);
- }
-
- @DataProvider(name = "decodeValueData")
- Object[][] createDecodeValueData() {
- return new Object[][] {
- // syntax tests
- { "unlimited", -1L },
- { "0h", 0L },
- { "0.0h", 0L },
- { "0.00h", 0L },
- { "0 h", 0L },
- { "0.00 h", 0L },
- { "1h", 1L },
- { "1 h", 1L },
- { "0ms", 0L },
- { "1h60m", 2L },
- { "1d10h", 34L },
- { "4d600m", 106L },
-
- // conversion tests
- { "1 d", 24L }, { "2 d", 48L }, { "0.5 d", 12L } };
- }
-
- @Test(dataProvider = "decodeValueData")
- public void testDecodeValue(String valueToDecode, Long expectedValue) {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- builder.setBaseUnit(DurationUnit.HOURS);
- builder.setMaximumUnit(DurationUnit.DAYS);
- DurationPropertyDefinition def = buildTestDefinition(builder);
-
- assertThat(def.decodeValue(valueToDecode, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS)).
- isEqualTo(expectedValue);
- }
-
- @DataProvider(name = "decodeValueDataIllegal")
- Object[][] createDecodeValueDataIllegal() {
- return new Object[][] { { "" }, { "0" }, // no unit
- { "123" }, // no unit
- { "a s" },
- { "1 x" },
- { "0.h" },
- { "0. h" },
- { "1.h" },
- { "1. h" },
- { "1.1 h" }, // too granular
- { "30 m" }, // unit too small violation
- { "60 m" }, // unit too small violation
- { "1 w" }, // unit too big violation
- { "7 w" }, // unit too big violation
- { "1 x" }, { "1 d" }, // upper limit violation
- { "2 h" }, // lower limit violation
- { "-1 h" } // unlimited violation
- };
- }
-
- @Test(dataProvider = "decodeValueDataIllegal", expectedExceptions = { IllegalPropertyValueStringException.class })
- public void testDecodeValue(String valueToDecode) {
- DurationPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(false);
- builder.setBaseUnit(DurationUnit.HOURS);
- builder.setMaximumUnit(DurationUnit.DAYS);
- builder.setLowerLimit(5L);
- builder.setUpperLimit(10L);
- DurationPropertyDefinition def = buildTestDefinition(builder);
- def.decodeValue(valueToDecode, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- private DurationPropertyDefinition.Builder createTestBuilder() {
- return DurationPropertyDefinition.createBuilder(RootCfgDefn.getInstance(), "test-property-name");
- }
-
- private DurationPropertyDefinition buildTestDefinition(DurationPropertyDefinition.Builder builder) {
- builder.setDefaultBehaviorProvider(new DefinedDefaultBehaviorProvider<Long>("0"));
- return builder.getInstance();
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/DurationUnitTest.java b/opendj-config/src/test/java/org/opends/server/admin/DurationUnitTest.java
deleted file mode 100644
index 7877a11..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/DurationUnitTest.java
+++ /dev/null
@@ -1,90 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import static org.opends.server.admin.DurationUnit.*;
-import static org.testng.Assert.*;
-
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class DurationUnitTest extends ConfigTestCase {
-
- @DataProvider(name = "testGetUnitData")
- public Object[][] createStringToSizeLimitData() {
- return new Object[][] {
- { "ms", MILLI_SECONDS },
- { "milliseconds", MILLI_SECONDS },
- { "s", SECONDS },
- { "seconds", SECONDS },
- { "m", MINUTES },
- { "minutes", MINUTES },
- { "h", HOURS },
- { "hours", HOURS },
- { "d", DAYS },
- { "days", DAYS },
- { "w", WEEKS },
- { "weeks", WEEKS } };
- }
-
- @Test(dataProvider = "testGetUnitData")
- public void testGetUnit(String unitString, DurationUnit unit) {
- assertEquals(getUnit(unitString), unit);
- }
-
- @Test(expectedExceptions = IllegalArgumentException.class)
- public void testGetUnitWithIllegalString() {
- getUnit("xxx");
- }
-
- @DataProvider(name = "valueToStringData")
- public Object[][] createValueToStringData() {
- return new Object[][] {
- { 0L, "0 ms" },
- { 1L, "1 ms" },
- { 999L, "999 ms" },
- { 1000L, "1 s" },
- { 1001L, "1 s 1 ms" },
- { 59999L, "59 s 999 ms" },
- { 60000L, "1 m" },
- { 3599999L, "59 m 59 s 999 ms" },
- { 3600000L, "1 h" } };
- }
-
- @Test(dataProvider = "valueToStringData")
- public void testToString(long ordinalValue, String expectedString) {
- assertEquals(DurationUnit.toString(ordinalValue), expectedString);
- }
-
- @Test(dataProvider = "valueToStringData")
- public void testParseValue(long expectedOrdinal, String value) {
- assertEquals(DurationUnit.parseValue(value), expectedOrdinal);
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/EnumPropertyDefinitionTest.java b/opendj-config/src/test/java/org/opends/server/admin/EnumPropertyDefinitionTest.java
deleted file mode 100644
index e96bff9..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/EnumPropertyDefinitionTest.java
+++ /dev/null
@@ -1,141 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import static org.testng.Assert.*;
-
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class EnumPropertyDefinitionTest extends ConfigTestCase {
-
- private enum TestEnum {
- ONE, TWO, THREE
- }
-
- private EnumPropertyDefinition.Builder<TestEnum> builder = null;
-
- @BeforeClass
- public void setUp() {
- builder = EnumPropertyDefinition.createBuilder(RootCfgDefn.getInstance(), "test-property");
- builder.setEnumClass(TestEnum.class);
- }
-
- @Test
- public void testCreateBuilder() {
- assertNotNull(builder);
- }
-
- /**
- * Tests that exception thrown when no enum class specified by builder
- */
- @Test
- public void testBuildInstance() {
- EnumPropertyDefinition<?> def = builder.getInstance();
- assertEquals(def.getEnumClass(), TestEnum.class);
- }
-
- /**
- * Tests that exception thrown when no enum class specified by builder
- */
- @Test(expectedExceptions = { IllegalStateException.class })
- public void testBuildInstanceWithoutEnumClassSpecified() {
- EnumPropertyDefinition.Builder<TestEnum> localBuilder = EnumPropertyDefinition.createBuilder(
- RootCfgDefn.getInstance(), "test-property");
- localBuilder.getInstance();
- }
-
- /**
- * Creates data decodeValue test
- *
- * @return data
- */
- @DataProvider(name = "decodeValueData")
- Object[][] createDecodeValueData() {
- return new Object[][] { { "ONE", TestEnum.ONE } };
- }
-
- /**
- * Tests decodeValue()
- *
- * @param value
- * to decode
- * @param expectedValue
- * enum expected
- */
- @Test(dataProvider = "decodeValueData")
- public void testDecodeValue(String value, TestEnum expectedValue) {
- EnumPropertyDefinition<?> def = builder.getInstance();
- assertEquals(def.decodeValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS), expectedValue);
- }
-
- /**
- * Creates illegal data for decode value test
- *
- * @return data
- */
- @DataProvider(name = "decodeValueIllegalData")
- Object[][] createDecodeValueIllegalData() {
- return new Object[][] { { "xxx" }, { null } };
- }
-
- /**
- * Tests decodeValue()
- *
- * @param value
- * to decode
- */
- @Test(dataProvider = "decodeValueIllegalData", expectedExceptions = { NullPointerException.class,
- IllegalPropertyValueStringException.class })
- public void testDecodeValueIllegalData(String value) {
- EnumPropertyDefinition<?> def = builder.getInstance();
- def.decodeValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- /**
- * Tests normalization
- */
- @Test
- public void testNormalizeValue() {
- EnumPropertyDefinition<TestEnum> def = builder.getInstance();
- assertEquals(def.normalizeValue(TestEnum.ONE), "one");
- }
-
- /**
- * Tests validation
- */
- @Test
- public void testValidateValue() {
- EnumPropertyDefinition<TestEnum> def = builder.getInstance();
- def.validateValue(TestEnum.ONE, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/IntegerPropertyDefinitionTest.java b/opendj-config/src/test/java/org/opends/server/admin/IntegerPropertyDefinitionTest.java
deleted file mode 100644
index 49ba994..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/IntegerPropertyDefinitionTest.java
+++ /dev/null
@@ -1,234 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static org.testng.Assert.*;
-
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class IntegerPropertyDefinitionTest extends ConfigTestCase {
-
- @Test
- public void testCreateBuilder() {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- assertNotNull(builder);
- }
-
- @DataProvider(name = "limitData")
- public Object[][] createlimitData() {
- return new Object[][] { { 1, 1 },
- // { null, 0 }
- };
- }
-
- @DataProvider(name = "illegalLimitData")
- public Object[][] createIllegalLimitData() {
- return new Object[][] {
- // lower, upper, is lower first ?
- { -1, 0, true },
- { 0, -1, false },
- { 2, 1, true },
- { 2, 1, false }
- };
- }
-
- @Test(dataProvider = "limitData")
- public void testLowerLimitWithInteger(int limit, int expectedValue) {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- builder.setLowerLimit(limit);
- IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
- assert propertyDef.getLowerLimit() == expectedValue;
- }
-
- @Test(dataProvider = "limitData")
- public void testUpperLimitWithInteger(int limit, int expectedValue) {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- builder.setUpperLimit(limit);
- IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
- assert propertyDef.getUpperLimit().equals(expectedValue);
- }
-
- @Test(dataProvider = "illegalLimitData", expectedExceptions = IllegalArgumentException.class)
- public void testIllegalLimits(int lower, int upper, boolean isLowerFirst) {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- if (isLowerFirst) {
- builder.setLowerLimit(lower);
- builder.setUpperLimit(upper);
- } else {
- builder.setUpperLimit(upper);
- builder.setLowerLimit(lower);
- }
- }
-
- @Test
- public void testIsAllowUnlimitedTrue() {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
- propertyDef.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @Test(expectedExceptions = IllegalPropertyValueStringException.class)
- public void testIsAllowUnlimitedFalse() {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(false);
- IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
- propertyDef.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @Test(expectedExceptions = IllegalPropertyValueException.class)
- public void testIsAllowUnlimitedInteger() {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(false);
- IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
- propertyDef.validateValue(-1, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @DataProvider(name = "validateValueData")
- public Object[][] createvalidateValueData() {
- return new Object[][] {
- // low, high, allow unlimited ?, value to validate
- { 5, 10, false, 7 },
- { 5, null, true, -1 },
- { 5, 10, true, -1 },
- };
- }
-
- @Test(dataProvider = "validateValueData")
- public void testValidateValue(Integer low, Integer high, boolean allowUnlimited, Integer valueToValidate) {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- builder.setLowerLimit(low);
- builder.setUpperLimit(high);
- builder.setAllowUnlimited(allowUnlimited);
- IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
- propertyDef.validateValue(valueToValidate, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @DataProvider(name = "illegalValidateValueData")
- public Object[][] createIllegalValidateValueData() {
- return new Object[][] {
- // low, high, allow unlimited ?, value to validate
- { 5, 10, false, null },
- { 5, 10, false, 1 },
- { 5, 10, false, 11 },
- { 5, 10, false, -1 },
- { 5, 10, true, 2 },
- { 5, 10, true, 11 }
- };
- }
-
- @Test(dataProvider = "illegalValidateValueData", expectedExceptions = { AssertionError.class,
- NullPointerException.class, IllegalPropertyValueException.class })
- public void testValidateValueIllegal(Integer low, Integer high, boolean allowUnlimited, Integer value) {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- builder.setLowerLimit(low);
- builder.setUpperLimit(high);
- builder.setAllowUnlimited(allowUnlimited);
- IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
- propertyDef.validateValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @DataProvider(name = "encodeValueData")
- public Object[][] createEncodeValueData() {
- return new Object[][] {
- { -1, "unlimited" },
- { 1, "1" }, };
- }
-
- @Test(dataProvider = "encodeValueData")
- public void testEncodeValue(Integer value, String expectedValue) {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
- assertEquals(propertyDef.encodeValue(value), expectedValue);
- }
-
- @Test
- public void testAccept() {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
- PropertyDefinitionVisitor<Boolean, Void> v = new PropertyDefinitionVisitor<Boolean, Void>() {
- public Boolean visitInteger(IntegerPropertyDefinition d, Void o) {
- return true;
- }
-
- @SuppressWarnings("unused")
- public Boolean visitUnknown(PropertyDefinition<?> d, Void o) throws UnknownPropertyDefinitionException {
- return false;
- }
- };
-
- assertEquals((boolean) propertyDef.accept(v, null), true);
- }
-
- @Test
- public void testToString() {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
- propertyDef.toString();
- }
-
- @Test
- public void testCompare() {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- IntegerPropertyDefinition propertyDef = buildTestDefinition(builder);
- propertyDef.compare(1, 2);
- }
-
- @Test
- public void testSetDefaultBehaviorProvider() {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- builder.setDefaultBehaviorProvider(new DefaultBehaviorProvider<Integer>() {
- public <R, P> R accept(DefaultBehaviorProviderVisitor<Integer, R, P> v, P p) {
- return null;
- }
- });
- }
-
- @Test
- public void testSetOption() {
- IntegerPropertyDefinition.Builder builder = createTestBuilder();
- builder.setOption(PropertyOption.HIDDEN);
- }
-
- private IntegerPropertyDefinition.Builder createTestBuilder() {
- return IntegerPropertyDefinition.createBuilder(RootCfgDefn.getInstance(), "test-property-name");
- }
-
- private IntegerPropertyDefinition buildTestDefinition(IntegerPropertyDefinition.Builder builder) {
- builder.setDefaultBehaviorProvider(new DefinedDefaultBehaviorProvider<Integer>("0"));
- return builder.getInstance();
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/LDAPProfileTest.java b/opendj-config/src/test/java/org/opends/server/admin/LDAPProfileTest.java
deleted file mode 100644
index 204bbbb..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/LDAPProfileTest.java
+++ /dev/null
@@ -1,47 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static org.testng.Assert.*;
-
-import java.util.List;
-
-import org.forgerock.opendj.admin.meta.GlobalCfgDefn;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class LDAPProfileTest extends ConfigTestCase {
-
- /** Makes sure the returned list contains "top" */
- @Test
- public void testGetObjectClasses() {
- LDAPProfile ldapProfile = LDAPProfile.getInstance();
- List<String> objectClasses = ldapProfile.getObjectClasses(GlobalCfgDefn.getInstance());
- assertTrue(objectClasses.contains("top"));
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/ManagedObjectDefinitionI18NResourceTest.java b/opendj-config/src/test/java/org/opends/server/admin/ManagedObjectDefinitionI18NResourceTest.java
deleted file mode 100644
index 15be2ca..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/ManagedObjectDefinitionI18NResourceTest.java
+++ /dev/null
@@ -1,56 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static org.testng.Assert.*;
-
-import java.util.Locale;
-
-import org.forgerock.opendj.admin.meta.GlobalCfgDefn;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class ManagedObjectDefinitionI18NResourceTest extends ConfigTestCase {
-
- ManagedObjectDefinitionI18NResource definitionI18NResource = null;
-
- @BeforeClass
- public void setUp() {
- definitionI18NResource = ManagedObjectDefinitionI18NResource.getInstanceForProfile("ldap");
- }
-
- @Test
- public void testGetMessage() {
- // Ideally we should test getting messages with arguments
- // but I couldn't find any existing properties files with
- // args
- assertNotNull(definitionI18NResource.getMessage(GlobalCfgDefn.getInstance(), "objectclass",
- Locale.getDefault()));
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/ManagedObjectPathTest.java b/opendj-config/src/test/java/org/opends/server/admin/ManagedObjectPathTest.java
deleted file mode 100644
index 86fa17b..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/ManagedObjectPathTest.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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static org.testng.Assert.*;
-
-import org.forgerock.opendj.admin.client.ConnectionHandlerCfgClient;
-import org.forgerock.opendj.admin.client.GlobalCfgClient;
-import org.forgerock.opendj.admin.client.LDAPConnectionHandlerCfgClient;
-import org.forgerock.opendj.admin.meta.ConnectionHandlerCfgDefn;
-import org.forgerock.opendj.admin.meta.GlobalCfgDefn;
-import org.forgerock.opendj.admin.meta.LDAPConnectionHandlerCfgDefn;
-import org.forgerock.opendj.admin.meta.ReplicationDomainCfgDefn;
-import org.forgerock.opendj.admin.meta.ReplicationSynchronizationProviderCfgDefn;
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.admin.server.ConnectionHandlerCfg;
-import org.forgerock.opendj.admin.server.GlobalCfg;
-import org.forgerock.opendj.admin.server.LDAPConnectionHandlerCfg;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.forgerock.opendj.ldap.DN;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class ManagedObjectPathTest extends ConfigTestCase {
-
- @Test
- public void testEmptyPathIsEmpty() {
- ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
- assertTrue(path.isEmpty());
- }
-
- @Test
- public void testEmptyPathHasZeroElements() {
- ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
- assertEquals(path.size(), 0);
- }
-
- @Test(expectedExceptions = IllegalArgumentException.class)
- public void testEmptyPathHasNoParent() {
- ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
- path.parent();
- }
-
- @Test
- public void testEmptyPathIsRootConfiguration() {
- ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
- assertEquals(path.getManagedObjectDefinition(), RootCfgDefn.getInstance());
- }
-
- @Test
- public void testEmptyPathHasNoRelation() {
- ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
- assertEquals(path.getRelationDefinition(), null);
- }
-
- @Test
- public void testEmptyPathHasNoName() {
- ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
- assertNull(path.getName());
- }
-
- @Test
- public void testEmptyPathString() {
- ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
- assertEquals(path.toString(), "/");
- }
-
- @Test
- public void testEmptyPathDecode() {
- ManagedObjectPath<?, ?> path = ManagedObjectPath.valueOf("/");
- assertEquals(path, ManagedObjectPath.emptyPath());
- }
-
- @Test
- public void testSingletonChild() {
- ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
- ManagedObjectPath<GlobalCfgClient, GlobalCfg> child = path.child(RootCfgDefn.getInstance()
- .getGlobalConfigurationRelationDefinition());
-
- assertFalse(child.isEmpty());
- assertEquals(child.size(), 1);
- assertEquals(child.parent(), path);
- assertNull(child.getName());
- assertEquals(child.getManagedObjectDefinition(), GlobalCfgDefn.getInstance());
- assertEquals(child.getRelationDefinition(), RootCfgDefn.getInstance()
- .getGlobalConfigurationRelationDefinition());
- assertEquals(child.toString(), "/relation=global-configuration");
- assertEquals(child, ManagedObjectPath.valueOf("/relation=global-configuration"));
- }
-
- @Test
- public void testInstantiableChild() {
- ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
- ManagedObjectPath<ConnectionHandlerCfgClient, ConnectionHandlerCfg> child = path.child(RootCfgDefn
- .getInstance().getConnectionHandlersRelationDefinition(), "LDAP connection handler");
-
- assertFalse(child.isEmpty());
- assertEquals(child.size(), 1);
- assertEquals(child.parent(), path);
- assertEquals(child.getName(), "LDAP connection handler");
- assertEquals(child.getManagedObjectDefinition(), ConnectionHandlerCfgDefn.getInstance());
- assertEquals(child.getRelationDefinition(), RootCfgDefn.getInstance()
- .getConnectionHandlersRelationDefinition());
- assertEquals(child.toString(), "/relation=connection-handler+name=LDAP connection handler");
- assertEquals(child, ManagedObjectPath.valueOf("/relation=connection-handler+name=LDAP connection handler"));
- }
-
- @Test
- public void testInstantiableChildWithSubtype() {
- ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
- ManagedObjectPath<LDAPConnectionHandlerCfgClient, LDAPConnectionHandlerCfg> child = path.child(RootCfgDefn
- .getInstance().getConnectionHandlersRelationDefinition(), LDAPConnectionHandlerCfgDefn.getInstance(),
- "LDAP connection handler");
-
- assertFalse(child.isEmpty());
- assertEquals(child.size(), 1);
- assertEquals(child.parent(), path);
- assertEquals(child.getManagedObjectDefinition(), LDAPConnectionHandlerCfgDefn.getInstance());
- assertEquals(child.getRelationDefinition(), RootCfgDefn.getInstance()
- .getConnectionHandlersRelationDefinition());
- String childAsString =
- "/relation=connection-handler+type=ldap-connection-handler+name=LDAP connection handler";
- assertEquals(child.toString(), childAsString);
- assertEquals(child, ManagedObjectPath.valueOf(childAsString));
- }
-
- @Test
- public void testInstantiableChildMultipleLevels() {
- ManagedObjectPath<?, ?> root = ManagedObjectPath.emptyPath();
- ManagedObjectPath<?, ?> mmr = root.child(RootCfgDefn.getInstance()
- .getSynchronizationProvidersRelationDefinition(), ReplicationSynchronizationProviderCfgDefn
- .getInstance(), "MMR");
- ManagedObjectPath<?, ?> domain = mmr.child(ReplicationSynchronizationProviderCfgDefn.getInstance()
- .getReplicationDomainsRelationDefinition(), "Domain");
- assertFalse(domain.isEmpty());
- assertEquals(domain.size(), 2);
- assertEquals(domain.parent(), mmr);
- assertEquals(domain.parent(2), root);
- assertEquals(domain.getManagedObjectDefinition(), ReplicationDomainCfgDefn.getInstance());
- assertEquals(domain.getRelationDefinition(), ReplicationSynchronizationProviderCfgDefn.getInstance()
- .getReplicationDomainsRelationDefinition());
- String domainAsString = "/relation=synchronization-provider+type=replication-synchronization-provider"
- + "+name=MMR/relation=replication-domain+name=Domain";
- assertEquals(domain.toString(), domainAsString);
- assertEquals(domain, ManagedObjectPath.valueOf(domainAsString));
- }
-
- @Test
- public void testMatchesAndEqualsBehavior() {
- ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
-
- ManagedObjectPath<ConnectionHandlerCfgClient, ConnectionHandlerCfg> child1 = path.child(RootCfgDefn
- .getInstance().getConnectionHandlersRelationDefinition(), "LDAP connection handler");
-
- ManagedObjectPath<LDAPConnectionHandlerCfgClient, LDAPConnectionHandlerCfg> child2 = path.child(RootCfgDefn
- .getInstance().getConnectionHandlersRelationDefinition(), LDAPConnectionHandlerCfgDefn.getInstance(),
- "LDAP connection handler");
-
- ManagedObjectPath<LDAPConnectionHandlerCfgClient, LDAPConnectionHandlerCfg> child3 = path.child(RootCfgDefn
- .getInstance().getConnectionHandlersRelationDefinition(), LDAPConnectionHandlerCfgDefn.getInstance(),
- "Another LDAP connection handler");
-
- // child 1 and child2 matches each other
- assertTrue(child1.matches(child1));
- assertTrue(child2.matches(child2));
- assertTrue(child1.matches(child2));
- assertTrue(child2.matches(child1));
-
- // child 1 and child2 are not equal to each other
- assertTrue(child1.equals(child1));
- assertTrue(child2.equals(child2));
- assertFalse(child1.equals(child2));
- assertFalse(child2.equals(child1));
-
- // child 1/2 does not match nor equals child3
- assertFalse(child1.matches(child3));
- assertFalse(child2.matches(child3));
- assertFalse(child3.matches(child1));
- assertFalse(child3.matches(child2));
-
- assertFalse(child1.equals(child3));
- assertFalse(child2.equals(child3));
- assertFalse(child3.equals(child1));
- assertFalse(child3.equals(child2));
- }
-
- @Test
- public void testToDN() throws Exception {
- ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath();
-
- ManagedObjectPath<ConnectionHandlerCfgClient, ConnectionHandlerCfg> child1 = path.child(RootCfgDefn
- .getInstance().getConnectionHandlersRelationDefinition(), "LDAP connection handler");
-
- ManagedObjectPath<LDAPConnectionHandlerCfgClient, LDAPConnectionHandlerCfg> child2 = path.child(RootCfgDefn
- .getInstance().getConnectionHandlersRelationDefinition(), LDAPConnectionHandlerCfgDefn.getInstance(),
- "LDAP connection handler");
-
- ManagedObjectPath<LDAPConnectionHandlerCfgClient, LDAPConnectionHandlerCfg> child3 = path.child(RootCfgDefn
- .getInstance().getConnectionHandlersRelationDefinition(), LDAPConnectionHandlerCfgDefn.getInstance(),
- "Another LDAP connection handler");
-
- DN expectedEmpty = DN.rootDN();
- DN expectedChild1 = DN.valueOf("cn=LDAP connection handler,cn=connection handlers,cn=config");
- DN expectedChild2 = DN.valueOf("cn=LDAP connection handler,cn=connection handlers,cn=config");
- DN expectedChild3 = DN.valueOf("cn=Another LDAP connection handler,cn=connection handlers,cn=config");
-
- assertEquals(path.toDN(), expectedEmpty);
- assertEquals(child1.toDN(), expectedChild1);
- assertEquals(child2.toDN(), expectedChild2);
- assertEquals(child3.toDN(), expectedChild3);
- }
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/MockLDAPProfile.java b/opendj-config/src/test/java/org/opends/server/admin/MockLDAPProfile.java
deleted file mode 100644
index cab5070..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/MockLDAPProfile.java
+++ /dev/null
@@ -1,130 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008-2010 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-/**
- * A mock LDAP profile wrapper for testing purposes.
- */
-public final class MockLDAPProfile extends LDAPProfile.Wrapper {
-
- /**
- * Creates a new mock LDAP profile.
- */
- public MockLDAPProfile() {
- // No implementation required.
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getAttributeName(AbstractManagedObjectDefinition<?, ?> d, PropertyDefinition<?> pd) {
-
- if (d == TestParentCfgDefn.getInstance()) {
- TestParentCfgDefn td = TestParentCfgDefn.getInstance();
-
- if (pd == (PropertyDefinition<?>) td.getMandatoryBooleanPropertyPropertyDefinition()) {
- return "ds-cfg-enabled";
- } else if (pd == (PropertyDefinition<?>) td.getMandatoryClassPropertyPropertyDefinition()) {
- return "ds-cfg-java-class";
- } else if (pd == (PropertyDefinition<?>) td.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition()) {
- return "ds-cfg-attribute-type";
- } else if (pd == (PropertyDefinition<?>) td.getOptionalMultiValuedDNPropertyPropertyDefinition()) {
- return "ds-cfg-base-dn";
- } else {
- throw new RuntimeException("Unexpected test-parent property" + pd.getName());
- }
- } else if (d == TestChildCfgDefn.getInstance()) {
- TestChildCfgDefn td = TestChildCfgDefn.getInstance();
-
- if (pd == (PropertyDefinition<?>) td.getMandatoryBooleanPropertyPropertyDefinition()) {
- return "ds-cfg-enabled";
- } else if (pd == (PropertyDefinition<?>) td.getMandatoryClassPropertyPropertyDefinition()) {
- return "ds-cfg-java-class";
- } else if (pd == (PropertyDefinition<?>) td.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition()) {
- return "ds-cfg-attribute-type";
- } else if (pd == (PropertyDefinition<?>) td.getOptionalMultiValuedDNProperty1PropertyDefinition()) {
- return "ds-cfg-base-dn";
- } else if (pd == (PropertyDefinition<?>) td.getOptionalMultiValuedDNProperty2PropertyDefinition()) {
- return "ds-cfg-group-dn";
- } else if (pd.getName().equals("aggregation-property")) {
- return "ds-cfg-rotation-policy";
- } else {
- throw new RuntimeException("Unexpected test-child property" + pd.getName());
- }
- }
-
- // Not known.
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getRelationChildRDNType(InstantiableRelationDefinition<?, ?> r) {
- if (r == TestCfg.getTestOneToManyParentRelationDefinition()
- || r == TestParentCfgDefn.getInstance().getTestChildrenRelationDefinition()) {
- return "cn";
- } else {
- return null;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getObjectClass(AbstractManagedObjectDefinition<?, ?> d) {
- if (d == TestParentCfgDefn.getInstance()) {
- return "ds-cfg-test-parent-dummy";
- } else if (d == TestChildCfgDefn.getInstance()) {
- return "ds-cfg-test-child-dummy";
- } else {
- // Not known.
- return null;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getRelationRDNSequence(RelationDefinition<?, ?> r) {
- if (r == TestCfg.getTestOneToManyParentRelationDefinition()) {
- return "cn=test parents,cn=config";
- } else if (r == TestCfg.getTestOneToZeroOrOneParentRelationDefinition()) {
- return "cn=optional test parent,cn=config";
- } else if (r == TestParentCfgDefn.getInstance().getTestChildrenRelationDefinition()) {
- return "cn=test children";
- } else if (r == TestParentCfgDefn.getInstance().getOptionalTestChildRelationDefinition()) {
- return "cn=optional test child";
- } else {
- return null;
- }
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/RelativeInheritedDefaultBehaviorProviderTest.java b/opendj-config/src/test/java/org/opends/server/admin/RelativeInheritedDefaultBehaviorProviderTest.java
deleted file mode 100644
index 3a1cb21..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/RelativeInheritedDefaultBehaviorProviderTest.java
+++ /dev/null
@@ -1,97 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import static org.testng.Assert.*;
-
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class RelativeInheritedDefaultBehaviorProviderTest extends ConfigTestCase {
-
- private static final int OFFSET = 0;
-
- private TestParentCfgDefn parentDefinition;
-
- private RelativeInheritedDefaultBehaviorProvider<Boolean> defaultBehaviorProvider = null;
-
- @BeforeClass
- public void setUp() {
- parentDefinition = TestParentCfgDefn.getInstance();
- this.defaultBehaviorProvider = new RelativeInheritedDefaultBehaviorProvider<Boolean>(
- parentDefinition,
- parentDefinition.getMandatoryBooleanPropertyPropertyDefinition().getName(),
- OFFSET);
- }
-
- @Test
- @SuppressWarnings("rawtypes")
- public void testAccept() {
- defaultBehaviorProvider.accept(new DefaultBehaviorProviderVisitor<Boolean, Object, Object>() {
-
- public Object visitAbsoluteInherited(AbsoluteInheritedDefaultBehaviorProvider d, Object o) {
- return null;
- }
-
- public Object visitAlias(AliasDefaultBehaviorProvider d, Object o) {
- return null;
- }
-
- public Object visitDefined(DefinedDefaultBehaviorProvider d, Object o) {
- return null;
- }
-
- public Object visitRelativeInherited(RelativeInheritedDefaultBehaviorProvider d, Object o) {
- return null;
- }
-
- public Object visitUndefined(UndefinedDefaultBehaviorProvider d, Object o) {
- return null;
- }
- }, new Object());
- }
-
- @Test
- public void testGetManagedObjectPath() {
- assertEquals(defaultBehaviorProvider.getManagedObjectPath(ManagedObjectPath.emptyPath()),
- ManagedObjectPath.emptyPath());
- }
-
- @Test
- public void testGetPropertyDefinition() {
- assertEquals(defaultBehaviorProvider.getPropertyName(),
- parentDefinition.getMandatoryBooleanPropertyPropertyDefinition().getName());
- }
-
- @Test
- public void testGetRelativeOffset() {
- assertEquals(defaultBehaviorProvider.getRelativeOffset(), OFFSET);
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/SizePropertyDefinitionTest.java b/opendj-config/src/test/java/org/opends/server/admin/SizePropertyDefinitionTest.java
deleted file mode 100644
index 4813675..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/SizePropertyDefinitionTest.java
+++ /dev/null
@@ -1,253 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static org.testng.Assert.*;
-
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class SizePropertyDefinitionTest extends ConfigTestCase {
-
- @Test
- public void testCreateBuilder() {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- assertNotNull(builder);
- }
-
- @Test
- public void testLowerLimit() {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setLowerLimit(1);
- SizePropertyDefinition propertyDef = buildTestDefinition(builder);
- assert propertyDef.getLowerLimit() == 1;
- }
-
- @DataProvider(name = "stringLimitData")
- public Object[][] createStringLimitData() {
- return new Object[][] {
- { "1 b", 1L },
- };
- }
-
- @DataProvider(name = "illegalLimitData")
- public Object[][] createIllegalLimitData() {
- return new Object[][] {
- // lower, upper, is lower first
- { -1L, 0L, true },
- { 0L, -1L, false },
- { 2L, 1L, true },
- { 2L, 1L, false } };
- }
-
- @Test(dataProvider = "stringLimitData")
- public void testLowerLimitString(String unitLimit, Long expectedValue) {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setLowerLimit(unitLimit);
- SizePropertyDefinition propertyDef = buildTestDefinition(builder);
- assert propertyDef.getLowerLimit() == expectedValue;
- }
-
- @Test(dataProvider = "stringLimitData")
- public void testUpperLimitString(String limit, long expectedValue) {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setUpperLimit(limit);
- SizePropertyDefinition propertyDef = buildTestDefinition(builder);
- assert propertyDef.getUpperLimit().equals(expectedValue);
- }
-
- @Test(dataProvider = "illegalLimitData", expectedExceptions = IllegalArgumentException.class)
- public void testIllegalLimits(long lower, long upper, boolean lowerFirst) {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- if (lowerFirst) {
- builder.setLowerLimit(lower);
- builder.setUpperLimit(upper);
- } else {
- builder.setUpperLimit(upper);
- builder.setLowerLimit(lower);
- }
- }
-
- @Test
- public void testIsAllowUnlimitedTrue() {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- SizePropertyDefinition propertyDef = buildTestDefinition(builder);
- propertyDef.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @Test(expectedExceptions = IllegalPropertyValueStringException.class)
- public void testIsAllowUnlimitedFalse() {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(false);
- SizePropertyDefinition propertyDef = buildTestDefinition(builder);
- propertyDef.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @Test(expectedExceptions = IllegalPropertyValueException.class)
- public void testIsAllowUnlimitedNumeric() {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(false);
- SizePropertyDefinition propertyDef = buildTestDefinition(builder);
- propertyDef.validateValue(-1L, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @DataProvider(name = "validateValueData")
- public Object[][] createvalidateValueData() {
- return new Object[][] {
- // low, high, is allow unlimited, value
- { 5L, 10L, false, 7L },
- { 5L, null, true, -1L },
- { 5L, 10L, true, -1L },
- };
- }
-
- @Test(dataProvider = "validateValueData")
- public void testValidateValue(Long low, Long high, boolean isAllowUnlimited, Long valueToValidate) {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setLowerLimit(low);
- builder.setUpperLimit(high);
- builder.setAllowUnlimited(isAllowUnlimited);
- SizePropertyDefinition propertyDef = buildTestDefinition(builder);
- propertyDef.validateValue(valueToValidate, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @DataProvider(name = "illegalValidateValueData")
- public Object[][] createIllegalValidateValueData() {
- return new Object[][] {
- // low, high, is allow unlimited, value
- { 5L, 10L, false, null },
- { 5L, 10L, false, 1L },
- { 5L, 10L, false, 11L },
- { 5L, 10L, false, -1L },
- { 5L, 10L, true, 2L },
- { 5L, 10L, true, 11L }
- };
- }
-
- @Test(dataProvider = "illegalValidateValueData", expectedExceptions = { AssertionError.class,
- NullPointerException.class, IllegalPropertyValueException.class })
- public void testValidateValueIllegal(Long low, Long high, boolean allowUnlimited, Long valueToValidate) {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setLowerLimit(low);
- builder.setUpperLimit(high);
- builder.setAllowUnlimited(allowUnlimited);
- SizePropertyDefinition propertyDef = buildTestDefinition(builder);
- propertyDef.validateValue(valueToValidate, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @DataProvider(name = "encodeValueData")
- public Object[][] createEncodeValueData() {
- return new Object[][] {
- { -1L, "unlimited" },
- { 0L, "0 b" },
- { 1L, "1 b" },
- { 2L, "2 b" },
- { 999L, "999 b" },
- { 1000L, "1 kb" },
- { 1001L, "1001 b" },
- { 1023L, "1023 b" },
- { 1024L, "1 kib" },
- { 1025L, "1025 b" },
- { 1000L * 1000L, "1 mb" },
- { 1000L * 1000L * 1000L, "1 gb" },
- { 1024L * 1024L * 1024L, "1 gib" },
- { 1000L * 1000L * 1000L * 1000L, "1 tb" }
- };
- }
-
- @Test(dataProvider = "encodeValueData")
- public void testEncodeValue(Long value, String expectedValue) {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- SizePropertyDefinition propertyDef = buildTestDefinition(builder);
- assertEquals(propertyDef.encodeValue(value), expectedValue);
- }
-
- @Test
- public void testAccept() {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- SizePropertyDefinition propertyDef = buildTestDefinition(builder);
- PropertyDefinitionVisitor<Boolean, Void> v = new PropertyDefinitionVisitor<Boolean, Void>() {
- public Boolean visitSize(SizePropertyDefinition d, Void o) {
- return true;
- }
- @SuppressWarnings("unused")
- public Boolean visitUnknown(PropertyDefinition<?> d, Void o) throws UnknownPropertyDefinitionException {
- return false;
- }
- };
-
- assertEquals((boolean) propertyDef.accept(v, null), true);
- }
-
- @Test
- public void testToString() {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- SizePropertyDefinition propertyDef = buildTestDefinition(builder);
- propertyDef.toString();
- }
-
- @Test
- public void testCompare() {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- SizePropertyDefinition propertyDef = buildTestDefinition(builder);
- assertEquals(propertyDef.compare(1L, 2L), -1);
- }
-
- @Test
- public void testSetDefaultBehaviorProvider() {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setAllowUnlimited(true);
- builder.setDefaultBehaviorProvider(new DefaultBehaviorProvider<Long>() {
- public <R, P> R accept(DefaultBehaviorProviderVisitor<Long, R, P> v, P p) {
- return null;
- }
- });
- }
-
- @Test
- public void testSetOption() {
- SizePropertyDefinition.Builder builder = createTestBuilder();
- builder.setOption(PropertyOption.HIDDEN);
- }
-
- private SizePropertyDefinition.Builder createTestBuilder() {
- return SizePropertyDefinition.createBuilder(RootCfgDefn.getInstance(), "test-property-name");
- }
-
- private SizePropertyDefinition buildTestDefinition(SizePropertyDefinition.Builder builder) {
- builder.setDefaultBehaviorProvider(new DefinedDefaultBehaviorProvider<Long>("0"));
- return builder.getInstance();
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/SizeUnitTest.java b/opendj-config/src/test/java/org/opends/server/admin/SizeUnitTest.java
deleted file mode 100644
index a8ba27c..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/SizeUnitTest.java
+++ /dev/null
@@ -1,278 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import static org.testng.Assert.*;
-
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class SizeUnitTest extends ConfigTestCase {
-
- @DataProvider(name = "stringToSizeLimitData")
- public Object[][] createStringToSizeLimitData() {
- return new Object[][] {
- { "b", SizeUnit.BYTES },
- { "kb", SizeUnit.KILO_BYTES },
- { "kib", SizeUnit.KIBI_BYTES },
- { "mb", SizeUnit.MEGA_BYTES },
- { "mib", SizeUnit.MEBI_BYTES },
- { "gb", SizeUnit.GIGA_BYTES },
- { "gib", SizeUnit.GIBI_BYTES },
- { "tb", SizeUnit.TERA_BYTES },
- { "tib", SizeUnit.TEBI_BYTES } };
- }
-
- @Test(dataProvider = "stringToSizeLimitData")
- public void testGetUnit(String name, SizeUnit expectedUnit) {
- SizeUnit unit = SizeUnit.getUnit(name);
- assertEquals(unit, expectedUnit);
- }
-
- @DataProvider(name = "parseValueData")
- public Object[][] createParseValueData() {
- return new Object[][] {
- { "1.0 b", 1L },
- { "1.0 kb", 1000L },
- { "1.0 kib", 1024L },
- { "0b", 0L },
- { "0 b", 0L },
- { "0 bytes", 0L },
- { "0kb", 0L },
- { "0 kilobytes", 0L },
- { "0 KILOBYTES", 0L },
- { "0 KB", 0L },
- { "1b", 1L },
- { "1 b", 1L },
- { "1 bytes", 1L },
- { "1kb", 1000L },
- { "1 kilobytes", 1000L },
- { "1 KILOBYTES", 1000L },
- { "1 KB", 1000L },
- { "1000b", 1000L },
- { "1000 b", 1000L },
- { "1000 bytes", 1000L },
- { "1000kb", 1000000L },
- { "1000 kilobytes", 1000000L },
- { "1000 KILOBYTES", 1000000L },
- { "1000 KB", 1000000L } };
- }
-
- @Test(dataProvider = "parseValueData")
- public void testParseValue(String valueToParse, long expectedValue) {
- assertEquals(SizeUnit.parseValue(valueToParse), expectedValue);
- }
-
- @DataProvider(name = "parseValueIllegalData")
- public Object[][] createParseValueIllegalData() {
- return new Object[][] {
- { "a.0 b" },
- { "1.a kb" },
- { "1.0 xx" },
- { "" },
- { "hello" },
- { "-1" },
- { "-1b" },
- { "1" },
- { "1x" },
- { "1.1y" }
- };
- }
-
-
- @Test(dataProvider = "parseValueIllegalData", expectedExceptions = NumberFormatException.class)
- public void testParseValueIllegal(String value) {
- SizeUnit.parseValue(value);
- }
-
- @DataProvider(name = "valuesToKiloBytes")
- public Object[][] createConversionData() {
- return new Object[][] {
- { "1.0 b", 1L },
- { "1.0 kb", 1000L },
- { "1.0 kib", 1024L },
- { "1.0", 1000L },
- { "1000", 1000000L },
- { "1MB", 1000000L }
- };
- }
-
- @Test(dataProvider = "valuesToKiloBytes")
- public void testParseValueWithUnit(String value, long expectedValueInKB) {
- assertEquals(SizeUnit.parseValue(value, SizeUnit.KILO_BYTES), expectedValueInKB);
- }
-
- @DataProvider(name = "parseValueIllegalDataKB")
- public Object[][] createParseValueIllegalDataKB() {
- return new Object[][] {
- { "a.0 b" },
- { "1.a kb" },
- { "1.0 xx" },
- { "" },
- { "hello" },
- { "-1" },
- { "-1b" },
- { "1x" },
- { "1.1y" }
- };
- }
-
- @Test(dataProvider = "parseValueIllegalDataKB", expectedExceptions = NumberFormatException.class)
- public void testParseValueIllegalWithUnit(String value) {
- SizeUnit.parseValue(value, SizeUnit.KILO_BYTES);
- }
-
- @DataProvider(name = "fromBytesTestData")
- public Object[][] createFromBytesTestData() {
- return new Object[][] {
- { SizeUnit.BYTES, 1L, 1D }
- // TODO: more data
- };
- }
-
- @Test(dataProvider = "fromBytesTestData")
- public void testFromBytes(SizeUnit unit, long value, double expected) {
- assertEquals(unit.fromBytes(value), expected);
- }
-
- @DataProvider(name = "bestFitUnitExactData")
- public Object[][] createBestFitExactData() {
- return new Object[][] {
- { 0, SizeUnit.BYTES },
- { 999, SizeUnit.BYTES },
- { 1000, SizeUnit.KILO_BYTES },
- { 1024, SizeUnit.KIBI_BYTES },
- { 1025, SizeUnit.BYTES },
- { 999999, SizeUnit.BYTES },
- { 1000000, SizeUnit.MEGA_BYTES },
- { 1000001, SizeUnit.BYTES } };
- }
-
-
- @Test(dataProvider = "bestFitUnitExactData")
- public void testGetBestFitUnitExact(long valueForWhichBestFitSought, SizeUnit expectedUnit) {
- assertEquals(SizeUnit.getBestFitUnitExact(valueForWhichBestFitSought), expectedUnit);
- }
-
- @DataProvider(name = "bestFitUnitData")
- public Object[][] createBestFitData() {
- return new Object[][] {
- { 0, SizeUnit.BYTES },
- { 999, SizeUnit.BYTES },
- { 1000, SizeUnit.KILO_BYTES },
- { 1024, SizeUnit.KIBI_BYTES },
- { 1025, SizeUnit.KILO_BYTES },
- { 999999, SizeUnit.KILO_BYTES },
- { 1000000, SizeUnit.MEGA_BYTES },
- { 1000001, SizeUnit.MEGA_BYTES } };
- }
-
- @Test(dataProvider = "bestFitUnitData")
- public void testGetBestFitUnit(long valueForWhichBestFitSought, SizeUnit expectedUnit) {
- assertEquals(SizeUnit.getBestFitUnit(valueForWhichBestFitSought), expectedUnit);
- }
-
- @DataProvider(name = "longNameData")
- public Object[][] createLongNameData() {
- return new Object[][] {
- { SizeUnit.BYTES, "bytes" },
- { SizeUnit.KILO_BYTES, "kilobytes" },
- { SizeUnit.KIBI_BYTES, "kibibytes" },
- { SizeUnit.MEGA_BYTES, "megabytes" },
- { SizeUnit.MEBI_BYTES, "mebibytes" },
- { SizeUnit.GIGA_BYTES, "gigabytes" },
- { SizeUnit.GIBI_BYTES, "gibibytes" },
- { SizeUnit.TERA_BYTES, "terabytes" },
- { SizeUnit.TEBI_BYTES, "tebibytes" }
- };
- }
-
- @Test(dataProvider = "longNameData")
- public void testGetLongName(SizeUnit unit, String expectedName) {
- assertEquals(unit.getLongName(), expectedName);
- }
-
- @DataProvider(name = "shortNameData")
- public Object[][] createShortNameData() {
- return new Object[][] {
- { SizeUnit.BYTES, "b" },
- { SizeUnit.KILO_BYTES, "kb" },
- { SizeUnit.KIBI_BYTES, "kib" },
- { SizeUnit.MEGA_BYTES, "mb" },
- { SizeUnit.MEBI_BYTES, "mib" },
- { SizeUnit.GIGA_BYTES, "gb" },
- { SizeUnit.GIBI_BYTES, "gib" },
- { SizeUnit.TERA_BYTES, "tb" },
- { SizeUnit.TEBI_BYTES, "tib" }
- };
- }
-
- @Test(dataProvider = "shortNameData")
- public void testGetShortName(SizeUnit unit, String expectedShortName) {
- assertEquals(unit.getShortName(), expectedShortName);
- }
-
- @DataProvider(name = "sizeData")
- public Object[][] createSizeData() {
- return new Object[][] {
- { SizeUnit.BYTES, 1L },
- { SizeUnit.KILO_BYTES, 1000L },
- { SizeUnit.KIBI_BYTES, 1024L },
- { SizeUnit.MEGA_BYTES, (long) 1000 * 1000 },
- { SizeUnit.MEBI_BYTES, (long) 1024 * 1024 },
- { SizeUnit.GIGA_BYTES, (long) 1000 * 1000 * 1000 },
- { SizeUnit.GIBI_BYTES, (long) 1024 * 1024 * 1024 },
- { SizeUnit.TERA_BYTES, (long) 1000 * 1000 * 1000 * 1000 },
- { SizeUnit.TEBI_BYTES, (long) 1024 * 1024 * 1024 * 1024 }
- };
- }
-
- @Test(dataProvider = "sizeData")
- public void testGetSize(SizeUnit unit, long expectedSize) {
- assertEquals(unit.getSize(), expectedSize);
- }
-
- @DataProvider(name = "toBytesData")
- public Object[][] createToBytesData() {
- return new Object[][] {
- // unit to test, amount of unit in bytes, expected
- { SizeUnit.BYTES, 1D, 1L } };
- }
-
- @Test(dataProvider = "toBytesData")
- public void testToBytes(SizeUnit unit, double amountOfUnitInBytes, long expected) {
- assertEquals(unit.toBytes(amountOfUnitInBytes), expected);
- }
-
- @Test(dataProvider = "shortNameData")
- public void testToString(SizeUnit unit, String expected) {
- assertEquals(unit.toString(), expected);
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/StringPropertyDefinitionTest.java b/opendj-config/src/test/java/org/opends/server/admin/StringPropertyDefinitionTest.java
deleted file mode 100644
index 7055ccf..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/StringPropertyDefinitionTest.java
+++ /dev/null
@@ -1,76 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import static org.testng.Assert.*;
-
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class StringPropertyDefinitionTest extends ConfigTestCase {
-
- public void testValidateValueNoPattern() {
- StringPropertyDefinition d = getDefinition(true, null);
- d.validateValue("abc", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @Test
- public void testValidateValuePatternMatches() {
- StringPropertyDefinition d = getDefinition(true, "^[a-z]+$");
- d.validateValue("abc", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- // TODO : I18N problem
- @Test(enabled = false, expectedExceptions = IllegalPropertyValueException.class)
- public void testValidateValuePatternDoesNotMatch() {
- StringPropertyDefinition d = getDefinition(true, "^[a-z]+$");
- d.validateValue("abc123", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- @Test
- public void testDecodeValuePatternMatches() {
- StringPropertyDefinition d = getDefinition(true, "^[a-z]+$");
- assertEquals(d.decodeValue("abc", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS), "abc");
- }
-
- // TODO : I18N problem
- @Test(enabled = false, expectedExceptions = IllegalPropertyValueStringException.class)
- public void testDecodeValuePatternDoesNotMatch() {
- StringPropertyDefinition d = getDefinition(true, "^[a-z]+$");
- d.decodeValue("abc123", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- }
-
- // Create a string property definition.
- private StringPropertyDefinition getDefinition(boolean isCaseInsensitive, String pattern) {
- StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(RootCfgDefn.getInstance(),
- "test-property");
- builder.setCaseInsensitive(isCaseInsensitive);
- builder.setPattern(pattern, "STRING");
- return builder.getInstance();
- }
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/TestCfg.java b/opendj-config/src/test/java/org/opends/server/admin/TestCfg.java
deleted file mode 100644
index ffa88b0..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/TestCfg.java
+++ /dev/null
@@ -1,195 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.ResourceBundle;
-
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-
-/**
- * Common methods for hooking in the test components.
- */
-public final class TestCfg {
-
- /**
- * A one-to-many relation between the root and test-parent components.
- */
- private static final InstantiableRelationDefinition<TestParentCfgClient, TestParentCfg> RD_TEST_ONE_TO_MANY_PARENT;
-
- /**
- * A one-to-zero-or-one relation between the root and a test-parent
- * component.
- */
- // @Checkstyle:off
- private static final OptionalRelationDefinition<TestParentCfgClient, TestParentCfg>
- RD_TEST_ONE_TO_ZERO_OR_ONE_PARENT;
- // @Checkstyle:on
-
- // Create a one-to-many relation for test-parent components.
- static {
- InstantiableRelationDefinition.Builder<TestParentCfgClient, TestParentCfg> builder =
- new InstantiableRelationDefinition.Builder<TestParentCfgClient, TestParentCfg>(
- RootCfgDefn.getInstance(), "test-one-to-many-parent", "test-one-to-many-parents",
- TestParentCfgDefn.getInstance());
- RD_TEST_ONE_TO_MANY_PARENT = builder.getInstance();
- }
-
- // Create a one-to-many relation for test-parent components.
- static {
- OptionalRelationDefinition.Builder<TestParentCfgClient, TestParentCfg> builder =
- new OptionalRelationDefinition.Builder<TestParentCfgClient, TestParentCfg>(
- RootCfgDefn.getInstance(), "test-one-to-zero-or-one-parent", TestParentCfgDefn.getInstance());
- RD_TEST_ONE_TO_ZERO_OR_ONE_PARENT = builder.getInstance();
- }
- /**
- * Registers test parent and child object class definitions and any required
- * resource bundles.
- * <p>
- * Unit tests which call this method <b>must</b> call {@link #cleanup()} on
- * completion.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- public synchronized static void setUp() throws Exception {
- initializeAndRegisterBundle(TestParentCfgDefn.getInstance());
- initializeAndRegisterBundle(TestChildCfgDefn.getInstance());
-
- // Ensure that the relations are registered (do this after things
- // that can fail and leave tests in a bad state).
- RootCfgDefn.getInstance().registerRelationDefinition(RD_TEST_ONE_TO_MANY_PARENT);
- RootCfgDefn.getInstance().registerRelationDefinition(RD_TEST_ONE_TO_ZERO_OR_ONE_PARENT);
- LDAPProfile.getInstance().pushWrapper(new MockLDAPProfile());
- }
-
- private static void initializeAndRegisterBundle(ManagedObjectDefinition<?, ?> definition) throws Exception {
- definition.initialize();
- String baseName = definition.getClass().getName();
- ResourceBundle resourceBundle = ResourceBundle.getBundle(baseName);
- ManagedObjectDefinitionI18NResource.getInstance().setResourceBundle(definition, resourceBundle);
- }
-
- /**
- * Deregisters the test configurations from the administration framework.
- */
- public synchronized static void cleanup() {
- LDAPProfile.getInstance().popWrapper();
-
- AbstractManagedObjectDefinition<?, ?> root = RootCfgDefn.getInstance();
- root.deregisterRelationDefinition(RD_TEST_ONE_TO_MANY_PARENT);
- root.deregisterRelationDefinition(RD_TEST_ONE_TO_ZERO_OR_ONE_PARENT);
-
- TestParentCfgDefn parentDef = TestParentCfgDefn.getInstance();
- ManagedObjectDefinitionI18NResource.getInstance().removeResourceBundle(parentDef);
-
- TestChildCfgDefn childDef = TestChildCfgDefn.getInstance();
- ManagedObjectDefinitionI18NResource.getInstance().removeResourceBundle(childDef);
- }
-
- /**
- * Gets the one-to-many relation between the root and test-parent
- * components.
- * <p>
- * Unit tests which call this method <b>must</b> have already called
- * {@link #setUp()}.
- *
- * @return Returns the one-to-many relation between the root and test-parent
- * components.
- */
- // @Checkstyle:off
- public static InstantiableRelationDefinition<TestParentCfgClient, TestParentCfg>
- getTestOneToManyParentRelationDefinition() {
- return RD_TEST_ONE_TO_MANY_PARENT;
- }
- // @Checkstyle:on
-
- /**
- * Gets the one-to-zero-or-one relation between the root and a test-parent
- * component.
- * <p>
- * Unit tests which call this method <b>must</b> have already called
- * {@link #setUp()}.
- *
- * @return Returns the one-to-zero-or-one relation between the root and a
- * test-parent component.
- */
- // @Checkstyle:off
- public static OptionalRelationDefinition<TestParentCfgClient, TestParentCfg>
- getTestOneToZeroOrOneParentRelationDefinition() {
- return RD_TEST_ONE_TO_ZERO_OR_ONE_PARENT;
- }
- // @Checkstyle:on
-
- /**
- * Initializes a property definition and its default behavior.
- *
- * @param propertyDef
- * The property definition to be initialized.
- * @throws Exception
- * If the property definition could not be initialized.
- */
- public static void initializePropertyDefinition(PropertyDefinition<?> propertyDef) throws Exception {
- propertyDef.initialize();
- propertyDef.getDefaultBehaviorProvider().initialize();
- }
-
- /**
- * Adds a constraint temporarily with test child definition.
- *
- * @param constraint
- * The constraint.
- */
- public static void addConstraint(Constraint constraint) {
- TestChildCfgDefn.getInstance().registerConstraint(constraint);
- }
-
- /**
- * Adds a property definition temporarily with test child definition,
- * replacing any existing property definition with the same name.
- *
- * @param pd
- * The property definition.
- */
- public static void addPropertyDefinition(PropertyDefinition<?> pd) {
- TestChildCfgDefn.getInstance().registerPropertyDefinition(pd);
- }
-
- /**
- * Removes a constraint from the test child definition.
- *
- * @param constraint
- * The constraint.
- */
- public static void removeConstraint(Constraint constraint) {
- TestChildCfgDefn.getInstance().deregisterConstraint(constraint);
- }
-
- // Prevent instantiation.
- private TestCfg() {
- // No implementation required.
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/TestChildCfg.java b/opendj-config/src/test/java/org/opends/server/admin/TestChildCfg.java
deleted file mode 100644
index ddbac74..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/TestChildCfg.java
+++ /dev/null
@@ -1,124 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.SortedSet;
-
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.opends.server.admin.server.ConfigurationChangeListener;
-
-/**
- * A server-side interface for querying Test Child settings.
- * <p>
- * A configuration for testing components that are subordinate to a parent
- * component. It re-uses the virtual-attribute configuration LDAP profile.
- */
-public interface TestChildCfg extends Configuration {
-
- /**
- * Get the configuration class associated with this Test Child.
- *
- * @return Returns the configuration class associated with this Test Child.
- */
- Class<? extends TestChildCfg> configurationClass();
-
- /**
- * Register to be notified when this Test Child is changed.
- *
- * @param listener
- * The Test Child configuration change listener.
- */
- void addChangeListener(ConfigurationChangeListener<TestChildCfg> listener);
-
- /**
- * Deregister an existing Test Child configuration change listener.
- *
- * @param listener
- * The Test Child configuration change listener.
- */
- void removeChangeListener(ConfigurationChangeListener<TestChildCfg> listener);
-
- /**
- * Get the "aggregation-property" property.
- * <p>
- * An aggregation property which references connection handlers.
- *
- * @return Returns the values of the "aggregation-property" property.
- */
- SortedSet<String> getAggregationProperty();
-
- /**
- * Get the "mandatory-boolean-property" property.
- * <p>
- * A mandatory boolean property.
- *
- * @return Returns the value of the "mandatory-boolean-property" property.
- */
- boolean isMandatoryBooleanProperty();
-
- /**
- * Get the "mandatory-class-property" property.
- * <p>
- * A mandatory Java-class property requiring a component restart.
- *
- * @return Returns the value of the "mandatory-class-property" property.
- */
- String getMandatoryClassProperty();
-
- /**
- * Get the "mandatory-read-only-attribute-type-property" property.
- * <p>
- * A mandatory read-only attribute type property.
- *
- * @return Returns the value of the
- * "mandatory-read-only-attribute-type-property" property.
- */
- AttributeType getMandatoryReadOnlyAttributeTypeProperty();
-
- /**
- * Get the "optional-multi-valued-dn-property1" property.
- * <p>
- * An optional multi-valued DN property which inherits its values from
- * optional-multi-valued-dn-property in the parent.
- *
- * @return Returns the values of the "optional-multi-valued-dn-property1"
- * property.
- */
- SortedSet<DN> getOptionalMultiValuedDNProperty1();
-
- /**
- * Get the "optional-multi-valued-dn-property2" property.
- * <p>
- * An optional multi-valued DN property which inherits its values from
- * optional-multi-valued-dn-property1.
- *
- * @return Returns the values of the "optional-multi-valued-dn-property2"
- * property.
- */
- SortedSet<DN> getOptionalMultiValuedDNProperty2();
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/TestChildCfgClient.java b/opendj-config/src/test/java/org/opends/server/admin/TestChildCfgClient.java
deleted file mode 100644
index 6504768..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/TestChildCfgClient.java
+++ /dev/null
@@ -1,192 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.Collection;
-import java.util.SortedSet;
-
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-
-/**
- * A client-side interface for reading and modifying Test Child settings.
- * <p>
- * A configuration for testing components that are subordinate to a parent
- * component. It re-uses the virtual-attribute configuration LDAP profile.
- */
-public interface TestChildCfgClient extends ConfigurationClient {
-
- /**
- * Get the configuration definition associated with this Test Child.
- *
- * @return Returns the configuration definition associated with this Test
- * Child.
- */
- ManagedObjectDefinition<? extends TestChildCfgClient, ? extends TestChildCfg> definition();
-
- /**
- * Get the "aggregation-property" property.
- * <p>
- * An aggregation property which references connection handlers.
- *
- * @return Returns the values of the "aggregation-property" property.
- */
- SortedSet<String> getAggregationProperty();
-
- /**
- * Set the "aggregation-property" property.
- * <p>
- * An aggregation property which references connection handlers.
- *
- * @param values
- * The values of the "aggregation-property" property.
- * @throws IllegalPropertyValueException
- * If one or more of the new values are invalid.
- */
- void setAggregationProperty(Collection<String> values) throws IllegalPropertyValueException;
-
- /**
- * Get the "mandatory-boolean-property" property.
- * <p>
- * A mandatory boolean property.
- *
- * @return Returns the value of the "mandatory-boolean-property" property.
- */
- Boolean isMandatoryBooleanProperty();
-
- /**
- * Set the "mandatory-boolean-property" property.
- * <p>
- * A mandatory boolean property.
- *
- * @param value
- * The value of the "mandatory-boolean-property" property.
- * @throws IllegalPropertyValueException
- * If the new value is invalid.
- */
- void setMandatoryBooleanProperty(boolean value) throws IllegalPropertyValueException;
-
- /**
- * Get the "mandatory-class-property" property.
- * <p>
- * A mandatory Java-class property requiring a component restart.
- *
- * @return Returns the value of the "mandatory-class-property" property.
- */
- String getMandatoryClassProperty();
-
- /**
- * Set the "mandatory-class-property" property.
- * <p>
- * A mandatory Java-class property requiring a component restart.
- *
- * @param value
- * The value of the "mandatory-class-property" property.
- * @throws IllegalPropertyValueException
- * If the new value is invalid.
- */
- void setMandatoryClassProperty(String value) throws IllegalPropertyValueException;
-
- /**
- * Get the "mandatory-read-only-attribute-type-property" property.
- * <p>
- * A mandatory read-only attribute type property.
- *
- * @return Returns the value of the
- * "mandatory-read-only-attribute-type-property" property.
- */
- AttributeType getMandatoryReadOnlyAttributeTypeProperty();
-
- /**
- * Set the "mandatory-read-only-attribute-type-property" property.
- * <p>
- * A mandatory read-only attribute type property.
- * <p>
- * This property is read-only and can only be modified during creation of a
- * Test Child.
- *
- * @param value
- * The value of the "mandatory-read-only-attribute-type-property"
- * property.
- * @throws IllegalPropertyValueException
- * If the new value is invalid.
- * @throws PropertyIsReadOnlyException
- * If this Test Child is not being initialized.
- */
- void setMandatoryReadOnlyAttributeTypeProperty(AttributeType value) throws IllegalPropertyValueException,
- PropertyIsReadOnlyException;
-
- /**
- * Get the "optional-multi-valued-dn-property1" property.
- * <p>
- * An optional multi-valued DN property which inherits its values from
- * optional-multi-valued-dn-property in the parent.
- *
- * @return Returns the values of the "optional-multi-valued-dn-property1"
- * property.
- */
- SortedSet<DN> getOptionalMultiValuedDNProperty1();
-
- /**
- * Set the "optional-multi-valued-dn-property1" property.
- * <p>
- * An optional multi-valued DN property which inherits its values from
- * optional-multi-valued-dn-property in the parent.
- *
- * @param values
- * The values of the "optional-multi-valued-dn-property1"
- * property.
- * @throws IllegalPropertyValueException
- * If one or more of the new values are invalid.
- */
- void setOptionalMultiValuedDNProperty1(Collection<DN> values) throws IllegalPropertyValueException;
-
- /**
- * Get the "optional-multi-valued-dn-property2" property.
- * <p>
- * An optional multi-valued DN property which inherits its values from
- * optional-multi-valued-dn-property1.
- *
- * @return Returns the values of the "optional-multi-valued-dn-property2"
- * property.
- */
- SortedSet<DN> getOptionalMultiValuedDNProperty2();
-
- /**
- * Set the "optional-multi-valued-dn-property2" property.
- * <p>
- * An optional multi-valued DN property which inherits its values from
- * optional-multi-valued-dn-property1.
- *
- * @param values
- * The values of the "optional-multi-valued-dn-property2"
- * property.
- * @throws IllegalPropertyValueException
- * If one or more of the new values are invalid.
- */
- void setOptionalMultiValuedDNProperty2(Collection<DN> values) throws IllegalPropertyValueException;
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/TestChildCfgDefn.java b/opendj-config/src/test/java/org/opends/server/admin/TestChildCfgDefn.java
deleted file mode 100644
index ca36a77..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/TestChildCfgDefn.java
+++ /dev/null
@@ -1,477 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.Collection;
-import java.util.SortedSet;
-
-import org.forgerock.opendj.admin.client.ConnectionHandlerCfgClient;
-import org.forgerock.opendj.admin.server.ConnectionHandlerCfg;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.opends.server.admin.client.ConcurrentModificationException;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.MissingMandatoryPropertiesException;
-import org.opends.server.admin.client.OperationRejectedException;
-import org.opends.server.admin.server.ConfigurationChangeListener;
-import org.opends.server.admin.server.ServerManagedObject;
-
-/**
- * An interface for querying the Test Child managed object definition meta
- * information.
- * <p>
- * A configuration for testing components that are subordinate to a parent
- * component. It re-uses the virtual-attribute configuration LDAP profile.
- */
-public final class TestChildCfgDefn extends ManagedObjectDefinition<TestChildCfgClient, TestChildCfg> {
-
- // The singleton configuration definition instance.
- private static final TestChildCfgDefn INSTANCE = new TestChildCfgDefn();
-
- // The "aggregation-property" property definition.
- // @Checkstyle:off
- private static final AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg>
- PROPDEF_AGGREGATION_PROPERTY;
- // @Checkstyle:on
-
- // The "mandatory-boolean-property" property definition.
- private static final BooleanPropertyDefinition PROPDEF_MANDATORY_BOOLEAN_PROPERTY;
-
- // The "mandatory-class-property" property definition.
- private static final ClassPropertyDefinition PROPDEF_MANDATORY_CLASS_PROPERTY;
-
- // The "mandatory-read-only-attribute-type-property" property definition.
- private static final AttributeTypePropertyDefinition PROPDEF_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY;
-
- // The "optional-multi-valued-dn-property1" property definition.
- private static final DNPropertyDefinition PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY1;
-
- // The "optional-multi-valued-dn-property2" property definition.
- private static final DNPropertyDefinition PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY2;
-
- // Build the "aggregation-property" property definition.
- static {
- AggregationPropertyDefinition.Builder<ConnectionHandlerCfgClient, ConnectionHandlerCfg> builder =
- AggregationPropertyDefinition.createBuilder(INSTANCE, "aggregation-property");
- builder.setOption(PropertyOption.MULTI_VALUED);
- builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
- "aggregation-property"));
- builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
- builder.setParentPath("/");
- builder.setRelationDefinition("connection-handler");
- PROPDEF_AGGREGATION_PROPERTY = builder.getInstance();
- INSTANCE.registerPropertyDefinition(PROPDEF_AGGREGATION_PROPERTY);
- INSTANCE.registerConstraint(PROPDEF_AGGREGATION_PROPERTY.getSourceConstraint());
- }
-
- // Build the "mandatory-boolean-property" property definition.
- static {
- BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE,
- "mandatory-boolean-property");
- builder.setOption(PropertyOption.MANDATORY);
- builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
- "mandatory-boolean-property"));
- builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<Boolean>());
- PROPDEF_MANDATORY_BOOLEAN_PROPERTY = builder.getInstance();
- INSTANCE.registerPropertyDefinition(PROPDEF_MANDATORY_BOOLEAN_PROPERTY);
- }
-
- // Build the "mandatory-class-property" property definition.
- static {
- ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE,
- "mandatory-class-property");
- builder.setOption(PropertyOption.MANDATORY);
- builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE,
- "mandatory-class-property"));
- DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>(
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- builder.setDefaultBehaviorProvider(provider);
- builder.addInstanceOf("org.opends.server.api.VirtualAttributeProvider");
- PROPDEF_MANDATORY_CLASS_PROPERTY = builder.getInstance();
- INSTANCE.registerPropertyDefinition(PROPDEF_MANDATORY_CLASS_PROPERTY);
- }
-
- // Build the "mandatory-read-only-attribute-type-property" property
- // definition.
- static {
- AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(INSTANCE,
- "mandatory-read-only-attribute-type-property");
- builder.setOption(PropertyOption.READ_ONLY);
- builder.setOption(PropertyOption.MANDATORY);
- builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
- "mandatory-read-only-attribute-type-property"));
- builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<AttributeType>());
- PROPDEF_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY = builder.getInstance();
- INSTANCE.registerPropertyDefinition(PROPDEF_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY);
- }
-
- // Build the "optional-multi-valued-dn-property1" property definition.
- static {
- DNPropertyDefinition.Builder builder = DNPropertyDefinition.createBuilder(INSTANCE,
- "optional-multi-valued-dn-property1");
- builder.setOption(PropertyOption.MULTI_VALUED);
- builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
- "optional-multi-valued-dn-property1"));
- DefaultBehaviorProvider<DN> provider = new RelativeInheritedDefaultBehaviorProvider<DN>(
- TestParentCfgDefn.getInstance(), "optional-multi-valued-dn-property", 1);
- builder.setDefaultBehaviorProvider(provider);
- PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY1 = builder.getInstance();
- INSTANCE.registerPropertyDefinition(PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY1);
- }
-
- // Build the "optional-multi-valued-dn-property2" property definition.
- static {
- DNPropertyDefinition.Builder builder = DNPropertyDefinition.createBuilder(INSTANCE,
- "optional-multi-valued-dn-property2");
- builder.setOption(PropertyOption.MULTI_VALUED);
- builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
- "optional-multi-valued-dn-property2"));
- DefaultBehaviorProvider<DN> provider = new RelativeInheritedDefaultBehaviorProvider<DN>(
- TestChildCfgDefn.getInstance(), "optional-multi-valued-dn-property1", 0);
- builder.setDefaultBehaviorProvider(provider);
- PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY2 = builder.getInstance();
- INSTANCE.registerPropertyDefinition(PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY2);
- }
-
- /**
- * Get the Test Child configuration definition singleton.
- *
- * @return Returns the Test Child configuration definition singleton.
- */
- public static TestChildCfgDefn getInstance() {
- return INSTANCE;
- }
-
- /**
- * Private constructor.
- */
- private TestChildCfgDefn() {
- super("test-child", null);
- }
-
- /**
- * {@inheritDoc}
- */
- public TestChildCfgClient createClientConfiguration(ManagedObject<? extends TestChildCfgClient> impl) {
- return new TestChildCfgClientImpl(impl);
- }
-
- /**
- * {@inheritDoc}
- */
- public TestChildCfg createServerConfiguration(ServerManagedObject<? extends TestChildCfg> impl) {
- return new TestChildCfgServerImpl(impl);
- }
-
- /**
- * {@inheritDoc}
- */
- public Class<TestChildCfg> getServerConfigurationClass() {
- return TestChildCfg.class;
- }
-
- /**
- * Get the "aggregation-property" property definition.
- * <p>
- * An aggregation property which references connection handlers.
- *
- * @return Returns the "aggregation-property" property definition.
- */
- // @Checkstyle:off
- public AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg>
- getAggregationPropertyPropertyDefinition() {
- return PROPDEF_AGGREGATION_PROPERTY;
- }
- // @Checkstyle:on
-
- /**
- * Get the "mandatory-boolean-property" property definition.
- * <p>
- * A mandatory boolean property.
- *
- * @return Returns the "mandatory-boolean-property" property definition.
- */
- public BooleanPropertyDefinition getMandatoryBooleanPropertyPropertyDefinition() {
- return PROPDEF_MANDATORY_BOOLEAN_PROPERTY;
- }
-
- /**
- * Get the "mandatory-class-property" property definition.
- * <p>
- * A mandatory Java-class property requiring a component restart.
- *
- * @return Returns the "mandatory-class-property" property definition.
- */
- public ClassPropertyDefinition getMandatoryClassPropertyPropertyDefinition() {
- return PROPDEF_MANDATORY_CLASS_PROPERTY;
- }
-
- /**
- * Get the "mandatory-read-only-attribute-type-property" property
- * definition.
- * <p>
- * A mandatory read-only attribute type property.
- *
- * @return Returns the "mandatory-read-only-attribute-type-property"
- * property definition.
- */
- public AttributeTypePropertyDefinition getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition() {
- return PROPDEF_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY;
- }
-
- /**
- * Get the "optional-multi-valued-dn-property1" property definition.
- * <p>
- * An optional multi-valued DN property which inherits its values from
- * optional-multi-valued-dn-property in the parent.
- *
- * @return Returns the "optional-multi-valued-dn-property1" property
- * definition.
- */
- public DNPropertyDefinition getOptionalMultiValuedDNProperty1PropertyDefinition() {
- return PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY1;
- }
-
- /**
- * Get the "optional-multi-valued-dn-property2" property definition.
- * <p>
- * An optional multi-valued DN property which inherits its values from
- * optional-multi-valued-dn-property1.
- *
- * @return Returns the "optional-multi-valued-dn-property2" property
- * definition.
- */
- public DNPropertyDefinition getOptionalMultiValuedDNProperty2PropertyDefinition() {
- return PROPDEF_OPTIONAL_MULTI_VALUED_DN_PROPERTY2;
- }
-
- /**
- * Managed object client implementation.
- */
- private static class TestChildCfgClientImpl implements TestChildCfgClient {
-
- // Private implementation.
- private ManagedObject<? extends TestChildCfgClient> impl;
-
- // Private constructor.
- private TestChildCfgClientImpl(ManagedObject<? extends TestChildCfgClient> impl) {
- this.impl = impl;
- }
-
- /**
- * {@inheritDoc}
- */
- public SortedSet<String> getAggregationProperty() {
- return impl.getPropertyValues(INSTANCE.getAggregationPropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public void setAggregationProperty(Collection<String> values) {
- impl.setPropertyValues(INSTANCE.getAggregationPropertyPropertyDefinition(), values);
- }
-
- /**
- * {@inheritDoc}
- */
- public Boolean isMandatoryBooleanProperty() {
- return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public void setMandatoryBooleanProperty(boolean value) {
- impl.setPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition(), value);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getMandatoryClassProperty() {
- return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public void setMandatoryClassProperty(String value) {
- impl.setPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition(), value);
- }
-
- /**
- * {@inheritDoc}
- */
- public AttributeType getMandatoryReadOnlyAttributeTypeProperty() {
- return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public void setMandatoryReadOnlyAttributeTypeProperty(AttributeType value) throws PropertyIsReadOnlyException {
- impl.setPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition(), value);
- }
-
- /**
- * {@inheritDoc}
- */
- public SortedSet<DN> getOptionalMultiValuedDNProperty1() {
- return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty1PropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public void setOptionalMultiValuedDNProperty1(Collection<DN> values) {
- impl.setPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty1PropertyDefinition(), values);
- }
-
- /**
- * {@inheritDoc}
- */
- public SortedSet<DN> getOptionalMultiValuedDNProperty2() {
- return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty2PropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public void setOptionalMultiValuedDNProperty2(Collection<DN> values) {
- impl.setPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty2PropertyDefinition(), values);
- }
-
- /**
- * {@inheritDoc}
- */
- public ManagedObjectDefinition<? extends TestChildCfgClient, ? extends TestChildCfg> definition() {
- return INSTANCE;
- }
-
- /**
- * {@inheritDoc}
- */
- public PropertyProvider properties() {
- return impl;
- }
-
- /**
- * {@inheritDoc}
- */
- public void commit() throws ManagedObjectAlreadyExistsException, MissingMandatoryPropertiesException,
- ConcurrentModificationException, OperationRejectedException, ErrorResultException {
- impl.commit();
- }
-
- }
-
- /**
- * Managed object server implementation.
- */
- private static class TestChildCfgServerImpl implements TestChildCfg {
-
- // Private implementation.
- private ServerManagedObject<? extends TestChildCfg> impl;
-
- // Private constructor.
- private TestChildCfgServerImpl(ServerManagedObject<? extends TestChildCfg> impl) {
- this.impl = impl;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addChangeListener(ConfigurationChangeListener<TestChildCfg> listener) {
- impl.registerChangeListener(listener);
- }
-
- /**
- * {@inheritDoc}
- */
- public void removeChangeListener(ConfigurationChangeListener<TestChildCfg> listener) {
- impl.deregisterChangeListener(listener);
- }
-
- /**
- * {@inheritDoc}
- */
- public SortedSet<String> getAggregationProperty() {
- return impl.getPropertyValues(INSTANCE.getAggregationPropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isMandatoryBooleanProperty() {
- return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public String getMandatoryClassProperty() {
- return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public AttributeType getMandatoryReadOnlyAttributeTypeProperty() {
- return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public SortedSet<DN> getOptionalMultiValuedDNProperty1() {
- return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty1PropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public SortedSet<DN> getOptionalMultiValuedDNProperty2() {
- return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty2PropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public Class<? extends TestChildCfg> configurationClass() {
- return TestChildCfg.class;
- }
-
- /**
- * {@inheritDoc}
- */
- public DN dn() {
- return impl.getDN();
- }
-
- }
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/TestParentCfg.java b/opendj-config/src/test/java/org/opends/server/admin/TestParentCfg.java
deleted file mode 100644
index fbe3e84..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/TestParentCfg.java
+++ /dev/null
@@ -1,215 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.SortedSet;
-
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.opends.server.admin.server.ConfigurationAddListener;
-import org.opends.server.admin.server.ConfigurationChangeListener;
-import org.opends.server.admin.server.ConfigurationDeleteListener;
-import org.opends.server.config.spi.ConfigException;
-
-/**
- * A server-side interface for querying Test Parent settings.
- * <p>
- * A configuration for testing components that have child components. It re-uses
- * the virtual-attribute configuration LDAP profile.
- */
-public interface TestParentCfg extends Configuration {
-
- /**
- * Get the configuration class associated with this Test Parent.
- *
- * @return Returns the configuration class associated with this Test Parent.
- */
- Class<? extends TestParentCfg> configurationClass();
-
- /**
- * Register to be notified when this Test Parent is changed.
- *
- * @param listener
- * The Test Parent configuration change listener.
- */
- void addChangeListener(ConfigurationChangeListener<TestParentCfg> listener);
-
- /**
- * Deregister an existing Test Parent configuration change listener.
- *
- * @param listener
- * The Test Parent configuration change listener.
- */
- void removeChangeListener(ConfigurationChangeListener<TestParentCfg> listener);
-
- /**
- * Get the "mandatory-boolean-property" property.
- * <p>
- * A mandatory boolean property.
- *
- * @return Returns the value of the "mandatory-boolean-property" property.
- */
- boolean isMandatoryBooleanProperty();
-
- /**
- * Get the "mandatory-class-property" property.
- * <p>
- * A mandatory Java-class property requiring a component restart.
- *
- * @return Returns the value of the "mandatory-class-property" property.
- */
- String getMandatoryClassProperty();
-
- /**
- * Get the "mandatory-read-only-attribute-type-property" property.
- * <p>
- * A mandatory read-only attribute type property.
- *
- * @return Returns the value of the
- * "mandatory-read-only-attribute-type-property" property.
- */
- AttributeType getMandatoryReadOnlyAttributeTypeProperty();
-
- /**
- * Get the "optional-multi-valued-dn-property" property.
- * <p>
- * An optional multi-valued DN property with a defined default behavior.
- *
- * @return Returns the values of the "optional-multi-valued-dn-property"
- * property.
- */
- SortedSet<DN> getOptionalMultiValuedDNProperty();
-
- /**
- * Lists the Test Children.
- *
- * @return Returns an array containing the names of the Test Children.
- */
- String[] listTestChildren();
-
- /**
- * Gets the named Test Child.
- *
- * @param name
- * The name of the Test Child to retrieve.
- * @return Returns the named Test Child.
- * @throws ConfigException
- * If the Test Child could not be found or it could not be
- * successfully decoded.
- */
- TestChildCfg getTestChild(String name) throws ConfigException;
-
- /**
- * Registers to be notified when new Test Children are added.
- *
- * @param listener
- * The Test Child configuration add listener.
- * @throws ConfigException
- * If the add listener could not be registered.
- */
- void addTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener) throws ConfigException;
-
- /**
- * Deregisters an existing Test Child configuration add listener.
- *
- * @param listener
- * The Test Child configuration add listener.
- */
- void removeTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener);
-
- /**
- * Registers to be notified when existing Test Children are deleted.
- *
- * @param listener
- * The Test Child configuration delete listener.
- * @throws ConfigException
- * If the delete listener could not be registered.
- */
- void addTestChildDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener) throws ConfigException;
-
- /**
- * Deregisters an existing Test Child configuration delete listener.
- *
- * @param listener
- * The Test Child configuration delete listener.
- */
- void removeTestChildDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener);
-
- /**
- * Determines whether or not the Optional Test Child exists.
- *
- * @return Returns <true> if the Optional Test Child exists.
- */
- boolean hasOptionalTestChild();
-
- /**
- * Gets the Optional Test Child if it is present.
- *
- * @return Returns the Optional Test Child if it is present.
- * @throws ConfigException
- * If the Optional Test Child does not exist or it could not be
- * successfully decoded.
- */
- TestChildCfg getOptionalTestChild() throws ConfigException;
-
- /**
- * Registers to be notified when the Optional Test Child is added.
- *
- * @param listener
- * The Optional Test Child configuration add listener.
- * @throws ConfigException
- * If the add listener could not be registered.
- */
- void addOptionalTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener) throws ConfigException;
-
- /**
- * Deregisters an existing Optional Test Child configuration add listener.
- *
- * @param listener
- * The Optional Test Child configuration add listener.
- */
- void removeOptionalTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener);
-
- /**
- * Registers to be notified the Optional Test Child is deleted.
- *
- * @param listener
- * The Optional Test Child configuration delete listener.
- * @throws ConfigException
- * If the delete listener could not be registered.
- */
- void addOptionalChildTestDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener) throws ConfigException;
-
- /**
- * Deregisters an existing Optional Test Child configuration delete
- * listener.
- *
- * @param listener
- * The Optional Test Child configuration delete listener.
- */
- void removeOptionalTestChildDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener);
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/TestParentCfgClient.java b/opendj-config/src/test/java/org/opends/server/admin/TestParentCfgClient.java
deleted file mode 100644
index 3a05a2e..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/TestParentCfgClient.java
+++ /dev/null
@@ -1,299 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.Collection;
-import java.util.SortedSet;
-
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.opends.server.admin.client.ConcurrentModificationException;
-import org.opends.server.admin.client.IllegalManagedObjectNameException;
-import org.opends.server.admin.client.ManagedObjectDecodingException;
-import org.opends.server.admin.client.OperationRejectedException;
-
-/**
- * A client-side interface for reading and modifying Test Parent settings.
- * <p>
- * A configuration for testing components that have child components. It re-uses
- * the virtual-attribute configuration LDAP profile.
- */
-public interface TestParentCfgClient extends ConfigurationClient {
-
- /**
- * Get the configuration definition associated with this Test Parent.
- *
- * @return Returns the configuration definition associated with this Test
- * Parent.
- */
- ManagedObjectDefinition<? extends TestParentCfgClient, ? extends TestParentCfg> definition();
-
- /**
- * Get the "mandatory-boolean-property" property.
- * <p>
- * A mandatory boolean property.
- *
- * @return Returns the value of the "mandatory-boolean-property" property.
- */
- Boolean isMandatoryBooleanProperty();
-
- /**
- * Set the "mandatory-boolean-property" property.
- * <p>
- * A mandatory boolean property.
- *
- * @param value
- * The value of the "mandatory-boolean-property" property.
- * @throws IllegalPropertyValueException
- * If the new value is invalid.
- */
- void setMandatoryBooleanProperty(boolean value) throws IllegalPropertyValueException;
-
- /**
- * Get the "mandatory-class-property" property.
- * <p>
- * A mandatory Java-class property requiring a component restart.
- *
- * @return Returns the value of the "mandatory-class-property" property.
- */
- String getMandatoryClassProperty();
-
- /**
- * Set the "mandatory-class-property" property.
- * <p>
- * A mandatory Java-class property requiring a component restart.
- *
- * @param value
- * The value of the "mandatory-class-property" property.
- * @throws IllegalPropertyValueException
- * If the new value is invalid.
- */
- void setMandatoryClassProperty(String value) throws IllegalPropertyValueException;
-
- /**
- * Get the "mandatory-read-only-attribute-type-property" property.
- * <p>
- * A mandatory read-only attribute type property.
- *
- * @return Returns the value of the
- * "mandatory-read-only-attribute-type-property" property.
- */
- AttributeType getMandatoryReadOnlyAttributeTypeProperty();
-
- /**
- * Set the "mandatory-read-only-attribute-type-property" property.
- * <p>
- * A mandatory read-only attribute type property.
- * <p>
- * This property is read-only and can only be modified during creation of a
- * Test Parent.
- *
- * @param value
- * The value of the "mandatory-read-only-attribute-type-property"
- * property.
- * @throws IllegalPropertyValueException
- * If the new value is invalid.
- * @throws PropertyIsReadOnlyException
- * If this Test Parent is not being initialized.
- */
- void setMandatoryReadOnlyAttributeTypeProperty(AttributeType value) throws IllegalPropertyValueException,
- PropertyIsReadOnlyException;
-
- /**
- * Get the "optional-multi-valued-dn-property" property.
- * <p>
- * An optional multi-valued DN property with a defined default behavior.
- *
- * @return Returns the values of the "optional-multi-valued-dn-property"
- * property.
- */
- SortedSet<DN> getOptionalMultiValuedDNProperty();
-
- /**
- * Set the "optional-multi-valued-dn-property" property.
- * <p>
- * An optional multi-valued DN property with a defined default behavior.
- *
- * @param values
- * The values of the "optional-multi-valued-dn-property"
- * property.
- * @throws IllegalPropertyValueException
- * If one or more of the new values are invalid.
- */
- void setOptionalMultiValuedDNProperty(Collection<DN> values) throws IllegalPropertyValueException;
-
- /**
- * Lists the Test Children.
- *
- * @return Returns an array containing the names of the Test Children.
- * @throws ConcurrentModificationException
- * If this Test Parent has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If an error occurs
- */
- String[] listTestChildren() throws ConcurrentModificationException, ErrorResultException;
-
- /**
- * Gets the named Test Child.
- *
- * @param name
- * The name of the Test Child to retrieve.
- * @return Returns the named Test Child.
- * @throws DefinitionDecodingException
- * If the named Test Child was found but its type could not be
- * determined.
- * @throws ManagedObjectDecodingException
- * If the named Test Child was found but one or more of its
- * properties could not be decoded.
- * @throws ManagedObjectNotFoundException
- * If the named Test Child was not found on the server.
- * @throws ConcurrentModificationException
- * If this Test Parent has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If an error occurs.
- */
- TestChildCfgClient getTestChild(String name) throws DefinitionDecodingException, ManagedObjectDecodingException,
- ManagedObjectNotFoundException, ConcurrentModificationException, ErrorResultException;
-
- /**
- * Creates a new Test Child. The new Test Child will initially not contain
- * any property values (including mandatory properties). Once the Test Child
- * has been configured it can be added to the server using the
- * {@link #commit()} method.
- *
- * @param <C>
- * The type of the Test Child being created.
- * @param d
- * The definition of the Test Child to be created.
- * @param name
- * The name of the new Test Child.
- * @param exceptions
- * An optional collection in which to place any
- * {@link DefaultBehaviorException}s that occurred whilst
- * attempting to determine the default values of the Test Child.
- * This argument can be <code>null<code>.
- * @return Returns a new Test Child configuration instance.
- * @throws IllegalManagedObjectNameException
- * If the name is invalid.
- */
- <C extends TestChildCfgClient> C createTestChild(ManagedObjectDefinition<C, ? extends TestChildCfg> d, String name,
- Collection<DefaultBehaviorException> exceptions) throws IllegalManagedObjectNameException;
-
- /**
- * Removes the named Test Child.
- *
- * @param name
- * The name of the Test Child to remove.
- * @throws ManagedObjectNotFoundException
- * If the Test Child does not exist.
- * @throws OperationRejectedException
- * If the server refuses to remove the Test Child due to some
- * server-side constraint which cannot be satisfied (for
- * example, if it is referenced by another managed object).
- * @throws ConcurrentModificationException
- * If this Test Parent has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If an errors occurs.
- */
- void removeTestChild(String name) throws ManagedObjectNotFoundException, OperationRejectedException,
- ConcurrentModificationException, ErrorResultException;
-
- /**
- * Determines whether or not the Optional Test Child exists.
- *
- * @return Returns <true> if the Optional Test Child exists.
- * @throws ConcurrentModificationException
- * If this Test Parent has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If an errors occurs.
- */
- boolean hasOptionalTestChild() throws ConcurrentModificationException, ErrorResultException;
-
- /**
- * Gets the Optional Test Child if it is present.
- *
- * @return Returns the Optional Test Child if it is present.
- * @throws DefinitionDecodingException
- * If the Optional Test Child was found but its type could not
- * be determined.
- * @throws ManagedObjectDecodingException
- * If the Optional Test Child was found but one or more of its
- * properties could not be decoded.
- * @throws ManagedObjectNotFoundException
- * If the Optional Test Child is not present.
- * @throws ConcurrentModificationException
- * If this Test Parent has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If an errors occurs.
- */
- TestChildCfgClient getOptionalChild() throws DefinitionDecodingException, ManagedObjectDecodingException,
- ManagedObjectNotFoundException, ConcurrentModificationException, ErrorResultException;
-
- /**
- * Creates a new Optional Test Child. The new Optional Test Child will
- * initially not contain any property values (including mandatory
- * properties). Once the Optional Test Child has been configured it can be
- * added to the server using the {@link #commit()} method.
- *
- * @param <C>
- * The type of the Optional Test Child being created.
- * @param d
- * The definition of the Optional Test Child to be created.
- * @param exceptions
- * An optional collection in which to place any
- * {@link DefaultBehaviorException}s that occurred whilst
- * attempting to determine the default values of the Optional
- * Test Child. This argument can be <code>null<code>.
- * @return Returns a new Optional Test Child configuration instance.
- */
- <C extends TestChildCfgClient> C createOptionalTestChild(ManagedObjectDefinition<C, ? extends TestChildCfg> d,
- Collection<DefaultBehaviorException> exceptions);
-
- /**
- * Removes the Optional Test Child if it exists.
- *
- * @throws ManagedObjectNotFoundException
- * If the Optional Test Child does not exist.
- * @throws OperationRejectedException
- * If the server refuses to remove the Optional Test Child due
- * to some server-side constraint which cannot be satisfied (for
- * example, if it is referenced by another managed object).
- * @throws ConcurrentModificationException
- * If this Test Parent has been removed from the server by
- * another client.
- * @throws ErrorResultException
- * If an errors occurs.
- */
- void removeOptionalTestChild() throws ManagedObjectNotFoundException, OperationRejectedException,
- ConcurrentModificationException, ErrorResultException;
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/TestParentCfgDefn.java b/opendj-config/src/test/java/org/opends/server/admin/TestParentCfgDefn.java
deleted file mode 100644
index ab68c16..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/TestParentCfgDefn.java
+++ /dev/null
@@ -1,567 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin;
-
-import java.util.Collection;
-import java.util.SortedSet;
-
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.opends.server.admin.client.ConcurrentModificationException;
-import org.opends.server.admin.client.IllegalManagedObjectNameException;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagedObjectDecodingException;
-import org.opends.server.admin.client.MissingMandatoryPropertiesException;
-import org.opends.server.admin.client.OperationRejectedException;
-import org.opends.server.admin.server.ConfigurationAddListener;
-import org.opends.server.admin.server.ConfigurationChangeListener;
-import org.opends.server.admin.server.ConfigurationDeleteListener;
-import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.spi.ConfigException;
-
-/**
- * An interface for querying the Test Parent managed object definition meta
- * information.
- * <p>
- * A configuration for testing components that have child components. It re-uses
- * the virtual-attribute configuration LDAP profile.
- */
-public final class TestParentCfgDefn extends ManagedObjectDefinition<TestParentCfgClient, TestParentCfg> {
-
- // The singleton configuration definition instance.
- private static final TestParentCfgDefn INSTANCE = new TestParentCfgDefn();
-
- // The "mandatory-boolean-property" property definition.
- private static final BooleanPropertyDefinition PD_MANDATORY_BOOLEAN_PROPERTY;
-
- // The "mandatory-class-property" property definition.
- private static final ClassPropertyDefinition PD_MANDATORY_CLASS_PROPERTY;
-
- // The "mandatory-read-only-attribute-type-property" property definition.
- private static final AttributeTypePropertyDefinition PD_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY;
-
- // The "optional-multi-valued-dn-property" property definition.
- private static final DNPropertyDefinition PD_OPTIONAL_MULTI_VALUED_DN_PROPERTY;
-
- // The "test-children" relation definition.
- private static final InstantiableRelationDefinition<TestChildCfgClient, TestChildCfg> RD_TEST_CHILDREN;
-
- // The "optional-test-child" relation definition.
- private static final OptionalRelationDefinition<TestChildCfgClient, TestChildCfg> RD_OPTIONAL_TEST_CHILD;
-
- // Build the "mandatory-boolean-property" property definition.
- static {
- BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE,
- "mandatory-boolean-property");
- builder.setOption(PropertyOption.MANDATORY);
- builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
- "mandatory-boolean-property"));
- builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<Boolean>());
- PD_MANDATORY_BOOLEAN_PROPERTY = builder.getInstance();
- INSTANCE.registerPropertyDefinition(PD_MANDATORY_BOOLEAN_PROPERTY);
- }
-
- // Build the "mandatory-class-property" property definition.
- static {
- ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE,
- "mandatory-class-property");
- builder.setOption(PropertyOption.MANDATORY);
- builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE,
- "mandatory-class-property"));
- DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>(
- "org.opends.server.extensions.SomeVirtualAttributeProvider");
- builder.setDefaultBehaviorProvider(provider);
- builder.addInstanceOf("org.opends.server.api.VirtualAttributeProvider");
- PD_MANDATORY_CLASS_PROPERTY = builder.getInstance();
- INSTANCE.registerPropertyDefinition(PD_MANDATORY_CLASS_PROPERTY);
- }
-
- // Build the "mandatory-read-only-attribute-type-property" property
- // definition.
- static {
- AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(INSTANCE,
- "mandatory-read-only-attribute-type-property");
- builder.setOption(PropertyOption.READ_ONLY);
- builder.setOption(PropertyOption.MANDATORY);
- builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
- "mandatory-read-only-attribute-type-property"));
- builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<AttributeType>());
- PD_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY = builder.getInstance();
- INSTANCE.registerPropertyDefinition(PD_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY);
- }
-
- // Build the "optional-multi-valued-dn-property" property definition.
- static {
- DNPropertyDefinition.Builder builder = DNPropertyDefinition.createBuilder(INSTANCE,
- "optional-multi-valued-dn-property");
- builder.setOption(PropertyOption.MULTI_VALUED);
- builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE,
- "optional-multi-valued-dn-property"));
- DefaultBehaviorProvider<DN> provider = new DefinedDefaultBehaviorProvider<DN>("dc=domain1,dc=com",
- "dc=domain2,dc=com", "dc=domain3,dc=com");
- builder.setDefaultBehaviorProvider(provider);
- PD_OPTIONAL_MULTI_VALUED_DN_PROPERTY = builder.getInstance();
- INSTANCE.registerPropertyDefinition(PD_OPTIONAL_MULTI_VALUED_DN_PROPERTY);
- }
-
- // Build the "test-children" relation definition.
- static {
- InstantiableRelationDefinition.Builder<TestChildCfgClient, TestChildCfg> builder =
- new InstantiableRelationDefinition.Builder<TestChildCfgClient, TestChildCfg>(
- INSTANCE, "multiple-children", "test-children", TestChildCfgDefn.getInstance());
- RD_TEST_CHILDREN = builder.getInstance();
- INSTANCE.registerRelationDefinition(RD_TEST_CHILDREN);
- }
-
- // Build the "optional-test-child" relation definition.
- static {
- OptionalRelationDefinition.Builder<TestChildCfgClient, TestChildCfg> builder =
- new OptionalRelationDefinition.Builder<TestChildCfgClient, TestChildCfg>(
- INSTANCE, "optional-test-child", TestChildCfgDefn.getInstance());
- RD_OPTIONAL_TEST_CHILD = builder.getInstance();
- INSTANCE.registerRelationDefinition(RD_OPTIONAL_TEST_CHILD);
- }
-
- /**
- * Get the Test Parent configuration definition singleton.
- *
- * @return Returns the Test Parent configuration definition singleton.
- */
- public static TestParentCfgDefn getInstance() {
- return INSTANCE;
- }
-
- /**
- * Private constructor.
- */
- private TestParentCfgDefn() {
- super("test-parent", null);
- }
-
- /**
- * {@inheritDoc}
- */
- public TestParentCfgClient createClientConfiguration(ManagedObject<? extends TestParentCfgClient> impl) {
- return new TestParentCfgClientImpl(impl);
- }
-
- /**
- * {@inheritDoc}
- */
- public TestParentCfg createServerConfiguration(ServerManagedObject<? extends TestParentCfg> impl) {
- return new TestParentCfgServerImpl(impl);
- }
-
- /**
- * {@inheritDoc}
- */
- public Class<TestParentCfg> getServerConfigurationClass() {
- return TestParentCfg.class;
- }
-
- /**
- * Get the "mandatory-boolean-property" property definition.
- * <p>
- * A mandatory boolean property.
- *
- * @return Returns the "mandatory-boolean-property" property definition.
- */
- public BooleanPropertyDefinition getMandatoryBooleanPropertyPropertyDefinition() {
- return PD_MANDATORY_BOOLEAN_PROPERTY;
- }
-
- /**
- * Get the "mandatory-class-property" property definition.
- * <p>
- * A mandatory Java-class property requiring a component restart.
- *
- * @return Returns the "mandatory-class-property" property definition.
- */
- public ClassPropertyDefinition getMandatoryClassPropertyPropertyDefinition() {
- return PD_MANDATORY_CLASS_PROPERTY;
- }
-
- /**
- * Get the "mandatory-read-only-attribute-type-property" property
- * definition.
- * <p>
- * A mandatory read-only attribute type property.
- *
- * @return Returns the "mandatory-read-only-attribute-type-property"
- * property definition.
- */
- public AttributeTypePropertyDefinition getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition() {
- return PD_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY;
- }
-
- /**
- * Get the "optional-multi-valued-dn-property" property definition.
- * <p>
- * An optional multi-valued DN property with a defined default behavior.
- *
- * @return Returns the "optional-multi-valued-dn-property" property
- * definition.
- */
- public DNPropertyDefinition getOptionalMultiValuedDNPropertyPropertyDefinition() {
- return PD_OPTIONAL_MULTI_VALUED_DN_PROPERTY;
- }
-
- /**
- * Get the "test-children" relation definition.
- *
- * @return Returns the "test-children" relation definition.
- */
- public InstantiableRelationDefinition<TestChildCfgClient, TestChildCfg> getTestChildrenRelationDefinition() {
- return RD_TEST_CHILDREN;
- }
-
- /**
- * Get the "optional-test-child" relation definition.
- *
- * @return Returns the "optional-test-child" relation definition.
- */
- public OptionalRelationDefinition<TestChildCfgClient, TestChildCfg> getOptionalTestChildRelationDefinition() {
- return RD_OPTIONAL_TEST_CHILD;
- }
-
- /**
- * Managed object client implementation.
- */
- private static class TestParentCfgClientImpl implements TestParentCfgClient {
-
- // Private implementation.
- private ManagedObject<? extends TestParentCfgClient> impl;
-
- // Private constructor.
- private TestParentCfgClientImpl(ManagedObject<? extends TestParentCfgClient> impl) {
- this.impl = impl;
- }
-
- /**
- * {@inheritDoc}
- */
- public Boolean isMandatoryBooleanProperty() {
- return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public void setMandatoryBooleanProperty(boolean value) {
- impl.setPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition(), value);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getMandatoryClassProperty() {
- return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public void setMandatoryClassProperty(String value) {
- impl.setPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition(), value);
- }
-
- /**
- * {@inheritDoc}
- */
- public AttributeType getMandatoryReadOnlyAttributeTypeProperty() {
- return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public void setMandatoryReadOnlyAttributeTypeProperty(AttributeType value) throws PropertyIsReadOnlyException {
- impl.setPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition(), value);
- }
-
- /**
- * {@inheritDoc}
- */
- public SortedSet<DN> getOptionalMultiValuedDNProperty() {
- return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNPropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public void setOptionalMultiValuedDNProperty(Collection<DN> values) {
- impl.setPropertyValues(INSTANCE.getOptionalMultiValuedDNPropertyPropertyDefinition(), values);
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] listTestChildren() throws ConcurrentModificationException, ErrorResultException {
- return impl.listChildren(INSTANCE.getTestChildrenRelationDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public TestChildCfgClient getTestChild(String name) throws DefinitionDecodingException,
- ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
- ErrorResultException {
- return impl.getChild(INSTANCE.getTestChildrenRelationDefinition(), name).getConfiguration();
- }
-
- /**
- * {@inheritDoc}
- */
- public <M extends TestChildCfgClient> M createTestChild(ManagedObjectDefinition<M, ? extends TestChildCfg> d,
- String name, Collection<DefaultBehaviorException> exceptions) throws IllegalManagedObjectNameException {
- return impl.createChild(INSTANCE.getTestChildrenRelationDefinition(), d, name, exceptions)
- .getConfiguration();
- }
-
- /**
- * {@inheritDoc}
- */
- public void removeTestChild(String name) throws ManagedObjectNotFoundException,
- ConcurrentModificationException, OperationRejectedException, ErrorResultException {
- impl.removeChild(INSTANCE.getTestChildrenRelationDefinition(), name);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean hasOptionalTestChild() throws ConcurrentModificationException, ErrorResultException {
- return impl.hasChild(INSTANCE.getOptionalTestChildRelationDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public TestChildCfgClient getOptionalChild() throws DefinitionDecodingException,
- ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
- ErrorResultException {
- return impl.getChild(INSTANCE.getOptionalTestChildRelationDefinition()).getConfiguration();
- }
-
- /**
- * {@inheritDoc}
- */
- public <M extends TestChildCfgClient> M createOptionalTestChild(
- ManagedObjectDefinition<M, ? extends TestChildCfg> d, Collection<DefaultBehaviorException> exceptions) {
- return impl.createChild(INSTANCE.getOptionalTestChildRelationDefinition(), d, exceptions)
- .getConfiguration();
- }
-
- /**
- * {@inheritDoc}
- */
- public void removeOptionalTestChild() throws ManagedObjectNotFoundException, ConcurrentModificationException,
- OperationRejectedException, ErrorResultException {
- impl.removeChild(INSTANCE.getOptionalTestChildRelationDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public ManagedObjectDefinition<? extends TestParentCfgClient, ? extends TestParentCfg> definition() {
- return INSTANCE;
- }
-
- /**
- * {@inheritDoc}
- */
- public PropertyProvider properties() {
- return impl;
- }
-
- /**
- * {@inheritDoc}
- */
- public void commit() throws ManagedObjectAlreadyExistsException, MissingMandatoryPropertiesException,
- ConcurrentModificationException, OperationRejectedException, ErrorResultException {
- impl.commit();
- }
-
- }
-
- /**
- * Managed object server implementation.
- */
- private static class TestParentCfgServerImpl implements TestParentCfg {
-
- // Private implementation.
- private ServerManagedObject<? extends TestParentCfg> impl;
-
- // Private constructor.
- private TestParentCfgServerImpl(ServerManagedObject<? extends TestParentCfg> impl) {
- this.impl = impl;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addChangeListener(ConfigurationChangeListener<TestParentCfg> listener) {
- impl.registerChangeListener(listener);
- }
-
- /**
- * {@inheritDoc}
- */
- public void removeChangeListener(ConfigurationChangeListener<TestParentCfg> listener) {
- impl.deregisterChangeListener(listener);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isMandatoryBooleanProperty() {
- return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public String getMandatoryClassProperty() {
- return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public AttributeType getMandatoryReadOnlyAttributeTypeProperty() {
- return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public SortedSet<DN> getOptionalMultiValuedDNProperty() {
- return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNPropertyPropertyDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] listTestChildren() {
- return impl.listChildren(INSTANCE.getTestChildrenRelationDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public TestChildCfg getTestChild(String name) throws ConfigException {
- return impl.getChild(INSTANCE.getTestChildrenRelationDefinition(), name).getConfiguration();
- }
-
- /**
- * {@inheritDoc}
- */
- public void addTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener) throws ConfigException {
- impl.registerAddListener(INSTANCE.getTestChildrenRelationDefinition(), listener);
- }
-
- /**
- * {@inheritDoc}
- */
- public void removeTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener) {
- impl.deregisterAddListener(INSTANCE.getTestChildrenRelationDefinition(), listener);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addTestChildDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener)
- throws ConfigException {
- impl.registerDeleteListener(INSTANCE.getTestChildrenRelationDefinition(), listener);
- }
-
- /**
- * {@inheritDoc}
- */
- public void removeTestChildDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener) {
- impl.deregisterDeleteListener(INSTANCE.getTestChildrenRelationDefinition(), listener);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean hasOptionalTestChild() {
- return impl.hasChild(INSTANCE.getOptionalTestChildRelationDefinition());
- }
-
- /**
- * {@inheritDoc}
- */
- public TestChildCfg getOptionalTestChild() throws ConfigException {
- return impl.getChild(INSTANCE.getOptionalTestChildRelationDefinition()).getConfiguration();
- }
-
- /**
- * {@inheritDoc}
- */
- public void addOptionalTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener)
- throws ConfigException {
- impl.registerAddListener(INSTANCE.getOptionalTestChildRelationDefinition(), listener);
- }
-
- /**
- * {@inheritDoc}
- */
- public void removeOptionalTestChildAddListener(ConfigurationAddListener<TestChildCfg> listener) {
- impl.deregisterAddListener(INSTANCE.getOptionalTestChildRelationDefinition(), listener);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addOptionalChildTestDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener)
- throws ConfigException {
- impl.registerDeleteListener(INSTANCE.getOptionalTestChildRelationDefinition(), listener);
- }
-
- /**
- * {@inheritDoc}
- */
- public void removeOptionalTestChildDeleteListener(ConfigurationDeleteListener<TestChildCfg> listener) {
- impl.deregisterDeleteListener(INSTANCE.getOptionalTestChildRelationDefinition(), listener);
- }
-
- /**
- * {@inheritDoc}
- */
- public Class<? extends TestParentCfg> configurationClass() {
- return TestParentCfg.class;
- }
-
- /**
- * {@inheritDoc}
- */
- public DN dn() {
- return impl.getDN();
- }
-
- }
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/TestTopCfgDefnTest.java b/opendj-config/src/test/java/org/opends/server/admin/TestTopCfgDefnTest.java
deleted file mode 100644
index aaafbfc..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/TestTopCfgDefnTest.java
+++ /dev/null
@@ -1,108 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-
-package org.opends.server.admin;
-
-import static org.fest.assertions.Assertions.*;
-import static org.testng.Assert.*;
-
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.testng.annotations.Test;
-
-
-@SuppressWarnings("javadoc")
-@Test(singleThreaded = true)
-public class TestTopCfgDefnTest extends ConfigTestCase {
-
- @Test
- public void testGetInstance() {
- assertNotNull(TopCfgDefn.getInstance());
- }
-
- @Test
- public void testGetName() {
- assertEquals(TopCfgDefn.getInstance().getName(), "top");
- }
-
- @Test
- public void testGetAllPropertyDefinitionsIsEmpty() {
- assertTrue(TopCfgDefn.getInstance().getAllPropertyDefinitions().isEmpty());
- }
-
- @Test
- public void testGetAllRelationDefinitionsIsEmpty() {
- assertTrue(TopCfgDefn.getInstance().getAllRelationDefinitions().isEmpty());
- }
-
- @Test
- public void testGetAllConstraintsIsEmpty() {
- assertTrue(TopCfgDefn.getInstance().getAllConstraints().isEmpty());
- }
-
- @Test
- public void testGetAllTagsIsEmpty() {
- assertTrue(TopCfgDefn.getInstance().getAllTags().isEmpty());
- }
-
- @Test
- public void testGetParentReturnNull() {
- assertNull(TopCfgDefn.getInstance().getParent());
- }
-
- @Test
- public void testIsTop() {
- assertTrue(TopCfgDefn.getInstance().isTop());
- }
-
- @Test(expectedExceptions = UnsupportedOperationException.class)
- public void testGetSynopsis() {
- assertNotNull(TopCfgDefn.getInstance().getSynopsis());
- }
-
- @Test(expectedExceptions = UnsupportedOperationException.class)
- public void testGetDescription() {
- assertNotNull(TopCfgDefn.getInstance().getDescription());
- }
-
- @Test(expectedExceptions = UnsupportedOperationException.class)
- public void testGetUserFriendlyName() {
- assertNotNull(TopCfgDefn.getInstance().getUserFriendlyName());
- }
-
- @Test(expectedExceptions = UnsupportedOperationException.class)
- public void testGetUserFriendlyPluralName() {
- assertNotNull(TopCfgDefn.getInstance().getUserFriendlyPluralName());
- }
-
- @Test
- public void testGetAllChildren() {
- // load RootCfgDef as child of TopCfgDef, and load all children of RootCfgDef as well
- RootCfgDefn.getInstance();
- assertThat(TopCfgDefn.getInstance().getAllChildren()).isNotEmpty();
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/ValidateConfigDefinitionsTest.java b/opendj-config/src/test/java/org/opends/server/admin/ValidateConfigDefinitionsTest.java
deleted file mode 100644
index 0592071..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/ValidateConfigDefinitionsTest.java
+++ /dev/null
@@ -1,218 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- * Portions copyright 2011 ForgeRock AS
- */
-package org.opends.server.admin;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.forgerock.opendj.config.ConfigTestCase;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.forgerock.opendj.ldap.schema.ObjectClass;
-import org.forgerock.opendj.ldap.schema.Schema;
-import org.testng.Assert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-@Test(singleThreaded = true)
-public class ValidateConfigDefinitionsTest extends ConfigTestCase {
-
- private static final String EOL = System.getProperty("line.separator");
-
- @BeforeClass
- public void setup() throws Exception {
- TestCfg.setUp();
- }
-
- @AfterClass
- public void tearDown() {
- TestCfg.cleanup();
- }
-
- @DataProvider
- Object[][] enumerateManageObjectDefns() throws Exception {
- TopCfgDefn topCfgDefn = TopCfgDefn.getInstance();
- List<AbstractManagedObjectDefinition<?, ?>> allCfgDefns =
- new ArrayList<AbstractManagedObjectDefinition<?, ?>>(topCfgDefn.getAllChildren());
-
- Object[][] params = new Object[allCfgDefns.size()][];
- for (int i = 0; i < params.length; i++) {
- params[i] = new Object[] { allCfgDefns.get(i) };
- }
- System.out.println(params.length);
- return params;
- }
-
- // Exceptions to config objects having a different objectclass
- private static final List<String> CLASS_OBJECT_CLASS_EXCEPTIONS = Arrays.asList(new String[] {
- "org.opends.server.admin.std.meta.RootCfgDefn", "org.opends.server.admin.std.meta.GlobalCfgDefn", });
-
- // TODO : does not work because can't retrieve object class objects
- @Test(enabled = false, dataProvider = "enumerateManageObjectDefns")
- public void validateConfigObjectDefinitions(AbstractManagedObjectDefinition<?, ?> objectDef) {
- String objName = objectDef.getName();
- StringBuilder errors = new StringBuilder();
- Collection<PropertyDefinition<?>> allPropertyDefs = objectDef.getAllPropertyDefinitions();
-
- LDAPProfile ldapProfile = LDAPProfile.getInstance();
- String ldapObjectclassName = ldapProfile.getObjectClass(objectDef);
- if (ldapObjectclassName == null) {
- errors.append("There is no objectclass definition for configuration object " + objName);
- } else {
- String expectedObjectClass = "ds-cfg-" + objName;
- if (!ldapObjectclassName.equals(expectedObjectClass)
- && !CLASS_OBJECT_CLASS_EXCEPTIONS.contains(objectDef.getClass().getName())) {
- errors.append(
- "For config object " + objName + ", the LDAP objectclass must be " + expectedObjectClass
- + " instead of " + ldapObjectclassName).append(EOL + EOL);
- }
- }
- ObjectClass configObjectClass =
- Schema.getDefaultSchema().asNonStrictSchema().getObjectClass(ldapObjectclassName.toLowerCase());
-
- for (PropertyDefinition<?> propDef : allPropertyDefs) {
- validatePropertyDefinition(objectDef, configObjectClass, propDef, errors);
- }
-
- if (errors.length() > 0) {
- Assert.fail("The configuration definition for " + objectDef.getName() + " has the following problems: "
- + EOL + errors.toString());
- }
- }
-
- // Exceptions to properties ending in -class being exactly 'java-class'.
- private static final List<String> CLASS_PROPERTY_EXCEPTIONS = Arrays.asList(new String[] {
- // e.g. "prop-name-ending-with-class"
- });
-
- // Exceptions to properties ending in -enabled being exactly 'enabled'.
- private static final List<String> ENABLED_PROPERTY_EXCEPTIONS = Arrays.asList(new String[] {
- "index-filter-analyzer-enabled", "subordinate-indexes-enabled"
- // e.g. "prop-name-ending-with-enabled"
- });
-
- // Exceptions to properties not starting with the name of their config
- // object
- private static final List<String> OBJECT_PREFIX_PROPERTY_EXCEPTIONS = Arrays.asList(new String[] { "backend-id",
- "plugin-type", "replication-server-id", "network-group-id", "workflow-id", "workflow-element-id",
- "workflow-element"
- // e.g. "prop-name-starting-with-object-prefix"
- });
-
- private void validatePropertyDefinition(AbstractManagedObjectDefinition<?, ?> objectDef,
- ObjectClass configObjectClass, PropertyDefinition<?> propDef, StringBuilder errors) {
- String objName = objectDef.getName();
- String propName = propDef.getName();
-
- // We want class properties to be exactly java-class
- if (propName.endsWith("-class") && !propName.equals("java-class")
- && !CLASS_PROPERTY_EXCEPTIONS.contains(propName)) {
- errors.append("The " + propName + " property on config object " + objName
- + " should probably be java-class. If not, then add " + propName
- + " to the CLASS_PROPERTY_EXCEPTIONS array in " + ValidateConfigDefinitionsTest.class.getName()
- + " to suppress" + " this warning.");
- }
-
- // We want enabled properties to be exactly enabled
- if (propName.endsWith("-enabled") && !ENABLED_PROPERTY_EXCEPTIONS.contains(propName)) {
- errors.append("The " + propName + " property on config object " + objName
- + " should probably be just 'enabled'. If not, then add " + propName
- + " to the ENABLED_PROPERTY_EXCEPTIONS array in " + ValidateConfigDefinitionsTest.class.getName()
- + " to suppress" + " this warning.");
- }
-
- // It's redundant for properties to be prefixed with the name of their
- // objecty
- if (propName.startsWith(objName) && !propName.equals(objName)
- && !OBJECT_PREFIX_PROPERTY_EXCEPTIONS.contains(propName)) {
- errors.append("The " + propName + " property on config object " + objName
- + " should not be prefixed with the name of the config object because"
- + " this is redundant. If you disagree, then add " + propName
- + " to the OBJECT_PREFIX_PROPERTY_EXCEPTIONS array in "
- + ValidateConfigDefinitionsTest.class.getName() + " to suppress" + " this warning.");
- }
-
- LDAPProfile ldapProfile = LDAPProfile.getInstance();
- String ldapAttrName = ldapProfile.getAttributeName(objectDef, propDef);
-
- // LDAP attribute name is consistent with the property name
- String expectedLdapAttr = "ds-cfg-" + propName;
- if (!ldapAttrName.equals(expectedLdapAttr)) {
- errors.append(
- "For the " + propName + " property on config object " + objName + ", the LDAP attribute must be "
- + expectedLdapAttr + " instead of " + ldapAttrName).append(EOL + EOL);
- }
-
- Schema schema = Schema.getDefaultSchema();
- AttributeType attrType = schema.getAttributeType(ldapAttrName.toLowerCase());
-
- // LDAP attribute exists
- if (attrType == null) {
- errors.append(
- propName + " property on config object " + objName + " is declared" + " to use ldap attribute "
- + ldapAttrName + ", but this attribute is not in the schema ").append(EOL + EOL);
- } else {
-
- // LDAP attribute is multivalued if the property is multivalued
- if (propDef.hasOption(PropertyOption.MULTI_VALUED) && attrType.isSingleValue()) {
- errors.append(
- propName + " property on config object " + objName + " is declared"
- + " as multi-valued, but the corresponding ldap attribute " + ldapAttrName
- + " is declared as single-valued.").append(EOL + EOL);
- }
-
- if (configObjectClass != null) {
- // If it's mandatory in the schema, it must be mandatory on the
- // config property
- Set<AttributeType> mandatoryAttributes = configObjectClass.getRequiredAttributes();
- if (mandatoryAttributes.contains(attrType) && !propDef.hasOption(PropertyOption.MANDATORY)) {
- errors.append(
- propName + " property on config object " + objName + " is not declared"
- + " as mandatory even though the corresponding ldap attribute " + ldapAttrName
- + " is declared as mandatory in the schema.").append(EOL + EOL);
- }
-
- Set<AttributeType> allowedAttributes = new HashSet<AttributeType>(mandatoryAttributes);
- allowedAttributes.addAll(configObjectClass.getOptionalAttributes());
- if (!allowedAttributes.contains(attrType)) {
- errors.append(
- propName + " property on config object " + objName + " has"
- + " the corresponding ldap attribute " + ldapAttrName
- + ", but this attribute is not an allowed attribute on the configuration "
- + " object's objectclass " + configObjectClass.getNameOrOID()).append(EOL + EOL);
- }
- }
- }
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java b/opendj-config/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java
deleted file mode 100644
index 9a4d727..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java
+++ /dev/null
@@ -1,337 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client.ldap;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.forgerock.opendj.admin.client.RootCfgClient;
-import org.opends.server.admin.AdminTestCase;
-import org.opends.server.admin.IllegalPropertyValueStringException;
-import org.opends.server.admin.LDAPProfile;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.PropertyException;
-import org.opends.server.admin.TestCfg;
-import org.opends.server.admin.TestChildCfgClient;
-import org.opends.server.admin.TestChildCfgDefn;
-import org.opends.server.admin.TestParentCfgClient;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagedObjectDecodingException;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.core.DirectoryServer;
-import org.testng.Assert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-@Test(singleThreaded = true)
-public class AggregationClientTest extends AdminTestCase {
-
- // Test LDIF.
- private static final String[] TEST_LDIF = new String[] {
- // Base entries.
- "dn: cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: config",
- "",
- "dn: cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: test-parents",
- "",
- // Parent 1 - uses default values for
- // optional-multi-valued-dn-property.
- "dn: cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-parent-dummy",
- "cn: test parent 1",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "",
- // Child base entry.
- "dn:cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: multiple children",
- "",
- // Child 1 has no references.
- "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 1",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "",
- // Child 2 has a single valid reference.
- "dn: cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 2",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=connection handlers, cn=config",
- "",
- // Child 3 has a multiple valid references.
- "dn: cn=test child 3,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 3",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=connection handlers, cn=config",
- "ds-cfg-rotation-policy: cn=LDAPS Connection Handler, cn=connection handlers, cn=config",
- "",
- // Child 4 has a single bad reference.
- "dn: cn=test child 4,cn=test children,cn=test parent 1,cn=test parents,cn=config", "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy", "cn: test child 4", "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=bad rdn, cn=config",
- "",
- "dn: cn=Connection Handlers,cn=config",
- "objectClass: top",
- "objectClass: ds-cfg-branch",
- "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-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler",
- "ds-cfg-enabled: true",
- "ds-cfg-listen-address: 0.0.0.0", "ds-cfg-listen-port: 389",
- "",
- "dn: cn=HTTP Connection Handler,cn=Connection Handlers,cn=config",
- "objectClass: top",
- "objectClass: ds-cfg-connection-handler",
- "objectClass: ds-cfg-http-connection-handler",
- "cn: HTTP Connection Handler",
- "ds-cfg-java-class: org.opends.server.protocols.http.HTTPConnectionHandler",
- "ds-cfg-enabled: false",
- "ds-cfg-listen-address: 0.0.0.0",
- "ds-cfg-listen-port: 8080",
- "",
- "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-java-class: org.opends.server.protocols.jmx.JmxConnectionHandler",
- "ds-cfg-enabled: false",
- "ds-cfg-listen-port: 1689",
- "" };
-
- @BeforeClass
- public void setUp() throws Exception {
- TestCfg.setUp();
- }
-
- /**
- * Tears down test environment.
- */
- @AfterClass
- public void tearDown() {
- TestCfg.cleanup();
- }
-
- /**
- * Tests that aggregation contains no values when it contains does not
- * contain any DN attribute values.
- *
- * @throws Exception
- * If the test unexpectedly fails.
- */
- @Test
- public void testAggregationEmpty() throws Exception {
- MockLDAPConnection c = new MockLDAPConnection();
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.getTestChild("test child 1");
- assertSetEquals(child.getAggregationProperty(), new String[0]);
- }
-
- /**
- * Tests that aggregation contains single valid value when it contains a
- * single valid DN attribute values.
- *
- * @throws Exception
- * If the test unexpectedly fails.
- */
- @Test
- public void testAggregationSingle() throws Exception {
- MockLDAPConnection c = new MockLDAPConnection();
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.getTestChild("test child 2");
-
- // Test normalization.
- assertSetEquals(child.getAggregationProperty(), "LDAP Connection Handler");
- assertSetEquals(child.getAggregationProperty(), " LDAP Connection Handler ");
- assertSetEquals(child.getAggregationProperty(), " ldap connection HANDLER ");
- }
-
- /**
- * Tests that aggregation contains multiple valid values when it contains a
- * multiple valid DN attribute values.
- *
- * @throws Exception
- * If the test unexpectedly fails.
- */
- @Test
- public void testAggregationMultiple() throws Exception {
- MockLDAPConnection c = new MockLDAPConnection();
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.getTestChild("test child 3");
- assertSetEquals(child.getAggregationProperty(), "LDAPS Connection Handler", "LDAP Connection Handler");
- }
-
- /**
- * Tests that aggregation is rejected when the LDAP DN contains a valid RDN
- * but an invalid parent DN.
- *
- * @throws Exception
- * If the test unexpectedly fails.
- */
- @Test
- public void testAggregationBadBaseDN() throws Exception {
- MockLDAPConnection c = new MockLDAPConnection();
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
-
- try {
- parent.getTestChild("test child 4");
- Assert.fail("Unexpectedly retrieved test child 4" + " when it had a bad aggregation value");
- } catch (ManagedObjectDecodingException e) {
- Collection<PropertyException> causes = e.getCauses();
- Assert.assertEquals(causes.size(), 1);
-
- Throwable cause = causes.iterator().next();
- if (cause instanceof IllegalPropertyValueStringException) {
- IllegalPropertyValueStringException pe = (IllegalPropertyValueStringException) cause;
- Assert.assertEquals(pe.getPropertyDefinition(), TestChildCfgDefn.getInstance()
- .getAggregationPropertyPropertyDefinition());
- Assert.assertEquals(pe.getIllegalValueString(), "cn=LDAP Connection Handler, cn=bad rdn, cn=config");
- } else {
- // Got an unexpected cause.
- throw e;
- }
- }
- }
-
- /**
- * Tests creation of a child managed object with a single reference.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testCreateChildManagedObject() throws Exception {
- CreateEntryMockLDAPConnection c = new CreateEntryMockLDAPConnection(
- "cn=test child new,cn=test children,cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- c.addExpectedAttribute("cn", "test child new");
- c.addExpectedAttribute("objectClass", "top", "ds-cfg-test-child-dummy");
- c.addExpectedAttribute("ds-cfg-enabled", "true");
- c.addExpectedAttribute("ds-cfg-java-class",
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- c.addExpectedAttribute("ds-cfg-attribute-type", "description");
- c.addExpectedAttribute("ds-cfg-rotation-policy",
- "cn=LDAP Connection Handler,cn=connection handlers, cn=config");
-
- ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
- child.setMandatoryBooleanProperty(true);
- child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
- child.setAggregationProperty(Collections.singleton("LDAP Connection Handler"));
- child.commit();
-
- c.assertEntryIsCreated();
- }
-
- /**
- * Tests modification of a child managed object so that it has a different
- * reference.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testModifyChildManagedObject() throws Exception {
- ModifyEntryMockLDAPConnection c = new ModifyEntryMockLDAPConnection(
- "cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- c.addExpectedModification("ds-cfg-rotation-policy",
- "cn=HTTP Connection Handler,cn=connection handlers, cn=config",
- "cn=JMX Connection Handler,cn=connection handlers, cn=config");
- ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.getTestChild("test child 2");
- child.setAggregationProperty(Arrays.asList("JMX Connection Handler", "HTTP Connection Handler"));
- child.commit();
- Assert.assertTrue(c.isEntryModified());
- }
-
- // Retrieve the named test parent managed object.
- private TestParentCfgClient getTestParent(ManagementContext context, String name) throws Exception {
- ManagedObject<RootCfgClient> root = context.getRootConfigurationManagedObject();
- return root.getChild(TestCfg.getTestOneToManyParentRelationDefinition(), name).getConfiguration();
- }
-
- // Asserts that the actual set of DNs contains the expected values.
- private void assertSetEquals(SortedSet<String> actual, String... expected) {
- SortedSet<String> values = new TreeSet<String>(TestChildCfgDefn.getInstance()
- .getAggregationPropertyPropertyDefinition());
- if (expected != null) {
- for (String value : expected) {
- values.add(value);
- }
- }
- Assert.assertEquals((Object) actual, (Object) values);
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/CreateEntryMockLDAPConnection.java b/opendj-config/src/test/java/org/opends/server/admin/client/ldap/CreateEntryMockLDAPConnection.java
deleted file mode 100644
index b82b808..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/CreateEntryMockLDAPConnection.java
+++ /dev/null
@@ -1,111 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client.ldap;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.forgerock.opendj.ldap.Attribute;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.Entry;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.util.Reject;
-import org.testng.Assert;
-
-/**
- * A mock LDAP connection which is used to verify that an add operation was
- * requested and that it has the correct parameters.
- */
-public final class CreateEntryMockLDAPConnection extends MockLDAPConnection {
-
- // Detect multiple calls.
- private boolean alreadyAdded = false;
-
- // The expected set of attributes (attribute name -> list of
- // values).
- private final Map<String, List<String>> attributes = new HashMap<String, List<String>>();
-
- // The expected DN.
- private final DN expectedDN;
-
- /**
- * Create a new mock ldap connection for detecting add operations.
- *
- * @param dn
- * The expected DN of the entry to be added.
- */
- public CreateEntryMockLDAPConnection(String dn) {
- this.expectedDN = DN.valueOf(dn);
- }
-
- /**
- * Add an attribute which should be part of the add operation.
- *
- * @param expectedName
- * The name of the expected attribute.
- * @param expectedValues
- * The attribute's expected values (never empty).
- */
- public void addExpectedAttribute(String expectedName, String... expectedValues) {
- Reject.ifNull(expectedName);
- Reject.ifNull(expectedValues);
- Reject.ifFalse(expectedValues.length > 0, "should have at least one expected value");
- attributes.put(expectedName, Arrays.asList(expectedValues));
- }
-
- /**
- * Asserts that the entry was created.
- */
- public void assertEntryIsCreated() {
- Assert.assertTrue(alreadyAdded);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void createEntry(Entry entry) throws ErrorResultException {
- Assert.assertFalse(alreadyAdded);
- Assert.assertEquals(entry.getName(), expectedDN);
-
- Map<String, List<String>> expected = new HashMap<String, List<String>>(this.attributes);
- for (Attribute attribute : entry.getAllAttributes()) {
- String attrName = attribute.getAttributeDescription().getAttributeType().getNameOrOID();
- List<String> values = expected.remove(attrName);
- if (values == null) {
- Assert.fail("Unexpected attribute " + attrName);
- }
- assertAttributeEquals(attribute, values);
- }
- if (!expected.isEmpty()) {
- Assert.fail("Missing expected attributes: " + expected.keySet());
- }
-
- alreadyAdded = true;
- }
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/DeleteSubtreeMockLDAPConnection.java b/opendj-config/src/test/java/org/opends/server/admin/client/ldap/DeleteSubtreeMockLDAPConnection.java
deleted file mode 100644
index aa980df..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/DeleteSubtreeMockLDAPConnection.java
+++ /dev/null
@@ -1,70 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client.ldap;
-
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.testng.Assert;
-
-/**
- * A mock LDAP connection which is used to verify that a delete subtree takes
- * place.
- */
-public final class DeleteSubtreeMockLDAPConnection extends MockLDAPConnection {
-
- // Detect multiple calls.
- private boolean alreadyDeleted = false;
-
- // The expected DN.
- private final DN expectedDN;
-
- /**
- * Create a new mock ldap connection for detecting subtree deletes.
- *
- * @param dn
- * The expected subtree DN.
- */
- public DeleteSubtreeMockLDAPConnection(String dn) {
- this.expectedDN = DN.valueOf(dn);
- }
-
- /**
- * Asserts that the subtree was deleted.
- */
- public void assertSubtreeIsDeleted() {
- Assert.assertTrue(alreadyDeleted);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void deleteSubtree(DN dn) throws ErrorResultException {
- Assert.assertFalse(alreadyDeleted);
- Assert.assertEquals(dn, expectedDN);
- alreadyDeleted = true;
- }
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/LDAPClientTest.java b/opendj-config/src/test/java/org/opends/server/admin/client/ldap/LDAPClientTest.java
deleted file mode 100644
index 8194638..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/LDAPClientTest.java
+++ /dev/null
@@ -1,943 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client.ldap;
-
-import static org.fest.assertions.Assertions.*;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.SortedSet;
-
-import org.forgerock.opendj.admin.client.RootCfgClient;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.Entry;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.opendj.ldap.ResultCode;
-import org.forgerock.opendj.ldap.responses.SearchResultEntry;
-import org.opends.server.admin.AdminTestCase;
-import org.opends.server.admin.Constraint;
-import org.opends.server.admin.LDAPProfile;
-import org.opends.server.admin.ManagedObjectAlreadyExistsException;
-import org.opends.server.admin.ManagedObjectNotFoundException;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.TestCfg;
-import org.opends.server.admin.TestChildCfgClient;
-import org.opends.server.admin.TestChildCfgDefn;
-import org.opends.server.admin.TestParentCfgClient;
-import org.opends.server.admin.TestParentCfgDefn;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.client.OperationRejectedException;
-import org.opends.server.core.DirectoryServer;
-import org.testng.Assert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-@Test(singleThreaded = true)
-public final class LDAPClientTest extends AdminTestCase {
-
- // @Checkstyle:off
- private static final String[] TEST_LDIF = new String[] {
- // Base entries.
- "dn: cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: config",
- "",
- "dn: cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: test-parents",
- "",
- // Parent 1 - uses default values for
- // optional-multi-valued-dn-property.
- "dn: cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-parent-dummy",
- "cn: test parent 1",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "",
- // Parent 2 - overrides default values for
- // optional-multi-valued-dn-property.
- "dn: cn=test parent 2,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-parent-dummy",
- "cn: test parent 2",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-base-dn: dc=default value p2v1,dc=com",
- "ds-cfg-base-dn: dc=default value p2v2,dc=com",
- "",
- // Parent 3 - overrides default values for
- // optional-multi-valued-dn-property.
- "dn: cn=test parent 3,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-parent-dummy",
- "cn: test parent 3",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-base-dn: dc=default value p3v1,dc=com",
- "ds-cfg-base-dn: dc=default value p3v2,dc=com",
- "",
- // Child base entries.
- "dn:cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: multiple children",
- "",
- "dn:cn=test children,cn=test parent 2,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: multiple children",
- "",
- // Child 1 inherits defaults for both
- // optional-multi-valued-dn-property1 and
- // optional-multi-valued-dn-property2.
- "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 1",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "",
- // Child 2 inherits defaults for
- // optional-multi-valued-dn-property2.
- "dn: cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 2",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-base-dn: dc=default value c2v1,dc=com",
- "ds-cfg-base-dn: dc=default value c2v2,dc=com",
- "",
- // Child 3 overrides defaults for
- // optional-multi-valued-dn-property1 and
- // optional-multi-valued-dn-property2.
- "dn: cn=test child 3,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 3",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-base-dn: dc=default value c3v1,dc=com",
- "ds-cfg-base-dn: dc=default value c3v2,dc=com",
- "ds-cfg-group-dn: dc=default value c3v3,dc=com",
- "ds-cfg-group-dn: dc=default value c3v4,dc=com",
- "",
- // Child 4 inherits overridden defaults for both
- // optional-multi-valued-dn-property1 and
- // optional-multi-valued-dn-property2.
- "dn: cn=test child 1,cn=test children,cn=test parent 2,cn=test parents,cn=config", "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy", "cn: test child 1", "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description", "", };
- // @Checkstyle:on
-
- /**
- * Provide valid naming exception to client API exception mappings.
- *
- * @return Returns valid naming exception to client API exception mappings.
- */
- @DataProvider(name = "createManagedObjectExceptions")
- public Object[][] createManagedObjectExceptions() {
- return new Object[][] {
- // result code corresponding to exception thrown, expected
- // exception, expected code result
- { ResultCode.PROTOCOL_ERROR, ErrorResultException.class, ResultCode.PROTOCOL_ERROR },
- { ResultCode.UNAVAILABLE, ErrorResultException.class, ResultCode.UNAVAILABLE },
- { ResultCode.ENTRY_ALREADY_EXISTS, ManagedObjectAlreadyExistsException.class, null },
- { ResultCode.INSUFFICIENT_ACCESS_RIGHTS, ErrorResultException.class,
- ResultCode.INSUFFICIENT_ACCESS_RIGHTS },
- { ResultCode.UNWILLING_TO_PERFORM, OperationRejectedException.class, null } };
- }
-
- /**
- * Provide valid naming exception to client API exception mappings.
- *
- * @return Returns valid naming exception to client API exception mappings.
- */
- @DataProvider(name = "getManagedObjectExceptions")
- public Object[][] getManagedObjectExceptions() {
- return new Object[][] {
- // result code corresponding to exception thrown, expected
- // exception, expected code result
- { ResultCode.PROTOCOL_ERROR, ErrorResultException.class, ResultCode.PROTOCOL_ERROR },
- { ResultCode.UNAVAILABLE, ErrorResultException.class, ResultCode.UNAVAILABLE },
- { ResultCode.NO_SUCH_OBJECT, ManagedObjectNotFoundException.class, null },
- { ResultCode.INSUFFICIENT_ACCESS_RIGHTS, ErrorResultException.class,
- ResultCode.INSUFFICIENT_ACCESS_RIGHTS },
- { ResultCode.UNWILLING_TO_PERFORM, ErrorResultException.class, ResultCode.UNWILLING_TO_PERFORM } };
- }
-
- @BeforeClass
- public void setUp() throws Exception {
- TestCfg.setUp();
- }
-
- @AfterClass
- public void tearDown() {
- TestCfg.cleanup();
- }
-
- /**
- * Tests creation of a child managed object.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testCreateChildManagedObject() throws Exception {
- CreateEntryMockLDAPConnection c =
- new CreateEntryMockLDAPConnection(
- "cn=test child new,cn=test children,cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- c.addExpectedAttribute("cn", "test child new");
- c.addExpectedAttribute("objectClass", "top", "ds-cfg-test-child-dummy");
- c.addExpectedAttribute("ds-cfg-enabled", "true");
- c.addExpectedAttribute("ds-cfg-java-class",
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- c.addExpectedAttribute("ds-cfg-attribute-type", "description");
-
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
- child.setMandatoryBooleanProperty(true);
- child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
- child.commit();
-
- c.assertEntryIsCreated();
- }
-
- /**
- * Tests creation of a top-level managed object using fails when an
- * underlying exception occurs.
- */
- @Test(dataProvider = "createManagedObjectExceptions")
- public void testCreateManagedObjectException(final ResultCode resultCodeOfThrownException,
- Class<? extends Exception> expectedExceptionClass, ResultCode expectedCode) {
- MockLDAPConnection conn = new MockLDAPConnection() {
-
- @Override
- public void createEntry(Entry entry) throws ErrorResultException {
- throw ErrorResultException.newErrorResult(resultCodeOfThrownException);
- }
-
- };
- conn.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(conn, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- try {
- TestParentCfgClient parent = createTestParent(ctx, "test parent new");
- parent.setMandatoryBooleanProperty(true);
- parent.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
- parent.commit();
- } catch (Exception e) {
- if (expectedExceptionClass.equals(ErrorResultException.class)) {
- assertThat(e).isInstanceOf(ErrorResultException.class);
- assertThat(((ErrorResultException) e).getResult().getResultCode()).isEqualTo(expectedCode);
- } else {
- assertThat(e).isInstanceOf(expectedExceptionClass);
- }
- }
- }
-
- /**
- * Tests creation of a top-level managed object.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testCreateTopLevelManagedObject() throws Exception {
- CreateEntryMockLDAPConnection c =
- new CreateEntryMockLDAPConnection("cn=test parent new,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- c.addExpectedAttribute("cn", "test parent new");
- c.addExpectedAttribute("objectClass", "top", "ds-cfg-test-parent-dummy");
- c.addExpectedAttribute("ds-cfg-enabled", "true");
- c.addExpectedAttribute("ds-cfg-java-class", "org.opends.server.extensions.SomeVirtualAttributeProvider");
- c.addExpectedAttribute("ds-cfg-attribute-type", "description");
-
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = createTestParent(ctx, "test parent new");
- parent.setMandatoryBooleanProperty(true);
- parent.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
- parent.commit();
- c.assertEntryIsCreated();
- }
-
- /**
- * Tests retrieval of a child managed object with non-default values.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testGetChildManagedObject() throws Exception {
- MockLDAPConnection c = new MockLDAPConnection();
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.getTestChild("test child 3");
- Assert.assertEquals(child.isMandatoryBooleanProperty(), Boolean.TRUE);
- Assert.assertEquals(child.getMandatoryClassProperty(),
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
- DirectoryServer.getAttributeType("description"));
- assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(), "dc=default value c3v1,dc=com",
- "dc=default value c3v2,dc=com");
- assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(), "dc=default value c3v3,dc=com",
- "dc=default value c3v4,dc=com");
- }
-
- /**
- * Tests retrieval of a child managed object with default values.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testGetChildManagedObjectDefault() throws Exception {
- MockLDAPConnection c = new MockLDAPConnection();
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.getTestChild("test child 1");
- Assert.assertEquals(child.isMandatoryBooleanProperty(), Boolean.TRUE);
- Assert.assertEquals(child.getMandatoryClassProperty(),
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
- DirectoryServer.getAttributeType("description"));
- assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(), "dc=domain1,dc=com", "dc=domain2,dc=com",
- "dc=domain3,dc=com");
- assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(), "dc=domain1,dc=com", "dc=domain2,dc=com",
- "dc=domain3,dc=com");
- Assert.assertEquals(child.isMandatoryBooleanProperty(), Boolean.TRUE);
- }
-
- /**
- * Tests retrieval of a top-level managed object fails when an underlying
- * ErrorResultException occurs.
- *
- * @param cause
- * The ErrorResultException cause of the failure.
- * @param expected
- * The expected client API exception class.
- */
- @Test(dataProvider = "getManagedObjectExceptions")
- public void testGetManagedObjectException(final ResultCode resultCodeOfThrownException,
- final Class<? extends Exception> expectedExceptionClass, final ResultCode expectedCode) {
- MockLDAPConnection c = new MockLDAPConnection() {
-
- @Override
- public SearchResultEntry readEntry(DN dn, Collection<String> attrIds) throws ErrorResultException {
- throw ErrorResultException.newErrorResult(resultCodeOfThrownException);
- }
-
- };
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- try {
- getTestParent(ctx, "test parent 2");
- } catch (Exception e) {
- if (expectedExceptionClass.equals(ErrorResultException.class)) {
- assertThat(e).isInstanceOf(ErrorResultException.class);
- assertThat(((ErrorResultException) e).getResult().getResultCode()).isEqualTo(expectedCode);
- } else {
- assertThat(e).isInstanceOf(expectedExceptionClass);
- }
- }
- }
-
- /**
- * Tests retrieval of a top-level managed object with non-default values.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testGetTopLevelManagedObject() throws Exception {
- MockLDAPConnection c = new MockLDAPConnection();
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 2");
- Assert.assertEquals(parent.isMandatoryBooleanProperty(), Boolean.TRUE);
- Assert.assertEquals(parent.getMandatoryClassProperty(),
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- Assert.assertEquals(parent.getMandatoryReadOnlyAttributeTypeProperty(),
- DirectoryServer.getAttributeType("description"));
- assertDNSetEquals(parent.getOptionalMultiValuedDNProperty(), "dc=default value p2v1,dc=com",
- "dc=default value p2v2,dc=com");
- }
-
- /**
- * Tests retrieval of a top-level managed object with default values.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testGetTopLevelManagedObjectDefault() throws Exception {
- MockLDAPConnection c = new MockLDAPConnection();
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- Assert.assertEquals(parent.isMandatoryBooleanProperty(), Boolean.TRUE);
- Assert.assertEquals(parent.getMandatoryClassProperty(),
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- Assert.assertEquals(parent.getMandatoryReadOnlyAttributeTypeProperty(),
- DirectoryServer.getAttributeType("description"));
- assertDNSetEquals(parent.getOptionalMultiValuedDNProperty(), "dc=domain1,dc=com", "dc=domain2,dc=com",
- "dc=domain3,dc=com");
- }
-
- /**
- * Tests retrieval of relative inherited default values.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testInheritedDefaultValues1() throws Exception {
- CreateEntryMockLDAPConnection c =
- new CreateEntryMockLDAPConnection(
- "cn=test child new,cn=test children,cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- c.addExpectedAttribute("cn", "test child new");
- c.addExpectedAttribute("objectClass", "top", "ds-cfg-test-child-dummy");
- c.addExpectedAttribute("ds-cfg-enabled", "true");
- c.addExpectedAttribute("ds-cfg-java-class",
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- c.addExpectedAttribute("ds-cfg-attribute-type", "description");
-
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
-
- // Check pre-commit values.
- Assert.assertEquals(child.isMandatoryBooleanProperty(), null);
- Assert.assertEquals(child.getMandatoryClassProperty(),
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(), null);
- assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(), "dc=domain1,dc=com", "dc=domain2,dc=com",
- "dc=domain3,dc=com");
- assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(), "dc=domain1,dc=com", "dc=domain2,dc=com",
- "dc=domain3,dc=com");
-
- // Check that the default values are not committed.
- child.setMandatoryBooleanProperty(true);
- child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
- child.commit();
-
- c.assertEntryIsCreated();
- }
-
- /**
- * Tests retrieval of relative inherited default values.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testInheritedDefaultValues2() throws Exception {
- CreateEntryMockLDAPConnection c =
- new CreateEntryMockLDAPConnection(
- "cn=test child new,cn=test children,cn=test parent 2,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- c.addExpectedAttribute("cn", "test child new");
- c.addExpectedAttribute("objectClass", "top", "ds-cfg-test-child-dummy");
- c.addExpectedAttribute("ds-cfg-enabled", "true");
- c.addExpectedAttribute("ds-cfg-java-class",
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- c.addExpectedAttribute("ds-cfg-attribute-type", "description");
-
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 2");
- TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
-
- // Check pre-commit values.
- Assert.assertEquals(child.isMandatoryBooleanProperty(), null);
- Assert.assertEquals(child.getMandatoryClassProperty(),
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(), null);
- assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(), "dc=default value p2v1,dc=com",
- "dc=default value p2v2,dc=com");
- assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(), "dc=default value p2v1,dc=com",
- "dc=default value p2v2,dc=com");
-
- // Check that the default values are not committed.
- child.setMandatoryBooleanProperty(true);
- child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
- child.commit();
-
- c.assertEntryIsCreated();
- }
-
- /**
- * Tests listing of child managed objects.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testListChildManagedObjects() throws Exception {
- MockLDAPConnection c = new MockLDAPConnection();
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- String[] actual = parent.listTestChildren();
- String[] expected = new String[] { "test child 1", "test child 2", "test child 3" };
- Assert.assertEqualsNoOrder(actual, expected);
- }
-
- /**
- * Tests listing of child managed objects when their are not any.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testListChildManagedObjectsEmpty() throws Exception {
- MockLDAPConnection c = new MockLDAPConnection();
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 3");
- String[] actual = parent.listTestChildren();
- String[] expected = new String[] {};
- Assert.assertEqualsNoOrder(actual, expected);
- }
-
- /**
- * Tests listing of top level managed objects.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testListTopLevelManagedObjects() throws Exception {
- MockLDAPConnection c = new MockLDAPConnection();
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- String[] actual = listTestParents(ctx);
- String[] expected = new String[] { "test parent 1", "test parent 2", "test parent 3" };
- Assert.assertEqualsNoOrder(actual, expected);
- }
-
- /**
- * Tests listing of top level managed objects when their are not any.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testListTopLevelManagedObjectsEmpty() throws Exception {
- MockLDAPConnection c = new MockLDAPConnection();
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- String[] actual = listTestParents(ctx);
- String[] expected = new String[] {};
- Assert.assertEqualsNoOrder(actual, expected);
- }
-
- /**
- * Tests modification of a child managed object.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testModifyChildManagedObjectResetToDefault() throws Exception {
- ModifyEntryMockLDAPConnection c =
- new ModifyEntryMockLDAPConnection(
- "cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- c.addExpectedModification("ds-cfg-base-dn");
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.getTestChild("test child 2");
- child.setOptionalMultiValuedDNProperty1(Collections.<DN> emptySet());
- child.commit();
- Assert.assertTrue(c.isEntryModified());
- }
-
- /**
- * Tests modification of a top-level managed object.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testModifyTopLevelManagedObjectNoChanges() throws Exception {
- ModifyEntryMockLDAPConnection c =
- new ModifyEntryMockLDAPConnection("cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- parent.commit();
- Assert.assertFalse(c.isEntryModified());
- }
-
- /**
- * Tests modification of a top-level managed object.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testModifyTopLevelManagedObjectWithChanges() throws Exception {
- ModifyEntryMockLDAPConnection c =
- new ModifyEntryMockLDAPConnection("cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- c.addExpectedModification("ds-cfg-enabled", "false");
- c.addExpectedModification("ds-cfg-base-dn", "dc=mod1,dc=com", "dc=mod2,dc=com");
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- parent.setMandatoryBooleanProperty(false);
- parent.setOptionalMultiValuedDNProperty(Arrays.asList(DN.valueOf("dc=mod1,dc=com"),
- DN.valueOf("dc=mod2,dc=com")));
- parent.commit();
- Assert.assertTrue(c.isEntryModified());
- }
-
- /**
- * Tests removal of a child managed object.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testRemoveChildManagedObject() throws Exception {
- DeleteSubtreeMockLDAPConnection c =
- new DeleteSubtreeMockLDAPConnection(
- "cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- parent.removeTestChild("test child 1");
- c.assertSubtreeIsDeleted();
- }
-
- /**
- * Tests removal of a top-level managed object.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testRemoveTopLevelManagedObject() throws Exception {
- DeleteSubtreeMockLDAPConnection c =
- new DeleteSubtreeMockLDAPConnection("cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- removeTestParent(ctx, "test parent 1");
- c.assertSubtreeIsDeleted();
- }
-
- /**
- * Tests creation of a child managed object succeeds when registered add
- * constraints succeed.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testAddConstraintSuccess() throws Exception {
- Constraint constraint = new MockConstraint(true, false, false);
- TestCfg.addConstraint(constraint);
-
- try {
- CreateEntryMockLDAPConnection c =
- new CreateEntryMockLDAPConnection(
- "cn=test child new,cn=test children,cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- c.addExpectedAttribute("cn", "test child new");
- c.addExpectedAttribute("objectClass", "top", "ds-cfg-test-child-dummy");
- c.addExpectedAttribute("ds-cfg-enabled", "true");
- c.addExpectedAttribute("ds-cfg-java-class",
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- c.addExpectedAttribute("ds-cfg-attribute-type", "description");
-
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
- child.setMandatoryBooleanProperty(true);
- child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
- child.commit();
-
- c.assertEntryIsCreated();
- } finally {
- // Clean up.
- TestCfg.removeConstraint(constraint);
- }
- }
-
- /**
- * Tests creation of a child managed object fails when registered add
- * constraints fail.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test(expectedExceptions = OperationRejectedException.class)
- public void testAddConstraintFail() throws Exception {
- Constraint constraint = new MockConstraint(false, true, true);
- TestCfg.addConstraint(constraint);
-
- try {
- CreateEntryMockLDAPConnection conn =
- new CreateEntryMockLDAPConnection(
- "cn=test child new,cn=test children,cn=test parent 1,cn=test parents,cn=config");
- conn.importLDIF(TEST_LDIF);
- conn.addExpectedAttribute("cn", "test child new");
- conn.addExpectedAttribute("objectClass", "top", "ds-cfg-test-child-dummy");
- conn.addExpectedAttribute("ds-cfg-enabled", "true");
- conn.addExpectedAttribute("ds-cfg-java-class",
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- conn.addExpectedAttribute("ds-cfg-attribute-type", "description");
-
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(conn, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
- child.setMandatoryBooleanProperty(true);
- child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer.getAttributeType("description"));
- child.commit();
- Assert.fail("The add constraint failed to prevent creation of the managed object");
- } finally {
- // Clean up.
- TestCfg.removeConstraint(constraint);
- }
- }
-
- /**
- * Tests removal of a child managed object succeeds when registered remove
- * constraints succeed.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testRemoveConstraintSuccess() throws Exception {
- Constraint constraint = new MockConstraint(false, false, true);
- TestCfg.addConstraint(constraint);
-
- try {
- DeleteSubtreeMockLDAPConnection c =
- new DeleteSubtreeMockLDAPConnection(
- "cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- parent.removeTestChild("test child 1");
- c.assertSubtreeIsDeleted();
- } finally {
- // Clean up.
- TestCfg.removeConstraint(constraint);
- }
- }
-
- /**
- * Tests removal of a child managed object fails when registered remove
- * constraints fails.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test(expectedExceptions = OperationRejectedException.class)
- public void testRemoveConstraintFail() throws Exception {
- Constraint constraint = new MockConstraint(true, true, false);
- TestCfg.addConstraint(constraint);
-
- try {
- DeleteSubtreeMockLDAPConnection c =
- new DeleteSubtreeMockLDAPConnection(
- "cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- parent.removeTestChild("test child 1");
- Assert.fail("The remove constraint failed to prevent removal of the managed object");
- } finally {
- // Clean up.
- TestCfg.removeConstraint(constraint);
- }
- }
-
- /**
- * Tests modification of a child managed object succeeds when registered
- * remove constraints succeed.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test
- public void testModifyConstraintSuccess() throws Exception {
- Constraint constraint = new MockConstraint(false, true, false);
- TestCfg.addConstraint(constraint);
-
- try {
- ModifyEntryMockLDAPConnection c =
- new ModifyEntryMockLDAPConnection(
- "cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- c.addExpectedModification("ds-cfg-base-dn");
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.getTestChild("test child 2");
- child.setOptionalMultiValuedDNProperty1(Collections.<DN> emptySet());
- child.commit();
- Assert.assertTrue(c.isEntryModified());
- } finally {
- // Clean up.
- TestCfg.removeConstraint(constraint);
- }
- }
-
- /**
- * Tests modification of a child managed object fails when registered remove
- * constraints fails.
- *
- * @throws Exception
- * If an unexpected error occurred.
- */
- @Test(expectedExceptions = OperationRejectedException.class)
- public void testModifyConstraintFail() throws Exception {
- Constraint constraint = new MockConstraint(true, false, true);
- TestCfg.addConstraint(constraint);
-
- try {
- ModifyEntryMockLDAPConnection c =
- new ModifyEntryMockLDAPConnection(
- "cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config");
- c.importLDIF(TEST_LDIF);
- c.addExpectedModification("ds-cfg-base-dn");
- ManagementContext ctx =
- LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
- PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
- TestChildCfgClient child = parent.getTestChild("test child 2");
- child.setOptionalMultiValuedDNProperty1(Collections.<DN> emptySet());
- child.commit();
- Assert.fail("The modify constraint failed to prevent modification of the managed object");
- } finally {
- // Clean up.
- TestCfg.removeConstraint(constraint);
- }
- }
-
- // Asserts that the actual set of DNs contains the expected values.
- private void assertDNSetEquals(SortedSet<DN> actual, String... expected) {
- String[] actualStrings = new String[actual.size()];
- int i = 0;
- for (DN dn : actual) {
- actualStrings[i] = dn.toString();
- i++;
- }
- Assert.assertEqualsNoOrder(actualStrings, expected);
- }
-
- // Create the named test parent managed object.
- private TestParentCfgClient createTestParent(ManagementContext context, String name) throws Exception {
- ManagedObject<RootCfgClient> root = context.getRootConfigurationManagedObject();
- return root.createChild(TestCfg.getTestOneToManyParentRelationDefinition(), TestParentCfgDefn.getInstance(),
- name, null).getConfiguration();
- }
-
- // Retrieve the named test parent managed object.
- private TestParentCfgClient getTestParent(ManagementContext context, String name) throws Exception {
- ManagedObject<RootCfgClient> root = context.getRootConfigurationManagedObject();
- return root.getChild(TestCfg.getTestOneToManyParentRelationDefinition(), name).getConfiguration();
- }
-
- // List test parent managed objects.
- private String[] listTestParents(ManagementContext context) throws Exception {
- ManagedObject<RootCfgClient> root = context.getRootConfigurationManagedObject();
- return root.listChildren(TestCfg.getTestOneToManyParentRelationDefinition());
- }
-
- // Remove the named test parent managed object.
- private void removeTestParent(ManagementContext context, String name) throws Exception {
- ManagedObject<RootCfgClient> root = context.getRootConfigurationManagedObject();
- root.removeChild(TestCfg.getTestOneToManyParentRelationDefinition(), name);
- }
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/MockConstraint.java b/opendj-config/src/test/java/org/opends/server/admin/client/ldap/MockConstraint.java
deleted file mode 100644
index cf2b024..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/MockConstraint.java
+++ /dev/null
@@ -1,131 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client.ldap;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.opends.server.admin.Constraint;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.client.ClientConstraintHandler;
-import org.opends.server.admin.client.ManagedObject;
-import org.opends.server.admin.client.ManagementContext;
-import org.opends.server.admin.server.ServerConstraintHandler;
-
-/**
- * A mock constraint which can be configured to refuse various types of
- * operation.
- */
-public final class MockConstraint extends Constraint {
-
- /**
- * Mock client constraint handler.
- */
- private class Handler extends ClientConstraintHandler {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isAddAcceptable(ManagementContext context, ManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
- if (!allowAdds) {
- unacceptableReasons.add(LocalizableMessage.raw("Adds not allowed"));
- }
-
- return allowAdds;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isDeleteAcceptable(ManagementContext context, ManagedObjectPath<?, ?> path,
- Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
- if (!allowDeletes) {
- unacceptableReasons.add(LocalizableMessage.raw("Deletes not allowed"));
- }
-
- return allowDeletes;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isModifyAcceptable(ManagementContext context, ManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ErrorResultException {
- if (!allowModifies) {
- unacceptableReasons.add(LocalizableMessage.raw("Modifies not allowed"));
- }
-
- return allowModifies;
- }
-
- }
-
- // Determines if add operations are allowed.
- private final boolean allowAdds;
-
- // Determines if modify operations are allowed.
- private final boolean allowModifies;
-
- // Determines if delete operations are allowed.
- private final boolean allowDeletes;
-
- /**
- * Creates a new mock constraint.
- *
- * @param allowAdds
- * Determines if add operations are allowed.
- * @param allowModifies
- * Determines if modify operations are allowed.
- * @param allowDeletes
- * Determines if delete operations are allowed.
- */
- public MockConstraint(boolean allowAdds, boolean allowModifies, boolean allowDeletes) {
- this.allowAdds = allowAdds;
- this.allowModifies = allowModifies;
- this.allowDeletes = allowDeletes;
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<ClientConstraintHandler> getClientConstraintHandlers() {
- return Collections.<ClientConstraintHandler> singleton(new Handler());
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<ServerConstraintHandler> getServerConstraintHandlers() {
- return Collections.emptySet();
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/MockLDAPConnection.java b/opendj-config/src/test/java/org/opends/server/admin/client/ldap/MockLDAPConnection.java
deleted file mode 100644
index 4e95cad..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/MockLDAPConnection.java
+++ /dev/null
@@ -1,387 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client.ldap;
-
-import static org.fest.assertions.Assertions.*;
-import static org.forgerock.opendj.ldif.LDIF.*;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.forgerock.opendj.ldap.Attribute;
-import org.forgerock.opendj.ldap.AttributeDescription;
-import org.forgerock.opendj.ldap.AttributeParser;
-import org.forgerock.opendj.ldap.ByteString;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.DecodeException;
-import org.forgerock.opendj.ldap.DecodeOptions;
-import org.forgerock.opendj.ldap.Entry;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.opendj.ldap.LinkedHashMapEntry;
-import org.forgerock.opendj.ldap.RDN;
-import org.forgerock.opendj.ldap.ResultCode;
-import org.forgerock.opendj.ldap.controls.Control;
-import org.forgerock.opendj.ldap.controls.ControlDecoder;
-import org.forgerock.opendj.ldap.requests.ModifyRequest;
-import org.forgerock.opendj.ldap.responses.SearchResultEntry;
-
-/**
- * A mock LDAP connection which fakes up search results based on some LDIF
- * content. Implementations should override the modify operations in order to
- * get provide the correct fake behavior.
- */
-public class MockLDAPConnection extends LDAPConnection {
-
- /**
- * A mock entry.
- */
- private static final class MockEntry {
-
- private final Entry entry;
-
- private final List<MockEntry> children;
-
- private final DN dn;
-
- public MockEntry(DN dn, Entry entry) {
- this.dn = dn;
- this.entry = entry;
- this.children = new LinkedList<MockEntry>();
- }
-
- public Entry getEntry() {
- return entry;
- }
-
- public List<MockEntry> getChildren() {
- return children;
- }
-
- public DN getDN() {
- return dn;
- }
-
- @Override
- public String toString() {
- StringBuilder builder = new StringBuilder();
- builder.append("dn:");
- builder.append(dn);
- builder.append(", attributes:");
- builder.append(entry.getAllAttributes());
- return builder.toString();
- }
- }
-
- /** All the entries. */
- private final Map<DN, MockEntry> entries;
-
- /** The single root entry. */
- private final MockEntry rootEntry;
-
- /**
- * Create a mock connection.
- */
- public MockLDAPConnection() {
- this.rootEntry = new MockEntry(DN.rootDN(), new LinkedHashMapEntry(DN.rootDN()));
- this.entries = new HashMap<DN, MockEntry>();
- this.entries.put(DN.rootDN(), this.rootEntry);
- }
-
- /**
- * {@inheritDoc}
- */
- public void createEntry(Entry entry) throws ErrorResultException {
- throw new UnsupportedOperationException("createEntry");
- }
-
- /**
- * {@inheritDoc}
- */
- public void deleteSubtree(DN dn) throws ErrorResultException {
- throw new UnsupportedOperationException("deleteSubtree");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean entryExists(DN dn) throws ErrorResultException {
- return getEntry(dn) != null;
- }
-
- /**
- * Imports the provided LDIF into this mock connection.
- *
- * @param lines
- * The LDIF.
- */
- public final void importLDIF(String... lines) {
- try {
- for (Entry entry : makeEntries(lines)) {
- addEntry(entry);
- }
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Collection<DN> listEntries(DN dn, String filter) throws ErrorResultException {
- MockEntry entry = getEntry(dn);
-
- if (entry == null) {
- throw ErrorResultException.newErrorResult(ResultCode.NO_SUCH_OBJECT, "Could not find entry: " + dn);
- } else {
- List<DN> names = new LinkedList<DN>();
- for (MockEntry child : entry.children) {
- names.add(DN.valueOf(child.getDN().toString()));
- }
- return names;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void modifyEntry(ModifyRequest request) throws ErrorResultException {
- throw new UnsupportedOperationException("modifyEntry");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public SearchResultEntry readEntry(DN dn, Collection<String> attrIds) throws ErrorResultException {
- final MockEntry entry = getEntry(dn);
- return new SearchResultEntry() {
-
- public AttributeParser parseAttribute(String attributeDescription) {
- throw new RuntimeException("not implemented");
- }
-
- public AttributeParser parseAttribute(AttributeDescription attributeDescription) {
- throw new RuntimeException("not implemented");
- }
-
- public boolean containsControl(String oid) {
- return false;
- }
-
- public SearchResultEntry setName(String dn) {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public SearchResultEntry setName(DN dn) {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public SearchResultEntry replaceAttribute(String attributeDescription, Object... values) {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public boolean replaceAttribute(Attribute attribute) {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public SearchResultEntry removeAttribute(String attributeDescription, Object... values) {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public boolean removeAttribute(AttributeDescription attributeDescription) {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public boolean removeAttribute(Attribute attribute, Collection<? super ByteString> missingValues) {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public DN getName() {
- return entry.getDN();
- }
-
- @Override
- public List<Control> getControls() {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public <C extends Control> C getControl(ControlDecoder<C> decoder, DecodeOptions options)
- throws DecodeException {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public int getAttributeCount() {
- return entry.getEntry().getAttributeCount();
- }
-
- @Override
- public Attribute getAttribute(String attributeDescription) {
- return entry.getEntry().getAttribute(attributeDescription);
- }
-
- @Override
- public Attribute getAttribute(AttributeDescription attributeDescription) {
- return entry.getEntry().getAttribute(attributeDescription);
- }
-
- @Override
- public Iterable<Attribute> getAllAttributes(String attributeDescription) {
- return entry.getEntry().getAllAttributes(attributeDescription);
- }
-
- @Override
- public Iterable<Attribute> getAllAttributes(AttributeDescription attributeDescription) {
- return entry.getEntry().getAllAttributes(attributeDescription);
- }
-
- @Override
- public Iterable<Attribute> getAllAttributes() {
- return entry.getEntry().getAllAttributes();
- }
-
- @Override
- public boolean containsAttribute(String attributeDescription, Object... values) {
- return entry.getEntry().containsAttribute(attributeDescription, values);
- }
-
- @Override
- public boolean containsAttribute(Attribute attribute, Collection<? super ByteString> missingValues) {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public SearchResultEntry clearAttributes() {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public SearchResultEntry addControl(Control control) {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public SearchResultEntry addAttribute(String attributeDescription, Object... values) {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public boolean addAttribute(Attribute attribute, Collection<? super ByteString> duplicateValues) {
- throw new RuntimeException("not implemented");
- }
-
- @Override
- public boolean addAttribute(Attribute attribute) {
- throw new RuntimeException("not implemented");
- }
- };
- }
-
- /**
- * Asserts whether the provided attribute contains exactly the set of values
- * contained in the provided collection.
- *
- * @param attr
- * The attribute.
- * @param values
- * The expected values.
- * @throws ErrorResultException
- * If an unexpected problem occurred.
- */
- protected final void assertAttributeEquals(Attribute attr, Collection<String> values) throws ErrorResultException {
- List<String> actualValues = new LinkedList<String>();
- for (ByteString actualValue : attr) {
- actualValues.add(actualValue.toString());
- }
-
- assertThat(actualValues).hasSize(values.size());
- assertThat(actualValues).containsOnly(values.toArray());
- }
-
- /**
- * Create a new mock entry.
- *
- * @param entry
- * The entry to be added.
- */
- private void addEntry(Entry entry) {
- MockEntry parent = rootEntry;
- DN entryDN = entry.getName();
-
- // Create required glue entries.
- for (int i = 0; i < entryDN.size() - 1; i++) {
- RDN rdn = entryDN.parent(entryDN.size() - i - 1).rdn();
- DN dn = parent.getDN().child(rdn);
-
- if (!entries.containsKey(dn)) {
- MockEntry glue = new MockEntry(dn, new LinkedHashMapEntry(dn));
- parent.getChildren().add(glue);
- entries.put(dn, glue);
- }
-
- parent = entries.get(dn);
- }
-
- // We now have the parent entry - so construct the new entry.
- MockEntry child = new MockEntry(entryDN, LinkedHashMapEntry.deepCopyOfEntry(entry));
- parent.getChildren().add(child);
- entries.put(entryDN, child);
- }
-
- /**
- * Gets the named entry.
- *
- * @param dn
- * The name of the entry.
- * @return Returns the mock entry or <code>null</code> if it does not exist.
- */
- private MockEntry getEntry(DN dn) {
- DN name = DN.valueOf(dn.toString());
- return entries.get(name);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void unbind() {
- // nothing to do
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/ModifyEntryMockLDAPConnection.java b/opendj-config/src/test/java/org/opends/server/admin/client/ldap/ModifyEntryMockLDAPConnection.java
deleted file mode 100644
index 0e24bed..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/client/ldap/ModifyEntryMockLDAPConnection.java
+++ /dev/null
@@ -1,115 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.client.ldap;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.forgerock.opendj.ldap.Attribute;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.opendj.ldap.Modification;
-import org.forgerock.opendj.ldap.requests.ModifyRequest;
-import org.testng.Assert;
-
-import org.forgerock.util.Reject;
-
-/**
- * A mock LDAP connection which is used to verify that a modify operation was
- * requested and that it has the correct parameters.
- */
-public final class ModifyEntryMockLDAPConnection extends MockLDAPConnection {
-
- // Detect multiple calls.
- private boolean alreadyModified = false;
-
- private final DN expectedDN;
-
- // The expected set of modifications (attribute name -> list of
- // values).
- private final Map<String, List<String>> modifications = new HashMap<String, List<String>>();
-
- /**
- * Create a new mock ldap connection for detecting modify operations.
- *
- * @param dn
- * The expected DN of the entry to be added.
- */
- public ModifyEntryMockLDAPConnection(String dn) {
- this.expectedDN = DN.valueOf(dn);
- }
-
- /**
- * Add a modification which should be part of the modify operation.
- *
- * @param expectedName
- * The name of the expected attribute.
- * @param expectedValues
- * The attribute's expected new values (possibly empty if
- * deleted).
- */
- public void addExpectedModification(String expectedName, String... expectedValues) {
- Reject.ifNull(expectedName);
- Reject.ifNull(expectedValues);
- modifications.put(expectedName, Arrays.asList(expectedValues));
- }
-
- /**
- * Determines whether or not the entry was modified.
- *
- * @return Returns <code>true</code> if it was modified.
- */
- public boolean isEntryModified() {
- return alreadyModified;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void modifyEntry(ModifyRequest request) throws ErrorResultException {
- Assert.assertFalse(alreadyModified);
- Assert.assertEquals(request.getName(), expectedDN);
-
- Map<String, List<String>> expected = new HashMap<String, List<String>>(modifications);
- for (Modification modification : request.getModifications()) {
- Attribute attribute = modification.getAttribute();
- String attrName = attribute.getAttributeDescription().getAttributeType().getNameOrOID();
- List<String> values = expected.remove(attrName);
- if (values == null) {
- Assert.fail("Unexpected modification to attribute " + attrName);
- }
- assertAttributeEquals(attribute, values);
- }
- if (!expected.isEmpty()) {
- Assert.fail("Missing modifications to: " + expected.keySet());
- }
-
- alreadyModified = true;
- }
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/server/AdminTestCaseUtils.java b/opendj-config/src/test/java/org/opends/server/admin/server/AdminTestCaseUtils.java
deleted file mode 100644
index dcd5085..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/server/AdminTestCaseUtils.java
+++ /dev/null
@@ -1,116 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.forgerock.opendj.ldap.Entry;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.Configuration;
-import org.opends.server.admin.ConfigurationClient;
-import org.opends.server.admin.DefinitionDecodingException;
-import org.opends.server.admin.LDAPProfile;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.RelationDefinition;
-import org.opends.server.admin.SingletonRelationDefinition;
-import org.opends.server.config.spi.ConfigException;
-
-/**
- * This class defines some utility functions which can be used by test cases
- * which interact with the admin framework.
- */
-public final class AdminTestCaseUtils {
-
- // The relation name which will be used for dummy configurations. A
- // deliberately obfuscated name is chosen to avoid clashes.
- private static final String DUMMY_TEST_RELATION = "*dummy*test*relation*";
-
- // Indicates if the dummy relation profile has been registered.
- private static boolean isProfileRegistered = false;
-
- // Prevent instantiation.
- private AdminTestCaseUtils() {
- // No implementation required.
- }
-
- /**
- * Decodes a configuration entry into the required type of server
- * configuration.
- *
- * @param <S>
- * The type of server configuration to be decoded.
- * @param context The server management context.
- * @param definition
- * The required definition of the required managed object.
- * @param entry
- * An entry containing the configuration to be decoded.
- * @return Returns the new server-side configuration.
- * @throws ConfigException
- * If the entry could not be decoded.
- */
- public static <S extends Configuration> S getConfiguration(ServerManagementContext context,
- AbstractManagedObjectDefinition<?, S> definition, Entry entry) throws ConfigException {
- try {
- ServerManagedObject<? extends S> managedObject = context.decode(getPath(definition), entry);
-
- // Ensure constraints are satisfied.
- managedObject.ensureIsUsable();
-
- return managedObject.getConfiguration();
- } catch (DefinitionDecodingException e) {
- throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(entry.getName(), e);
- } catch (ServerManagedObjectDecodingException e) {
- throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(e);
- } catch (ConstraintViolationException e) {
- throw ConfigExceptionFactory.getInstance().createDecodingExceptionAdaptor(e);
- }
- }
-
- /** Construct a dummy path. */
- // @Checkstyle:off
- private synchronized static <C extends ConfigurationClient, S extends Configuration> ManagedObjectPath<C, S>
- getPath(AbstractManagedObjectDefinition<C, S> d) {
- // @Checkstyle:on
- if (!isProfileRegistered) {
- LDAPProfile.Wrapper profile = new LDAPProfile.Wrapper() {
- @Override
- public String getRelationRDNSequence(RelationDefinition<?, ?> r) {
- if (r.getName().equals(DUMMY_TEST_RELATION)) {
- return "cn=dummy configuration,cn=config";
- } else {
- return null;
- }
- }
-
- };
- LDAPProfile.getInstance().pushWrapper(profile);
- isProfileRegistered = true;
- }
- SingletonRelationDefinition.Builder<C, S> builder =
- new SingletonRelationDefinition.Builder<C, S>(RootCfgDefn.getInstance(), DUMMY_TEST_RELATION, d);
- ManagedObjectPath<?, ?> root = ManagedObjectPath.emptyPath();
- return root.child(builder.getInstance());
- }
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/server/AggregationServerTest.java b/opendj-config/src/test/java/org/opends/server/admin/server/AggregationServerTest.java
deleted file mode 100644
index 1edf139..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/server/AggregationServerTest.java
+++ /dev/null
@@ -1,637 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- * Portions copyright 2013 ForgeRock AS
- */
-package org.opends.server.admin.server;
-
-import static org.fest.assertions.Assertions.*;
-import static org.forgerock.opendj.ldif.LDIF.*;
-import static org.mockito.Matchers.*;
-import static org.mockito.Mockito.*;
-import static org.testng.Assert.*;
-
-import java.util.List;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.admin.client.ConnectionHandlerCfgClient;
-import org.forgerock.opendj.admin.server.ConnectionHandlerCfg;
-import org.forgerock.opendj.ldap.Entry;
-import org.forgerock.opendj.ldap.ResultCode;
-import org.forgerock.opendj.ldap.schema.Schema;
-import org.forgerock.opendj.ldif.LDIF;
-import org.mockito.ArgumentCaptor;
-import org.opends.server.admin.AdminTestCase;
-import org.opends.server.admin.AdministratorAction;
-import org.opends.server.admin.AggregationPropertyDefinition;
-import org.opends.server.admin.IllegalPropertyValueStringException;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.PropertyException;
-import org.opends.server.admin.PropertyOption;
-import org.opends.server.admin.TestCfg;
-import org.opends.server.admin.TestChildCfg;
-import org.opends.server.admin.TestChildCfgDefn;
-import org.opends.server.admin.TestParentCfg;
-import org.opends.server.admin.UndefinedDefaultBehaviorProvider;
-import org.opends.server.admin.condition.Conditions;
-import org.opends.server.config.spi.ConfigChangeListener;
-import org.opends.server.config.spi.ConfigDeleteListener;
-import org.opends.server.config.spi.ConfigException;
-import org.opends.server.config.spi.ConfigurationRepository;
-import org.testng.Assert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-/**
- * Test cases for aggregations on the server-side.
- */
-@Test(singleThreaded = true)
-@SuppressWarnings("javadoc")
-public final class AggregationServerTest extends AdminTestCase {
-
- /**
- * Dummy change listener for triggering change constraint call-backs.
- */
- private static final class DummyChangeListener implements ConfigurationChangeListener<TestChildCfg> {
-
- public ConfigChangeResult applyConfigurationChange(TestChildCfg configuration) {
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
-
- public boolean isConfigurationChangeAcceptable(TestChildCfg configuration,
- List<LocalizableMessage> unacceptableReasons) {
- return true;
- }
- }
-
- /**
- * Dummy delete listener for triggering delete constraint call-backs.
- */
- private static final class DummyDeleteListener implements ConfigurationDeleteListener<TestChildCfg> {
-
- public ConfigChangeResult applyConfigurationDelete(TestChildCfg configuration) {
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
-
- public boolean isConfigurationDeleteAcceptable(TestChildCfg configuration,
- List<LocalizableMessage> unacceptableReasons) {
- return true;
- }
- }
-
- // @Checkstyle:off
- private static final Entry TEST_CHILD_1 = makeEntry(
- "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 1",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real");
-
- private static final Entry TEST_CHILD_2 = makeEntry(
- "dn: cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 2",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real",
- "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=connection handlers, cn=config");
-
- /** Has an invalid handler reference. */
- private static final Entry TEST_CHILD_3 = makeEntry(
- "dn: cn=test child 3,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 3", "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real",
- "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=bad rdn, cn=config");
-
- private static final Entry TEST_CHILD_4 = makeEntry(
- "dn: cn=test child 4,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 4", "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real",
- "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=connection handlers, cn=config",
- "ds-cfg-rotation-policy: cn=LDAPS Connection Handler, cn=connection handlers, cn=config");
-
- private static final Entry TEST_CHILD_5 = makeEntry(
- "dn: cn=test child 5,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 5", "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real",
- "ds-cfg-rotation-policy: cn=BAD Connection Handler 1, cn=connection handlers, cn=config",
- "ds-cfg-rotation-policy: cn=BAD Connection Handler 2, cn=connection handlers, cn=config",
- "ds-cfg-rotation-policy: cn=LDAP Connection Handler, cn=connection handlers, cn=config");
-
- private static final Entry TEST_CHILD_6 = makeEntry(
- "dn: cn=test child 6,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 6", "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real",
- "ds-cfg-rotation-policy: cn=Test Connection Handler, cn=connection handlers, cn=config");
-
- private static final Entry TEST_CHILD_7 = makeEntry(
- "dn: cn=test child 7,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 7", "ds-cfg-enabled: false",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real",
- "ds-cfg-rotation-policy: cn=Test Connection Handler, cn=connection handlers, cn=config");
-
- static final Entry TEST_PARENTS = makeEntry(
- "dn: cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: test parents");
-
- static final Entry TEST_PARENT_1 = makeEntry(
- "dn: cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-parent-dummy",
- "cn: test parent 1",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real");
-
- private static final Entry TEST_BASE_CHILD = LDIF.makeEntry(
- "dn:cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: test children");
-
- /** this handler is disabled - see ds-cfg-enabled property */
- protected static final Entry TEST_CONNECTION_HANDLER_ENTRY_DISABLED = LDIF.makeEntry(
- "dn: cn=" + "Test 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-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler",
- "ds-cfg-enabled: false",
- "ds-cfg-listen-address: 0.0.0.0", "ds-cfg-listen-port: 389");
-
- /** this handler is enabled - see ds-cfg-enabled property */
- protected static final Entry TEST_CONNECTION_HANDLER_ENTRY_ENABLED = LDIF.makeEntry(
- "dn: cn=" + "Test 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-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler",
- "ds-cfg-enabled: true",
- "ds-cfg-listen-address: 0.0.0.0", "ds-cfg-listen-port: 389");
- // @Checkstyle:on
-
- // @Checkstyle:off
- /**
- * The default test child configuration "aggregation-property" property
- * definition.
- */
- private AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg>
- aggregationPropertyDefinitionDefault = null;
-
- /**
- * An aggregation where the target must be enabled if the source is enabled.
- */
- private AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg>
- aggregationPropertyDefinitionTargetAndSourceMustBeEnabled = null;
-
- /** An aggregation where the target must be enabled. */
- private AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg>
- aggregationPropertyDefinitionTargetMustBeEnabled = null;
- // @Checkstyle:on
-
- @BeforeClass
- public void setUp() throws Exception {
- TestCfg.setUp();
-
- // Save the aggregation property definition so that it can be
- // replaced and restored later.
- aggregationPropertyDefinitionDefault =
- TestChildCfgDefn.getInstance().getAggregationPropertyPropertyDefinition();
-
- // Create the two test aggregation properties.
- AggregationPropertyDefinition.Builder<ConnectionHandlerCfgClient, ConnectionHandlerCfg> builder;
- TestChildCfgDefn d = TestChildCfgDefn.getInstance();
- builder = AggregationPropertyDefinition.createBuilder(d, "aggregation-property");
- builder.setOption(PropertyOption.MULTI_VALUED);
- builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, d,
- "aggregation-property"));
- builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
- builder.setParentPath("/");
- builder.setRelationDefinition("connection-handler");
- builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true"));
- aggregationPropertyDefinitionTargetMustBeEnabled = builder.getInstance();
- TestCfg.initializePropertyDefinition(aggregationPropertyDefinitionTargetMustBeEnabled);
-
- builder = AggregationPropertyDefinition.createBuilder(d, "aggregation-property");
- builder.setOption(PropertyOption.MULTI_VALUED);
- builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, d,
- "aggregation-property"));
- builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
- builder.setParentPath("/");
- builder.setRelationDefinition("connection-handler");
- builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true"));
- builder.setTargetNeedsEnablingCondition(Conditions.contains("mandatory-boolean-property", "true"));
- aggregationPropertyDefinitionTargetAndSourceMustBeEnabled = builder.getInstance();
- TestCfg.initializePropertyDefinition(aggregationPropertyDefinitionTargetAndSourceMustBeEnabled);
- }
-
- @AfterClass
- public void tearDown() throws Exception {
- TestCfg.cleanup();
-
- // Restore the test child aggregation definition.
- TestCfg.addPropertyDefinition(aggregationPropertyDefinitionDefault);
- }
-
- /**
- * Tests that aggregation is rejected when the LDAP DN contains a valid RDN
- * but an invalid parent DN.
- */
- @Test
- public void testAggregationBadBaseDN() throws Exception {
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_3, LDAP_CONN_HANDLER_ENTRY);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
- try {
- parentCfg.getTestChild(entryName(TEST_CHILD_3));
- fail("Unexpectedly added test child 3 when it had a bad aggregation value");
- } catch (ConfigException e) {
- assertThat(e.getCause()).isNotNull().isInstanceOf(ServerManagedObjectDecodingException.class);
- ServerManagedObjectDecodingException de = (ServerManagedObjectDecodingException) e.getCause();
- assertThat(de.getCauses()).hasSize(1);
- PropertyException propertyException = de.getCauses().iterator().next();
- assertThat(propertyException).isInstanceOf(IllegalPropertyValueStringException.class);
- IllegalPropertyValueStringException pe = (IllegalPropertyValueStringException) propertyException;
- assertEquals(pe.getPropertyDefinition(), TestChildCfgDefn.getInstance()
- .getAggregationPropertyPropertyDefinition());
- assertEquals(pe.getIllegalValueString(), "cn=LDAP Connection Handler, cn=bad rdn, cn=config");
- }
- }
-
- /**
- * Tests that aggregation is rejected by a constraint violation when the DN
- * values are dangling.
- */
- @Test
- public void testAggregationDanglingReference() throws Exception {
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_5, LDAP_CONN_HANDLER_ENTRY);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
-
- try {
- parentCfg.getTestChild(entryName(TEST_CHILD_5));
- fail("Unexpectedly added test child 5 when it had a dangling reference");
- } catch (ConfigException e) {
- assertThat(e.getCause()).isNotNull().isInstanceOf(ConstraintViolationException.class);
- ConstraintViolationException cve = (ConstraintViolationException) e.getCause();
- assertThat(cve.getMessages()).isNotNull().hasSize(2);
- }
- }
-
- /**
- * Tests that aggregation is REJECTED by a constraint violation when an
- * enabled component references a disabled component and the referenced
- * component must always be enabled.
- */
- @Test
- public void testAggregationDisabledReference1() throws Exception {
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_6, TEST_CONNECTION_HANDLER_ENTRY_DISABLED);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
-
- registerAggregationDefinitionWithTargetEnabled();
-
- try {
- TestParentCfg parent = getParentCfg(TEST_PARENT_1, context);
- parent.getTestChild(entryName(TEST_CHILD_6));
- fail("Unexpectedly added test child 6 when it had a disabled reference");
- } catch (ConfigException e) {
- assertThat(e.getCause()).isNotNull().isInstanceOf(ConstraintViolationException.class);
- ConstraintViolationException cve = (ConstraintViolationException) e.getCause();
- assertThat(cve.getMessages()).isNotNull().hasSize(1);
- } finally {
- putBackDefaultAggregationDefinitionFromTargetEnabled();
- }
- }
-
- /**
- * Tests that aggregation is REJECTED by a constraint violation when a
- * disabled component references a disabled component and the referenced
- * component must always be enabled.
- */
- @Test
- public void testAggregationDisabledReference2() throws Exception {
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_7, TEST_CONNECTION_HANDLER_ENTRY_DISABLED);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
-
- registerAggregationDefinitionWithTargetEnabled();
-
- try {
- TestParentCfg parent = getParentCfg(TEST_PARENT_1, context);
- parent.getTestChild(entryName(TEST_CHILD_7));
- fail("Unexpectedly added test child 7 when it had a disabled reference");
- } catch (ConfigException e) {
- assertThat(e.getCause()).isNotNull().isInstanceOf(ConstraintViolationException.class);
- ConstraintViolationException cve = (ConstraintViolationException) e.getCause();
- assertThat(cve.getMessages()).isNotNull().hasSize(1);
- } finally {
- putBackDefaultAggregationDefinitionFromTargetEnabled();
- }
- }
-
- /**
- * Tests that aggregation is REJECTED by a constraint violation when an
- * enabled component references a disabled component and the referenced
- * component must always be enabled when the referencing component is
- * enabled.
- */
- @Test
- public void testAggregationDisabledReference3() throws Exception {
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_6, TEST_CONNECTION_HANDLER_ENTRY_DISABLED);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
-
- registerAggregationDefinitionWithTargetAndSourceEnabled();
-
- try {
- TestParentCfg parent = getParentCfg(TEST_PARENT_1, context);
- parent.getTestChild(entryName(TEST_CHILD_6));
- fail("Unexpectedly added test child 6 when it had a disabled reference");
- } catch (ConfigException e) {
- assertThat(e.getCause()).isNotNull().isInstanceOf(ConstraintViolationException.class);
- ConstraintViolationException cve = (ConstraintViolationException) e.getCause();
- assertThat(cve.getMessages()).isNotNull().hasSize(1);
- } finally {
- putBackDefaultAggregationDefinitionFromTargetAndSourceEnabled();
- }
- }
-
- /**
- * Tests that aggregation is ALLOWED when a disabled component references a
- * disabled component and the referenced component must always be enabled
- * when the referencing component is enabled.
- */
- @Test
- public void testAggregationDisabledReference4() throws Exception {
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_7, TEST_CONNECTION_HANDLER_ENTRY_DISABLED);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
-
- registerAggregationDefinitionWithTargetAndSourceEnabled();
-
- try {
- TestParentCfg parent = getParentCfg(TEST_PARENT_1, context);
- parent.getTestChild(entryName(TEST_CHILD_7));
- } finally {
- putBackDefaultAggregationDefinitionFromTargetAndSourceEnabled();
- }
- }
-
- /**
- * Tests that aggregation contains no values when it contains does not
- * contain any DN attribute values.
- */
- @Test
- public void testAggregationEmpty() throws Exception {
- ConfigurationRepository configRepository = createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_1);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
- TestChildCfg testChildCfg = parentCfg.getTestChild(entryName(TEST_CHILD_1));
-
- assertEquals(testChildCfg.getMandatoryClassProperty(),
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- assertEquals(testChildCfg.getMandatoryReadOnlyAttributeTypeProperty(), Schema.getDefaultSchema()
- .getAttributeType("description"));
- assertSetEquals(testChildCfg.getAggregationProperty(), new String[0]);
- }
-
- /**
- * Tests that aggregation contains multiple valid values when it contains a
- * multiple valid DN attribute values.
- */
- @Test
- public void testAggregationMultipleValues() throws Exception {
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_4, LDAP_CONN_HANDLER_ENTRY,
- LDAPS_CONN_HANDLER_ENTRY);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
- TestChildCfg testChildCfg = parentCfg.getTestChild(entryName(TEST_CHILD_4));
-
- assertEquals(testChildCfg.getMandatoryClassProperty(),
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- assertEquals(testChildCfg.getMandatoryReadOnlyAttributeTypeProperty(), Schema.getDefaultSchema()
- .getAttributeType("description"));
- assertSetEquals(testChildCfg.getAggregationProperty(), "LDAPS Connection Handler", "LDAP Connection Handler");
- }
-
- /**
- * Tests that aggregation contains single valid value when it contains a
- * single valid DN attribute values.
- */
- @Test
- public void testAggregationSingle() throws Exception {
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_2, LDAP_CONN_HANDLER_ENTRY);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
- TestChildCfg testChildCfg = parentCfg.getTestChild(entryName(TEST_CHILD_2));
-
- assertEquals(testChildCfg.getMandatoryClassProperty(),
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- assertEquals(testChildCfg.getMandatoryReadOnlyAttributeTypeProperty(), Schema.getDefaultSchema()
- .getAttributeType("description"));
-
- // Test normalization.
- assertSetEquals(testChildCfg.getAggregationProperty(), "LDAP Connection Handler");
- assertSetEquals(testChildCfg.getAggregationProperty(), " LDAP Connection Handler ");
- assertSetEquals(testChildCfg.getAggregationProperty(), " ldap connection HANDLER ");
- }
-
- /**
- * Tests that it is impossible to delete a referenced component when the
- * referenced component must always exist regardless of whether the
- * referencing component is enabled or not.
- */
- @Test
- public void testCannotDeleteReferencedComponent() throws Exception {
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENTS, TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_7,
- CONN_HANDLER_ENTRY, TEST_CONNECTION_HANDLER_ENTRY_ENABLED);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
-
- registerAggregationDefinitionWithTargetEnabled();
-
- ConfigurationDeleteListener<TestChildCfg> deleteListener = new DummyDeleteListener();
- try {
- // Retrieve the parent and child managed objects and register
- // delete and change listeners respectively in order to trigger
- // the constraint call-backs.
- TestParentCfg parentCfg = getParentCfg(entryName(TEST_PARENT_1), context);
- parentCfg.addTestChildDeleteListener(deleteListener);
-
- ArgumentCaptor<ConfigDeleteListener> registeredListener =
- ArgumentCaptor.forClass(ConfigDeleteListener.class);
- verify(configRepository).registerDeleteListener(eq(TEST_BASE_CHILD.getName()),
- registeredListener.capture());
-
- // Now simulate the delete ofthe referenced connection handler.
- assertThat(
- registeredListener.getValue().configDeleteIsAcceptable(TEST_CONNECTION_HANDLER_ENTRY_ENABLED,
- new LocalizableMessageBuilder())).isFalse();
-
- } finally {
- putBackDefaultAggregationDefinitionFromTargetEnabled();
- }
- }
-
- /**
- * Tests that it is impossible to disable a referenced component when the
- * referenced component must always be enabled regardless of whether the
- * referencing component is enabled or not.
- */
- @Test
- public void testCannotDisableReferencedComponent() throws Exception {
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENTS, TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_7,
- CONN_HANDLER_ENTRY, TEST_CONNECTION_HANDLER_ENTRY_ENABLED);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
-
- registerAggregationDefinitionWithTargetEnabled();
-
- ConfigurationChangeListener<TestChildCfg> changeListener = new DummyChangeListener();
- try {
- // Retrieve the parent and child managed objects and register
- // delete and change listeners respectively in order to trigger
- // the constraint call-backs.
- TestParentCfg parentCfg = getParentCfg(entryName(TEST_PARENT_1), context);
- TestChildCfg testChildCfg = parentCfg.getTestChild(entryName(TEST_CHILD_7));
- testChildCfg.addChangeListener(changeListener);
-
- ArgumentCaptor<ConfigChangeListener> registeredListener =
- ArgumentCaptor.forClass(ConfigChangeListener.class);
- verify(configRepository).registerChangeListener(eq(TEST_CHILD_7.getName()), registeredListener.capture());
-
- // Now simulate the disabling ofthe referenced connection handler.
- assertThat(
- registeredListener.getValue().configChangeIsAcceptable(TEST_CONNECTION_HANDLER_ENTRY_DISABLED,
- new LocalizableMessageBuilder())).isFalse();
-
- } finally {
- putBackDefaultAggregationDefinitionFromTargetEnabled();
- }
- }
-
- /**
- * Register the temporary aggregation definition to be used in test. You
- * must call
- * {@code putBackDefaultAggregationDefinitionFromTargetAndSourceEnabled}
- * method at end of test.
- */
- private void registerAggregationDefinitionWithTargetAndSourceEnabled() {
- TestCfg.removeConstraint(aggregationPropertyDefinitionDefault.getSourceConstraint());
- TestCfg.addPropertyDefinition(aggregationPropertyDefinitionTargetAndSourceMustBeEnabled);
- TestCfg.addConstraint(aggregationPropertyDefinitionTargetAndSourceMustBeEnabled.getSourceConstraint());
- }
-
- /**
- * Put back the default aggregation definition.
- */
- private void putBackDefaultAggregationDefinitionFromTargetAndSourceEnabled() {
- TestCfg.removeConstraint(aggregationPropertyDefinitionTargetAndSourceMustBeEnabled.getSourceConstraint());
- TestCfg.addPropertyDefinition(aggregationPropertyDefinitionDefault);
- TestCfg.addConstraint(aggregationPropertyDefinitionDefault.getSourceConstraint());
- }
-
- /**
- * Register the temporary aggregation definition to be used in test. You
- * must call {@code putBackDefaultAggregationDefinitionFromTargetEnabled}
- * method at end of test.
- */
- private void registerAggregationDefinitionWithTargetEnabled() {
- TestCfg.removeConstraint(aggregationPropertyDefinitionDefault.getSourceConstraint());
- TestCfg.addPropertyDefinition(aggregationPropertyDefinitionTargetMustBeEnabled);
- TestCfg.addConstraint(aggregationPropertyDefinitionTargetMustBeEnabled.getSourceConstraint());
- }
-
- /**
- * Put back the default aggregation definition.
- */
- private void putBackDefaultAggregationDefinitionFromTargetEnabled() {
- TestCfg.removeConstraint(aggregationPropertyDefinitionTargetMustBeEnabled.getSourceConstraint());
- TestCfg.addPropertyDefinition(aggregationPropertyDefinitionDefault);
- TestCfg.addConstraint(aggregationPropertyDefinitionDefault.getSourceConstraint());
- }
-
- /** Asserts that the actual set of DNs contains the expected values. */
- private void assertSetEquals(SortedSet<String> actual, String... expected) {
- SortedSet<String> values =
- new TreeSet<String>(TestChildCfgDefn.getInstance().getAggregationPropertyPropertyDefinition());
- if (expected != null) {
- for (String value : expected) {
- values.add(value);
- }
- }
- Assert.assertEquals((Object) actual, (Object) values);
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/server/ConstraintTest.java b/opendj-config/src/test/java/org/opends/server/admin/server/ConstraintTest.java
deleted file mode 100644
index 18299b3..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/server/ConstraintTest.java
+++ /dev/null
@@ -1,314 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import static org.fest.assertions.Assertions.*;
-import static org.mockito.Matchers.*;
-import static org.mockito.Mockito.*;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.Entry;
-import org.forgerock.opendj.ldap.ResultCode;
-import org.forgerock.opendj.ldif.LDIF;
-import org.mockito.ArgumentCaptor;
-import org.opends.server.admin.AdminTestCase;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.TestCfg;
-import org.opends.server.admin.TestChildCfg;
-import org.opends.server.admin.TestChildCfgDefn;
-import org.opends.server.admin.TestParentCfg;
-import org.opends.server.config.spi.ConfigAddListener;
-import org.opends.server.config.spi.ConfigChangeListener;
-import org.opends.server.config.spi.ConfigDeleteListener;
-import org.opends.server.config.spi.ConfigException;
-import org.opends.server.config.spi.ConfigurationRepository;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test cases for constraints on the server-side.
- */
-@SuppressWarnings("javadoc")
-public final class ConstraintTest extends AdminTestCase {
-
- private static class AddListener implements ConfigurationAddListener<TestChildCfg> {
-
- public ConfigChangeResult applyConfigurationAdd(TestChildCfg configuration) {
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
-
- public boolean isConfigurationAddAcceptable(TestChildCfg configuration,
- List<LocalizableMessage> unacceptableReasons) {
- return true;
- }
- }
-
- private static class DeleteListener implements ConfigurationDeleteListener<TestChildCfg> {
-
- public ConfigChangeResult applyConfigurationDelete(TestChildCfg configuration) {
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
-
- public boolean isConfigurationDeleteAcceptable(TestChildCfg configuration,
- List<LocalizableMessage> unacceptableReasons) {
- return true;
- }
-
- }
-
- private static class ChangeListener implements ConfigurationChangeListener<TestChildCfg> {
-
- public ConfigChangeResult applyConfigurationChange(TestChildCfg configuration) {
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
-
- public boolean isConfigurationChangeAcceptable(TestChildCfg configuration,
- List<LocalizableMessage> unacceptableReasons) {
- return true;
- }
-
- }
-
- // @Checkstyle:off
- private static final Entry TEST_CHILD_1 = LDIF.makeEntry(
- "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 1",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real");
-
- private static final Entry TEST_BASE_CHILD = LDIF.makeEntry(
- "dn:cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: test children");
-
- // Parent 1 - uses default values for
- // optional-multi-valued-dn-property.
- private static final Entry TEST_PARENT_1 = LDIF.makeEntry(
- "dn: cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-parent-dummy",
- "cn: test parent 1",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real");
-
- // @Checkstyle:on
-
- @BeforeClass
- public void setUp() throws Exception {
- TestCfg.setUp();
- }
-
- @AfterClass
- public void tearDown() throws Exception {
- TestCfg.cleanup();
- }
-
- /** Success just ensure there is no exception raised */
- @Test
- public void testGetManagedObjectSuccess() throws Exception {
- // arrange
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_1);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- MockConstraint constraint = new MockConstraint(true, false, configRepository);
- try {
- TestCfg.addConstraint(constraint);
- TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
-
- // act
- parentCfg.getTestChild(entryName(TEST_CHILD_1));
- } finally {
- TestCfg.removeConstraint(constraint);
- }
- }
-
- @Test
- public void testGetManagedObjectFail() throws Exception {
- // arrange
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_1);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- MockConstraint constraint = new MockConstraint(false, true, configRepository);
- try {
- TestCfg.addConstraint(constraint);
- TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
-
- // act
- parentCfg.getTestChild(entryName(TEST_CHILD_1));
-
- failWasExpected(ConfigException.class);
- } catch (ConfigException e) {
- // assert
- Throwable cause = e.getCause();
- assertThat(e.getCause()).isNotNull().isInstanceOf(ConstraintViolationException.class);
- ConstraintViolationException cve = (ConstraintViolationException) cause;
- assertThat(cve.getMessages().size()).isEqualTo(1);
- assertThat(cve.getManagedObject().getManagedObjectDefinition()).isSameAs(TestChildCfgDefn.getInstance());
- } finally {
- TestCfg.removeConstraint(constraint);
- }
- }
-
- @DataProvider
- Object[][] constraintValues() {
- return new Object[][] {
- // value of constraint used
- { true }, // success
- { false } // failure
- };
- }
-
- @Test(dataProvider = "constraintValues")
- public void testAddConstraint(boolean isUsableConstraint) throws Exception {
- // arrange
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_1);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
- parentCfg.addTestChildAddListener(new AddListener());
- MockConstraint constraint = new MockConstraint(isUsableConstraint, false, configRepository);
- try {
- TestCfg.addConstraint(constraint);
-
- // act
- boolean isAcceptable = simulateEntryAdd(TEST_CHILD_1, configRepository);
-
- // assert : success depends on constraint used
- assertThat(isAcceptable).isEqualTo(isUsableConstraint);
- } finally {
- TestCfg.removeConstraint(constraint);
- }
- }
-
- @Test(dataProvider = "constraintValues")
- public void testDeleteConstraint(boolean isDeleteAllowedConstraint) throws Exception {
- // arrange
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_1);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
- parentCfg.addTestChildDeleteListener(new DeleteListener());
- MockConstraint constraint = new MockConstraint(false, isDeleteAllowedConstraint, configRepository);
- try {
- TestCfg.addConstraint(constraint);
-
- // act
- boolean isAcceptable = simulateEntryDelete(TEST_CHILD_1, configRepository);
-
- // assert : success depends on constraint used
- assertThat(isAcceptable).isEqualTo(isDeleteAllowedConstraint);
- } finally {
- TestCfg.removeConstraint(constraint);
- }
- }
-
- @Test(dataProvider = "constraintValues")
- public void testChangeConstraint(boolean isUsableConstraint) throws Exception {
- // arrange
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_BASE_CHILD, TEST_CHILD_1);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- MockConstraint constraint = new MockConstraint(isUsableConstraint, false, configRepository);
- TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
- TestChildCfg childCfg = parentCfg.getTestChild(entryName(TEST_CHILD_1));
-
- try {
- TestCfg.addConstraint(constraint);
- childCfg.addChangeListener(new ChangeListener());
-
- // act
- // It is not an issue to use the same child entry here
- // as we're only interested in constraint checking
- boolean isAcceptable = simulateEntryChange(TEST_CHILD_1, configRepository);
-
- // assert : success depends on constraint used
- assertThat(isAcceptable).isEqualTo(isUsableConstraint);
- } finally {
- TestCfg.removeConstraint(constraint);
- }
- }
-
- /**
- * Simulate an entry add by triggering configAddIsAcceptable method of last
- * registered add listener.
- *
- * @return true if add is acceptable, false otherwise.
- */
- private boolean simulateEntryAdd(Entry entry, ConfigurationRepository configRepository) throws IOException {
- // use argument capture to retrieve the actual listener
- ArgumentCaptor<ConfigAddListener> registeredListener = ArgumentCaptor.forClass(ConfigAddListener.class);
- verify(configRepository).registerAddListener(eq(entry.getName().parent()), registeredListener.capture());
-
- return registeredListener.getValue().configAddIsAcceptable(entry, new LocalizableMessageBuilder());
- }
-
- /**
- * Simulate an entry delete by triggering configDeleteIsAcceptable method of
- * last registered add listener.
- *
- * @return true if delete is acceptable, false otherwise.
- */
- private boolean simulateEntryDelete(Entry entry, ConfigurationRepository configRepository) throws IOException {
- // use argument capture to retrieve the actual listener
- ArgumentCaptor<ConfigDeleteListener> registeredListener = ArgumentCaptor.forClass(ConfigDeleteListener.class);
- verify(configRepository).registerDeleteListener(eq(entry.getName().parent()), registeredListener.capture());
-
- return registeredListener.getValue().configDeleteIsAcceptable(entry, new LocalizableMessageBuilder());
- }
-
- /**
- * Simulate an entry change by triggering configChangeIsAcceptable method on
- * last registered change listener.
- *
- * @return true if change is acceptable, false otherwise.
- */
- private boolean simulateEntryChange(Entry newEntry, ConfigurationRepository configRepository) {
- // use argument capture to retrieve the actual listener
- ArgumentCaptor<ConfigChangeListener> registeredListener = ArgumentCaptor.forClass(ConfigChangeListener.class);
- verify(configRepository).registerChangeListener(eq(newEntry.getName()), registeredListener.capture());
-
- return registeredListener.getValue().configChangeIsAcceptable(newEntry, new LocalizableMessageBuilder());
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/server/DNBuilderTest.java b/opendj-config/src/test/java/org/opends/server/admin/server/DNBuilderTest.java
deleted file mode 100644
index 48c7ac5..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/server/DNBuilderTest.java
+++ /dev/null
@@ -1,113 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import static org.testng.Assert.*;
-
-import org.forgerock.opendj.ldap.DN;
-import org.opends.server.admin.AdminTestCase;
-import org.opends.server.admin.LDAPProfile;
-import org.opends.server.admin.ManagedObjectPath;
-import org.opends.server.admin.RelationDefinition;
-import org.opends.server.admin.SingletonRelationDefinition;
-import org.opends.server.admin.TestCfg;
-import org.opends.server.admin.TestChildCfg;
-import org.opends.server.admin.TestChildCfgClient;
-import org.opends.server.admin.TestChildCfgDefn;
-import org.opends.server.admin.TestParentCfgDefn;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public final class DNBuilderTest extends AdminTestCase {
-
- @BeforeClass
- public void setUp() throws Exception {
- TestCfg.setUp();
- }
-
- @AfterClass
- public void tearDown() {
- TestCfg.cleanup();
- }
-
- @Test
- public void createWithInstantiableRelationDefinition() throws Exception {
- ManagedObjectPath<?, ?> parentPath = ManagedObjectPath.emptyPath().
- child(TestCfg.getTestOneToManyParentRelationDefinition(), "test-parent-1");
- ManagedObjectPath<?, ?> childPath = parentPath.child(TestParentCfgDefn.getInstance().
- getTestChildrenRelationDefinition(), "test-child-1");
-
- assertEquals(
- DNBuilder.create(childPath),
- DN.valueOf("cn=test-child-1,cn=test children,cn=test-parent-1,cn=test parents,cn=config"));
- }
-
- @Test
- public void createWithSingletonRelationDefinition() throws Exception {
- SingletonRelationDefinition.Builder<TestChildCfgClient, TestChildCfg> builder =
- new SingletonRelationDefinition.Builder<TestChildCfgClient, TestChildCfg>(
- TestParentCfgDefn.getInstance(), "singleton-test-child", TestChildCfgDefn.getInstance());
- final SingletonRelationDefinition<TestChildCfgClient, TestChildCfg> relationDef = builder.getInstance();
-
- LDAPProfile.Wrapper wrapper = new LDAPProfile.Wrapper() {
- public String getRelationRDNSequence(RelationDefinition<?, ?> r) {
- return (r == relationDef) ? "cn=singleton-test-child" : null;
- }
- };
-
- ManagedObjectPath<?, ?> path = ManagedObjectPath.emptyPath().
- child(TestCfg.getTestOneToManyParentRelationDefinition(), "test-parent-1");
- ManagedObjectPath<?, ?> childPath = path.child(relationDef);
-
- LDAPProfile.getInstance().pushWrapper(wrapper);
- try {
- assertEquals(
- DNBuilder.create(childPath),
- DN.valueOf("cn=singleton-test-child,cn=test-parent-1,cn=test parents,cn=config"));
- } finally {
- LDAPProfile.getInstance().popWrapper();
- }
- }
-
- /**
- * Tests construction of a DN from a managed object path containing a
- * subordinate one-to-zero-or-one relationship.
- */
- @Test
- public void createWithOptionalRelationDefinition() throws Exception {
- ManagedObjectPath<?, ?> path = ManagedObjectPath
- .emptyPath().child(TestCfg.getTestOneToManyParentRelationDefinition(), "test-parent-1");
- ManagedObjectPath<?, ?> childPath =
- path.child(TestParentCfgDefn.getInstance().getOptionalTestChildRelationDefinition());
-
- assertEquals(
- DNBuilder.create(childPath),
- DN.valueOf("cn=optional test child,cn=test-parent-1,cn=test parents,cn=config"));
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/server/DefaultBehaviorTest.java b/opendj-config/src/test/java/org/opends/server/admin/server/DefaultBehaviorTest.java
deleted file mode 100644
index 2ba1721..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/server/DefaultBehaviorTest.java
+++ /dev/null
@@ -1,425 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import static org.fest.assertions.Assertions.*;
-import static org.forgerock.opendj.ldif.LDIF.*;
-import static org.mockito.Matchers.*;
-import static org.mockito.Mockito.*;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.SortedSet;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.Entry;
-import org.forgerock.opendj.ldap.ResultCode;
-import org.forgerock.opendj.ldap.schema.Schema;
-import org.mockito.ArgumentCaptor;
-import org.opends.server.admin.AdminTestCase;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.TestCfg;
-import org.opends.server.admin.TestChildCfg;
-import org.opends.server.admin.TestParentCfg;
-import org.opends.server.config.spi.ConfigAddListener;
-import org.opends.server.config.spi.ConfigChangeListener;
-import org.opends.server.config.spi.ConfigurationRepository;
-import org.testng.Assert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-/**
- * Test default behavior on the server side, by checking values of configuration objects.
- */
-public final class DefaultBehaviorTest extends AdminTestCase {
-
- private static class TestConfigurationAddListener implements ConfigurationAddListener<TestChildCfg> {
-
- private TestChildCfg childCfg;
-
- public ConfigChangeResult applyConfigurationAdd(TestChildCfg configuration) {
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
-
- /** Gets the child configuration checking that it has the expected name. */
- public TestChildCfg getChildCfg(String expectedName) {
- Assert.assertNotNull(childCfg);
- Assert.assertEquals(childCfg.dn().rdn().getFirstAVA().getAttributeValue().toString(), expectedName);
- return childCfg;
- }
-
- public boolean isConfigurationAddAcceptable(TestChildCfg configuration,
- List<LocalizableMessage> unacceptableReasons) {
- childCfg = configuration;
- return true;
- }
- }
-
- private static class TestConfigurationChangeListener implements ConfigurationChangeListener<TestChildCfg> {
-
- private TestChildCfg childCfg;
-
- public ConfigChangeResult applyConfigurationChange(TestChildCfg configuration) {
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
-
- /** Gets the child configuration checking that it has the expected name. */
- public TestChildCfg getChildCfg(String expectedName) {
- Assert.assertNotNull(childCfg);
- Assert.assertEquals(childCfg.dn().rdn().getFirstAVA().getAttributeValue().toString(), expectedName);
- return childCfg;
- }
-
- public boolean isConfigurationChangeAcceptable(TestChildCfg configuration,
- List<LocalizableMessage> unacceptableReasons) {
- childCfg = configuration;
- return true;
- }
- }
-
- // @Checkstyle:off
- static final Entry CONFIG = makeEntry(
- "dn: cn=config",
- "objectClass: top",
- "objectClass: ds-cfg-root-config",
- "cn: config");
-
- static final Entry TEST_PARENTS = makeEntry(
- "dn: cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: test parents");
-
- // Parent 1 - uses default values for optional-multi-valued-dn-property.
- static final List<String> LDIF_TEST_PARENT_1 = Arrays.asList(
- "dn: cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-parent-dummy",
- "cn: test parent 1",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real");
-
- static final Entry TEST_PARENT_1 = makeEntry(LDIF_TEST_PARENT_1);
-
- // Parent 2 - overrides default values for optional-multi-valued-dn-property.
- static final Entry TEST_PARENT_2 = makeEntry(
- "dn: cn=test parent 2,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-parent-dummy",
- "cn: test parent 2",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real",
- "ds-cfg-base-dn: dc=default value p2v1,dc=com",
- "ds-cfg-base-dn: dc=default value p2v2,dc=com");
-
- static final Entry TEST_CHILD_BASE_1 = makeEntry(
- "dn:cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: test children");
-
- static final Entry TEST_CHILD_BASE_2 = makeEntry(
- "dn:cn=test children,cn=test parent 2,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-branch",
- "cn: test children");
-
- private static final List<String> LDIF_TEST_CHILD_1 = Arrays.asList(
- "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 1",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real");
-
- private static final Entry TEST_CHILD_1 = makeEntry(LDIF_TEST_CHILD_1);
-
- private static final List<String> NEW_ATTRS_1 = Arrays.asList(
- "ds-cfg-base-dn: dc=new value 1,dc=com",
- "ds-cfg-base-dn: dc=new value 2,dc=com",
- "ds-cfg-group-dn: dc=new value 3,dc=com",
- "ds-cfg-group-dn: dc=new value 4,dc=com");
-
- private static final List<String> NEW_ATTRS_2 = Arrays.asList(
- "ds-cfg-base-dn: dc=new value 1,dc=com",
- "ds-cfg-base-dn: dc=new value 2,dc=com");
-
- private static final List<String> NEW_ATTRS_3 = Arrays.asList(
- "ds-cfg-group-dn: dc=new value 1,dc=com",
- "ds-cfg-group-dn: dc=new value 2,dc=com");
-
- private static final Entry TEST_CHILD_2 = makeEntry(
- "dn: cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 2",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real",
- "ds-cfg-base-dn: dc=default value c2v1,dc=com",
- "ds-cfg-base-dn: dc=default value c2v2,dc=com");
-
- private static final Entry TEST_CHILD_3 = makeEntry(
- "dn: cn=test child 3,cn=test children,cn=test parent 1,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 3",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real",
- "ds-cfg-base-dn: dc=default value c3v1,dc=com",
- "ds-cfg-base-dn: dc=default value c3v2,dc=com",
- "ds-cfg-group-dn: dc=default value c3v3,dc=com",
- "ds-cfg-group-dn: dc=default value c3v4,dc=com");
-
- private static final Entry TEST_CHILD_4 = makeEntry(
- "dn: cn=test child 4,cn=test children,cn=test parent 2,cn=test parents,cn=config",
- "objectclass: top",
- "objectclass: ds-cfg-test-child-dummy",
- "cn: test child 4",
- "ds-cfg-enabled: true",
- "ds-cfg-java-class: org.opends.server.extensions.UserDefinedVirtualAttributeProvider",
- "ds-cfg-attribute-type: description",
- "ds-cfg-conflict-behavior: virtual-overrides-real");
-
- // @Checkstyle:on
-
- @BeforeClass
- public void setUp() throws Exception {
- TestCfg.setUp();
- }
-
- @AfterClass
- public void tearDown() throws Exception {
- TestCfg.cleanup();
- }
-
- @DataProvider
- Object[][] childConfigurationsValues() {
- return new Object[][] {
- // parent entry, child base entry, child entry,
- // expected first dn property values,
- // expected second dn property values
- { TEST_PARENT_1, TEST_CHILD_BASE_1, TEST_CHILD_1,
- Arrays.asList("dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com"),
- Arrays.asList("dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com") },
-
- { TEST_PARENT_1, TEST_CHILD_BASE_1, TEST_CHILD_2,
- Arrays.asList("dc=default value c2v1,dc=com", "dc=default value c2v2,dc=com"),
- Arrays.asList("dc=default value c2v1,dc=com", "dc=default value c2v2,dc=com") },
-
- { TEST_PARENT_1, TEST_CHILD_BASE_1, TEST_CHILD_3,
- Arrays.asList("dc=default value c3v1,dc=com", "dc=default value c3v2,dc=com"),
- Arrays.asList("dc=default value c3v3,dc=com", "dc=default value c3v4,dc=com") },
-
- { TEST_PARENT_2, TEST_CHILD_BASE_2, TEST_CHILD_4,
- Arrays.asList("dc=default value p2v1,dc=com", "dc=default value p2v2,dc=com"),
- Arrays.asList("dc=default value p2v1,dc=com", "dc=default value p2v2,dc=com") } };
- }
-
- /**
- * Test that a child config have correct values when accessed from its
- * parent config.
- */
- @Test(dataProvider = "childConfigurationsValues")
- public void testChildValues(Entry testParent, Entry testBaseChild, Entry testChild,
- List<String> valuesForOptionalDNProperty1, List<String> valuesForOptionalDNProperty2) throws Exception {
- // arrange
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(testParent, testBaseChild, testChild);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfg parentCfg = getParentCfg(testParent, context);
-
- // assert
- assertChildHasCorrectValues(parentCfg.getTestChild(entryName(testChild)), valuesForOptionalDNProperty1,
- valuesForOptionalDNProperty2);
- }
-
- /**
- * Test that a child config have correct values when accessed through an add
- * listener.
- */
- @Test(dataProvider = "childConfigurationsValues")
- public void testAddListenerChildValues(Entry testParent, Entry testBaseChild, Entry testChild,
- List<String> valuesForOptionalDNProperty1, List<String> valuesForOptionalDNProperty2) throws Exception {
- // arrange
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(testParent, testBaseChild, testChild);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfg parentCfg = getParentCfg(testParent, context);
- TestConfigurationAddListener addListener = new TestConfigurationAddListener();
- parentCfg.addTestChildAddListener(addListener);
-
- // act
- simulateEntryAdd(testChild, configRepository);
-
- // assert
- assertChildHasCorrectValues(addListener.getChildCfg(entryName(testChild)), valuesForOptionalDNProperty1,
- valuesForOptionalDNProperty2);
- }
-
- @DataProvider
- Object[][] childConfigurationsValuesForChangeListener() {
- return new Object[][] {
- // new entry after change, expected first dn property values,
- // expected second dn property values
- { makeEntryFrom(LDIF_TEST_CHILD_1, NEW_ATTRS_1),
- Arrays.asList("dc=new value 1,dc=com", "dc=new value 2,dc=com"),
- Arrays.asList("dc=new value 3,dc=com", "dc=new value 4,dc=com") },
-
- { makeEntryFrom(LDIF_TEST_CHILD_1, NEW_ATTRS_2),
- Arrays.asList("dc=new value 1,dc=com", "dc=new value 2,dc=com"),
- Arrays.asList("dc=new value 1,dc=com", "dc=new value 2,dc=com") },
-
- { makeEntryFrom(LDIF_TEST_CHILD_1, NEW_ATTRS_3),
- Arrays.asList("dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com"),
- Arrays.asList("dc=new value 1,dc=com", "dc=new value 2,dc=com") },
-
- { makeEntryFrom(LDIF_TEST_PARENT_1, NEW_ATTRS_2),
- Arrays.asList("dc=new value 1,dc=com", "dc=new value 2,dc=com"),
- Arrays.asList("dc=new value 1,dc=com", "dc=new value 2,dc=com") } };
- }
-
- /**
- * Tests that a child config have correct values when accessed through an
- * change listener. The defaulted properties are replaced with some real
- * values.
- */
- @Test(dataProvider = "childConfigurationsValuesForChangeListener")
- public void testChangeListenerChildValues(Entry newEntry, List<String> valuesForOptionalDNProperty1,
- List<String> valuesForOptionalDNProperty2) throws Exception {
- // arrange
- ConfigurationRepository configRepository =
- createConfigRepositoryWithEntries(TEST_PARENT_1, TEST_CHILD_BASE_1, TEST_CHILD_1);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfg parentCfg = getParentCfg(TEST_PARENT_1, context);
- TestChildCfg childCfg = parentCfg.getTestChild(entryName(TEST_CHILD_1));
- TestConfigurationChangeListener changeListener = new TestConfigurationChangeListener();
- childCfg.addChangeListener(changeListener);
-
- // act
- simulateEntryChange(newEntry, configRepository);
-
- // assert
- assertChildHasCorrectValues(changeListener.getChildCfg(entryName(TEST_CHILD_1)),
- valuesForOptionalDNProperty1, valuesForOptionalDNProperty2);
- }
-
- @DataProvider
- Object[][] parentConfigurationsValues() {
- return new Object[][] {
- // parent entry, expected first dn property values, expected second
- // dn property values
- { TEST_PARENT_1, Arrays.asList("dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com") },
- { TEST_PARENT_2, Arrays.asList("dc=default value p2v1,dc=com", "dc=default value p2v2,dc=com") } };
- }
-
- /**
- * Tests that parent configuration has correct values.
- */
- @Test(dataProvider = "parentConfigurationsValues")
- public void testParentValues(Entry parentEntry, List<String> valuesForOptionalDNProperty) throws Exception {
- ConfigurationRepository configRepository = createConfigRepositoryWithEntries(parentEntry);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- TestParentCfg parent = getParentCfg(parentEntry, context);
-
- assertThat(parent.getMandatoryClassProperty()).isEqualTo(
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- assertThat(parent.getMandatoryReadOnlyAttributeTypeProperty()).isEqualTo(
- Schema.getDefaultSchema().getAttributeType("description"));
- assertDNSetEquals(parent.getOptionalMultiValuedDNProperty(), valuesForOptionalDNProperty);
- }
-
- /**
- * Simulate an entry add by triggering configAddIsAcceptable method of last
- * registered add listener.
- */
- private void simulateEntryAdd(Entry entry, ConfigurationRepository configRepository) throws IOException {
- // use argument capture to retrieve the actual listener
- ArgumentCaptor<ConfigAddListener> registeredListener = ArgumentCaptor.forClass(ConfigAddListener.class);
- verify(configRepository).registerAddListener(eq(entry.getName().parent()), registeredListener.capture());
-
- registeredListener.getValue().configAddIsAcceptable(entry, new LocalizableMessageBuilder());
- }
-
- /**
- * Simulate an entry change by triggering configChangeIsAcceptable method on
- * last registered change listener.
- */
- private void simulateEntryChange(Entry newEntry, ConfigurationRepository configRepository) {
- // use argument capture to retrieve the actual listener
- ArgumentCaptor<ConfigChangeListener> registeredListener = ArgumentCaptor.forClass(ConfigChangeListener.class);
- verify(configRepository).registerChangeListener(eq(newEntry.getName()), registeredListener.capture());
-
- registeredListener.getValue().configChangeIsAcceptable(newEntry, new LocalizableMessageBuilder());
- }
-
- private void assertChildHasCorrectValues(TestChildCfg child, List<String> dnProperty1, List<String> dnProperty2) {
- assertThat(child.getMandatoryClassProperty()).isEqualTo(
- "org.opends.server.extensions.UserDefinedVirtualAttributeProvider");
- assertThat(child.getMandatoryReadOnlyAttributeTypeProperty()).isEqualTo(
- Schema.getDefaultSchema().getAttributeType("description"));
- assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(), dnProperty1);
- assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(), dnProperty2);
- }
-
- /** Asserts that the actual set of DNs contains the expected values */
- private void assertDNSetEquals(SortedSet<DN> actualDNs, List<String> expectedDNs) {
- String[] actualStrings = new String[actualDNs.size()];
- int i = 0;
- for (DN dn : actualDNs) {
- actualStrings[i] = dn.toString();
- i++;
- }
- assertThat(actualStrings).containsOnly(expectedDNs.toArray(new Object[expectedDNs.size()]));
- }
-
- /** Make an entry by combining two lists */
- static Entry makeEntryFrom(List<String> base, List<String> attrs) {
- List<String> ldif = new ArrayList<String>(base);
- ldif.addAll(attrs);
- return makeEntry(ldif.toArray(new String[0]));
- }
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/server/ListenerTest.java b/opendj-config/src/test/java/org/opends/server/admin/server/ListenerTest.java
deleted file mode 100644
index 135de3f..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/server/ListenerTest.java
+++ /dev/null
@@ -1,283 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import static org.fest.assertions.Assertions.*;
-import static org.forgerock.opendj.ldif.LDIF.*;
-import static org.mockito.Mockito.*;
-
-import java.util.Arrays;
-
-import org.forgerock.opendj.admin.server.RootCfg;
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldap.Entry;
-import org.mockito.ArgumentCaptor;
-import org.opends.server.admin.AdminTestCase;
-import org.opends.server.admin.PropertyDefinitionsOptions;
-import org.opends.server.admin.TestCfg;
-import org.opends.server.admin.TestParentCfg;
-import org.opends.server.config.spi.ConfigAddListener;
-import org.opends.server.config.spi.ConfigChangeListener;
-import org.opends.server.config.spi.ConfigDeleteListener;
-import org.opends.server.config.spi.ConfigException;
-import org.opends.server.config.spi.ConfigurationRepository;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-@SuppressWarnings({ "javadoc", "rawtypes", "unchecked" })
-public class ListenerTest extends AdminTestCase {
-
- private static final DN ROOT_CONFIG_DN = DN.valueOf("cn=config");
- private static final DN TEST_PARENTS_DN = DN.valueOf("cn=test parents,cn=config");
-
- @BeforeClass
- public void setUp() throws Exception {
- TestCfg.setUp();
- }
-
- @AfterClass
- public void tearDown() throws Exception {
- TestCfg.cleanup();
- }
-
- private Entry getTestParentEntry() throws Exception {
- return makeEntry("dn: cn=test parents,cn=config", "objectclass: top", "objectclass: ds-cfg-branch",
- "cn: test parents");
- }
-
- /**
- * Create a mock of ConfigurationRepository with provided DNs registered.
- */
- private ConfigurationRepository createConfigRepositoryWithDNs(DN... dns) throws ConfigException {
- ConfigurationRepository configRepository = mock(ConfigurationRepository.class);
- for (DN dn : dns) {
- when(configRepository.hasEntry(dn)).thenReturn(true);
- }
- return configRepository;
- }
-
- /**
- * Register a listener for test parent entry and return the actual
- * registered listener
- */
- private ConfigAddListener registerAddListenerForTestParent(ConfigurationRepository configRepository,
- ServerManagedObject<RootCfg> root, ConfigurationAddListener<TestParentCfg> parentListener) throws Exception {
- root.registerAddListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
-
- ArgumentCaptor<ConfigAddListener> registered = ArgumentCaptor.forClass(ConfigAddListener.class);
- verify(configRepository).registerAddListener(eq(TEST_PARENTS_DN), registered.capture());
- return registered.getValue();
- }
-
- /**
- * Register a listener for test parent entry in delayed scenario and return
- * the actual registered listener
- */
- private DelayedConfigAddListener registerAddListenerForTestParentDelayed(
- ConfigurationRepository configRepository, ServerManagedObject<RootCfg> root,
- ConfigurationAddListener<TestParentCfg> parentListener) throws Exception {
- root.registerAddListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
-
- ArgumentCaptor<DelayedConfigAddListener> registered = ArgumentCaptor.forClass(DelayedConfigAddListener.class);
- verify(configRepository).registerAddListener(eq(ROOT_CONFIG_DN), registered.capture());
- return registered.getValue();
- }
-
- @Test
- public void testRegisterAddListenerWithInstantiableRelationImmediate() throws Exception {
- ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN, TEST_PARENTS_DN);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
-
- root.registerAddListener(TestCfg.getTestOneToManyParentRelationDefinition(),
- mock(ConfigurationAddListener.class));
-
- verify(configRepository).registerAddListener(eq(TEST_PARENTS_DN), isA(ConfigAddListener.class));
- }
-
- @Test
- public void testRegisterAddListenerWithInstantiableRelationDelayed() throws Exception {
- ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
-
- ConfigurationAddListener<TestParentCfg> parentListener = mock(ConfigurationAddListener.class);
- root.registerAddListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
-
- ArgumentCaptor<DelayedConfigAddListener> registered = ArgumentCaptor.forClass(DelayedConfigAddListener.class);
- verify(configRepository).registerAddListener(eq(ROOT_CONFIG_DN), registered.capture());
- // check that actual listener is the one provided to the root
- ConfigurationAddListener<?> actualListener =
- ((ServerManagedObjectAddListenerAdaptor<?>)
- ((ConfigAddListenerAdaptor<?>) registered.getValue().getDelayedAddListener()).
- getServerManagedObjectAddListener()).getConfigurationAddListener();
- assertThat(actualListener).isEqualTo(parentListener);
- }
-
- @Test
- public void testRegisterAddListenerWithInstantiableRelationDelayedThenActualized() throws Exception {
- ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
-
- // register a listener to root
- ConfigurationAddListener<TestParentCfg> parentListener = mock(ConfigurationAddListener.class);
- root.registerAddListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
-
- // get the delayed listener registered to configuration repository
- ArgumentCaptor<DelayedConfigAddListener> registered = ArgumentCaptor.forClass(DelayedConfigAddListener.class);
- verify(configRepository).registerAddListener(eq(ROOT_CONFIG_DN), registered.capture());
-
- // now simulate the add of target entry
- String parentDN = "cn=test parents,cn=config";
- when(configRepository.hasEntry(DN.valueOf(parentDN))).thenReturn(true);
- registered.getValue().applyConfigurationAdd(getTestParentEntry());
-
- // check that listener is added for target entry and deleted for its
- // parent entry
- ConfigAddListenerAdaptor listener =
- (ConfigAddListenerAdaptor<?>) registered.getValue().getDelayedAddListener();
- verify(configRepository).registerAddListener(DN.valueOf(parentDN), listener);
- verify(configRepository).deregisterAddListener(ROOT_CONFIG_DN, registered.getValue());
- }
-
- @Test
- public void testRegisterAddListenerWithOptionalRelation() throws Exception {
- ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
-
- root.registerAddListener(TestCfg.getTestOneToZeroOrOneParentRelationDefinition(),
- mock(ConfigurationAddListener.class));
-
- verify(configRepository).registerAddListener(eq(ROOT_CONFIG_DN), isA(ConfigAddListener.class));
- }
-
- @Test
- public void testRegisterDeleteListenerWithInstantiableRelationImmediate() throws Exception {
- ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN, TEST_PARENTS_DN);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
-
- root.registerDeleteListener(TestCfg.getTestOneToManyParentRelationDefinition(),
- mock(ConfigurationDeleteListener.class));
-
- verify(configRepository).registerDeleteListener(eq(TEST_PARENTS_DN), isA(ConfigDeleteListener.class));
- }
-
- @Test
- public void testRegisterDeleteListenerWithInstantiableRelationDelayed() throws Exception {
- ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
-
- ConfigurationDeleteListener<TestParentCfg> parentListener = mock(ConfigurationDeleteListener.class);
- root.registerDeleteListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
-
- ArgumentCaptor<DelayedConfigAddListener> argument = ArgumentCaptor.forClass(DelayedConfigAddListener.class);
- verify(configRepository).registerAddListener(eq(ROOT_CONFIG_DN), argument.capture());
- // check that actual listener is the one provided to the root
- ConfigurationDeleteListener actualListener =
- ((ServerManagedObjectDeleteListenerAdaptor)
- ((ConfigDeleteListenerAdaptor) argument.getValue().getDelayedDeleteListener()).
- getServerManagedObjectDeleteListener()).getConfigurationDeleteListener();
- assertThat(actualListener).isEqualTo(parentListener);
- }
-
- @Test
- public void testRegisterDeleteListenerWithOptionalRelation() throws Exception {
- ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
-
- root.registerDeleteListener(TestCfg.getTestOneToZeroOrOneParentRelationDefinition(),
- mock(ConfigurationDeleteListener.class));
-
- verify(configRepository).registerDeleteListener(eq(ROOT_CONFIG_DN), isA(ConfigDeleteListener.class));
- }
-
- @Test
- public void testRegisterChangeListener() throws Exception {
- ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
- root.setConfigDN(ROOT_CONFIG_DN);
-
- root.registerChangeListener(mock(ConfigurationChangeListener.class));
-
- verify(configRepository).registerChangeListener(eq(ROOT_CONFIG_DN), isA(ConfigChangeListener.class));
- }
-
- @Test
- public void testDeregisterAddListenerWithInstantiableRelationImmediate() throws Exception {
- // arrange
- ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN, TEST_PARENTS_DN);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
-
- ConfigurationAddListener<TestParentCfg> parentListener = mock(ConfigurationAddListener.class);
- ConfigAddListener registeredListener =
- registerAddListenerForTestParent(configRepository, root, parentListener);
- when(configRepository.getAddListeners(TEST_PARENTS_DN)).thenReturn(Arrays.asList(registeredListener));
-
- // act
- root.deregisterAddListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
-
- // assert
- verify(configRepository).deregisterAddListener(eq(TEST_PARENTS_DN), same(registeredListener));
- }
-
- @Test
- public void testDeregisterAddListenerWithInstantiableRelationDelayed() throws Exception {
- // arrange
- ConfigurationRepository configRepository = createConfigRepositoryWithDNs(ROOT_CONFIG_DN);
- ServerManagementContext context =
- new ServerManagementContext(configRepository, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
- ServerManagedObject<RootCfg> root = context.getRootConfigurationManagedObject();
-
- ConfigurationAddListener<TestParentCfg> parentListener = mock(ConfigurationAddListener.class);
- ConfigAddListener registeredListener =
- registerAddListenerForTestParentDelayed(configRepository, root, parentListener);
- when(configRepository.getAddListeners(ROOT_CONFIG_DN)).thenReturn(Arrays.asList(registeredListener));
-
- // act
- root.deregisterAddListener(TestCfg.getTestOneToManyParentRelationDefinition(), parentListener);
-
- // assert
- verify(configRepository).deregisterAddListener(eq(ROOT_CONFIG_DN), same(registeredListener));
- }
-
-}
diff --git a/opendj-config/src/test/java/org/opends/server/admin/server/MockConstraint.java b/opendj-config/src/test/java/org/opends/server/admin/server/MockConstraint.java
deleted file mode 100644
index ac132b1..0000000
--- a/opendj-config/src/test/java/org/opends/server/admin/server/MockConstraint.java
+++ /dev/null
@@ -1,146 +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 legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * 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 legal-notices/CDDLv1_0.txt.
- * 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
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.admin.server;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.opendj.ldap.DN;
-import org.opends.server.admin.Constraint;
-import org.opends.server.admin.client.ClientConstraintHandler;
-import org.opends.server.config.spi.ConfigException;
-import org.opends.server.config.spi.ConfigurationRepository;
-import org.testng.Assert;
-
-/**
- * A mock constraint which can be configured to refuse various types of
- * operation.
- */
-public final class MockConstraint extends Constraint {
-
- /**
- * Mock server constraint handler.
- */
- private class MockConstraintHandler extends ServerConstraintHandler {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isDeleteAllowed(ServerManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ConfigException {
- if (!isDeleteAllowed) {
- unacceptableReasons.add(LocalizableMessage.raw("Configuration cannot be deleted."));
- }
-
- return isDeleteAllowed;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isUsable(ServerManagedObject<?> managedObject,
- Collection<LocalizableMessage> unacceptableReasons) throws ConfigException {
- if (!isUsable) {
- unacceptableReasons.add(LocalizableMessage.raw("Configuration is not usable."));
- }
-
- return isUsable;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void performPostAdd(ServerManagedObject<?> managedObject) throws ConfigException {
- // Make sure that the associated config entry exists.
- DN targetDN = managedObject.getDN();
- Assert.assertTrue(configRepository.hasEntry(targetDN));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void performPostDelete(ServerManagedObject<?> managedObject) throws ConfigException {
- // Make sure that the associated config entry does not exist.
- DN targetDN = managedObject.getDN();
- Assert.assertTrue(configRepository.hasEntry(targetDN));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void performPostModify(ServerManagedObject<?> managedObject) throws ConfigException {
- // Make sure that the associated config entry exists.
- DN targetDN = managedObject.getDN();
- Assert.assertTrue(configRepository.hasEntry(targetDN));
- }
-
- }
-
- // Determines if delete operations are allowed.
- private final boolean isDeleteAllowed;
-
- // Determines if configurations can be decoded.
- private final boolean isUsable;
-
- private final ConfigurationRepository configRepository;
-
- /**
- * Creates a new mock constraint.
- *
- * @param isUsable
- * Determines if configurations can be decoded.
- * @param isDeleteAllowed
- * Determines if delete operations are allowed.
- * @param configRepository
- * Configuration entries.
- */
- public MockConstraint(boolean isUsable, boolean isDeleteAllowed, ConfigurationRepository configRepository) {
- this.isUsable = isUsable;
- this.isDeleteAllowed = isDeleteAllowed;
- this.configRepository = configRepository;
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<ClientConstraintHandler> getClientConstraintHandlers() {
- return Collections.emptySet();
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<ServerConstraintHandler> getServerConstraintHandlers() {
- return Collections.<ServerConstraintHandler> singleton(new MockConstraintHandler());
- }
-
-}
diff --git a/opendj-config/src/test/resources/org/opends/server/admin/TestChildCfgDefn.properties b/opendj-config/src/test/resources/org/forgerock/opendj/config/TestChildCfgDefn.properties
similarity index 100%
rename from opendj-config/src/test/resources/org/opends/server/admin/TestChildCfgDefn.properties
rename to opendj-config/src/test/resources/org/forgerock/opendj/config/TestChildCfgDefn.properties
diff --git a/opendj-config/src/test/resources/org/forgerock/opendj/config/TestChildConfiguration.xml b/opendj-config/src/test/resources/org/forgerock/opendj/config/TestChildConfiguration.xml
new file mode 100644
index 0000000..ae64d9e
--- /dev/null
+++ b/opendj-config/src/test/resources/org/forgerock/opendj/config/TestChildConfiguration.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="test-child" plural-name="test-children"
+ package="org.forgerock.opendj.server.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ A configuration for testing components that are subordinate to a
+ parent component. It re-uses the virtual-attribute configuration
+ LDAP profile.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:oid>1.3.6.1.4.1.26027.1.2.4455114402</ldap:oid>
+ <ldap:name>ds-cfg-test-child-dummy</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:property name="mandatory-boolean-property" mandatory="true">
+ <adm:synopsis>A mandatory boolean property.</adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:oid>1.3.6.1.4.1.26027.1.1.326</ldap:oid>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="mandatory-class-property" mandatory="true">
+ <adm:synopsis>
+ A mandatory Java-class property requiring a component restart.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.UserDefinedVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.VirtualAttributeProvider
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:oid>1.3.6.1.4.1.26027.1.1.325</ldap:oid>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="mandatory-read-only-attribute-type-property"
+ mandatory="true" read-only="true">
+ <adm:synopsis>
+ A mandatory read-only attribute type property.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:oid>1.3.6.1.4.1.26027.1.1.327</ldap:oid>
+ <ldap:name>ds-cfg-attribute-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="optional-multi-valued-dn-property1"
+ multi-valued="true">
+ <adm:synopsis>
+ An optional multi-valued DN property which inherits its values
+ from optional-multi-valued-dn-property in the parent.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:inherited>
+ <adm:relative property-name="optional-multi-valued-dn-property"
+ offset="1" managed-object-name="test-parent" />
+ </adm:inherited>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:oid>1.3.6.1.4.1.26027.1.1.328</ldap:oid>
+ <ldap:name>ds-cfg-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="optional-multi-valued-dn-property2"
+ multi-valued="true">
+ <adm:synopsis>
+ An optional multi-valued DN property which inherits its values
+ from optional-multi-valued-dn-property1.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:inherited>
+ <adm:relative property-name="optional-multi-valued-dn-property1"
+ offset="0" managed-object-name="test-child" />
+ </adm:inherited>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:oid>1.3.6.1.4.1.26027.1.1.329</ldap:oid>
+ <ldap:name>ds-cfg-group-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="aggregation-property" multi-valued="true">
+ <adm:synopsis>
+ An aggregation property which references connection handlers.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:undefined />
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:aggregation parent-path="/"
+ relation-name="connection-handler" />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:oid>1.3.6.1.4.1.26027.1.1.332</ldap:oid>
+ <ldap:name>ds-task-initialize-domain-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/test/resources/org/opends/server/admin/TestParentCfgDefn.properties b/opendj-config/src/test/resources/org/forgerock/opendj/config/TestParentCfgDefn.properties
similarity index 100%
rename from opendj-config/src/test/resources/org/opends/server/admin/TestParentCfgDefn.properties
rename to opendj-config/src/test/resources/org/forgerock/opendj/config/TestParentCfgDefn.properties
diff --git a/opendj-config/src/test/resources/org/forgerock/opendj/config/TestParentConfiguration.xml b/opendj-config/src/test/resources/org/forgerock/opendj/config/TestParentConfiguration.xml
new file mode 100644
index 0000000..7df1ade
--- /dev/null
+++ b/opendj-config/src/test/resources/org/forgerock/opendj/config/TestParentConfiguration.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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 legal-notices/CDDLv1_0.txt
+ ! or http://forgerock.org/license/CDDLv1.0.html.
+ ! 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 legal-notices/CDDLv1_0.txt.
+ ! 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
+ !
+ !
+ ! Copyright 2008 Sun Microsystems, Inc.
+ ! -->
+<adm:managed-object name="test-parent" plural-name="test-parents"
+ package="org.forgerock.opendj.config"
+ xmlns:adm="http://opendj.forgerock.org/admin"
+ xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
+ <adm:synopsis>
+ A configuration for testing components that have child components.
+ It re-uses the virtual-attribute configuration LDAP profile.
+ </adm:synopsis>
+ <adm:profile name="ldap">
+ <ldap:object-class>
+ <ldap:oid>1.3.6.1.4.1.26027.1.2.4455114401</ldap:oid>
+ <ldap:name>ds-cfg-test-parent-dummy</ldap:name>
+ <ldap:superior>top</ldap:superior>
+ </ldap:object-class>
+ </adm:profile>
+ <adm:relation name="test-child">
+ <adm:one-to-many />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=multiple children</ldap:rdn-sequence>
+ </adm:profile>
+ </adm:relation>
+ <adm:relation name="optional-test-child"
+ managed-object-name="test-child">
+ <adm:one-to-zero-or-one />
+ <adm:profile name="ldap">
+ <ldap:rdn-sequence>cn=optional child</ldap:rdn-sequence>
+ </adm:profile>
+ </adm:relation>
+ <adm:property name="mandatory-boolean-property" mandatory="true">
+ <adm:synopsis>A mandatory boolean property.</adm:synopsis>
+ <adm:syntax>
+ <adm:boolean />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:oid>1.3.6.1.4.1.26027.1.1.326</ldap:oid>
+ <ldap:name>ds-cfg-enabled</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="mandatory-class-property" mandatory="true">
+ <adm:synopsis>
+ A mandatory Java-class property requiring a component restart.
+ </adm:synopsis>
+ <adm:requires-admin-action>
+ <adm:component-restart />
+ </adm:requires-admin-action>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>
+ org.opends.server.extensions.UserDefinedVirtualAttributeProvider
+ </adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:java-class>
+ <adm:instance-of>
+ org.opends.server.api.VirtualAttributeProvider
+ </adm:instance-of>
+ </adm:java-class>
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:oid>1.3.6.1.4.1.26027.1.1.325</ldap:oid>
+ <ldap:name>ds-cfg-java-class</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="mandatory-read-only-attribute-type-property"
+ mandatory="true" read-only="true">
+ <adm:synopsis>
+ A mandatory read-only attribute type property.
+ </adm:synopsis>
+ <adm:syntax>
+ <adm:attribute-type />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:oid>1.3.6.1.4.1.26027.1.1.327</ldap:oid>
+ <ldap:name>ds-cfg-attribute-type</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+ <adm:property name="optional-multi-valued-dn-property"
+ multi-valued="true">
+ <adm:synopsis>
+ An optional multi-valued DN property with a defined default
+ behavior.
+ </adm:synopsis>
+ <adm:default-behavior>
+ <adm:defined>
+ <adm:value>dc=domain1,dc=com</adm:value>
+ <adm:value>dc=domain2,dc=com</adm:value>
+ <adm:value>dc=domain3,dc=com</adm:value>
+ </adm:defined>
+ </adm:default-behavior>
+ <adm:syntax>
+ <adm:dn />
+ </adm:syntax>
+ <adm:profile name="ldap">
+ <ldap:attribute>
+ <ldap:oid>1.3.6.1.4.1.26027.1.1.328</ldap:oid>
+ <ldap:name>ds-cfg-base-dn</ldap:name>
+ </ldap:attribute>
+ </adm:profile>
+ </adm:property>
+</adm:managed-object>
diff --git a/opendj-config/src/test/resources/org/opends/server/admin/TestChildConfiguration.xml b/opendj-config/src/test/resources/org/opends/server/admin/TestChildConfiguration.xml
deleted file mode 100644
index 89a45d9..0000000
--- a/opendj-config/src/test/resources/org/opends/server/admin/TestChildConfiguration.xml
+++ /dev/null
@@ -1,160 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="test-child" plural-name="test-children"
- package="org.opends.server.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- A configuration for testing components that are subordinate to a
- parent component. It re-uses the virtual-attribute configuration
- LDAP profile.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:oid>1.3.6.1.4.1.26027.1.2.4455114402</ldap:oid>
- <ldap:name>ds-cfg-test-child-dummy</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property name="mandatory-boolean-property" mandatory="true">
- <adm:synopsis>A mandatory boolean property.</adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:oid>1.3.6.1.4.1.26027.1.1.326</ldap:oid>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="mandatory-class-property" mandatory="true">
- <adm:synopsis>
- A mandatory Java-class property requiring a component restart.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.UserDefinedVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.VirtualAttributeProvider
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:oid>1.3.6.1.4.1.26027.1.1.325</ldap:oid>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="mandatory-read-only-attribute-type-property"
- mandatory="true" read-only="true">
- <adm:synopsis>
- A mandatory read-only attribute type property.
- </adm:synopsis>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:oid>1.3.6.1.4.1.26027.1.1.327</ldap:oid>
- <ldap:name>ds-cfg-attribute-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="optional-multi-valued-dn-property1"
- multi-valued="true">
- <adm:synopsis>
- An optional multi-valued DN property which inherits its values
- from optional-multi-valued-dn-property in the parent.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:inherited>
- <adm:relative property-name="optional-multi-valued-dn-property"
- offset="1" managed-object-name="test-parent" />
- </adm:inherited>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:oid>1.3.6.1.4.1.26027.1.1.328</ldap:oid>
- <ldap:name>ds-cfg-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="optional-multi-valued-dn-property2"
- multi-valued="true">
- <adm:synopsis>
- An optional multi-valued DN property which inherits its values
- from optional-multi-valued-dn-property1.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:inherited>
- <adm:relative property-name="optional-multi-valued-dn-property1"
- offset="0" managed-object-name="test-child" />
- </adm:inherited>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:oid>1.3.6.1.4.1.26027.1.1.329</ldap:oid>
- <ldap:name>ds-cfg-group-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="aggregation-property" multi-valued="true">
- <adm:synopsis>
- An aggregation property which references connection handlers.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:undefined />
- </adm:default-behavior>
- <adm:syntax>
- <adm:aggregation parent-path="/"
- relation-name="connection-handler" />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:oid>1.3.6.1.4.1.26027.1.1.332</ldap:oid>
- <ldap:name>ds-task-initialize-domain-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
diff --git a/opendj-config/src/test/resources/org/opends/server/admin/TestParentConfiguration.xml b/opendj-config/src/test/resources/org/opends/server/admin/TestParentConfiguration.xml
deleted file mode 100644
index 8e010e8..0000000
--- a/opendj-config/src/test/resources/org/opends/server/admin/TestParentConfiguration.xml
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! 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 legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! 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 legal-notices/CDDLv1_0.txt.
- ! 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
- !
- !
- ! Copyright 2008 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="test-parent" plural-name="test-parents"
- package="org.opends.server.admin"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>
- A configuration for testing components that have child components.
- It re-uses the virtual-attribute configuration LDAP profile.
- </adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:oid>1.3.6.1.4.1.26027.1.2.4455114401</ldap:oid>
- <ldap:name>ds-cfg-test-parent-dummy</ldap:name>
- <ldap:superior>top</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:relation name="test-child">
- <adm:one-to-many />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=multiple children</ldap:rdn-sequence>
- </adm:profile>
- </adm:relation>
- <adm:relation name="optional-test-child"
- managed-object-name="test-child">
- <adm:one-to-zero-or-one />
- <adm:profile name="ldap">
- <ldap:rdn-sequence>cn=optional child</ldap:rdn-sequence>
- </adm:profile>
- </adm:relation>
- <adm:property name="mandatory-boolean-property" mandatory="true">
- <adm:synopsis>A mandatory boolean property.</adm:synopsis>
- <adm:syntax>
- <adm:boolean />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:oid>1.3.6.1.4.1.26027.1.1.326</ldap:oid>
- <ldap:name>ds-cfg-enabled</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="mandatory-class-property" mandatory="true">
- <adm:synopsis>
- A mandatory Java-class property requiring a component restart.
- </adm:synopsis>
- <adm:requires-admin-action>
- <adm:component-restart />
- </adm:requires-admin-action>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>
- org.opends.server.extensions.UserDefinedVirtualAttributeProvider
- </adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:java-class>
- <adm:instance-of>
- org.opends.server.api.VirtualAttributeProvider
- </adm:instance-of>
- </adm:java-class>
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:oid>1.3.6.1.4.1.26027.1.1.325</ldap:oid>
- <ldap:name>ds-cfg-java-class</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="mandatory-read-only-attribute-type-property"
- mandatory="true" read-only="true">
- <adm:synopsis>
- A mandatory read-only attribute type property.
- </adm:synopsis>
- <adm:syntax>
- <adm:attribute-type />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:oid>1.3.6.1.4.1.26027.1.1.327</ldap:oid>
- <ldap:name>ds-cfg-attribute-type</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
- <adm:property name="optional-multi-valued-dn-property"
- multi-valued="true">
- <adm:synopsis>
- An optional multi-valued DN property with a defined default
- behavior.
- </adm:synopsis>
- <adm:default-behavior>
- <adm:defined>
- <adm:value>dc=domain1,dc=com</adm:value>
- <adm:value>dc=domain2,dc=com</adm:value>
- <adm:value>dc=domain3,dc=com</adm:value>
- </adm:defined>
- </adm:default-behavior>
- <adm:syntax>
- <adm:dn />
- </adm:syntax>
- <adm:profile name="ldap">
- <ldap:attribute>
- <ldap:oid>1.3.6.1.4.1.26027.1.1.328</ldap:oid>
- <ldap:name>ds-cfg-base-dn</ldap:name>
- </ldap:attribute>
- </adm:profile>
- </adm:property>
-</adm:managed-object>
--
Gitblit v1.10.0