Class ArtifactTypeMappingServiceBuilder
- java.lang.Object
-
- com.sodius.oslc.server.process.types.services.ArtifactTypeMappingServiceBuilder
-
public class ArtifactTypeMappingServiceBuilder extends Object
Convenient builder to create aServicebased on theartifact type mappingsof a container.- Since:
- 3.9.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Servicebuild(URI domain)Builds aServicefor a given domain.ArtifactTypeMappingServiceBuildercreationDialogs(BiConsumer<Dialog,ArtifactTypeMapping> customizer)Registers the creationDialogcustomizer.ArtifactTypeMappingServiceBuildercreationFactories(Consumer<CreationFactory> customizer)Registers theCreationFactorycustomizer.static ArtifactTypeMappingServiceBuilderforContainer(String container)Creates a builder for a given artifact type mappings container.ArtifactTypeMappingServiceBuilderqueryCapabilities(BiConsumer<QueryCapability,Link> customizer)Registers theQueryCapabilitycustomizer.ArtifactTypeMappingServiceBuilderselectionDialogs(BiConsumer<Dialog,ArtifactTypeMapping> customizer)Registers the selectionDialogcustomizer.
-
-
-
Method Detail
-
forContainer
public static ArtifactTypeMappingServiceBuilder forContainer(String container) throws ArtifactTypeMappingStoreException, LinkingTypesStoreException
Creates a builder for a given artifact type mappings container.- Parameters:
container- the artifact type mappings container id.- Returns:
- the corresponding builder.
- Throws:
NullPointerException- ifcontainerisnull.ArtifactTypeMappingStoreException- if the artifact type mappings cannot be resolved.LinkingTypesStoreException- if an error prevents resource types from being retrieved.- Since:
- 3.13.0
-
selectionDialogs
public ArtifactTypeMappingServiceBuilder selectionDialogs(BiConsumer<Dialog,ArtifactTypeMapping> customizer)
Registers the selectionDialogcustomizer.The customizer must set at minimum the
dialog URIor the processing dialog will not be included in theService. The dialog size is also expected to be set.- Parameters:
customizer- the selection dialog customizer.- Returns:
- this builder reference.
- Throws:
NullPointerException- ifcustomizerisnull.- Since:
- 3.13.0
-
creationDialogs
public ArtifactTypeMappingServiceBuilder creationDialogs(BiConsumer<Dialog,ArtifactTypeMapping> customizer)
Registers the creationDialogcustomizer.The customizer must set at minimum the
dialog URIor the processing dialog will not be included in theService. The dialog size is also expected to be set.- Parameters:
customizer- the creation dialog customizer.- Returns:
- this builder reference.
- Throws:
NullPointerException- ifcustomizerisnull.- Since:
- 3.13.0
-
queryCapabilities
public ArtifactTypeMappingServiceBuilder queryCapabilities(BiConsumer<QueryCapability,Link> customizer)
Registers theQueryCapabilitycustomizer.The customizer must set at minimum the
query base URIor the processing capability will not be included in theService.- Parameters:
customizer- the query capability customizer.- Returns:
- this builder reference.
- Throws:
NullPointerException- ifcustomizerisnull.- Since:
- 3.13.0
-
creationFactories
public ArtifactTypeMappingServiceBuilder creationFactories(Consumer<CreationFactory> customizer)
Registers theCreationFactorycustomizer.The customizer must set at minimum the
creationandresource shapeURIs or the processing factory will not be included in theService.- Parameters:
customizer- the creation factory customizer.- Returns:
- this builder reference.
- Throws:
NullPointerException- ifcustomizerisnull.- Since:
- 3.13.0
-
build
public Service build(URI domain)
Builds aServicefor a given domain.- Parameters:
domain- the domain URI.- Returns:
- the corresponding service.
- Throws:
NullPointerException- ifdomainisnull.
-
-