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 IResourceEnvironmentAdditionaddToResourceEnvironment(LinkingResourceCreator linkingResource)Adds aLinkingResourceto the resource environment.IResourceEnvironmentAdditionaddToResourceEnvironment(ResourceContainerCreator resourceContainer)Adds aResourceContainerto the resource environment.protected org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironmentbuild()Turns the entity in the making into the finished entity.org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironmentcreateResourceEnvironmentNow()Completes the resource environment creationorg.palladiosimulator.pcm.resourcetype.CommunicationLinkResourceTypegetCommunicationLinkResource(CommunicationLinkResource resource)Fetches theCommunicationLinkResourceTypematching the given resource.org.palladiosimulator.pcm.resourcetype.ProcessingResourceTypegetProcessingResource(ProcessingResource resource)Fetches theProcessingResourceTypematching the given resource.org.palladiosimulator.pcm.resourceenvironment.ResourceContainergetResourceContainerByName(String name)Fetches theResourceContaienrwith the given name.org.palladiosimulator.pcm.resourcetype.SchedulingPolicygetSchedulingPolicy(SchedulingPolicies policy)Fetches theSchedulingPolicymatching the given policy.ResourceEnvironmentCreatorwithName(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: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 interfaceIResourceEnvironment- Overrides:
withNamein classEntity- Returns:
- this current entity in the making
-
createResourceEnvironmentNow
public org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment createResourceEnvironmentNow()
Description copied from interface:IResourceEnvironmentAdditionCompletes the resource environment creation- Specified by:
createResourceEnvironmentNowin interfaceIResourceEnvironmentAddition- Returns:
- the created resource environment
- See Also:
ResourceEnvironment
-
build
protected org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment build()
Description copied from class:EntityTurns the entity in the making into the finished entity.
-
addToResourceEnvironment
public IResourceEnvironmentAddition addToResourceEnvironment(ResourceContainerCreator resourceContainer)
Description copied from interface:IResourceEnvironmentAdditionAdds aResourceContainerto the resource environment. The creator will be turned into the finished container.- Specified by:
addToResourceEnvironmentin interfaceIResourceEnvironmentAddition- Returns:
- this resource environment
- See Also:
ResourceContainer,FluentResourceEnvironmentFactory.newResourceContainer()
-
addToResourceEnvironment
public IResourceEnvironmentAddition addToResourceEnvironment(LinkingResourceCreator linkingResource)
Description copied from interface:IResourceEnvironmentAdditionAdds aLinkingResourceto the resource environment. The creator will be turned into the finished resource.- Specified by:
addToResourceEnvironmentin interfaceIResourceEnvironmentAddition- Returns:
- this resource environment
- See Also:
LinkingResource,FluentResourceEnvironmentFactory.newLinkingResource()
-
getSchedulingPolicy
public org.palladiosimulator.pcm.resourcetype.SchedulingPolicy getSchedulingPolicy(SchedulingPolicies policy)
Fetches theSchedulingPolicymatching the given policy.- Parameters:
policy-- Returns:
- the matching
SchedulingPolicy
-
getProcessingResource
public org.palladiosimulator.pcm.resourcetype.ProcessingResourceType getProcessingResource(ProcessingResource resource)
Fetches theProcessingResourceTypematching the given resource.- Parameters:
resource-- Returns:
- the matching
ProcessingResourceType
-
getCommunicationLinkResource
public org.palladiosimulator.pcm.resourcetype.CommunicationLinkResourceType getCommunicationLinkResource(CommunicationLinkResource resource)
Fetches theCommunicationLinkResourceTypematching the given resource.- Parameters:
resource-- Returns:
- the matching
CommunicationLinkResourceType
-
getResourceContainerByName
public org.palladiosimulator.pcm.resourceenvironment.ResourceContainer getResourceContainerByName(String name) throws IllegalArgumentException
Fetches theResourceContaienrwith the given name.- Parameters:
name-- Returns:
- the
ResourceContainer - Throws:
IllegalArgumentException- Thrown if noResourceContainerhas the given name.
-
-