Class RepositoryCreator

  • All Implemented Interfaces:
    Repo, RepoAddition

    public class RepositoryCreator
    extends RepositoryEntity
    implements Repo, RepoAddition
    This class constructs a Repository. It is used to create the 'Repository' object step-by-step, i.e. 'RepositoryCreator' objects are of intermediate state.
    See Also:
    Repository
    • 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.
        Specified by:
        withName in interface Repo
        Overrides:
        withName in class Entity
        Returns:
        this current entity in the making
      • withDescription

        public RepositoryCreator withDescription​(String description)
        Description copied from interface: Repo
        Defines the description of the repository.
        Specified by:
        withDescription in interface Repo
        Returns:
        this repository
      • withImportedResource

        public Repo withImportedResource​(URI uri)
        Description copied from interface: Repo
        Loads the repository located in uri 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 interface Repo
        Parameters:
        uri - to the import repository
        Returns:
        this repository
      • withImportedResource

        public Repo withImportedResource​(String path)
        Description copied from interface: Repo
        Loads the repository located in path 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 interface Repo
        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 interface Repo
        Parameters:
        repository - loaded repository to be copied
        Returns:
        this repository
      • addToRepository

        public RepoAddition addToRepository​(CompositeDataTypeCreator compositeDataType)
        Description copied from interface: RepoAddition
        Adds the compositeDataType 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.
        The compositeDataType can be created using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.newCompositeDataType()

        Specified by:
        addToRepository in interface RepoAddition
        Returns:
        this repository, now containing the compositeDataType
        See Also:
        org.palladiosimulator.generator.fluent.repository.factory.FluentRepositoryFactory#newCompositeDataType(String, org.palladiosimulator.pcm.repository.CompositeDataType...), CompositeDataType
      • build

        protected org.palladiosimulator.pcm.repository.Repository build()
        Description copied from class: Entity
        Turns the entity in the making into the finished entity.
        Specified by:
        build in class Entity
        Returns:
        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 interface RepoAddition
        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)