Schema schema = DirectoryServer.getSchema();
int fractionalMode = newFractionalConfig.fractionalConfigToInt();
for (String className : newFractionalSpecificClassesAttributes.keySet())
{
// Does the class exist ?
ObjectClass fractionalClass = schema.getObjectClass(
className.toLowerCase());
if (fractionalClass == null)
{
throw new ConfigException(
NOTE_ERR_FRACTIONAL_CONFIG_UNKNOWN_OBJECT_CLASS.get(className));
}
boolean isExtensibleObjectClass = className.
equalsIgnoreCase("extensibleObject");
List<String> attributes =
newFractionalSpecificClassesAttributes.get(className);
for (String attrName : attributes)
{
// Not a prohibited attribute ?
if (isFractionalProhibitedAttr(attrName))
{
throw new ConfigException(
NOTE_ERR_FRACTIONAL_CONFIG_PROHIBITED_ATTRIBUTE.get(attrName));
}
// Does the attribute exist ?
AttributeType attributeType = schema.getAttributeType(attrName);
if (attributeType != null)
{
// No more checking for the extensibleObject class
if (!isExtensibleObjectClass)
{
if (fractionalMode == FractionalConfig.EXCLUSIVE_FRACTIONAL)
{
// Exclusive mode : the attribute must be optional
if (!fractionalClass.isOptional(attributeType))
{
throw new ConfigException(
NOTE_ERR_FRACTIONAL_CONFIG_NOT_OPTIONAL_ATTRIBUTE.
get(attrName, className));
}