Class AllocationCreator
- java.lang.Object
-
- org.palladiosimulator.generator.fluent.shared.structure.Entity
-
- org.palladiosimulator.generator.fluent.allocation.structure.AllocationEntity
-
- org.palladiosimulator.generator.fluent.allocation.structure.AllocationCreator
-
- All Implemented Interfaces:
IAllocation,IAllocationAddition
public class AllocationCreator extends AllocationEntity implements IAllocation
This class constructs anAllocation. First, theSystemandResoruceEnvironmenthave to be defined. AfterwardsAllocationContexts can be added.- See Also:
Allocation
-
-
Field Summary
-
Fields inherited from class org.palladiosimulator.generator.fluent.allocation.structure.AllocationEntity
allocationCreator
-
-
Constructor Summary
Constructors Constructor Description AllocationCreator(IModelValidator validator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IAllocationAdditionaddToAllocation(AllocationContextCreator allocationContext)Adds anAllocationContextto the org.palladiosimulator.generator.fluent.allocation.protected org.palladiosimulator.pcm.allocation.Allocationbuild()Turns the entity in the making into the finished entity.org.palladiosimulator.pcm.allocation.AllocationcreateAllocationNow()Completes the org.palladiosimulator.generator.fluent.allocation creation.org.palladiosimulator.pcm.core.composition.AssemblyContextgetAssemblyContextByName(String name)Searches the definedSystemfor anAssemblyContextwith the given name.org.palladiosimulator.pcm.core.composition.EventChannelgetEventChannelByName(String name)Searches the definedSystemfor anEventChannelwith the given name.org.palladiosimulator.pcm.resourceenvironment.ResourceContainergetResourceContainerByName(String name)Searches the definedResourceEnvironmentfor aResourceContainerwith the given name.AllocationCreatorwithName(String name)Defines the unique name of this current entity.IAllocationAdditionwithResourceEnvironment(org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment environment)Defines theResourceEnvironmetused for the org.palladiosimulator.generator.fluent.allocation.IAllocationAdditionwithSystem(org.palladiosimulator.pcm.system.System system)Defines theSystemused for the org.palladiosimulator.generator.fluent.allocation.
-
-
-
Constructor Detail
-
AllocationCreator
public AllocationCreator(IModelValidator validator)
-
-
Method Detail
-
build
protected org.palladiosimulator.pcm.allocation.Allocation build()
Description copied from class:EntityTurns the entity in the making into the finished entity.
-
withName
public AllocationCreator withName(String name)
Description copied from class:EntityDefines 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:
withNamein interfaceIAllocation- Overrides:
withNamein classEntity- Returns:
- this current entity in the making
-
createAllocationNow
public org.palladiosimulator.pcm.allocation.Allocation createAllocationNow()
Description copied from interface:IAllocationAdditionCompletes the org.palladiosimulator.generator.fluent.allocation creation.- Specified by:
createAllocationNowin interfaceIAllocationAddition- 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:IAllocationAdditionDefines theResourceEnvironmetused for the org.palladiosimulator.generator.fluent.allocation.- Specified by:
withResourceEnvironmentin interfaceIAllocationAddition- Returns:
- this org.palladiosimulator.generator.fluent.allocation
- See Also:
ResourceEnvironment
-
withSystem
public IAllocationAddition withSystem(org.palladiosimulator.pcm.system.System system)
Description copied from interface:IAllocationAdditionDefines theSystemused for the org.palladiosimulator.generator.fluent.allocation.- Specified by:
withSystemin interfaceIAllocationAddition- Returns:
- this org.palladiosimulator.generator.fluent.allocation
- See Also:
System
-
addToAllocation
public IAllocationAddition addToAllocation(AllocationContextCreator allocationContext)
Description copied from interface:IAllocationAdditionAdds anAllocationContextto the org.palladiosimulator.generator.fluent.allocation. The creator will be turned into a finished context.- Specified by:
addToAllocationin interfaceIAllocationAddition- Returns:
- this org.palladiosimulator.generator.fluent.allocation
- See Also:
AllocationContext,FluentAllocationFactory.newAllocationContext()
-
getAssemblyContextByName
public org.palladiosimulator.pcm.core.composition.AssemblyContext getAssemblyContextByName(String name) throws IllegalArgumentException
Searches the definedSystemfor anAssemblyContextwith the given name.- Parameters:
name-- Returns:
- the
AssemblyContextwith 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 definedSystemfor anEventChannelwith the given name.- Parameters:
name-- Returns:
- the
EventChannelwith 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 definedResourceEnvironmentfor aResourceContainerwith the given name.- Parameters:
name-- Returns:
- the
ResourceContainerwith the given name - Throws:
IllegalArgumentException- Thrown if no ResourceContainer with the given name exists
-
-