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
This class constructs an
Allocation
.
First, the System
and ResoruceEnvironment
have to be defined.
Afterwards AllocationContext
s can be added.- See Also:
-
Allocation
-
Field Summary
Fields inherited from class org.palladiosimulator.generator.fluent.allocation.structure.AllocationEntity
allocationCreator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddToAllocation
(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
Completes the org.palladiosimulator.generator.fluent.allocation creation.org.palladiosimulator.pcm.core.composition.AssemblyContext
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
Searches the definedResourceEnvironment
for aResourceContainer
with the given name.Defines the unique name of this current entity.withResourceEnvironment
(org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment environment) Defines theResourceEnvironmet
used for the org.palladiosimulator.generator.fluent.allocation.withSystem
(org.palladiosimulator.pcm.system.System system) Defines theSystem
used for the org.palladiosimulator.generator.fluent.allocation.
-
Constructor Details
-
Method Details
-
build
protected org.palladiosimulator.pcm.allocation.Allocation build()Description copied from class:Entity
Turns the entity in the making into the finished entity. -
withName
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
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
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
-