Class ProcessScope.Builder

    • 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 a ProjectScope 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 call resource(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.