Class CompositeComponentCreator


  • public class CompositeComponentCreator
    extends ComplexComponent
    This class constructs a CompositeComponent. It is used to create the 'CompositeComponent' object step-by-step, i.e. 'CompositeComponentCreator' objects are of intermediate state.
    See Also:
    CompositeComponent
    • Constructor Detail

      • CompositeComponentCreator

        public CompositeComponentCreator​(RepositoryCreator repo)
    • Method Detail

      • withName

        public CompositeComponentCreator withName​(String name)
        Description copied from class: Entity
        Defines the unique name of this current entity. Once created entities are referenced by this name. Only entities with a unique name can be fetched from the model.
        Overrides:
        withName in class Entity
        Returns:
        this current entity in the making
      • ofType

        public CompositeComponentCreator ofType​(org.palladiosimulator.pcm.repository.ComponentType type)
        Sets the type of the composite component.

        Possible values are 'BUSINESS_COMPONENT' (default) and 'INFRASTRUCTURE_COMPONENT'.
        Parameters:
        type -
        Returns:
        the composite component in the making
      • provides

        public CompositeComponentCreator provides​(OperationInterfaceCreator interfce,
                                                  String name)
        Description copied from class: Component
        Creates an OperationProvidedRole connection with the name name between the component and the OperationInterface interfce and adds it to the component. Setting the name is important for referencing if the role is used in a connector of a composite component and/or subsystem later on.

        Create a new operation interface by using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.newOperationInterface().

        Overrides:
        provides in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.newOperationInterface()
      • provides

        public CompositeComponentCreator provides​(org.palladiosimulator.pcm.repository.OperationInterface interfce)
        Description copied from class: Component
        Creates an OperationProvidedRole connection between the component and the OperationInterface interfce and adds it to the component.

        An existing interfce can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfOperationInterface(name).

        Overrides:
        provides in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.fetchOfOperationInterface(String)
      • provides

        public CompositeComponentCreator provides​(org.palladiosimulator.pcm.repository.OperationInterface interfce,
                                                  String name)
        Description copied from class: Component
        Creates an OperationProvidedRole connection with the name name between the component and the OperationInterface interfce and adds it to the component. Setting the name is important for referencing if the role is used in a connector of a composite component and/or subsystem later on.

        An existing interfce can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfOperationInterface(name).

        Overrides:
        provides in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.fetchOfOperationInterface(String)
      • providesInfrastructure

        public CompositeComponentCreator providesInfrastructure​(InfrastructureInterfaceCreator interfce,
                                                                String name)
        Description copied from class: Component
        Creates an InfrastructureProvidedRole connection with the name name between the component and the InfrastructureInterface interfce and adds it to the component. Setting the name is important for referencing if the role is used in a connector of a composite component and/or subsystem later on.

        Create a new infrastructure interface by using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.newInfrastructureInterface().

        Overrides:
        providesInfrastructure in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.newInfrastructureInterface()
      • providesInfrastructure

        public CompositeComponentCreator providesInfrastructure​(org.palladiosimulator.pcm.repository.InfrastructureInterface interfce)
        Description copied from class: Component
        Creates an InfrastructureProvidedRole connection between the component and the InfrastructureInterface interfce and adds it to the component.

        An existing interfce can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfInfrastructureInterface(name).

        Overrides:
        providesInfrastructure in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.fetchOfInfrastructureInterface(String)
      • providesInfrastructure

        public CompositeComponentCreator providesInfrastructure​(org.palladiosimulator.pcm.repository.InfrastructureInterface interfce,
                                                                String name)
        Description copied from class: Component
        Creates an InfrastructureProvidedRole connection with the name name between the component and the InfrastructureInterface interfce and adds it to the component. Setting the name is important for referencing if the role is used in a connector of a composite component and/or subsystem later on.

        An existing interfce can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfInfrastructureInterface(name).

        Overrides:
        providesInfrastructure in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.fetchOfInfrastructureInterface(String)
      • handles

        public CompositeComponentCreator handles​(EventGroupCreator eventGroup,
                                                 String name)
        Description copied from class: Component
        Creates a SinkRole connection with the name name between the component and the EventGroup eventGroup and adds it to the component. Setting the name is important for referencing if the role is used in a connector of a composite component and/or subsystem later on.

        Create a new event group by using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.newEventGroup().

        Overrides:
        handles in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.newEventGroup()
      • handles

        public CompositeComponentCreator handles​(org.palladiosimulator.pcm.repository.EventGroup eventGroup)
        Description copied from class: Component
        Creates a SinkRole connection between the component and the EventGroup eventGroup and adds it to the component.

        An existing eventGroup can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfEventGroup(name).

        Overrides:
        handles in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.fetchOfEventGroup(String)
      • handles

        public CompositeComponentCreator handles​(org.palladiosimulator.pcm.repository.EventGroup eventGroup,
                                                 String name)
        Description copied from class: Component
        Creates a SinkRole connection with the name name between the component and the EventGroup eventGroup and adds it to the component. Setting the name is important for referencing if the role is used in a connector of a composite component and/or subsystem later on.

        An existing eventGroup can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfEventGroup(name).

        Overrides:
        handles in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.fetchOfEventGroup(String)
      • requires

        public CompositeComponentCreator requires​(OperationInterfaceCreator interfce,
                                                  String name)
        Description copied from class: Component
        Creates an OperationRequiredRole connection with the name name between the component and the OperationInterface interfce and adds it to the component. Setting the name is important for referencing if the role is used in a connector of a composite component and/or subsystem later on.

        Create a new operation interface by using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.newOperationInterface().

        Overrides:
        requires in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.newOperationInterface()
      • requires

        public CompositeComponentCreator requires​(org.palladiosimulator.pcm.repository.OperationInterface interfce)
        Description copied from class: Component
        Creates an OperationRequiredRole connection between the component and the OperationInterface interfce and adds it to the component.

        An existing interfce can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfOperationInterface(name).

        Overrides:
        requires in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.fetchOfOperationInterface(String)
      • requires

        public CompositeComponentCreator requires​(org.palladiosimulator.pcm.repository.OperationInterface interfce,
                                                  String name)
        Description copied from class: Component
        Creates an OperationRequiredRole connection with the name name between the component and the OperationInterface interfce and adds it to the component. Setting the name is important for referencing if the role is used in a connector of a composite component and/or subsystem later on.

        An existing interfce can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfOperationInterface(name).

        Overrides:
        requires in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.fetchOfOperationInterface(String)
      • requiresInfrastructure

        public CompositeComponentCreator requiresInfrastructure​(InfrastructureInterfaceCreator interfce,
                                                                String name)
        Description copied from class: Component
        Creates an InfrastructureRequiredRole connection with the name name between the component and the InfrastructureInterface interfce and adds it to the component. Setting the name is important for referencing if the role is used in a connector of a composite component and/or subsystem later on.

        Create a new infrastructure interface by using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.newInfrastructureInterface().

        Overrides:
        requiresInfrastructure in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.newInfrastructureInterface()
      • requiresInfrastructure

        public CompositeComponentCreator requiresInfrastructure​(org.palladiosimulator.pcm.repository.InfrastructureInterface interfce)
        Description copied from class: Component
        Creates an InfrastructureRequiredRole connection between the component and the InfrastructureInterface interfce and adds it to the component.

        An existing interfce can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfInfrastructureInterface(name).

        Overrides:
        requiresInfrastructure in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.fetchOfInfrastructureInterface(String)
      • requiresInfrastructure

        public CompositeComponentCreator requiresInfrastructure​(org.palladiosimulator.pcm.repository.InfrastructureInterface interfce,
                                                                String name)
        Description copied from class: Component
        Creates an InfrastructureRequiredRole connection with the name name between the component and the InfrastructureInterface interfce and adds it to the component. Setting the name is important for referencing if the role is used in a connector of a composite component and/or subsystem later on.

        An existing interfce can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfInfrastructureInterface(name).

        Overrides:
        requiresInfrastructure in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.fetchOfInfrastructureInterface(String)
      • emits

        public CompositeComponentCreator emits​(EventGroupCreator eventGroup,
                                               String name)
        Description copied from class: Component
        Creates a SourceRole connection with the name name between the component and the EventGroup eventGroup and adds it to the component. Setting the name is important for referencing if the role is used in a connector of a composite component and/or subsystem later on.

        Create a new event group by using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.newEventGroup().

        Overrides:
        emits in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.newEventGroup()
      • emits

        public CompositeComponentCreator emits​(org.palladiosimulator.pcm.repository.EventGroup eventGroup)
        Description copied from class: Component
        Creates a SourceRole connection between the component and the EventGroup eventGroup and adds it to the component.

        An existing eventGroup can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfEventGroup(name).

        Overrides:
        emits in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.fetchOfEventGroup(String)
      • emits

        public CompositeComponentCreator emits​(org.palladiosimulator.pcm.repository.EventGroup eventGroup,
                                               String name)
        Description copied from class: Component
        Creates a SourceRole connection with the name name between the component and the EventGroup eventGroup and adds it to the component. Setting the name is important for referencing if the role is used in a connector of a composite component and/or subsystem later on.

        An existing eventGroup can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfEventGroup(name).

        Overrides:
        emits in class Component
        Returns:
        this component
        See Also:
        FluentRepositoryFactory.fetchOfEventGroup(String)
      • requiresResource

        public CompositeComponentCreator requiresResource​(ResourceInterface resourceInterface)
        Description copied from class: Component
        Creates a ResourceRequiredRole connection between the component and the ResourceInterface resourceInterface and adds it to the component.

        An existing resourceInterface can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfResourceInterface(name).

        Overrides:
        requiresResource in class Component
        Returns:
        this component
        See Also:
        org.palladiosimulator.generator.fluent.repository.factory.FluentRepositoryFactory#fetchOfResourceInterface(String)
      • requiresResource

        public CompositeComponentCreator requiresResource​(ResourceInterface resourceInterface,
                                                          String name)
        Description copied from class: Component
        Creates a ResourceRequiredRole connection with the name name between the component and the ResourceInterface resourceInterface and adds it to the component. Setting the name is important for referencing if the role is used in a connector of a composite component and/or subsystem later on.

        An existing resourceInterface can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfResourceInterface(name).

        Overrides:
        requiresResource in class Component
        Returns:
        this component
        See Also:
        org.palladiosimulator.generator.fluent.repository.factory.FluentRepositoryFactory#fetchOfResourceInterface(String)
      • conforms

        public CompositeComponentCreator conforms​(CompleteComponentTypeCreator completeComponentType)
        Creates a conforming (parental) connection to the completeComponentType and adds it to the composite component.

        Complete (Component) types abstract from the realization of components. They only contain provided and required roles omitting the components’ internal structure, i.e., the service effect specifications or assemblies.

        The completeComponentType can be created using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.newCompleteComponentType().

        Parameters:
        completeComponentType -
        Returns:
        the composite component in the making
        See Also:
        FluentRepositoryFactory.newCompleteComponentType(), ImplementationComponentType.getParentCompleteComponentTypes(), CompleteComponentType
      • conforms

        public CompositeComponentCreator conforms​(org.palladiosimulator.pcm.repository.CompleteComponentType completeComponentType)
        Creates a conforming (parental) connection to the completeComponentType and adds it to the composite component.

        Complete (Component) types abstract from the realization of components. They only contain provided and required roles omitting the components’ internal structure, i.e., the service effect specifications or assemblies.

        An existing completeComponentType can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfCompleteComponentType(name).

        Parameters:
        completeComponentType -
        Returns:
        the composite component in the making
        See Also:
        FluentRepositoryFactory.fetchOfCompleteComponentType(String), ImplementationComponentType.getParentCompleteComponentTypes(), CompleteComponentType
      • withVariableUsage

        public CompositeComponentCreator withVariableUsage​(VariableUsageCreator variableUsage)
        Adds a VariableUsage to the composite component.

        Variable usages are used to characterize variables like input and output variables or component parameters. They contain the specification of the variable as VariableCharacterisation and also refer to the name of the characterized variable in its namedReference association.

        Create a new variable usage by using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.newVariableUsage().

        Parameters:
        variableUsage - in the making
        Returns:
        the composite component in the making
        See Also:
        FluentRepositoryFactory.newVariableUsage(), VariableUsage
      • withAssemblyConnection

        public CompositeComponentCreator withAssemblyConnection​(org.palladiosimulator.pcm.repository.OperationProvidedRole providedRole,
                                                                org.palladiosimulator.pcm.core.composition.AssemblyContext providingAssemblyContext,
                                                                org.palladiosimulator.pcm.repository.OperationRequiredRole requiredRole,
                                                                org.palladiosimulator.pcm.core.composition.AssemblyContext requiringAssemblyContext)
        Description copied from class: ComplexComponent
        Creates an AssemblyConnector and adds it to the component.

        An AssemblyConnector is a bidirectional link of two assembly contexts. Intuitively, an AssemblyConnector connects a provided and a required interface of two different components. AssemblyContext must refer to the tuple (Role, AssemblyContext) in order to uniquely identify which component roles communicate with each other.

        Existing roles and assembly contexts can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory.

        Overrides:
        withAssemblyConnection in class ComplexComponent
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfAssemblyContext(String), FluentRepositoryFactory.fetchOfOperationProvidedRole(String), FluentRepositoryFactory.fetchOfOperationRequiredRole(String)
      • withAssemblyEventConnection

        public CompositeComponentCreator withAssemblyEventConnection​(org.palladiosimulator.pcm.repository.SinkRole sinkRole,
                                                                     org.palladiosimulator.pcm.core.composition.AssemblyContext sinkAssemblyContext,
                                                                     org.palladiosimulator.pcm.repository.SourceRole sourceRole,
                                                                     org.palladiosimulator.pcm.core.composition.AssemblyContext sourceAssemblyContext,
                                                                     String filterConditionStochasticExpression)
        Description copied from class: ComplexComponent
        Creates an AssemblyEventConnector and adds it to the component.

        An AssemblyConnector is a bidirectional link of two assembly contexts. Intuitively, an AssemblyEventConnector connects a sink and a source. AssemblyContext must refer to the tuple (Role,AssemblyContext) in order to uniquely identify which component sink and source roles communicate with each other.

        Existing roles and assembly contexts can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory.

        Overrides:
        withAssemblyEventConnection in class ComplexComponent
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfAssemblyContext(String), FluentRepositoryFactory.fetchOfSinkRole(String), FluentRepositoryFactory.fetchOfSourceRole(String)
      • build

        public org.palladiosimulator.pcm.repository.RepositoryComponent build()
        Description copied from class: Entity
        Turns the entity in the making into the finished entity.
        Specified by:
        build in class Component
        Returns:
        the finished entity