hunk.code_window:                 });
       }
       @Override
       public Mono<Datasource> update(String id, Datasource datasource) {
           if (id == null) {
               return Mono.error(new AppsmithException(AppsmithError.INVALID_PARAMETER, FieldName.ID));
  
hunk.labels: keep keep add keep keep keep keep
hunk.after_edit:     @Override
       public Mono<Datasource> getValidDatasourceFromActionMono(ActionDTO actionDTO, AclPermission aclPermission) {
           // Global datasource requires us to fetch the datasource from DB.
           if (actionDTO.getDatasource() != null && actionDTO.getDatasource().getId() != null) {
               return this.findById(actionDTO.getDatasource().getId(), aclPermission)
                       .switchIfEmpty(Mono.error(new AppsmithException(AppsmithError.NO_RESOURCE_FOUND,
                               FieldName.DATASOURCE,
                               actionDTO.getDatasource().getId())));
           }
           // This is a nested datasource. Return as is.
           return Mono.justOrEmpty(actionDTO.getDatasource());
       }
  
hunk.file_path: app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/DatasourceServiceCEImpl.java
hunk.type: add
file: package com.appsmith.server.services.ce;
  
  import com.appsmith.external.models.Datasource;
  import com.appsmith.external.models.DatasourceTestResult;
  import com.appsmith.server.acl.AclPermission;
  import com.appsmith.server.services.CrudService;
  import reactor.core.publisher.Flux;
  import reactor.core.publisher.Mono;
  
  import java.util.List;
  import java.util.Set;
  
  public interface DatasourceServiceCE extends CrudService<Datasource, String> {
  
      Mono<DatasourceTestResult> testDatasource(Datasource datasource);
  
      Mono<Datasource> findByNameAndWorkspaceId(String name, String workspaceId, AclPermission permission);
  
      Mono<Datasource> findById(String id, AclPermission aclPermission);
  
      Mono<Datasource> findById(String id);
  
      Set<String> extractKeysFromDatasource(Datasource datasource);
  
      Mono<Datasource> validateDatasource(Datasource datasource);
  
      Mono<Datasource> save(Datasource datasource);
  
      Flux<Datasource> findAllByWorkspaceId(String workspaceId, AclPermission readDatasources);
  
      Flux<Datasource> saveAll(List<Datasource> datasourceList);
  
      Mono<Datasource> populateHintMessages(Datasource datasource);
  }
  