Class ArtifactTypeUsageMappingDialogBuilder
- java.lang.Object
-
- com.sodius.oslc.server.process.services.ArtifactTypeUsageMappingDialogBuilder
-
public abstract class ArtifactTypeUsageMappingDialogBuilder extends Object
Builder to create Dialogs based on an Artifact Type Usage Mapping. Adds the Dialogs to a Service based on the Artifact Type Usage Mapping found for the given containerId. If no mapping has been created for this containerId, the default Artifacts provided by theArtifactTypeStore
will be used.- Since:
- 3.1.0
-
-
Field Summary
Fields Modifier and Type Field Description protected String
containerId
-
Constructor Summary
Constructors Modifier Constructor Description protected
ArtifactTypeUsageMappingDialogBuilder(String containerId, Service service)
Instantiates a builder to create Dialogs based on the Artifact Type Usage Mappings of the given container.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Service
build()
Adds the dialogs to the service based on the Artifact Type Usage Mappings configured.protected abstract void
fillCreationDialog(Dialog creationDialog, ArtifactTypeUsageMapping artifactTypeUsageMapping)
Fill the missing properties on the given creation dialog: oslc_core:dialog (the dialog URI) oslc_core:hintHeight oslc_core:hintWidthprotected abstract void
fillSelectionDialog(Dialog selectionDialog, ArtifactTypeUsageMapping artifactTypeUsageMapping)
Fill the missing properties on the given selection dialog: oslc_core:dialog (the dialog URI) oslc_core:hintHeight oslc_core:hintWidth
-
-
-
Field Detail
-
containerId
protected final String containerId
-
-
Constructor Detail
-
ArtifactTypeUsageMappingDialogBuilder
protected ArtifactTypeUsageMappingDialogBuilder(String containerId, Service service)
Instantiates a builder to create Dialogs based on the Artifact Type Usage Mappings of the given container.- Parameters:
containerId
- The container ID of the projectservice
- The service to add the Dialogs to
-
-
Method Detail
-
build
public Service build() throws ArtifactTypeStoreException
Adds the dialogs to the service based on the Artifact Type Usage Mappings configured.- Returns:
- the
Service
with the added dialogs. - Throws:
ArtifactTypeStoreException
- if an error occurs while querying the store.
-
fillSelectionDialog
protected abstract void fillSelectionDialog(Dialog selectionDialog, ArtifactTypeUsageMapping artifactTypeUsageMapping)
Fill the missing properties on the given selection dialog:- oslc_core:dialog (the dialog URI)
- oslc_core:hintHeight
- oslc_core:hintWidth
- Parameters:
selectionDialog
- the selection dialog to fillartifactTypeUsageMapping
- the artifact type usage mapping from which the dialog was initialized with a label, resource type and usage
-
fillCreationDialog
protected abstract void fillCreationDialog(Dialog creationDialog, ArtifactTypeUsageMapping artifactTypeUsageMapping)
Fill the missing properties on the given creation dialog:- oslc_core:dialog (the dialog URI)
- oslc_core:hintHeight
- oslc_core:hintWidth
- Parameters:
creationDialog
- the creation dialog to fillartifactTypeUsageMapping
- the artifact type usage mapping from which the dialog was initialized with a label, resource type and usage
-
-