From 599c307ea27723bd289516103d4162c56fed7f8e Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Tue, 11 Mar 2014 16:56:01 +0000
Subject: [PATCH] Checkpoint commit for OPENDJ-1308 Migrate schema support
---
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/AciHandler.java | 2
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java | 6 +-
opendj3-server-dev/src/server/org/opends/server/core/SubentryPasswordPolicy.java | 2
opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java | 4
opendj3-server-dev/src/server/org/opends/server/plugins/ReferentialIntegrityPlugin.java | 4
opendj3-server-dev/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java | 4
opendj3-server-dev/src/server/org/opends/server/core/AddOperationBasis.java | 4
opendj3-server-dev/src/server/org/opends/server/tools/LDIFModify.java | 2
opendj3-server-dev/src/server/org/opends/server/core/PasswordPolicyState.java | 2
opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/ManageTasksPanel.java | 2
opendj3-server-dev/src/server/org/opends/server/protocols/internal/InternalClientConnection.java | 2
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/TestAttributeType.java | 4
opendj3-server-dev/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java | 4
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/TemplateEntry.java | 2
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/SearchResultEntryProtocolOp.java | 2
opendj3-server-dev/src/server/org/opends/server/types/Entry.java | 20 +++---
opendj3-server-dev/src/server/org/opends/server/core/SearchOperationBasis.java | 2
opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java | 6 +-
opendj3-server-dev/src/server/org/opends/server/core/ModifyOperationBasis.java | 2
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationBackend.java | 2
opendj3-server-dev/src/server/org/opends/server/types/AttributeType.java | 47 ---------------
opendj3-server-dev/src/server/org/opends/server/util/LDIFReader.java | 4
opendj3-server-dev/src/server/org/opends/server/core/PasswordPolicyFactory.java | 2
23 files changed, 43 insertions(+), 88 deletions(-)
diff --git a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java
index ed5af94..d4266ce 100644
--- a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java
+++ b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java
@@ -772,7 +772,7 @@
boolean areEqual = attr1.getOID().equals(attr2.getOID()) &&
attr1.isCollective() == attr2.isCollective() &&
attr1.isNoUserModification() == attr2.isNoUserModification() &&
- attr1.isObjectClassType() == attr2.isObjectClassType() &&
+ attr1.isObjectClass() == attr2.isObjectClass() &&
attr1.isObsolete() == attr2.isObsolete() &&
attr1.isOperational() == attr2.isOperational() &&
attr1.isSingleValue() == attr2.isSingleValue();
@@ -788,7 +788,7 @@
attr1.getSubstringMatchingRule(), attr2.getSubstringMatchingRule(),
attr1.getSuperiorType(), attr2.getSuperiorType(),
attr1.getSyntax(), attr2.getSyntax(),
- attr1.getSyntaxOID(), attr2.getSyntaxOID()
+ attr1.getSyntax().getOID(), attr2.getSyntax().getOID()
};
for (int i=0; i<compareWithEqual.length && areEqual; i++)
diff --git a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/ManageTasksPanel.java b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/ManageTasksPanel.java
index 889eb06..8352dbb 100644
--- a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/ManageTasksPanel.java
+++ b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/ManageTasksPanel.java
@@ -799,7 +799,7 @@
builder = new AttributeBuilder(attrDescr);
}
- if(builder.getAttributeType().isBinary())
+ if(builder.getAttributeType().getSyntax().isBEREncodingRequired())
{
//resetting doesn't hurt and returns false.
builder.setOption("binary");
diff --git a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java
index 6a3a201..fb1e2b7 100644
--- a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java
+++ b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java
@@ -2239,7 +2239,7 @@
AttributeType attr = schema.getAttributeType(attrName);
if (attr != null)
{
- String syntaxOID = attr.getSyntaxOID();
+ String syntaxOID = attr.getSyntax().getOID();
hasImageSyntax = SchemaConstants.SYNTAX_JPEG_OID.equals(syntaxOID);
}
}
@@ -2265,7 +2265,7 @@
AttributeType attr = schema.getAttributeType(attrName);
if (attr != null)
{
- String syntaxOID = attr.getSyntaxOID();
+ String syntaxOID = attr.getSyntax().getOID();
for (String oid : binarySyntaxOIDs)
{
if (oid.equals(syntaxOID))
@@ -2303,7 +2303,7 @@
AttributeType attr = schema.getAttributeType(attrName);
if (attr != null)
{
- String syntaxOID = attr.getSyntaxOID();
+ String syntaxOID = attr.getSyntax().getOID();
for (String oid : passwordSyntaxOIDs)
{
if (oid.equals(syntaxOID))
diff --git a/opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/AciHandler.java b/opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
index 1a0e937..302da46 100644
--- a/opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
+++ b/opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
@@ -1151,7 +1151,7 @@
*/
private boolean isAttributeDN(AttributeType attribute)
{
- return SYNTAX_DN_OID.equals(attribute.getSyntaxOID());
+ return SYNTAX_DN_OID.equals(attribute.getSyntax().getOID());
}
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/AddOperationBasis.java b/opendj3-server-dev/src/server/org/opends/server/core/AddOperationBasis.java
index ae87297..6183652 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/AddOperationBasis.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/AddOperationBasis.java
@@ -377,7 +377,7 @@
ERR_ADD_ATTR_IS_NO_USER_MOD.get(entryDN, attr.getName()));
}
- if(attrType.isBinary())
+ if(attrType.getSyntax().isBEREncodingRequired())
{
if(!attr.hasOption("binary"))
{
@@ -397,7 +397,7 @@
}
}
- if (attrType.isObjectClassType())
+ if (attrType.isObjectClass())
{
for (ByteString os : a.getValues())
{
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java b/opendj3-server-dev/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java
index 1ed4b46..31a8ebf 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java
@@ -256,7 +256,7 @@
String oid = syntax.getOID();
for (AttributeType at : DirectoryServer.getAttributeTypes().values())
{
- if (oid.equals(at.getSyntaxOID()))
+ if (oid.equals(at.getSyntax().getOID()))
{
LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_DELETE_SYNTAX_IN_USE.get(
syntax.getSyntaxName(), at.getNameOrOID());
@@ -326,7 +326,7 @@
String oid = syntax.getOID();
for (AttributeType at : DirectoryServer.getAttributeTypes().values())
{
- if (oid.equals(at.getSyntaxOID()))
+ if (oid.equals(at.getSyntax().getOID()))
{
LocalizableMessage message =
WARN_CONFIG_SCHEMA_CANNOT_DISABLE_SYNTAX_IN_USE.get(
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/ModifyOperationBasis.java b/opendj3-server-dev/src/server/org/opends/server/core/ModifyOperationBasis.java
index fcb6d71..f14b39f 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/ModifyOperationBasis.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/ModifyOperationBasis.java
@@ -237,7 +237,7 @@
Attribute attr = mod.getAttribute();
AttributeType type = attr.getAttributeType();
- if(type.isBinary())
+ if(type.getSyntax().isBEREncodingRequired())
{
if(!attr.hasOption("binary"))
{
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/PasswordPolicyFactory.java b/opendj3-server-dev/src/server/org/opends/server/core/PasswordPolicyFactory.java
index 2faab17..f734a0d 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/PasswordPolicyFactory.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/PasswordPolicyFactory.java
@@ -224,7 +224,7 @@
// user password or auth password syntax.
final AttributeType passwordAttribute = configuration
.getPasswordAttribute();
- final String syntaxOID = passwordAttribute.getSyntaxOID();
+ final String syntaxOID = passwordAttribute.getSyntax().getOID();
final boolean authPasswordSyntax;
if (syntaxOID.equals(SYNTAX_AUTH_PASSWORD_OID))
{
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/PasswordPolicyState.java b/opendj3-server-dev/src/server/org/opends/server/core/PasswordPolicyState.java
index 51c99ff..135cfa6 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/PasswordPolicyState.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/PasswordPolicyState.java
@@ -3325,7 +3325,7 @@
newTimestamp++;
}
String newHistStr = GeneralizedTimeSyntax.format(newTimestamp) + "#" +
- passwordPolicy.getPasswordAttribute().getSyntaxOID() +
+ passwordPolicy.getPasswordAttribute().getSyntax().getOID() +
"#" + encodedPassword;
Attribute newHistAttr = Attributes.create(historyType, newHistStr);
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/SearchOperationBasis.java b/opendj3-server-dev/src/server/org/opends/server/core/SearchOperationBasis.java
index a511cc6..256c39f 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/SearchOperationBasis.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/SearchOperationBasis.java
@@ -1390,7 +1390,7 @@
switch (filter.getFilterType())
{
case EQUALITY:
- if (filter.getAttributeType().isObjectClassType())
+ if (filter.getAttributeType().isObjectClass())
{
AttributeValue v = filter.getAssertionValue();
// FIXME : technically this is not correct since the presence
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/SubentryPasswordPolicy.java b/opendj3-server-dev/src/server/org/opends/server/core/SubentryPasswordPolicy.java
index 59583a2..e1ae149 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/SubentryPasswordPolicy.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/SubentryPasswordPolicy.java
@@ -183,7 +183,7 @@
}
// Check the syntax.
- final String syntaxOID = pPasswordAttribute.getSyntaxOID();
+ final String syntaxOID = pPasswordAttribute.getSyntax().getOID();
if (SYNTAX_AUTH_PASSWORD_OID.equals(syntaxOID))
{
pAuthPasswordSyntax = true;
diff --git a/opendj3-server-dev/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java b/opendj3-server-dev/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java
index 5b23d78..3c98281 100644
--- a/opendj3-server-dev/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java
+++ b/opendj3-server-dev/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java
@@ -255,11 +255,11 @@
HashSet<AttributeType> userPWTypes = new HashSet<AttributeType>();
for (AttributeType t : DirectoryServer.getAttributeTypes().values())
{
- if (t.getSyntaxOID().equals(SYNTAX_AUTH_PASSWORD_OID))
+ if (t.getSyntax().getOID().equals(SYNTAX_AUTH_PASSWORD_OID))
{
authPWTypes.add(t);
}
- else if (t.getSyntaxOID().equals(SYNTAX_USER_PASSWORD_OID))
+ else if (t.getSyntax().getOID().equals(SYNTAX_USER_PASSWORD_OID))
{
userPWTypes.add(t);
}
diff --git a/opendj3-server-dev/src/server/org/opends/server/plugins/ReferentialIntegrityPlugin.java b/opendj3-server-dev/src/server/org/opends/server/plugins/ReferentialIntegrityPlugin.java
index 26ab03d..64c0275 100644
--- a/opendj3-server-dev/src/server/org/opends/server/plugins/ReferentialIntegrityPlugin.java
+++ b/opendj3-server-dev/src/server/org/opends/server/plugins/ReferentialIntegrityPlugin.java
@@ -521,8 +521,8 @@
*/
private boolean isAttributeSyntaxValid(AttributeType attribute)
{
- return (attribute.getSyntaxOID().equals(SYNTAX_DN_OID) ||
- attribute.getSyntaxOID().equals(SYNTAX_NAME_AND_OPTIONAL_UID_OID));
+ return (attribute.getSyntax().getOID().equals(SYNTAX_DN_OID) ||
+ attribute.getSyntax().getOID().equals(SYNTAX_NAME_AND_OPTIONAL_UID_OID));
}
/**
diff --git a/opendj3-server-dev/src/server/org/opends/server/protocols/internal/InternalClientConnection.java b/opendj3-server-dev/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
index c240dfa..368d86c 100644
--- a/opendj3-server-dev/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
+++ b/opendj3-server-dev/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
@@ -887,7 +887,7 @@
new ArrayList<AttributeValue>();
for (Attribute a : addRecord.getAttributes())
{
- if (a.getAttributeType().isObjectClassType())
+ if (a.getAttributeType().isObjectClass())
{
for (AttributeValue v : a)
{
diff --git a/opendj3-server-dev/src/server/org/opends/server/protocols/ldap/SearchResultEntryProtocolOp.java b/opendj3-server-dev/src/server/org/opends/server/protocols/ldap/SearchResultEntryProtocolOp.java
index 49c2b2a..0c7d4b5 100644
--- a/opendj3-server-dev/src/server/org/opends/server/protocols/ldap/SearchResultEntryProtocolOp.java
+++ b/opendj3-server-dev/src/server/org/opends/server/protocols/ldap/SearchResultEntryProtocolOp.java
@@ -561,7 +561,7 @@
Attribute attr = a.toAttribute();
AttributeType attrType = attr.getAttributeType();
- if (attrType.isObjectClassType())
+ if (attrType.isObjectClass())
{
for (ByteString os : a.getValues())
{
diff --git a/opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationBackend.java b/opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationBackend.java
index ca85736..69466d9 100644
--- a/opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationBackend.java
+++ b/opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationBackend.java
@@ -771,7 +771,7 @@
for (RawAttribute a : addOperation.getRawAttributes())
{
Attribute attr = a.toAttribute();
- if (attr.getAttributeType().isObjectClassType())
+ if (attr.getAttributeType().isObjectClass())
{
for (ByteString os : a.getValues())
{
diff --git a/opendj3-server-dev/src/server/org/opends/server/tools/LDIFModify.java b/opendj3-server-dev/src/server/org/opends/server/tools/LDIFModify.java
index c048943..6f79119 100644
--- a/opendj3-server-dev/src/server/org/opends/server/tools/LDIFModify.java
+++ b/opendj3-server-dev/src/server/org/opends/server/tools/LDIFModify.java
@@ -322,7 +322,7 @@
for (Attribute a : add.getAttributes())
{
AttributeType t = a.getAttributeType();
- if (t.isObjectClassType())
+ if (t.isObjectClass())
{
for (AttributeValue v : a)
{
diff --git a/opendj3-server-dev/src/server/org/opends/server/tools/makeldif/TemplateEntry.java b/opendj3-server-dev/src/server/org/opends/server/tools/makeldif/TemplateEntry.java
index 42b1139..8bddaf1 100644
--- a/opendj3-server-dev/src/server/org/opends/server/tools/makeldif/TemplateEntry.java
+++ b/opendj3-server-dev/src/server/org/opends/server/tools/makeldif/TemplateEntry.java
@@ -313,7 +313,7 @@
for (AttributeType t : attributes.keySet())
{
ArrayList<TemplateValue> valueList = attributes.get(t);
- if (t.isObjectClassType())
+ if (t.isObjectClass())
{
for (TemplateValue v : valueList)
{
diff --git a/opendj3-server-dev/src/server/org/opends/server/types/AttributeType.java b/opendj3-server-dev/src/server/org/opends/server/types/AttributeType.java
index 0fb59bf..8e73b71 100644
--- a/opendj3-server-dev/src/server/org/opends/server/types/AttributeType.java
+++ b/opendj3-server-dev/src/server/org/opends/server/types/AttributeType.java
@@ -113,9 +113,6 @@
// The definition string used to create this attribute type.
private final String definition;
- // The OID for the associated syntax.
- private final String syntaxOID;
-
// The substring matching rule for this attribute type.
private final SubstringMatchingRule substringMatchingRule;
@@ -320,8 +317,6 @@
{
this.syntax = syntax;
}
- syntaxOID = this.syntax.getOID();
-
if (approximateMatchingRule == null)
{
@@ -447,46 +442,6 @@
return syntax;
}
-
-
- /**
- * Indicates whether this attribute syntax requires BER encoding.
- *
- * @return {@code true} if this syntax required BER encoding.
- */
- public boolean isBinary()
- {
- return syntax.isBEREncodingRequired();
- }
-
-
-
- /**
- * Indicates whether this attribute syntax is human readable.
- *
- * @return {@code true} if this syntax is human readable.
- */
- public boolean isHumanReadable()
- {
- return syntax.isHumanReadable();
- }
-
-
-
- /**
- * Retrieves the OID for this syntax associated with this attribute
- * type.
- *
- * @return The OID for this syntax associated with this attribute
- * type.
- */
- public String getSyntaxOID()
- {
- return syntaxOID;
- }
-
-
-
/**
* Retrieves the matching rule that should be used for approximate
* matching with this attribute type.
@@ -619,7 +574,7 @@
* @return <CODE>true</CODE> if this attribute type is the
* objectclass type, or <CODE>false</CODE> if not.
*/
- public boolean isObjectClassType()
+ public boolean isObjectClass()
{
return isObjectClassType;
}
diff --git a/opendj3-server-dev/src/server/org/opends/server/types/Entry.java b/opendj3-server-dev/src/server/org/opends/server/types/Entry.java
index 27e1f5e..4f500ac 100644
--- a/opendj3-server-dev/src/server/org/opends/server/types/Entry.java
+++ b/opendj3-server-dev/src/server/org/opends/server/types/Entry.java
@@ -524,7 +524,7 @@
boolean includeSubordinates)
{
// Handle object class.
- if (attributeType.isObjectClassType())
+ if (attributeType.isObjectClass())
{
return !objectClasses.isEmpty() && (options == null || options.isEmpty());
}
@@ -701,7 +701,7 @@
{
return attributes;
}
- if (attributeType.isObjectClassType() && !objectClasses.isEmpty())
+ if (attributeType.isObjectClass() && !objectClasses.isEmpty())
{
return newList(getObjectClassAttribute());
}
@@ -839,7 +839,7 @@
attrs = operationalAttributes.get(attributeType);
if (attrs == null)
{
- if (attributeType.isObjectClassType()
+ if (attributeType.isObjectClass()
&& !objectClasses.isEmpty()
&& (options == null || options.isEmpty()))
{
@@ -1425,7 +1425,7 @@
{
attachment = null;
- if (attributeType.isObjectClassType())
+ if (attributeType.isObjectClass())
{
objectClasses.clear();
return true;
@@ -1465,7 +1465,7 @@
{
attachment = null;
- if (attribute.getAttributeType().isObjectClassType())
+ if (attribute.getAttributeType().isObjectClass())
{
if (attribute.isEmpty())
{
@@ -1633,7 +1633,7 @@
// We'll need to handle changes to the objectclass attribute in a
// special way.
- if (t.isObjectClassType())
+ if (t.isObjectClass())
{
Map<ObjectClass, String> ocs = new LinkedHashMap<ObjectClass, String>();
for (AttributeValue v : a)
@@ -2018,7 +2018,7 @@
{
if (! (userAttributes.containsKey(t) ||
operationalAttributes.containsKey(t) ||
- t.isObjectClassType()))
+ t.isObjectClass()))
{
LocalizableMessage message =
ERR_ENTRY_SCHEMA_MISSING_REQUIRED_ATTR_FOR_OC.get(
@@ -2206,7 +2206,7 @@
{
if (! (userAttributes.containsKey(t) ||
operationalAttributes.containsKey(t) ||
- t.isObjectClassType()))
+ t.isObjectClass()))
{
LocalizableMessage message =
ERR_ENTRY_SCHEMA_MISSING_REQUIRED_ATTR_FOR_DCR.get(
@@ -4663,7 +4663,7 @@
AttributeType attributeType = attribute.getAttributeType();
- if (attribute.getAttributeType().isObjectClassType())
+ if (attribute.getAttributeType().isObjectClass())
{
// We will not do any validation of the object classes - this is
// left to the caller.
@@ -4944,7 +4944,7 @@
else
{
// Recognized attribute type.
- if (attrType.isObjectClassType()) {
+ if (attrType.isObjectClass()) {
if (!omitReal)
{
if (omitValues)
diff --git a/opendj3-server-dev/src/server/org/opends/server/util/LDIFReader.java b/opendj3-server-dev/src/server/org/opends/server/util/LDIFReader.java
index 6f133da..fd35864 100644
--- a/opendj3-server-dev/src/server/org/opends/server/util/LDIFReader.java
+++ b/opendj3-server-dev/src/server/org/opends/server/util/LDIFReader.java
@@ -1082,7 +1082,7 @@
}
//The attribute is not being ignored so check for binary option.
- if(checkSchema && !attrType.isBinary())
+ if(checkSchema && !attrType.getSyntax().isBEREncodingRequired())
{
if(attribute.hasOption("binary"))
{
@@ -1371,7 +1371,7 @@
builder = new AttributeBuilder(attrDescr);
}
- if(builder.getAttributeType().isBinary())
+ if(builder.getAttributeType().getSyntax().isBEREncodingRequired())
{
//resetting doesn't hurt and returns false.
builder.setOption("binary");
diff --git a/opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java b/opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
index ff62a4e..ee57e20 100644
--- a/opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
+++ b/opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
@@ -1435,7 +1435,7 @@
// If the attribute to be added is the object class attribute then
// make sure that all the object classes are known and not
// obsoleted.
- if (attr.getAttributeType().isObjectClassType())
+ if (attr.getAttributeType().isObjectClass())
{
validateObjectClasses(attr);
}
@@ -1469,7 +1469,7 @@
*/
private void validateObjectClasses(Attribute attr) throws DirectoryException
{
- Reject.ifFalse(attr.getAttributeType().isObjectClassType());
+ Reject.ifFalse(attr.getAttributeType().isObjectClass());
for (AttributeValue v : attr)
{
String name = v.getValue().toString();
@@ -1638,7 +1638,7 @@
// If the attribute to be replaced is the object class attribute
// then make sure that all the object classes are known and not
// obsoleted.
- if (attr.getAttributeType().isObjectClassType())
+ if (attr.getAttributeType().isObjectClass())
{
validateObjectClasses(attr);
}
diff --git a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/TestAttributeType.java b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/TestAttributeType.java
index bb07eb2..882c6e6 100644
--- a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/TestAttributeType.java
+++ b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/TestAttributeType.java
@@ -630,7 +630,7 @@
/**
* Create test data for testing the
- * {@link AttributeType#isObjectClassType()} method.
+ * {@link AttributeType#isObjectClass()} method.
*
* @return Returns the array of test data.
*/
@@ -661,7 +661,7 @@
"1.2.3");
AttributeType type = builder.getInstance();
- Assert.assertEquals(type.isObjectClassType(), result);
+ Assert.assertEquals(type.isObjectClass(), result);
}
--
Gitblit v1.10.0