Class ProcessScope.Builder
java.lang.Object
com.sodius.oslc.core.process.model.ProcessScope.Builder
- Enclosing class:
ProcessScope
Enables configuring and creating a
ProcessScope instance.- Since:
- 1.9.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionassociation(AssociationType... associationTypes) Adds supported association types into the scope being configured.associationAndLinks(AssociationType... associationTypes) Adds supported association types and all their associated link types into the scope being configured.build()Creates aProjectScopeinstance based on current builder configuration.Adds supported link types into the scope being configured.resource(ResourceType... resourceTypes) Adds supported resource types, the ones whose artifacts can be managed by the local application.
-
Method Details
-
resource
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
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:
-
associationAndLinks
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:
-
link
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:
-
build
Creates aProjectScopeinstance based on current builder configuration.An
IllegalStateExceptionis 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
ProjectScopeinstance. - Throws:
IllegalStateException- if resource types, association types or link types were not configured in the builder.
-