Class ProcessScope.Builder
- java.lang.Object
-
- com.sodius.oslc.core.process.model.ProcessScope.Builder
-
- Enclosing class:
- ProcessScope
public static class ProcessScope.Builder extends Object
Enables configuring and creating aProcessScope
instance.- Since:
- 1.9.0
- See Also:
ProcessScope.builder()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessScope.Builder
association(AssociationType... associationTypes)
Adds supported association types into the scope being configured.ProcessScope.Builder
associationAndLinks(AssociationType... associationTypes)
Adds supported association types and all their associated link types into the scope being configured.ProcessScope
build()
Creates aProjectScope
instance based on current builder configuration.ProcessScope.Builder
link(LinkType... linkTypes)
Adds supported link types into the scope being configured.ProcessScope.Builder
resource(ResourceType... resourceTypes)
Adds supported resource types, the ones whose artifacts can be managed by the local application.
-
-
-
Method Detail
-
resource
public ProcessScope.Builder resource(ResourceType... resourceTypes)
Adds supported resource types, the ones whose artifacts can be managed by the local application.- Parameters:
resourceTypes
- supported resource types- Returns:
- the builder instance.
- Since:
- 3.5.0
-
association
public ProcessScope.Builder association(AssociationType... associationTypes)
Adds supported association types into the scope being configured. Adding an association also automatically adds its back-association. However it doesn't automatically add its link types; link types must be registered explicitly.- Parameters:
associationTypes
- additional supported association types.- Returns:
- the builder instance.
- See Also:
AssociationType.getBackAssociation()
,link(LinkType...)
-
associationAndLinks
public ProcessScope.Builder associationAndLinks(AssociationType... associationTypes)
Adds supported association types and all their associated link types into the scope being configured. Adding an association also automatically adds its back-association.- Parameters:
associationTypes
- additional supported association types and their link types.- Returns:
- the builder instance.
- See Also:
AssociationType.getBackAssociation()
-
link
public ProcessScope.Builder link(LinkType... linkTypes)
Adds supported link types into the scope being configured. Adding a link type also automatically adds its back-link, if any.- Parameters:
linkTypes
- additional supported link types.- Returns:
- the builder instance.
- See Also:
LinkType.getBacklink()
-
build
public ProcessScope build() throws IllegalStateException
Creates aProjectScope
instance based on current builder configuration.An
IllegalStateException
is thrown if the builder was not configured with resource types, association types and link types. An application may be legitimate not to declare any supported resource type, but it has to callresource(ResourceType...)
with an empty array in such case, to explicit the decision.- Returns:
- a new
ProjectScope
instance. - Throws:
IllegalStateException
- if resource types, association types or link types were not configured in the builder.
-
-