Class ResourceEnvironmentCreator
- java.lang.Object
-
- org.palladiosimulator.generator.fluent.shared.structure.Entity
-
- org.palladiosimulator.generator.fluent.resourceenvironment.structure.ResourceEntity
-
- org.palladiosimulator.generator.fluent.resourceenvironment.structure.ResourceEnvironmentCreator
-
- All Implemented Interfaces:
IResourceEnvironment
,IResourceEnvironmentAddition
public class ResourceEnvironmentCreator extends ResourceEntity implements IResourceEnvironment
This class constructs aResourceEnvironment
.- See Also:
ResourceEnvironment
-
-
Field Summary
-
Fields inherited from class org.palladiosimulator.generator.fluent.resourceenvironment.structure.ResourceEntity
resourceCreator
-
-
Constructor Summary
Constructors Constructor Description ResourceEnvironmentCreator(org.palladiosimulator.pcm.resourcetype.ResourceRepository resources, IModelValidator validator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IResourceEnvironmentAddition
addToResourceEnvironment(LinkingResourceCreator linkingResource)
Adds aLinkingResource
to the resource environment.IResourceEnvironmentAddition
addToResourceEnvironment(ResourceContainerCreator resourceContainer)
Adds aResourceContainer
to the resource environment.protected org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment
build()
Turns the entity in the making into the finished entity.org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment
createResourceEnvironmentNow()
Completes the resource environment creationorg.palladiosimulator.pcm.resourcetype.CommunicationLinkResourceType
getCommunicationLinkResource(CommunicationLinkResource resource)
Fetches theCommunicationLinkResourceType
matching the given resource.org.palladiosimulator.pcm.resourcetype.ProcessingResourceType
getProcessingResource(ProcessingResource resource)
Fetches theProcessingResourceType
matching the given resource.org.palladiosimulator.pcm.resourceenvironment.ResourceContainer
getResourceContainerByName(String name)
Fetches theResourceContaienr
with the given name.org.palladiosimulator.pcm.resourcetype.SchedulingPolicy
getSchedulingPolicy(SchedulingPolicies policy)
Fetches theSchedulingPolicy
matching the given policy.ResourceEnvironmentCreator
withName(String name)
Defines the unique name of this current entity.
-
-
-
Constructor Detail
-
ResourceEnvironmentCreator
public ResourceEnvironmentCreator(org.palladiosimulator.pcm.resourcetype.ResourceRepository resources, IModelValidator validator)
-
-
Method Detail
-
withName
public ResourceEnvironmentCreator 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 interfaceIResourceEnvironment
- Overrides:
withName
in classEntity
- Returns:
- this current entity in the making
-
createResourceEnvironmentNow
public org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment createResourceEnvironmentNow()
Description copied from interface:IResourceEnvironmentAddition
Completes the resource environment creation- Specified by:
createResourceEnvironmentNow
in interfaceIResourceEnvironmentAddition
- Returns:
- the created resource environment
- See Also:
ResourceEnvironment
-
build
protected org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment build()
Description copied from class:Entity
Turns the entity in the making into the finished entity.
-
addToResourceEnvironment
public IResourceEnvironmentAddition addToResourceEnvironment(ResourceContainerCreator resourceContainer)
Description copied from interface:IResourceEnvironmentAddition
Adds aResourceContainer
to the resource environment. The creator will be turned into the finished container.- Specified by:
addToResourceEnvironment
in interfaceIResourceEnvironmentAddition
- Returns:
- this resource environment
- See Also:
ResourceContainer
,FluentResourceEnvironmentFactory.newResourceContainer()
-
addToResourceEnvironment
public IResourceEnvironmentAddition addToResourceEnvironment(LinkingResourceCreator linkingResource)
Description copied from interface:IResourceEnvironmentAddition
Adds aLinkingResource
to the resource environment. The creator will be turned into the finished resource.- Specified by:
addToResourceEnvironment
in interfaceIResourceEnvironmentAddition
- Returns:
- this resource environment
- See Also:
LinkingResource
,FluentResourceEnvironmentFactory.newLinkingResource()
-
getSchedulingPolicy
public org.palladiosimulator.pcm.resourcetype.SchedulingPolicy getSchedulingPolicy(SchedulingPolicies policy)
Fetches theSchedulingPolicy
matching the given policy.- Parameters:
policy
-- Returns:
- the matching
SchedulingPolicy
-
getProcessingResource
public org.palladiosimulator.pcm.resourcetype.ProcessingResourceType getProcessingResource(ProcessingResource resource)
Fetches theProcessingResourceType
matching the given resource.- Parameters:
resource
-- Returns:
- the matching
ProcessingResourceType
-
getCommunicationLinkResource
public org.palladiosimulator.pcm.resourcetype.CommunicationLinkResourceType getCommunicationLinkResource(CommunicationLinkResource resource)
Fetches theCommunicationLinkResourceType
matching the given resource.- Parameters:
resource
-- Returns:
- the matching
CommunicationLinkResourceType
-
getResourceContainerByName
public org.palladiosimulator.pcm.resourceenvironment.ResourceContainer getResourceContainerByName(String name) throws IllegalArgumentException
Fetches theResourceContaienr
with the given name.- Parameters:
name
-- Returns:
- the
ResourceContainer
- Throws:
IllegalArgumentException
- Thrown if noResourceContainer
has the given name.
-
-