EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.pcm.transformations.builder.connectors]

COVERAGE SUMMARY FOR SOURCE FILE [AbstractClientServerConnectorCompletionBuilder.java]

nameclass, %method, %block, %line, %
AbstractClientServerConnectorCompletionBuilder.java0%   (0/1)0%   (0/7)0%   (0/240)0%   (0/38)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AbstractClientServerConnectorCompletionBuilder0%   (0/1)0%   (0/7)0%   (0/240)0%   (0/38)
<static initializer> 0%   (0/1)0%   (0/8)0%   (0/1)
AbstractClientServerConnectorCompletionBuilder (PCMAndCompletionModelHolder, ... 0%   (0/1)0%   (0/36)0%   (0/7)
build (): void 0%   (0/1)0%   (0/184)0%   (0/26)
getClientSideBuilder (): IMiddlewareInteractingComponentBuilder 0%   (0/1)0%   (0/3)0%   (0/1)
getClientSideMiddlewareRole (): OperationRequiredRole 0%   (0/1)0%   (0/3)0%   (0/1)
getServerSideBuilder (): IMiddlewareInteractingComponentBuilder 0%   (0/1)0%   (0/3)0%   (0/1)
getServerSideMiddlewareRole (): OperationRequiredRole 0%   (0/1)0%   (0/3)0%   (0/1)

1package de.uka.ipd.sdq.pcm.transformations.builder.connectors;
2 
3import de.uka.ipd.sdq.pcm.core.composition.AssemblyConnector;
4import de.uka.ipd.sdq.pcm.repository.OperationInterface;
5import de.uka.ipd.sdq.pcm.repository.OperationProvidedRole;
6import de.uka.ipd.sdq.pcm.repository.OperationRequiredRole;
7import de.uka.ipd.sdq.pcm.repository.RequiredRole;
8import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceContainer;
9import de.uka.ipd.sdq.pcm.transformations.builder.IComponentBuilder;
10import de.uka.ipd.sdq.pcm.transformations.builder.infrastructure.IMiddlewareInteractingComponentBuilder;
11import de.uka.ipd.sdq.pcm.transformations.builder.util.PCMAndCompletionModelHolder;
12 
13public abstract class AbstractClientServerConnectorCompletionBuilder
14extends AbstractConnectorCompletionBuilder
15implements IClientServerConnectorCompletionComponentBuilder {
16 
17        protected OperationInterface middlewareInterface;
18        private OperationRequiredRole myClientRole;
19        private OperationRequiredRole myServerRole;
20        private IComponentBuilder innerBuilder;
21 
22        private IMiddlewareInteractingComponentBuilder serverBuilder;
23        private IMiddlewareInteractingComponentBuilder clientBuilder;
24 
25        protected ResourceContainer fromResourceContainer;
26        protected ResourceContainer toResourceContainer;
27        
28        public AbstractClientServerConnectorCompletionBuilder(
29                        PCMAndCompletionModelHolder models, 
30                        AssemblyConnector connector,
31                        ResourceContainer fromResourceContainer,
32                        ResourceContainer toResourceContainer,
33                        IComponentBuilder innerBuilder, 
34                        String componentName) {
35                super(models, connector, componentName);
36                
37                assert (models.getMiddlewareRepository().getInterfaces__Repository().get(0) instanceof OperationInterface);
38                middlewareInterface = (OperationInterface)models.getMiddlewareRepository().getInterfaces__Repository().get(0);
39                this.fromResourceContainer = fromResourceContainer;
40                this.toResourceContainer = toResourceContainer;
41                this.innerBuilder = innerBuilder;
42        }
43        
44        public OperationRequiredRole getClientSideMiddlewareRole() {
45                return myClientRole;
46        }
47 
48        public OperationRequiredRole getServerSideMiddlewareRole() {
49                return myServerRole;
50        }
51 
52        protected IMiddlewareInteractingComponentBuilder getClientSideBuilder() {
53                return clientBuilder;
54        }
55 
56        protected IMiddlewareInteractingComponentBuilder getServerSideBuilder() {
57                return serverBuilder;
58        }
59 
60        protected abstract IMiddlewareInteractingComponentBuilder createClientSideBuilder();
61        protected abstract IMiddlewareInteractingComponentBuilder createServerSideBuilder();
62        
63        @Override
64        public void build() {
65                super.build();
66                this.clientBuilder = createClientSideBuilder();
67                this.serverBuilder = createServerSideBuilder();
68                
69                innerBuilder.build();
70                getComposedStructure().getAssemblyContexts__ComposedStructure().add(innerBuilder.getAssemblyContext());
71                
72                myClientRole = addOperationRequiredRole(middlewareInterface,"ClientMiddleware");
73                myServerRole = addOperationRequiredRole(middlewareInterface,"ServerMiddleware");
74                
75                getClientSideBuilder().build();
76                this.getComposedStructure().getAssemblyContexts__ComposedStructure().add(getClientSideBuilder().getAssemblyContext());
77                getServerSideBuilder().build();
78                this.getComposedStructure().getAssemblyContexts__ComposedStructure().add(getServerSideBuilder().getAssemblyContext());
79                        
80                assert(myComponent.getProvidedRoles_InterfaceProvidingEntity().get(0) instanceof OperationProvidedRole);
81                addProvidedDelegationConnector(getClientSideBuilder().getOperationProvidedRole(), getClientSideBuilder().getAssemblyContext(), (OperationProvidedRole)myComponent.getProvidedRoles_InterfaceProvidingEntity().get(0));
82                assert (myComponent.getRequiredRoles_InterfaceRequiringEntity().get(0) instanceof OperationRequiredRole);
83                addRequiredDelegationConnector(getServerSideBuilder().getOperationRequiredRole(),getServerSideBuilder().getAssemblyContext(),(OperationRequiredRole)myComponent.getRequiredRoles_InterfaceRequiringEntity().get(0));
84                
85                addAssemblyConnector(getClientSideBuilder().getOperationRequiredRole(), getClientSideBuilder().getAssemblyContext(), 
86                                innerBuilder.getOperationProvidedRole(), innerBuilder.getAssemblyContext());
87                addAssemblyConnector(innerBuilder.getOperationRequiredRole(),innerBuilder.getAssemblyContext(),
88                                getServerSideBuilder().getOperationProvidedRole(), getServerSideBuilder().getAssemblyContext());
89                
90                if (innerBuilder instanceof IClientServerConnectorCompletionComponentBuilder) {
91                        IClientServerConnectorCompletionComponentBuilder csBuilder = (IClientServerConnectorCompletionComponentBuilder) innerBuilder;
92                        addRequiredDelegationConnector(csBuilder.getClientSideMiddlewareRole(), csBuilder.getAssemblyContext(), getClientSideMiddlewareRole());
93                        addRequiredDelegationConnector(csBuilder.getServerSideMiddlewareRole(), csBuilder.getAssemblyContext(), getServerSideMiddlewareRole());
94                }
95 
96                addRequiredDelegationConnector(getClientSideBuilder().getMiddlewareRole(), getClientSideBuilder().getAssemblyContext(), getClientSideMiddlewareRole());
97                addRequiredDelegationConnector(getServerSideBuilder().getMiddlewareRole(), getServerSideBuilder().getAssemblyContext(), getServerSideMiddlewareRole());
98        }
99}

[all classes][de.uka.ipd.sdq.pcm.transformations.builder.connectors]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov