Class RepositoryCreator
- java.lang.Object
-
- org.palladiosimulator.generator.fluent.shared.structure.Entity
-
- org.palladiosimulator.generator.fluent.repository.structure.RepositoryEntity
-
- org.palladiosimulator.generator.fluent.repository.structure.RepositoryCreator
-
- All Implemented Interfaces:
Repo
,RepoAddition
public class RepositoryCreator extends RepositoryEntity implements Repo, RepoAddition
This class constructs aRepository
. It is used to create the 'Repository' object step-by-step, i.e. 'RepositoryCreator' objects are of intermediate state.- See Also:
Repository
-
-
Field Summary
-
Fields inherited from class org.palladiosimulator.generator.fluent.repository.structure.RepositoryEntity
repository
-
-
Constructor Summary
Constructors Constructor Description RepositoryCreator(org.palladiosimulator.pcm.repository.Repository primitiveDataTypes, org.palladiosimulator.pcm.resourcetype.ResourceRepository resourceTypes, org.palladiosimulator.pcm.repository.Repository failureTypes, Logger logger, IModelValidator validator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAssemblyContext(org.palladiosimulator.pcm.core.composition.AssemblyContext ac)
void
addComponent(org.palladiosimulator.pcm.repository.RepositoryComponent c)
void
addConnector(org.palladiosimulator.pcm.core.composition.Connector r)
void
addEventChannel(org.palladiosimulator.pcm.core.composition.EventChannel eg)
void
addInterface(org.palladiosimulator.pcm.repository.Interface i)
void
addParameter(org.palladiosimulator.pcm.repository.Parameter p)
void
addPassiveResource(org.palladiosimulator.pcm.repository.PassiveResource pass)
void
addProvidedRole(org.palladiosimulator.pcm.repository.ProvidedRole pr)
void
addRecoveryActionBehaviour(org.palladiosimulator.pcm.seff.seff_reliability.RecoveryActionBehaviour recovery)
void
addRequiredRole(org.palladiosimulator.pcm.repository.RequiredRole rr)
void
addResourceRequiredRole(org.palladiosimulator.pcm.core.entity.ResourceRequiredRole rr)
void
addSignature(org.palladiosimulator.pcm.repository.Signature sign)
RepoAddition
addToRepository(Component component)
Adds thecomponent
to the list of components stored in the repository.RepoAddition
addToRepository(Interface interfce)
Adds theinterfce
to the list of interfaces stored in the repository.RepoAddition
addToRepository(CompositeDataTypeCreator compositeDataType)
Adds thecompositeDataType
to the list of data types provided by this repository.RepoAddition
addToRepository(ExceptionTypeCreator exceptionType)
Adds theexceptionType
to the list of exception types provided by this repository.RepoAddition
addToRepository(ResourceTimeoutFailureTypeCreator failureType)
Adds thefailureType
to the list of failure types provided by this repository.RepoAddition
addToRepository(org.palladiosimulator.pcm.reliability.FailureType failureType)
Adds thefailureType
to the list of failure types provided by this repository.RepoAddition
addToRepository(org.palladiosimulator.pcm.repository.CollectionDataType collectionDataType)
Adds thecollectionDataType
to the list of data types provided by this repository.protected org.palladiosimulator.pcm.repository.Repository
build()
Turns the entity in the making into the finished entity.org.palladiosimulator.pcm.repository.Repository
createRepositoryNow()
Turns this repository-in-the-making into a Palladio-'Repository' object.org.palladiosimulator.pcm.core.composition.AssemblyContext
getAssemblyContext(String name)
org.palladiosimulator.pcm.repository.BasicComponent
getBasicComponent(String name)
org.palladiosimulator.pcm.resourcetype.CommunicationLinkResourceType
getCommunicationLinkResource(CommunicationLinkResource communicationLinkResource)
org.palladiosimulator.pcm.repository.CompleteComponentType
getCompleteComponentType(String name)
org.palladiosimulator.pcm.repository.RepositoryComponent
getComponent(String name)
org.palladiosimulator.pcm.repository.CompositeComponent
getCompositeComponent(String name)
org.palladiosimulator.pcm.repository.CompositeDataType
getCompositeDataType(String name)
org.palladiosimulator.pcm.repository.DataType
getDataType(String name)
org.palladiosimulator.pcm.core.composition.EventChannel
getEventChannel(String name)
org.palladiosimulator.pcm.repository.EventGroup
getEventGroup(String name)
org.palladiosimulator.pcm.repository.EventType
getEventType(String name)
org.palladiosimulator.pcm.repository.ExceptionType
getExceptionType(String name)
org.palladiosimulator.pcm.reliability.FailureType
getFailureType(String name)
org.palladiosimulator.pcm.reliability.FailureType
getFailureType(Failure failure)
org.palladiosimulator.pcm.repository.InfrastructureInterface
getInfrastructureInterface(String name)
org.palladiosimulator.pcm.repository.InfrastructureProvidedRole
getInfrastructureProvidedRole(String name)
org.palladiosimulator.pcm.repository.InfrastructureRequiredRole
getInfrastructureRequiredRole(String name)
org.palladiosimulator.pcm.repository.InfrastructureSignature
getInfrastructureSignature(String name)
org.palladiosimulator.pcm.repository.Interface
getInterface(String name)
org.palladiosimulator.pcm.repository.OperationInterface
getOperationInterface(String name)
org.palladiosimulator.pcm.repository.OperationProvidedRole
getOperationProvidedRole(String name)
org.palladiosimulator.pcm.repository.OperationRequiredRole
getOperationRequiredRole(String name)
org.palladiosimulator.pcm.repository.OperationSignature
getOperationSignature(String name)
org.palladiosimulator.pcm.repository.Parameter
getParameter(String name)
org.palladiosimulator.pcm.repository.Parameter
getParameter(String name, org.palladiosimulator.pcm.repository.Signature context)
org.palladiosimulator.pcm.repository.PassiveResource
getPassiveResource(String name)
org.palladiosimulator.pcm.repository.PrimitiveDataType
getPrimitiveDataType(String name)
TODOorg.palladiosimulator.pcm.repository.PrimitiveDataType
getPrimitiveDataType(Primitive primitive)
org.palladiosimulator.pcm.resourcetype.ProcessingResourceType
getProcessingResourceType(ProcessingResource processingResource)
org.palladiosimulator.pcm.repository.ProvidedRole
getProvidedRole(String name)
org.palladiosimulator.pcm.repository.ProvidesComponentType
getProvidesComponentType(String name)
org.palladiosimulator.pcm.seff.seff_reliability.RecoveryActionBehaviour
getRecoveryActionBehaviour(String name)
org.palladiosimulator.pcm.repository.RequiredRole
getRequiredRole(String name)
org.palladiosimulator.pcm.resourcetype.ResourceInterface
getResourceInterface(ResourceInterface resourceInterface)
org.palladiosimulator.pcm.core.entity.ResourceRequiredRole
getResourceRequiredRole(String name)
org.palladiosimulator.pcm.resourcetype.ResourceSignature
getResourceSignature(ResourceSignature resourceSignature)
org.palladiosimulator.pcm.reliability.ResourceTimeoutFailureType
getResourceTimeoutFailureType(String name)
org.palladiosimulator.pcm.repository.Signature
getSignature(String name)
org.palladiosimulator.pcm.repository.SinkRole
getSinkRole(String name)
org.palladiosimulator.pcm.repository.SourceRole
getSourceRole(String name)
org.palladiosimulator.pcm.subsystem.SubSystem
getSubsystem(String name)
RepositoryCreator
withDescription(String description)
Defines the description of the repository.Repo
withImportedResource(String path)
Loads the repository located inpath
as a Resource and provides its entities in the fetching methods by calling on the entities with the name of the repository leading.Repo
withImportedResource(URI uri)
Loads the repository located inuri
as a Resource and provides its entities in the fetching methods by calling on the entities with the name of the repository leading.Repo
withImportedResource(org.palladiosimulator.pcm.repository.Repository repository)
Provides the entities in the fetching methods of a already loaded repository by calling on the entities with the name of the repository leading.RepositoryCreator
withName(String name)
Defines the unique name of this current entity.
-
-
-
Constructor Detail
-
RepositoryCreator
public RepositoryCreator(org.palladiosimulator.pcm.repository.Repository primitiveDataTypes, org.palladiosimulator.pcm.resourcetype.ResourceRepository resourceTypes, org.palladiosimulator.pcm.repository.Repository failureTypes, Logger logger, IModelValidator validator)
-
-
Method Detail
-
withName
public RepositoryCreator 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.
-
withDescription
public RepositoryCreator withDescription(String description)
Description copied from interface:Repo
Defines the description of the repository.- Specified by:
withDescription
in interfaceRepo
- Returns:
- this repository
-
withImportedResource
public Repo withImportedResource(URI uri)
Description copied from interface:Repo
Loads the repository located inuri
as a Resource and provides its entities in the fetching methods by calling on the entities with the name of the repository leading.- Specified by:
withImportedResource
in interfaceRepo
- Parameters:
uri
- to the import repository- Returns:
- this repository
-
withImportedResource
public Repo withImportedResource(String path)
Description copied from interface:Repo
Loads the repository located inpath
as a Resource and provides its entities in the fetching methods by calling on the entities with the name of the repository leading.- Specified by:
withImportedResource
in interfaceRepo
- Parameters:
path
- to the import repository- Returns:
- this repository
-
withImportedResource
public Repo withImportedResource(org.palladiosimulator.pcm.repository.Repository repository)
Description copied from interface:Repo
Provides the entities in the fetching methods of a already loaded repository by calling on the entities with the name of the repository leading.- Specified by:
withImportedResource
in interfaceRepo
- Parameters:
repository
- loaded repository to be copied- Returns:
- this repository
-
addToRepository
public RepoAddition addToRepository(org.palladiosimulator.pcm.repository.CollectionDataType collectionDataType)
Description copied from interface:RepoAddition
Adds thecollectionDataType
to the list of data types provided by this repository.The
collectionDataType
represents a collection data type, e.g. a list, array, set of items of the particular type.
ThecollectionDataType
can be created using the org.palladiosimulator.generator.fluent.component.factory, i.e.create.newCollectionDataType()
- Specified by:
addToRepository
in interfaceRepoAddition
- Returns:
- this repository, now containing the
collectionDataType
- See Also:
FluentRepositoryFactory.newCollectionDataType(String, org.palladiosimulator.generator.fluent.component.repositoryStructure.datatypes.Primitive)
,FluentRepositoryFactory.newCollectionDataType(String, org.palladiosimulator.pcm.repository.DataType)
,CollectionDataType
-
addToRepository
public RepoAddition addToRepository(CompositeDataTypeCreator compositeDataType)
Description copied from interface:RepoAddition
Adds thecompositeDataType
to the list of data types provided by this repository.The
compositeDataType
represents a complex data type containing other data types. This construct is common in higher programming languages as record, struct, or class.
ThecompositeDataType
can be created using the org.palladiosimulator.generator.fluent.component.factory, i.e.create.newCompositeDataType()
- Specified by:
addToRepository
in interfaceRepoAddition
- Returns:
- this repository, now containing the
compositeDataType
- See Also:
org.palladiosimulator.generator.fluent.repository.factory.FluentRepositoryFactory#newCompositeDataType(String, org.palladiosimulator.pcm.repository.CompositeDataType...)
,CompositeDataType
-
addToRepository
public RepoAddition addToRepository(org.palladiosimulator.pcm.reliability.FailureType failureType)
Description copied from interface:RepoAddition
Adds thefailureType
to the list of failure types provided by this repository.- Specified by:
addToRepository
in interfaceRepoAddition
- Returns:
- this repository, now containing the
failureType
- See Also:
FluentRepositoryFactory.newHardwareInducedFailureType(String, org.palladiosimulator.generator.fluent.component.repositoryStructure.datatypes.ProcessingResource)
,FluentRepositoryFactory.newNetworkInducedFailureType(String, org.palladiosimulator.generator.fluent.component.repositoryStructure.datatypes.CommunicationLinkResource)
,FluentRepositoryFactory.newSoftwareInducedFailureType(String)
,FluentRepositoryFactory.newResourceTimeoutFailureType(String)
,FailureType
-
addToRepository
public RepoAddition addToRepository(ResourceTimeoutFailureTypeCreator failureType)
Description copied from interface:RepoAddition
Adds thefailureType
to the list of failure types provided by this repository.- Specified by:
addToRepository
in interfaceRepoAddition
- Returns:
- this repository, now containing the
failureType
- See Also:
FluentRepositoryFactory.newHardwareInducedFailureType(String, org.palladiosimulator.generator.fluent.component.repositoryStructure.datatypes.ProcessingResource)
,FluentRepositoryFactory.newNetworkInducedFailureType(String, org.palladiosimulator.generator.fluent.component.repositoryStructure.datatypes.CommunicationLinkResource)
,FluentRepositoryFactory.newSoftwareInducedFailureType(String)
,FluentRepositoryFactory.newResourceTimeoutFailureType(String)
,FailureType
-
addToRepository
public RepoAddition addToRepository(ExceptionTypeCreator exceptionType)
Description copied from interface:RepoAddition
Adds theexceptionType
to the list of exception types provided by this repository.- Specified by:
addToRepository
in interfaceRepoAddition
- Returns:
- this repository, now containing the
exceptionType
- See Also:
FluentRepositoryFactory.newExceptionType()
,ExceptionType
-
addToRepository
public RepoAddition addToRepository(Interface interfce)
Description copied from interface:RepoAddition
Adds theinterfce
to the list of interfaces stored in the repository.Interfaces are modeled as a set of signatures representing services provided or required by a component. There are 3 different types of interfaces: 'OperationInterface', 'EventGroup', 'InfrastructureInterface'.
Theinterfce
can be created using the org.palladiosimulator.generator.fluent.component.factory, e.g.create.newOperationInterface()
etc.- Specified by:
addToRepository
in interfaceRepoAddition
- Returns:
- this repository, now containing the
interfce
- See Also:
FluentRepositoryFactory.newOperationInterface()
,FluentRepositoryFactory.newEventGroup()
,FluentRepositoryFactory.newInfrastructureInterface()
,Interface
-
addToRepository
public RepoAddition addToRepository(Component component)
Description copied from interface:RepoAddition
Adds thecomponent
to the list of components stored in the repository.Components are atomic building blocks of a software architecture. There are 5 different types of components: 'BasicComponent', 'CompositeComponent', 'SubSystem', 'CompleteComponentType', 'ProvidesComponentType'.
Thecomponent
can be created using the org.palladiosimulator.generator.fluent.component.factory, e.g.create.newBasicComponent()
etc.- Specified by:
addToRepository
in interfaceRepoAddition
- Returns:
- this repository, now containing the
component
- See Also:
FluentRepositoryFactory.newBasicComponent()
,FluentRepositoryFactory.newCompositeComponent()
,FluentRepositoryFactory.newSubSystem()
,FluentRepositoryFactory.newCompleteComponentType()
,FluentRepositoryFactory.newProvidesComponentType()
,RepositoryComponent
-
build
protected org.palladiosimulator.pcm.repository.Repository build()
Description copied from class:Entity
Turns the entity in the making into the finished entity.
-
createRepositoryNow
public org.palladiosimulator.pcm.repository.Repository createRepositoryNow()
Description copied from interface:RepoAddition
Turns this repository-in-the-making into a Palladio-'Repository' object.- Specified by:
createRepositoryNow
in interfaceRepoAddition
- Returns:
- the final repository object
- See Also:
Repository
-
getPrimitiveDataType
public org.palladiosimulator.pcm.repository.PrimitiveDataType getPrimitiveDataType(Primitive primitive)
-
getPrimitiveDataType
public org.palladiosimulator.pcm.repository.PrimitiveDataType getPrimitiveDataType(String name) throws NoSuchElementException
TODO- Parameters:
name
-- Returns:
- Throws:
NoSuchElementException
- Thrown if no role matches the given name.
-
getCompositeDataType
public org.palladiosimulator.pcm.repository.CompositeDataType getCompositeDataType(String name)
-
getDataType
public org.palladiosimulator.pcm.repository.DataType getDataType(String name)
-
getFailureType
public org.palladiosimulator.pcm.reliability.FailureType getFailureType(Failure failure)
-
getFailureType
public org.palladiosimulator.pcm.reliability.FailureType getFailureType(String name)
-
getResourceTimeoutFailureType
public org.palladiosimulator.pcm.reliability.ResourceTimeoutFailureType getResourceTimeoutFailureType(String name)
-
getExceptionType
public org.palladiosimulator.pcm.repository.ExceptionType getExceptionType(String name)
-
getProcessingResourceType
public org.palladiosimulator.pcm.resourcetype.ProcessingResourceType getProcessingResourceType(ProcessingResource processingResource)
-
getCommunicationLinkResource
public org.palladiosimulator.pcm.resourcetype.CommunicationLinkResourceType getCommunicationLinkResource(CommunicationLinkResource communicationLinkResource)
-
getResourceInterface
public org.palladiosimulator.pcm.resourcetype.ResourceInterface getResourceInterface(ResourceInterface resourceInterface)
-
getResourceSignature
public org.palladiosimulator.pcm.resourcetype.ResourceSignature getResourceSignature(ResourceSignature resourceSignature)
-
getComponent
public org.palladiosimulator.pcm.repository.RepositoryComponent getComponent(String name)
-
getBasicComponent
public org.palladiosimulator.pcm.repository.BasicComponent getBasicComponent(String name)
-
getCompositeComponent
public org.palladiosimulator.pcm.repository.CompositeComponent getCompositeComponent(String name)
-
getSubsystem
public org.palladiosimulator.pcm.subsystem.SubSystem getSubsystem(String name)
-
getCompleteComponentType
public org.palladiosimulator.pcm.repository.CompleteComponentType getCompleteComponentType(String name)
-
getProvidesComponentType
public org.palladiosimulator.pcm.repository.ProvidesComponentType getProvidesComponentType(String name)
-
getInterface
public org.palladiosimulator.pcm.repository.Interface getInterface(String name)
-
getOperationInterface
public org.palladiosimulator.pcm.repository.OperationInterface getOperationInterface(String name)
-
getInfrastructureInterface
public org.palladiosimulator.pcm.repository.InfrastructureInterface getInfrastructureInterface(String name)
-
getEventGroup
public org.palladiosimulator.pcm.repository.EventGroup getEventGroup(String name)
-
getProvidedRole
public org.palladiosimulator.pcm.repository.ProvidedRole getProvidedRole(String name)
-
getOperationProvidedRole
public org.palladiosimulator.pcm.repository.OperationProvidedRole getOperationProvidedRole(String name)
-
getInfrastructureProvidedRole
public org.palladiosimulator.pcm.repository.InfrastructureProvidedRole getInfrastructureProvidedRole(String name)
-
getSinkRole
public org.palladiosimulator.pcm.repository.SinkRole getSinkRole(String name)
-
getRequiredRole
public org.palladiosimulator.pcm.repository.RequiredRole getRequiredRole(String name)
-
getOperationRequiredRole
public org.palladiosimulator.pcm.repository.OperationRequiredRole getOperationRequiredRole(String name)
-
getInfrastructureRequiredRole
public org.palladiosimulator.pcm.repository.InfrastructureRequiredRole getInfrastructureRequiredRole(String name)
-
getSourceRole
public org.palladiosimulator.pcm.repository.SourceRole getSourceRole(String name)
-
getResourceRequiredRole
public org.palladiosimulator.pcm.core.entity.ResourceRequiredRole getResourceRequiredRole(String name)
-
getSignature
public org.palladiosimulator.pcm.repository.Signature getSignature(String name)
-
getOperationSignature
public org.palladiosimulator.pcm.repository.OperationSignature getOperationSignature(String name)
-
getInfrastructureSignature
public org.palladiosimulator.pcm.repository.InfrastructureSignature getInfrastructureSignature(String name)
-
getEventType
public org.palladiosimulator.pcm.repository.EventType getEventType(String name)
-
getAssemblyContext
public org.palladiosimulator.pcm.core.composition.AssemblyContext getAssemblyContext(String name)
-
getEventChannel
public org.palladiosimulator.pcm.core.composition.EventChannel getEventChannel(String name)
-
getParameter
public org.palladiosimulator.pcm.repository.Parameter getParameter(String name)
-
getParameter
public org.palladiosimulator.pcm.repository.Parameter getParameter(String name, org.palladiosimulator.pcm.repository.Signature context)
-
getPassiveResource
public org.palladiosimulator.pcm.repository.PassiveResource getPassiveResource(String name)
-
getRecoveryActionBehaviour
public org.palladiosimulator.pcm.seff.seff_reliability.RecoveryActionBehaviour getRecoveryActionBehaviour(String name)
-
addComponent
public void addComponent(org.palladiosimulator.pcm.repository.RepositoryComponent c)
-
addInterface
public void addInterface(org.palladiosimulator.pcm.repository.Interface i)
-
addProvidedRole
public void addProvidedRole(org.palladiosimulator.pcm.repository.ProvidedRole pr)
-
addRequiredRole
public void addRequiredRole(org.palladiosimulator.pcm.repository.RequiredRole rr)
-
addResourceRequiredRole
public void addResourceRequiredRole(org.palladiosimulator.pcm.core.entity.ResourceRequiredRole rr)
-
addSignature
public void addSignature(org.palladiosimulator.pcm.repository.Signature sign)
-
addAssemblyContext
public void addAssemblyContext(org.palladiosimulator.pcm.core.composition.AssemblyContext ac)
-
addConnector
public void addConnector(org.palladiosimulator.pcm.core.composition.Connector r)
-
addEventChannel
public void addEventChannel(org.palladiosimulator.pcm.core.composition.EventChannel eg)
-
addParameter
public void addParameter(org.palladiosimulator.pcm.repository.Parameter p)
-
addPassiveResource
public void addPassiveResource(org.palladiosimulator.pcm.repository.PassiveResource pass)
-
addRecoveryActionBehaviour
public void addRecoveryActionBehaviour(org.palladiosimulator.pcm.seff.seff_reliability.RecoveryActionBehaviour recovery)
-
-