Interface ArtifactTypeMappingStore.ContainerDefaultsProvider
- Enclosing class:
ArtifactTypeMappingStore
- Since:
- 4.2.0
-
Method Summary
Modifier and TypeMethodDescriptiongetArtifactTypeMapping(String containerId, String artifactTypeId) Gets the default artifact type mapping of a container and artifact type.default Collection<ArtifactTypeMapping> getContainerMappings(String containerId) Gets the default artifact type mappings of a single container.default Collection<ProjectArea> getContainerProjectAreas(String containerId) Resolves the project areas of a single container.Gets all available containers.getContainersMappings(Set<String> containerIds) Gets the default artifact type mappings of a given set of containers.getContainersProjectAreas(Set<String> containerIds) Resolves the project areas of a given set of containers.default Optional<ArtifactTypeContainer> getProjectAreaContainer(String projectAreaId) Resolves the container of a single project area.getProjectAreasContainers(Set<String> projectAreaIds) Resolves the containers of a given set of project areas.
-
Method Details
-
getProjectAreasContainers
Map<String,ArtifactTypeContainer> getProjectAreasContainers(Set<String> projectAreaIds) throws ArtifactTypeMappingStoreException Resolves the containers of a given set of project areas.- Parameters:
projectAreaIds- the project area ids to resolve containers for.- Returns:
- the corresponding container per project area id.
- Throws:
ArtifactTypeMappingStoreException- if containers cannot be resolved.
-
getProjectAreaContainer
default Optional<ArtifactTypeContainer> getProjectAreaContainer(String projectAreaId) throws ArtifactTypeMappingStoreException Resolves the container of a single project area.- Parameters:
projectAreaId- the project area id to resolve the container for.- Returns:
- an empty optional if no container exists for the given project area; its contained reference otherwise.
- Throws:
ArtifactTypeMappingStoreException- if containers cannot be resolved.
-
getContainersProjectAreas
Map<String,Collection<ProjectArea>> getContainersProjectAreas(Set<String> containerIds) throws ArtifactTypeMappingStoreException Resolves the project areas of a given set of containers.Implementations must provide all known project areas per requested (and existing) container, regardless of the permissions of the currently logged-in user.
- Parameters:
containerIds- the container ids to resolve project areas for (defaults to all containers if empty).- Returns:
- the corresponding project areas per requested container id.
- Throws:
ArtifactTypeMappingStoreException- if project areas cannot be resolved.
-
getContainerProjectAreas
default Collection<ProjectArea> getContainerProjectAreas(String containerId) throws ArtifactTypeMappingStoreException Resolves the project areas of a single container.An empty collection is returned when the container id is not found in the result of
getContainersProjectAreas(Set), or when its mapped collection is itself empty. These two cases are indistinguishable from this method's return value alone.- Parameters:
containerId- the container id to resolve project areas for.- Returns:
- the project areas for the given container, or an empty collection if none are found.
- Throws:
ArtifactTypeMappingStoreException- if project areas cannot be resolved.
-
getContainers
Gets all available containers.- Returns:
- the available containers.
- Throws:
ArtifactTypeMappingStoreException- if containers cannot be resolved.
-
getArtifactTypeMapping
ArtifactTypeMapping getArtifactTypeMapping(String containerId, String artifactTypeId) throws ArtifactTypeMappingStoreException Gets the default artifact type mapping of a container and artifact type.- Parameters:
containerId- the container id.artifactTypeId- the artifact type id.- Returns:
- the corresponding default mapping.
- Throws:
ArtifactTypeMappingStoreException- if the mapping does not exist or an error occurs while querying the store.
-
getContainersMappings
Map<String,Collection<ArtifactTypeMapping>> getContainersMappings(Set<String> containerIds) throws ArtifactTypeMappingStoreException Gets the default artifact type mappings of a given set of containers.Implementations must provide a mapping for each valid artifact type, in the underlying application, per requested (and existing) container.
- Parameters:
containerIds- the container ids to retrieve mappings for (defaults to all containers if empty).- Returns:
- the default artifact type mappings per requested container id.
- Throws:
ArtifactTypeMappingStoreException- if an error occurs while querying the store.
-
getContainerMappings
default Collection<ArtifactTypeMapping> getContainerMappings(String containerId) throws ArtifactTypeMappingStoreException Gets the default artifact type mappings of a single container.An empty collection is returned when the container id is not found in the result of
getContainersMappings(Set), or when its mapped collection is itself empty. These two cases are indistinguishable from this method's return value alone.- Parameters:
containerId- the container id to retrieve mappings for.- Returns:
- the default artifact type mappings for the given container, or an empty collection if none are found.
- Throws:
ArtifactTypeMappingStoreException- if an error occurs while querying the store.
-