public Set<AttributeType> getAttributeTypes() { return clonedEntry.getAttributeTypes(); }
for ( AttributeType attributeType:entry.getAttributeTypes() )
public ClonedServerEntry lookup( LookupOperationContext opContext ) throws Exception { ID id = getEntryId( opContext.getDn().getNormName() ); if ( id == null ) { return null; } ClonedServerEntry entry = lookup( id ); if ( ( opContext.getAttrsId() == null ) || ( opContext.getAttrsId().size() == 0 ) ) { return entry; } for ( AttributeType attributeType : ( ( ServerEntry ) entry.getOriginalEntry() ).getAttributeTypes() ) { if ( !opContext.getAttrsId().contains( attributeType.getOid() ) ) { entry.removeAttributes( attributeType ); } } return entry; }
public void modify( DN dn, ModificationOperation modOp, ServerEntry mods ) throws Exception { if ( mods instanceof ClonedServerEntry ) { throw new Exception( I18n.err( I18n.ERR_215 ) ); } Long id = getEntryId( dn.getNormName() ); ServerEntry entry = ( ServerEntry ) master.get( id ); for ( AttributeType attributeType : mods.getAttributeTypes() ) { EntryAttribute attr = mods.get( attributeType ); switch ( modOp ) { case ADD_ATTRIBUTE: add( id, entry, attr ); break; case REMOVE_ATTRIBUTE: remove( id, entry, attr ); break; case REPLACE_ATTRIBUTE: replace( id, entry, attr ); break; default: throw new Exception( I18n.err( I18n.ERR_221 ) ); } } master.put( id, entry ); }