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 voidaddAssemblyContext(org.palladiosimulator.pcm.core.composition.AssemblyContext ac)voidaddComponent(org.palladiosimulator.pcm.repository.RepositoryComponent c)voidaddConnector(org.palladiosimulator.pcm.core.composition.Connector r)voidaddEventChannel(org.palladiosimulator.pcm.core.composition.EventChannel eg)voidaddInterface(org.palladiosimulator.pcm.repository.Interface i)voidaddParameter(org.palladiosimulator.pcm.repository.Parameter p)voidaddPassiveResource(org.palladiosimulator.pcm.repository.PassiveResource pass)voidaddProvidedRole(org.palladiosimulator.pcm.repository.ProvidedRole pr)voidaddRecoveryActionBehaviour(org.palladiosimulator.pcm.seff.seff_reliability.RecoveryActionBehaviour recovery)voidaddRequiredRole(org.palladiosimulator.pcm.repository.RequiredRole rr)voidaddResourceRequiredRole(org.palladiosimulator.pcm.core.entity.ResourceRequiredRole rr)voidaddSignature(org.palladiosimulator.pcm.repository.Signature sign)RepoAdditionaddToRepository(Component component)Adds thecomponentto the list of components stored in the repository.RepoAdditionaddToRepository(Interface interfce)Adds theinterfceto the list of interfaces stored in the repository.RepoAdditionaddToRepository(CompositeDataTypeCreator compositeDataType)Adds thecompositeDataTypeto the list of data types provided by this repository.RepoAdditionaddToRepository(ExceptionTypeCreator exceptionType)Adds theexceptionTypeto the list of exception types provided by this repository.RepoAdditionaddToRepository(ResourceTimeoutFailureTypeCreator failureType)Adds thefailureTypeto the list of failure types provided by this repository.RepoAdditionaddToRepository(org.palladiosimulator.pcm.reliability.FailureType failureType)Adds thefailureTypeto the list of failure types provided by this repository.RepoAdditionaddToRepository(org.palladiosimulator.pcm.repository.CollectionDataType collectionDataType)Adds thecollectionDataTypeto the list of data types provided by this repository.protected org.palladiosimulator.pcm.repository.Repositorybuild()Turns the entity in the making into the finished entity.org.palladiosimulator.pcm.repository.RepositorycreateRepositoryNow()Turns this repository-in-the-making into a Palladio-'Repository' object.org.palladiosimulator.pcm.core.composition.AssemblyContextgetAssemblyContext(String name)org.palladiosimulator.pcm.repository.BasicComponentgetBasicComponent(String name)org.palladiosimulator.pcm.resourcetype.CommunicationLinkResourceTypegetCommunicationLinkResource(CommunicationLinkResource communicationLinkResource)org.palladiosimulator.pcm.repository.CompleteComponentTypegetCompleteComponentType(String name)org.palladiosimulator.pcm.repository.RepositoryComponentgetComponent(String name)org.palladiosimulator.pcm.repository.CompositeComponentgetCompositeComponent(String name)org.palladiosimulator.pcm.repository.CompositeDataTypegetCompositeDataType(String name)org.palladiosimulator.pcm.repository.DataTypegetDataType(String name)org.palladiosimulator.pcm.core.composition.EventChannelgetEventChannel(String name)org.palladiosimulator.pcm.repository.EventGroupgetEventGroup(String name)org.palladiosimulator.pcm.repository.EventTypegetEventType(String name)org.palladiosimulator.pcm.repository.ExceptionTypegetExceptionType(String name)org.palladiosimulator.pcm.reliability.FailureTypegetFailureType(String name)org.palladiosimulator.pcm.reliability.FailureTypegetFailureType(Failure failure)org.palladiosimulator.pcm.repository.InfrastructureInterfacegetInfrastructureInterface(String name)org.palladiosimulator.pcm.repository.InfrastructureProvidedRolegetInfrastructureProvidedRole(String name)org.palladiosimulator.pcm.repository.InfrastructureRequiredRolegetInfrastructureRequiredRole(String name)org.palladiosimulator.pcm.repository.InfrastructureSignaturegetInfrastructureSignature(String name)org.palladiosimulator.pcm.repository.InterfacegetInterface(String name)org.palladiosimulator.pcm.repository.OperationInterfacegetOperationInterface(String name)org.palladiosimulator.pcm.repository.OperationProvidedRolegetOperationProvidedRole(String name)org.palladiosimulator.pcm.repository.OperationRequiredRolegetOperationRequiredRole(String name)org.palladiosimulator.pcm.repository.OperationSignaturegetOperationSignature(String name)org.palladiosimulator.pcm.repository.ParametergetParameter(String name)org.palladiosimulator.pcm.repository.ParametergetParameter(String name, org.palladiosimulator.pcm.repository.Signature context)org.palladiosimulator.pcm.repository.PassiveResourcegetPassiveResource(String name)org.palladiosimulator.pcm.repository.PrimitiveDataTypegetPrimitiveDataType(String name)TODOorg.palladiosimulator.pcm.repository.PrimitiveDataTypegetPrimitiveDataType(Primitive primitive)org.palladiosimulator.pcm.resourcetype.ProcessingResourceTypegetProcessingResourceType(ProcessingResource processingResource)org.palladiosimulator.pcm.repository.ProvidedRolegetProvidedRole(String name)org.palladiosimulator.pcm.repository.ProvidesComponentTypegetProvidesComponentType(String name)org.palladiosimulator.pcm.seff.seff_reliability.RecoveryActionBehaviourgetRecoveryActionBehaviour(String name)org.palladiosimulator.pcm.repository.RequiredRolegetRequiredRole(String name)org.palladiosimulator.pcm.resourcetype.ResourceInterfacegetResourceInterface(ResourceInterface resourceInterface)org.palladiosimulator.pcm.core.entity.ResourceRequiredRolegetResourceRequiredRole(String name)org.palladiosimulator.pcm.resourcetype.ResourceSignaturegetResourceSignature(ResourceSignature resourceSignature)org.palladiosimulator.pcm.reliability.ResourceTimeoutFailureTypegetResourceTimeoutFailureType(String name)org.palladiosimulator.pcm.repository.SignaturegetSignature(String name)org.palladiosimulator.pcm.repository.SinkRolegetSinkRole(String name)org.palladiosimulator.pcm.repository.SourceRolegetSourceRole(String name)org.palladiosimulator.pcm.subsystem.SubSystemgetSubsystem(String name)RepositoryCreatorwithDescription(String description)Defines the description of the repository.RepowithImportedResource(String path)Loads the repository located inpathas a Resource and provides its entities in the fetching methods by calling on the entities with the name of the repository leading.RepowithImportedResource(URI uri)Loads the repository located inurias a Resource and provides its entities in the fetching methods by calling on the entities with the name of the repository leading.RepowithImportedResource(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.RepositoryCreatorwithName(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: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.
-
withDescription
public RepositoryCreator withDescription(String description)
Description copied from interface:RepoDefines the description of the repository.- Specified by:
withDescriptionin interfaceRepo- Returns:
- this repository
-
withImportedResource
public Repo withImportedResource(URI uri)
Description copied from interface:RepoLoads the repository located inurias a Resource and provides its entities in the fetching methods by calling on the entities with the name of the repository leading.- Specified by:
withImportedResourcein interfaceRepo- Parameters:
uri- to the import repository- Returns:
- this repository
-
withImportedResource
public Repo withImportedResource(String path)
Description copied from interface:RepoLoads the repository located inpathas a Resource and provides its entities in the fetching methods by calling on the entities with the name of the repository leading.- Specified by:
withImportedResourcein interfaceRepo- Parameters:
path- to the import repository- Returns:
- this repository
-
withImportedResource
public Repo withImportedResource(org.palladiosimulator.pcm.repository.Repository repository)
Description copied from interface:RepoProvides 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:
withImportedResourcein 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:RepoAdditionAdds thecollectionDataTypeto the list of data types provided by this repository.The
collectionDataTyperepresents a collection data type, e.g. a list, array, set of items of the particular type.
ThecollectionDataTypecan be created using the org.palladiosimulator.generator.fluent.component.factory, i.e.create.newCollectionDataType()- Specified by:
addToRepositoryin 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:RepoAdditionAdds thecompositeDataTypeto the list of data types provided by this repository.The
compositeDataTyperepresents a complex data type containing other data types. This construct is common in higher programming languages as record, struct, or class.
ThecompositeDataTypecan be created using the org.palladiosimulator.generator.fluent.component.factory, i.e.create.newCompositeDataType()- Specified by:
addToRepositoryin 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:RepoAdditionAdds thefailureTypeto the list of failure types provided by this repository.- Specified by:
addToRepositoryin 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:RepoAdditionAdds thefailureTypeto the list of failure types provided by this repository.- Specified by:
addToRepositoryin 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:RepoAdditionAdds theexceptionTypeto the list of exception types provided by this repository.- Specified by:
addToRepositoryin interfaceRepoAddition- Returns:
- this repository, now containing the
exceptionType - See Also:
FluentRepositoryFactory.newExceptionType(),ExceptionType
-
addToRepository
public RepoAddition addToRepository(Interface interfce)
Description copied from interface:RepoAdditionAdds theinterfceto 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'.
Theinterfcecan be created using the org.palladiosimulator.generator.fluent.component.factory, e.g.create.newOperationInterface()etc.- Specified by:
addToRepositoryin 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:RepoAdditionAdds thecomponentto 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'.
Thecomponentcan be created using the org.palladiosimulator.generator.fluent.component.factory, e.g.create.newBasicComponent()etc.- Specified by:
addToRepositoryin 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:EntityTurns the entity in the making into the finished entity.
-
createRepositoryNow
public org.palladiosimulator.pcm.repository.Repository createRepositoryNow()
Description copied from interface:RepoAdditionTurns this repository-in-the-making into a Palladio-'Repository' object.- Specified by:
createRepositoryNowin 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)
-
-