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, theSystem
andResoruceEnvironment
have to be defined. AfterwardsAllocationContext
s 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 IAllocationAddition
addToAllocation(AllocationContextCreator allocationContext)
Adds anAllocationContext
to the org.palladiosimulator.generator.fluent.allocation.protected org.palladiosimulator.pcm.allocation.Allocation
build()
Turns the entity in the making into the finished entity.org.palladiosimulator.pcm.allocation.Allocation
createAllocationNow()
Completes the org.palladiosimulator.generator.fluent.allocation creation.org.palladiosimulator.pcm.core.composition.AssemblyContext
getAssemblyContextByName(String name)
Searches the definedSystem
for anAssemblyContext
with the given name.org.palladiosimulator.pcm.core.composition.EventChannel
getEventChannelByName(String name)
Searches the definedSystem
for anEventChannel
with the given name.org.palladiosimulator.pcm.resourceenvironment.ResourceContainer
getResourceContainerByName(String name)
Searches the definedResourceEnvironment
for aResourceContainer
with the given name.AllocationCreator
withName(String name)
Defines the unique name of this current entity.IAllocationAddition
withResourceEnvironment(org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment environment)
Defines theResourceEnvironmet
used for the org.palladiosimulator.generator.fluent.allocation.IAllocationAddition
withSystem(org.palladiosimulator.pcm.system.System system)
Defines theSystem
used 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:Entity
Turns the entity in the making into 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 interfaceIAllocation
- Overrides:
withName
in classEntity
- 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 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:IAllocationAddition
Defines theResourceEnvironmet
used for the org.palladiosimulator.generator.fluent.allocation.- Specified by:
withResourceEnvironment
in 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:IAllocationAddition
Defines theSystem
used for the org.palladiosimulator.generator.fluent.allocation.- Specified by:
withSystem
in interfaceIAllocationAddition
- Returns:
- this org.palladiosimulator.generator.fluent.allocation
- See Also:
System
-
addToAllocation
public IAllocationAddition addToAllocation(AllocationContextCreator allocationContext)
Description copied from interface:IAllocationAddition
Adds anAllocationContext
to the org.palladiosimulator.generator.fluent.allocation. The creator will be turned into a finished context.- Specified by:
addToAllocation
in 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 definedSystem
for anAssemblyContext
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 definedSystem
for anEventChannel
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 definedResourceEnvironment
for aResourceContainer
with the given name.- Parameters:
name
-- Returns:
- the
ResourceContainer
with the given name - Throws:
IllegalArgumentException
- Thrown if no ResourceContainer with the given name exists
-
-