1 | package de.uka.ipd.sdq.pcm.transformations.builder.connectors; |
2 | |
3 | import de.uka.ipd.sdq.pcm.core.composition.AssemblyConnector; |
4 | import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceContainer; |
5 | import de.uka.ipd.sdq.pcm.transformations.builder.IComponentBuilder; |
6 | import de.uka.ipd.sdq.pcm.transformations.builder.infrastructure.IMiddlewareInteractingComponentBuilder; |
7 | import de.uka.ipd.sdq.pcm.transformations.builder.infrastructure.MiddlewareCallingComponentBuilder; |
8 | import de.uka.ipd.sdq.pcm.transformations.builder.util.PCMAndCompletionModelHolder; |
9 | |
10 | public class ConfigurableMiddlewareCallingConnectorCompletionBuilder extends |
11 | AbstractClientServerConnectorCompletionBuilder { |
12 | |
13 | private String clientSideBeforeCall; |
14 | private String clientSideAfterCall; |
15 | private String serverSideBeforeCall; |
16 | private String serverSideAfterCall; |
17 | |
18 | public ConfigurableMiddlewareCallingConnectorCompletionBuilder( |
19 | PCMAndCompletionModelHolder models, AssemblyConnector connector, |
20 | ResourceContainer fromResourceContainer, |
21 | ResourceContainer toResourceContainer, |
22 | IComponentBuilder innerBuilder, |
23 | String clientSideBeforeCall, String serverSideBeforeCall, |
24 | String serverSideAfterCall, String clientSideAfterCall) { |
25 | super(models, connector, fromResourceContainer, toResourceContainer, innerBuilder, "ConfigurableMiddlewareCallingConnectorCompletion"); |
26 | this.clientSideBeforeCall = clientSideBeforeCall; |
27 | this.clientSideAfterCall = clientSideAfterCall; |
28 | this.serverSideBeforeCall = serverSideBeforeCall; |
29 | this.serverSideAfterCall = serverSideAfterCall; |
30 | } |
31 | |
32 | @Override |
33 | protected IMiddlewareInteractingComponentBuilder createClientSideBuilder() { |
34 | MiddlewareCallingComponentBuilder builder = new MiddlewareCallingComponentBuilder |
35 | (myModels, |
36 | this.connectorToReplace.getRequiredRole_AssemblyConnector().getRequiredInterface__OperationRequiredRole(), |
37 | this.connectorToReplace.getRequiredRole_AssemblyConnector().getRequiredInterface__OperationRequiredRole(), |
38 | this.middlewareInterface, |
39 | this.fromResourceContainer, |
40 | clientSideBeforeCall, |
41 | clientSideAfterCall); |
42 | return builder; |
43 | } |
44 | |
45 | @Override |
46 | protected IMiddlewareInteractingComponentBuilder createServerSideBuilder() { |
47 | MiddlewareCallingComponentBuilder builder = new MiddlewareCallingComponentBuilder |
48 | (myModels, |
49 | this.connectorToReplace.getRequiredRole_AssemblyConnector().getRequiredInterface__OperationRequiredRole(), |
50 | this.connectorToReplace.getRequiredRole_AssemblyConnector().getRequiredInterface__OperationRequiredRole(), |
51 | this.middlewareInterface, |
52 | this.toResourceContainer, |
53 | serverSideBeforeCall, |
54 | serverSideAfterCall); |
55 | return builder; |
56 | } |
57 | } |