Class PcmSystemManager
java.lang.Object
edu.kit.ipd.are.dsexplore.featurecompletions.weaver.strategy.manager.PcmSystemManager
This class provides all operations performed on a PCM system.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAssemblyContext
(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContextToAdd) Adds an assembly context to the PCM system.void
addAssemblyContexts
(List<org.palladiosimulator.pcm.core.composition.AssemblyContext> assemblyContextsToAdd) Adds a set of assembly contexts to the PCM system.void
addConnectors
(List<org.palladiosimulator.pcm.core.composition.Connector> connectorsToAdd) Adds a set of connectors to the PCM system.void
addConnectors
(org.palladiosimulator.pcm.core.composition.Connector... connectorsToAdd) Adds a set of connectors to the PCM system.org.palladiosimulator.pcm.core.composition.AssemblyContext
createAndAddAssemblyContextOf
(org.palladiosimulator.pcm.repository.RepositoryComponent component) Creates and adds an assembly context for a given component to the PCm system.org.palladiosimulator.pcm.core.composition.AssemblyConnector
createAssemblyConnectorBy
(Pair<org.palladiosimulator.pcm.repository.OperationRequiredRole, org.palladiosimulator.pcm.core.composition.AssemblyContext> requiredPair, Pair<org.palladiosimulator.pcm.repository.OperationProvidedRole, org.palladiosimulator.pcm.core.composition.AssemblyContext> providedPair) Creates an assembly connector given by a required pair including the corresponding assembly context and required role and a given provided pair including the corresponding assembly context and provided role.org.palladiosimulator.pcm.core.composition.AssemblyContext
createAssemblyContextOf
(org.palladiosimulator.pcm.repository.RepositoryComponent component) Creates an assembly context for a component.org.palladiosimulator.pcm.core.composition.AssemblyContext
createAssemblyContextOf
(org.palladiosimulator.pcm.repository.RepositoryComponent component, String name) Creates an assembly context with a specified name for a component.List<org.palladiosimulator.pcm.core.composition.AssemblyContext>
createAssemblyContextsOf
(List<org.palladiosimulator.pcm.repository.RepositoryComponent> components) Creates the corresponding assembly contexts for a set of components.org.palladiosimulator.pcm.core.composition.AssemblyEventConnector
createAssemblyEventConnectorBy
(Pair<org.palladiosimulator.pcm.repository.SourceRole, org.palladiosimulator.pcm.core.composition.AssemblyContext> requiredPair, Pair<org.palladiosimulator.pcm.repository.SinkRole, org.palladiosimulator.pcm.core.composition.AssemblyContext> providedPair) Creates an assembly event connector given by a required pair including the corresponding assembly context and required role and a given provided pair including the corresponding assembly context and provided role.org.palladiosimulator.pcm.core.composition.ProvidedDelegationConnector
createProvidedDelegationConnectorBy
(org.palladiosimulator.pcm.repository.OperationProvidedRole outerProvidedRole, Pair<org.palladiosimulator.pcm.repository.OperationProvidedRole, org.palladiosimulator.pcm.core.composition.AssemblyContext> providedPair) Creates a provided delegation connector by the outer provided role and the provided pair the actual calls are delegated to.org.palladiosimulator.pcm.core.composition.RequiredDelegationConnector
createRequiredDelegationConnectorBy
(org.palladiosimulator.pcm.repository.OperationRequiredRole outerRequiredRole, Pair<org.palladiosimulator.pcm.repository.OperationRequiredRole, org.palladiosimulator.pcm.core.composition.AssemblyContext> requiredPair) Creates a provided delegation connector by the outer required role and the required pair which actually requires a couple of services.boolean
existConnector
(org.palladiosimulator.pcm.core.composition.Connector searchedConnector) Checks if a given connector already exists.boolean
existConnectors
(List<org.palladiosimulator.pcm.core.composition.Connector> searchedConnectors) Optional<org.palladiosimulator.pcm.core.composition.AssemblyContext>
getAssemblyContextBy
(Predicate<org.palladiosimulator.pcm.core.composition.AssemblyContext> searchCriteria) Filters the assembly contexts which satisfies the given predicate.List<org.palladiosimulator.pcm.core.composition.AssemblyContext>
getAssemblyContextsBy
(Predicate<org.palladiosimulator.pcm.core.composition.AssemblyContext> searchCriteria) Filters the assembly contexts which satisfies the given predicate.List<org.palladiosimulator.pcm.core.composition.AssemblyContext>
getAssemblyContextsInstantiating
(org.palladiosimulator.pcm.repository.RepositoryComponent component) Retrieves all assembly contexts which instantiates a given component.List<org.palladiosimulator.pcm.core.composition.Connector>
getConnectorsBy
(Predicate<org.palladiosimulator.pcm.core.composition.Connector> searchCriteria) Filters the connectors which satisfies the given predicate.void
remove
(org.palladiosimulator.pcm.core.composition.Connector connectorToRemove) Removes a given connector from the PCm system.
-
Constructor Details
-
PcmSystemManager
public PcmSystemManager(org.palladiosimulator.pcm.system.System system)
-
-
Method Details
-
getConnectorsBy
public List<org.palladiosimulator.pcm.core.composition.Connector> getConnectorsBy(Predicate<org.palladiosimulator.pcm.core.composition.Connector> searchCriteria) Filters the connectors which satisfies the given predicate.- Parameters:
searchCriteria
- - The search criteria for filtering the connectors.- Returns:
- the filtered connectors.
-
existConnector
public boolean existConnector(org.palladiosimulator.pcm.core.composition.Connector searchedConnector) Checks if a given connector already exists.- Parameters:
searchedConnector
- - The connector that is checked for existence.- Returns:
-
existConnectors
public boolean existConnectors(List<org.palladiosimulator.pcm.core.composition.Connector> searchedConnectors) -
remove
public void remove(org.palladiosimulator.pcm.core.composition.Connector connectorToRemove) Removes a given connector from the PCm system.- Parameters:
connectorToRemove
- - The connector that is suppose to be removed.
-
getAssemblyContextBy
public Optional<org.palladiosimulator.pcm.core.composition.AssemblyContext> getAssemblyContextBy(Predicate<org.palladiosimulator.pcm.core.composition.AssemblyContext> searchCriteria) Filters the assembly contexts which satisfies the given predicate.- Parameters:
searchCriteria
- - The search criteria for filtering the assembly contexts.- Returns:
- the first filtered assembly context.
-
getAssemblyContextsBy
public List<org.palladiosimulator.pcm.core.composition.AssemblyContext> getAssemblyContextsBy(Predicate<org.palladiosimulator.pcm.core.composition.AssemblyContext> searchCriteria) Filters the assembly contexts which satisfies the given predicate.- Parameters:
searchCriteria
- the search criteria for filtering the assembly contexts.- Returns:
- all assembly contexts that match the given predicate.
-
getAssemblyContextsInstantiating
public List<org.palladiosimulator.pcm.core.composition.AssemblyContext> getAssemblyContextsInstantiating(org.palladiosimulator.pcm.repository.RepositoryComponent component) Retrieves all assembly contexts which instantiates a given component.- Parameters:
component
- - The component which might be instantiated by an assembly context.- Returns:
- the set of assembly contexts instantiating the given component.
-
addAssemblyContext
public void addAssemblyContext(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContextToAdd) Adds an assembly context to the PCM system.- Parameters:
assemblyContextToAdd
- - The assembly context to add.
-
addAssemblyContexts
public void addAssemblyContexts(List<org.palladiosimulator.pcm.core.composition.AssemblyContext> assemblyContextsToAdd) Adds a set of assembly contexts to the PCM system.- Parameters:
assemblyContextsToAdd
- - The set of assembly contexts to add.
-
addConnectors
public void addConnectors(org.palladiosimulator.pcm.core.composition.Connector... connectorsToAdd) Adds a set of connectors to the PCM system.- Parameters:
connectorsToAdd
- - The connectors to add.
-
addConnectors
public void addConnectors(List<org.palladiosimulator.pcm.core.composition.Connector> connectorsToAdd) Adds a set of connectors to the PCM system.- Parameters:
connectorsToAdd
- - The connectors to add.
-
createProvidedDelegationConnectorBy
public org.palladiosimulator.pcm.core.composition.ProvidedDelegationConnector createProvidedDelegationConnectorBy(org.palladiosimulator.pcm.repository.OperationProvidedRole outerProvidedRole, Pair<org.palladiosimulator.pcm.repository.OperationProvidedRole, org.palladiosimulator.pcm.core.composition.AssemblyContext> providedPair) Creates a provided delegation connector by the outer provided role and the provided pair the actual calls are delegated to.- Parameters:
outerProvidedRole
- - The outer provided role.providedPair
- - The provided pair.- Returns:
- a newly created provided delegation connector.
-
createRequiredDelegationConnectorBy
public org.palladiosimulator.pcm.core.composition.RequiredDelegationConnector createRequiredDelegationConnectorBy(org.palladiosimulator.pcm.repository.OperationRequiredRole outerRequiredRole, Pair<org.palladiosimulator.pcm.repository.OperationRequiredRole, org.palladiosimulator.pcm.core.composition.AssemblyContext> requiredPair) Creates a provided delegation connector by the outer required role and the required pair which actually requires a couple of services.- Parameters:
outerRequiredRole
- - The outer required role.requiredPair
- - The required pair.- Returns:
- a newly created required delegation connector.
-
createAssemblyConnectorBy
public org.palladiosimulator.pcm.core.composition.AssemblyConnector createAssemblyConnectorBy(Pair<org.palladiosimulator.pcm.repository.OperationRequiredRole, org.palladiosimulator.pcm.core.composition.AssemblyContext> requiredPair, Pair<org.palladiosimulator.pcm.repository.OperationProvidedRole, org.palladiosimulator.pcm.core.composition.AssemblyContext> providedPair) Creates an assembly connector given by a required pair including the corresponding assembly context and required role and a given provided pair including the corresponding assembly context and provided role.- Parameters:
requiredPair
- - The required pair.providedPair
- - The provided pair.- Returns:
- the newly created assembly connector.
-
createAssemblyEventConnectorBy
public org.palladiosimulator.pcm.core.composition.AssemblyEventConnector createAssemblyEventConnectorBy(Pair<org.palladiosimulator.pcm.repository.SourceRole, org.palladiosimulator.pcm.core.composition.AssemblyContext> requiredPair, Pair<org.palladiosimulator.pcm.repository.SinkRole, org.palladiosimulator.pcm.core.composition.AssemblyContext> providedPair) Creates an assembly event connector given by a required pair including the corresponding assembly context and required role and a given provided pair including the corresponding assembly context and provided role.- Parameters:
requiredPair
- - The required pair.providedPair
- - The provided pair.- Returns:
- the newly created assembly event connector.
-
createAssemblyContextsOf
public List<org.palladiosimulator.pcm.core.composition.AssemblyContext> createAssemblyContextsOf(List<org.palladiosimulator.pcm.repository.RepositoryComponent> components) Creates the corresponding assembly contexts for a set of components.- Parameters:
components
- - The set of components that is going to be instantiated.- Returns:
- the list of assembly contexts.
-
createAssemblyContextOf
public org.palladiosimulator.pcm.core.composition.AssemblyContext createAssemblyContextOf(org.palladiosimulator.pcm.repository.RepositoryComponent component) Creates an assembly context for a component.- Parameters:
component
- - The component that is going to be instantiated.- Returns:
- the created assembly context.
-
createAssemblyContextOf
public org.palladiosimulator.pcm.core.composition.AssemblyContext createAssemblyContextOf(org.palladiosimulator.pcm.repository.RepositoryComponent component, String name) Creates an assembly context with a specified name for a component.- Parameters:
component
- - The component that is going to be instantiated.name
- - The name of assembly context.- Returns:
- the created assembly context with a specific name.
-
createAndAddAssemblyContextOf
public org.palladiosimulator.pcm.core.composition.AssemblyContext createAndAddAssemblyContextOf(org.palladiosimulator.pcm.repository.RepositoryComponent component) Creates and adds an assembly context for a given component to the PCm system.- Parameters:
component
- - The component that is going to be instantiated and added to the PCM system.- Returns:
- the created assembly context.
-