{
// Inject the ModifiersName AT if it's not present
Attribute attribute = new DefaultAttribute( MODIFIERS_NAME_AT, getPrincipal( modifyContext )
.getName() );
Modification modifiersName = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
attribute );
mods.add( modifiersName );
}
if ( !modifiedTimeAtPresent )
{
// Inject the ModifyTimestamp AT if it's not present
Attribute attribute = new DefaultAttribute( MODIFY_TIMESTAMP_AT, DateUtils
.getGeneralizedTime() );
Modification timestamp = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
mods.add( timestamp );
}
if ( !entryCsnAtPresent )
{
String csn = directoryService.getCSN().toString();
Attribute attribute = new DefaultAttribute( ENTRY_CSN_AT, csn );
Modification updatedCsn = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
mods.add( updatedCsn );
}
}
// Go down in the chain