}
}
private void updatePanel(ObjectClassValue newValue)
{
CustomSearchResult oldResult = searchResult;
CustomSearchResult newResult = new CustomSearchResult(searchResult.getDN());
for (String attrName : schemaReadOnlyAttributesLowerCase)
{
List<Object> values = searchResult.getAttributeValues(attrName);
if (!values.isEmpty())
{
newResult.set(attrName, values);
}
}
ignoreEntryChangeEvents = true;
Schema schema = getInfo().getServerDescriptor().getSchema();
if (schema != null)
{
ArrayList<String> attributes = new ArrayList<String>();
ArrayList<String> ocs = new ArrayList<String>();
if (newValue.getStructural() != null)
{
ocs.add(newValue.getStructural().toLowerCase());
}
for (String oc : newValue.getAuxiliary())
{
ocs.add(oc.toLowerCase());
}
for (String oc : ocs)
{
ObjectClass objectClass = schema.getObjectClass(oc);
if (objectClass != null)
{
for (AttributeType attr : objectClass.getRequiredAttributeChain())
{
attributes.add(attr.getNameOrOID().toLowerCase());
}
for (AttributeType attr : objectClass.getOptionalAttributeChain())
{
attributes.add(attr.getNameOrOID().toLowerCase());
}
}
}
for (String attrName : editableOperationalAttrNames)
{
attributes.add(attrName.toLowerCase());
}
for (String attrName : hmEditors.keySet())
{
String attrNoOptions =
Utilities.getAttributeNameWithoutOptions(attrName);
if (!attributes.contains(attrNoOptions))
{
continue;
}
if (isPassword(attrName))
{
List<String> newPwds = getNewPasswords(attrName);
if (newPwds.equals(lastUserPasswords.get(attrName)))
{
List<Object> oldValues = searchResult.getAttributeValues(attrName);
newResult.set(attrName, oldValues);
}
else
{
setValues(newResult, attrName);
}