Class AllocationCreator

  • All Implemented Interfaces:
    IAllocation, IAllocationAddition

    public class AllocationCreator
    extends AllocationEntity
    implements IAllocation
    This class constructs an Allocation. First, the System and ResoruceEnvironment have to be defined. Afterwards AllocationContexts can be added.
    See Also:
    Allocation
    • Constructor Detail

      • AllocationCreator

        public AllocationCreator​(IModelValidator validator)
    • Method Detail

      • build

        protected org.palladiosimulator.pcm.allocation.Allocation build()
        Description copied from class: Entity
        Turns the entity in the making into the finished entity.
        Specified by:
        build in class Entity
        Returns:
        the finished entity
      • withName

        public AllocationCreator 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.
        Specified by:
        withName in interface IAllocation
        Overrides:
        withName in class Entity
        Returns:
        this current entity in the making
      • createAllocationNow

        public org.palladiosimulator.pcm.allocation.Allocation createAllocationNow()
        Description copied from interface: IAllocationAddition
        Completes the org.palladiosimulator.generator.fluent.allocation creation.
        Specified by:
        createAllocationNow in interface IAllocationAddition
        Returns:
        the created org.palladiosimulator.generator.fluent.allocation
        See Also:
        Allocation
      • withResourceEnvironment

        public IAllocationAddition withResourceEnvironment​(org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment environment)
        Description copied from interface: IAllocationAddition
        Defines the ResourceEnvironmet used for the org.palladiosimulator.generator.fluent.allocation.
        Specified by:
        withResourceEnvironment in interface IAllocationAddition
        Returns:
        this org.palladiosimulator.generator.fluent.allocation
        See Also:
        ResourceEnvironment
      • withSystem

        public IAllocationAddition withSystem​(org.palladiosimulator.pcm.system.System system)
        Description copied from interface: IAllocationAddition
        Defines the System used for the org.palladiosimulator.generator.fluent.allocation.
        Specified by:
        withSystem in interface IAllocationAddition
        Returns:
        this org.palladiosimulator.generator.fluent.allocation
        See Also:
        System
      • getAssemblyContextByName

        public org.palladiosimulator.pcm.core.composition.AssemblyContext getAssemblyContextByName​(String name)
                                                                                            throws IllegalArgumentException
        Searches the defined System for an AssemblyContext with the given name.
        Parameters:
        name -
        Returns:
        the AssemblyContext with the given name
        Throws:
        IllegalArgumentException - Thrown if no AssemblyContext with the given name exists
      • getEventChannelByName

        public org.palladiosimulator.pcm.core.composition.EventChannel getEventChannelByName​(String name)
                                                                                      throws IllegalArgumentException
        Searches the defined System for an EventChannel with the given name.
        Parameters:
        name -
        Returns:
        the EventChannel with the given name
        Throws:
        IllegalArgumentException - Thrown if no EventChannel with the given name exists
      • getResourceContainerByName

        public org.palladiosimulator.pcm.resourceenvironment.ResourceContainer getResourceContainerByName​(String name)
                                                                                                   throws IllegalArgumentException
        Searches the defined ResourceEnvironment for a ResourceContainer with the given name.
        Parameters:
        name -
        Returns:
        the ResourceContainer with the given name
        Throws:
        IllegalArgumentException - Thrown if no ResourceContainer with the given name exists