Package org.guvnor.ala.registry.inmemory
Class InMemoryPipelineRegistry
- java.lang.Object
-
- org.guvnor.ala.registry.inmemory.InMemoryPipelineRegistry
-
- All Implemented Interfaces:
PipelineRegistry
@ApplicationScoped public class InMemoryPipelineRegistry extends Object implements PipelineRegistry
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,org.guvnor.ala.registry.inmemory.InMemoryPipelineRegistry.PipelineRegistryEntry>pipelineByName-
Fields inherited from interface org.guvnor.ala.registry.PipelineRegistry
PIPELINE_NAME_SORT
-
-
Constructor Summary
Constructors Constructor Description InMemoryPipelineRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PipelinegetPipelineByName(String pipelineId)Gets a Pipeline by Name.List<Pipeline>getPipelines(int page, int pageSize, String sort, boolean sortOrder)Gets all the registered PipelinesList<Pipeline>getPipelines(String providerType, String version, int page, int pageSize, String sort, boolean sortOrder)Gets all the registered Pipelines for a given provider type.ProviderTypegetProviderType(String pipelineId)Gets the associated provider type for a given pipeline.voidregisterPipeline(Pipeline pipeline)Registers a PipelinevoidregisterPipeline(Pipeline pipeline, ProviderType providerType)Registers a Pipeline by associating it to a provider type.
-
-
-
Method Detail
-
registerPipeline
public void registerPipeline(Pipeline pipeline)
Description copied from interface:PipelineRegistryRegisters a Pipeline- Specified by:
registerPipelinein interfacePipelineRegistry- Parameters:
pipeline- The Pipeline to be registered.
-
registerPipeline
public void registerPipeline(Pipeline pipeline, ProviderType providerType)
Description copied from interface:PipelineRegistryRegisters a Pipeline by associating it to a provider type.- Specified by:
registerPipelinein interfacePipelineRegistry- Parameters:
pipeline- The Pipeline to be registered.providerType- The provider type for associating the Pipeline.
-
getPipelineByName
public Pipeline getPipelineByName(String pipelineId)
Description copied from interface:PipelineRegistryGets a Pipeline by Name.- Specified by:
getPipelineByNamein interfacePipelineRegistry- Parameters:
pipelineId- the pipeline id.- Returns:
- the pipeline corresponding to the pipeline id.
-
getPipelines
public List<Pipeline> getPipelines(int page, int pageSize, String sort, boolean sortOrder)
Description copied from interface:PipelineRegistryGets all the registered Pipelines- Specified by:
getPipelinesin interfacePipelineRegistry- Parameters:
page- the page numberpageSize- the page sizesort- the sort columnsortOrder- the sort order to use: true ascending, false descending- Returns:
- a list with all the available pipelines.
-
getPipelines
public List<Pipeline> getPipelines(String providerType, String version, int page, int pageSize, String sort, boolean sortOrder)
Description copied from interface:PipelineRegistryGets all the registered Pipelines for a given provider type.- Specified by:
getPipelinesin interfacePipelineRegistry- Parameters:
providerType- A provider type name.version- the provider type version.page- the page numberpageSize- the page sizesort- the sort columnsortOrder- the sort order to use: true ascending, false descending- Returns:
- the list of pipelines associated to the given provider.
-
getProviderType
public ProviderType getProviderType(String pipelineId)
Description copied from interface:PipelineRegistryGets the associated provider type for a given pipeline.- Specified by:
getProviderTypein interfacePipelineRegistry- Parameters:
pipelineId- a pipeline id.- Returns:
- a provider type in cases where the pipeline was associated to one, null in any other case.
-
-