private Uid executePatchOperations(ConnectorFacade facade,OperationOptions operationOptions,Multimap<String,Attribute> operations,Uid uid) throws IOException, ResourceException {
  Set<String> keys=operations.keySet();
  for (  String key : keys) {
    Set<Attribute> attrs=ImmutableSet.copyOf(operations.get(key));
    if (attrs.size() > 0) {
switch (key) {
case PatchOperation.OPERATION_ADD:
        uid=facade.addAttributeValues(objectClassInfoHelper.getObjectClass(),uid,AttributeUtil.filterUid(attrs),operationOptions);
      break;
case PatchOperation.OPERATION_REMOVE:
    try {
      uid=facade.removeAttributeValues(objectClassInfoHelper.getObjectClass(),uid,AttributeUtil.filterUid(attrs),operationOptions);
    }
 catch (    ConnectorException e) {
      logger.debug("Error removing attribute values for object {}",uid,e);
    }
  break;
case PatchOperation.OPERATION_REPLACE:
default :
uid=facade.update(objectClassInfoHelper.getObjectClass(),uid,AttributeUtil.filterUid(attrs),operationOptions);
}
}
}
return uid;
}

private Uid executePatchOperations ( ConnectorFacade facade , OperationOptions operationOptions , Multimap < String , Attribute > operations , Uid uid ) throws IOException , ResourceException { Set < String > keys = operations . keySet ( ) ; for ( String key : keys ) { Set < Attribute > attrs = ImmutableSet . copyOf ( operations . get ( key ) ) ; if ( attrs . size ( ) > 0 ) { switch ( key ) { case PatchOperation . OPERATION_ADD : uid = facade . addAttributeValues ( objectClassInfoHelper . getObjectClass ( ) , uid , AttributeUtil . filterUid ( attrs ) , operationOptions ) ; break ; case PatchOperation . OPERATION_REMOVE : try { uid = facade . removeAttributeValues ( objectClassInfoHelper . getObjectClass ( ) , uid , AttributeUtil . filterUid ( attrs ) , operationOptions ) ; } catch ( ConnectorException e ) { logger . debug ( "Error removing attribute values for object {}" , uid , e ) ; } break ; case PatchOperation . OPERATION_REPLACE : default : uid = facade . update ( objectClassInfoHelper . getObjectClass ( ) , uid , AttributeUtil . filterUid ( attrs ) , operationOptions ) ; } } } return uid ; }
execute add , remove , replace operations against a set of attributes
