1 26 package org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.binder; 27 28 import org.objectweb.openccm.descriptor.componentassembly.Connectinterface; 29 import org.objectweb.openccm.descriptor.componentassembly.beans.ConnectinterfaceBean; 30 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.ChildDeployerContext; 31 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.InitializationError; 32 33 41 public class ConnectinterfaceDeployerContext 42 extends ChildDeployerContext 43 { 44 private ComponentsupportedinterfaceDeployer componentsupportedinterfaceDeployer; 50 private ExistinginterfaceDeployer existinginterfaceDeployer; 51 private HomeinterfaceDeployer homeinterfaceDeployer; 52 private ProvidesportDeployer providesportDeployer; 53 private UsesportDeployer usesportDeployer; 54 private ConnectinterfaceBean connectinterface; 55 56 72 75 public ComponentsupportedinterfaceDeployer 76 getComponentsupportedinterfaceDeployer() 77 { 78 return componentsupportedinterfaceDeployer; 79 } 80 81 84 public ExistinginterfaceDeployer 85 getExistinginterfaceDeployer() 86 { 87 return existinginterfaceDeployer; 88 } 89 90 93 public HomeinterfaceDeployer 94 getHomeinterfaceDeployer() 95 { 96 return homeinterfaceDeployer; 97 } 98 99 102 public ProvidesportDeployer 103 getProvidesportDeployer() 104 { 105 return providesportDeployer; 106 } 107 108 111 public UsesportDeployer 112 getUsesportDeployer() 113 { 114 return usesportDeployer; 115 } 116 117 120 public void 121 connectComponentsupportedinterfaceDeployer 122 (ComponentsupportedinterfaceDeployer deployer) 123 { 124 componentsupportedinterfaceDeployer = deployer; 125 } 126 127 130 public void 131 connectExistinginterfaceDeployer(ExistinginterfaceDeployer deployer) 132 { 133 existinginterfaceDeployer = deployer; 134 } 135 136 139 public void 140 connectHomeinterfaceDeployer(HomeinterfaceDeployer deployer) 141 { 142 homeinterfaceDeployer = deployer; 143 } 144 145 148 public void 149 connectProvidesportDeployer(ProvidesportDeployer deployer) 150 { 151 providesportDeployer = deployer; 152 } 153 154 157 public void 158 connectUsesportDeployer(UsesportDeployer deployer) 159 { 160 usesportDeployer = deployer; 161 } 162 165 protected Connectinterface getConnectinterface() { 166 return connectinterface; 167 } 168 169 172 public void connectConnectinterface(ConnectinterfaceBean connectinterface) { 173 this.connectinterface = connectinterface; 174 connectDeployerDescription(connectinterface); 175 } 176 177 184 public void 185 initialize() 186 throws InitializationError 187 { 188 if(getConnectinterface()==null) 189 getErrorManager() 190 .submitException(new InitializationError(this,"Connection on connectinterface bean is required"+ 191 "check the handler code it must specify this connection")); 192 if(getUsesportDeployer()==null) 193 getErrorManager() 194 .submitException(new InitializationError(this,"The useport child must be specified in"+ 195 "connectinterface element check you connectinterface element"+ 196 "description.\n"+getStringifiedDeployerDescription())); 197 198 if(getProvidesportDeployer()==null&& 199 getComponentsupportedinterfaceDeployer()==null&& 200 getExistinginterfaceDeployer()==null&& 201 getHomeinterfaceDeployer()==null) 202 getErrorManager() 203 .submitException(new InitializationError(this,"One of The providesport/componentsupportedinterface"+ 204 "existinginterface/homeinterface child must be specified in"+ 205 "connectinterface element check you connectinterface element"+ 206 "description.\n"+getStringifiedDeployerDescription())); 207 getLifeCycleManager().stepEndedSuccessFully(); 208 } 209 210 } 211 | Popular Tags |