1 26 package org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.root; 27 28 import org.objectweb.openccm.descriptor.componentassembly.beans.ComponentassemblyBean; 29 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.*; 30 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.binder.*; 31 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.installer.*; 32 33 41 public class ComponentassemblyDeployerContext 42 extends RootDeployerContext 43 { 44 50 private ComponentfilesDeployer cfd; 51 protected ComponentassemblyBean cad; 52 private PartitioningDeployer part; 53 private ConnectionsDeployer connect; 54 public void 70 connectComponentassembly(ComponentassemblyBean cad) 71 { 72 this.cad = cad; 73 connectDeployerDescription(cad); 74 } 75 76 protected ComponentassemblyBean 77 getComponentassembly(){ 78 return cad; 79 } 80 81 protected ComponentfilesDeployer 82 getComponentfilesDeployer() 83 { 84 return cfd; 85 } 86 87 public void 88 connectComponentfilesDeployer(ComponentfilesDeployer cfd) 89 { 90 this.cfd = cfd; 91 } 92 93 public void 94 connectPartitioningDeployer(PartitioningDeployer part) 95 { 96 this.part = part; 97 } 98 99 public PartitioningDeployer 100 getPartitioningDeployer() 101 { 102 return part; 103 } 104 105 public void 106 connectConnectionsDeployer(ConnectionsDeployer connect) 107 { 108 this.connect = connect; 109 } 110 111 public ConnectionsDeployer 112 getConnectionsDeployer() 113 { 114 return connect; 115 } 116 117 124 public void 125 initialize() 126 throws InitializationError 127 { 128 if(getComponentassembly()==null) 129 getErrorManager() 130 .submitException(new InitializationError(this,"Connection on componentassembly bean is required"+ 131 "check the handler code it must specify this connection")); 132 133 if(getPartitioningDeployer()==null) 134 getErrorManager() 135 .submitException(new InitializationError(this,"A partitioning child must be specified in componentassembly element,"+ 136 "check you componentassembly element description.\n"+ 137 getStringifiedDeployerDescription())); 138 139 getLifeCycleManager().stepEndedSuccessFully(); 140 } 141 } 142 | Popular Tags |