Class MemoryFlowRepository

java.lang.Object
io.kestra.repository.memory.MemoryFlowRepository
All Implemented Interfaces:
io.kestra.core.repositories.FlowRepositoryInterface

@Singleton @MemoryRepositoryEnabled public class MemoryFlowRepository extends Object implements io.kestra.core.repositories.FlowRepositoryInterface
  • Constructor Details

    • MemoryFlowRepository

      public MemoryFlowRepository()
  • Method Details

    • findById

      public Optional<io.kestra.core.models.flows.Flow> findById(String tenantId, String namespace, String id, Optional<Integer> revision, Boolean allowDeleted)
      Specified by:
      findById in interface io.kestra.core.repositories.FlowRepositoryInterface
    • findByIdWithSource

      public Optional<io.kestra.core.models.flows.FlowWithSource> findByIdWithSource(String tenantId, String namespace, String id, Optional<Integer> revision, Boolean allowDeleted)
      Specified by:
      findByIdWithSource in interface io.kestra.core.repositories.FlowRepositoryInterface
    • findRevisions

      public List<io.kestra.core.models.flows.FlowWithSource> findRevisions(String tenantId, String namespace, String id)
      Specified by:
      findRevisions in interface io.kestra.core.repositories.FlowRepositoryInterface
    • lastRevision

      public Integer lastRevision(String tenantId, String namespace, String id)
      Specified by:
      lastRevision in interface io.kestra.core.repositories.FlowRepositoryInterface
    • findAll

      public List<io.kestra.core.models.flows.Flow> findAll(String tenantId)
      Specified by:
      findAll in interface io.kestra.core.repositories.FlowRepositoryInterface
    • findAllForAllTenants

      public List<io.kestra.core.models.flows.Flow> findAllForAllTenants()
      Specified by:
      findAllForAllTenants in interface io.kestra.core.repositories.FlowRepositoryInterface
    • findByNamespace

      public List<io.kestra.core.models.flows.Flow> findByNamespace(String tenantId, String namespace)
      Specified by:
      findByNamespace in interface io.kestra.core.repositories.FlowRepositoryInterface
    • findByNamespaceWithSource

      public List<io.kestra.core.models.flows.FlowWithSource> findByNamespaceWithSource(String tenantId, String namespace)
      Specified by:
      findByNamespaceWithSource in interface io.kestra.core.repositories.FlowRepositoryInterface
    • find

      public io.kestra.core.repositories.ArrayListTotal<io.kestra.core.models.flows.Flow> find(io.micronaut.data.model.Pageable pageable, @Nullable String query, @Nullable String tenantId, @Nullable String namespace, @Nullable Map<String,String> labels)
      Specified by:
      find in interface io.kestra.core.repositories.FlowRepositoryInterface
    • findWithSource

      public List<io.kestra.core.models.flows.FlowWithSource> findWithSource(@Nullable String query, @Nullable String tenantId, @Nullable String namespace, @Nullable Map<String,String> labels)
      Specified by:
      findWithSource in interface io.kestra.core.repositories.FlowRepositoryInterface
    • findSourceCode

      public io.kestra.core.repositories.ArrayListTotal<io.kestra.core.models.SearchResult<io.kestra.core.models.flows.Flow>> findSourceCode(io.micronaut.data.model.Pageable pageable, @Nullable String query, @Nullable String tenantId, @Nullable String namespace)
      Specified by:
      findSourceCode in interface io.kestra.core.repositories.FlowRepositoryInterface
    • create

      public io.kestra.core.models.flows.FlowWithSource create(io.kestra.core.models.flows.Flow flow, String flowSource, io.kestra.core.models.flows.Flow flowWithDefaults)
      Specified by:
      create in interface io.kestra.core.repositories.FlowRepositoryInterface
    • update

      public io.kestra.core.models.flows.FlowWithSource update(io.kestra.core.models.flows.Flow flow, io.kestra.core.models.flows.Flow previous, String flowSource, io.kestra.core.models.flows.Flow flowWithDefaults) throws jakarta.validation.ConstraintViolationException
      Specified by:
      update in interface io.kestra.core.repositories.FlowRepositoryInterface
      Throws:
      jakarta.validation.ConstraintViolationException
    • delete

      public io.kestra.core.models.flows.Flow delete(io.kestra.core.models.flows.Flow flow)
      Specified by:
      delete in interface io.kestra.core.repositories.FlowRepositoryInterface
    • findDistinctNamespace

      public List<String> findDistinctNamespace(String tenantId)
      Specified by:
      findDistinctNamespace in interface io.kestra.core.repositories.FlowRepositoryInterface