}
}
}
AttributeType superior = getSuperior();
if (superior != null)
{
if (superior.getNameOrOID().equalsIgnoreCase(attribute.getNameOrOID()))
{
errors.add(ERR_CTRL_PANEL_ATTRIBUTE_CANNOT_BE_ITS_SUPERIOR.get());
setPrimaryInvalid(lSuperior);
}
else
{
// Check whether this object class is defined as parent as the superior.
superior = superior.getSuperiorType();
while (superior != null)
{
if (superior.getNameOrOID().equalsIgnoreCase(
attribute.getNameOrOID()))
{
errors.add(
ERR_CTRL_PANEL_ATTRIBUTE_IS_SUPERIOR_OF_SUPERIOR.get(
getSuperior().getNameOrOID()));
setPrimaryInvalid(lSuperior);
break;
}
superior = superior.getSuperiorType();
}
}
}
setPrimaryValid(lUsage);