{
operational.remove( oldName.toString() );
operational.add( newName.toString() );
}
modList.add( new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, operational ) );
}
if ( subentry.isSchemaSubentry() )
{
operational = ( ServerAttribute ) entry.get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).clone();
if ( operational == null )
{
operational = new DefaultServerAttribute( SchemaConstants.SUBSCHEMA_SUBENTRY_AT, atRegistry
.lookup( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ) );
operational.add( newName.toString() );
}
else
{
operational.remove( oldName.toString() );
operational.add( newName.toString() );
}
modList.add( new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, operational ) );
}
if ( subentry.isCollectiveSubentry() )
{
operational = ( ServerAttribute ) entry.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ).clone();
if ( operational == null )
{
operational = new DefaultServerAttribute( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT,
atRegistry.lookup( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
operational.add( newName.toString() );
}
else
{
operational.remove( oldName.toString() );
operational.add( newName.toString() );
}
modList.add( new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, operational ) );
}
if ( subentry.isTriggerSubentry() )
{
operational = ( ServerAttribute ) entry.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ).clone();
if ( operational == null )
{
operational = new DefaultServerAttribute( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT, atRegistry
.lookup( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) );
operational.add( newName.toString() );
}
else
{
operational.remove( oldName.toString() );
operational.add( newName.toString() );
}
modList.add( new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, operational ) );
}
return modList;
}