1 26 package org.objectweb.openccm.descriptor.softpkg.ccm; 27 28 import java.util.LinkedList ; 29 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.ChildDeployerContext; 30 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.InitializationError; 31 import org.objectweb.openccm.descriptor.softpkg.beans.SoftpkgBean; 32 33 41 public class SoftpkgDeployerContext 42 extends ChildDeployerContext 43 { 44 private SoftpkgBean softpkg; 50 private LinkedList implementationDeployers; 51 private LinkedList dependencyDeployers; 52 private LinkedList descriptorDeployers; 53 public SoftpkgDeployerContext(){ 59 implementationDeployers=new LinkedList (); 60 dependencyDeployers=new LinkedList (); 61 descriptorDeployers=new LinkedList (); 62 } 63 76 public SoftpkgBean 77 getSoftpkg() 78 { 79 return softpkg; 80 } 81 82 85 public void 86 connectSoftpkg(SoftpkgBean bean) 87 { 88 softpkg = bean; 89 connectDeployerDescription(bean); 90 } 91 92 public void 93 connectDependencyDeployer(DependencyDeployer deployer) 94 { 95 dependencyDeployers.addLast(deployer); 96 } 97 98 public DependencyDeployer[] 99 getDependencyDeployers() 100 { 101 return (DependencyDeployer[]) 102 dependencyDeployers 103 .toArray(new DependencyDeployer[dependencyDeployers.size()]); 104 } 105 106 public void 107 connectDescriptorDeployer(DescriptorDeployer deployer) 108 { 109 descriptorDeployers.addLast(deployer); 110 } 111 112 public DescriptorDeployer[] 113 getDescriptorDeployers() 114 { 115 return (DescriptorDeployer[]) 116 descriptorDeployers 117 .toArray(new DescriptorDeployer[descriptorDeployers.size()]); 118 } 119 120 public void 121 connectImplementationDeployer(ImplementationDeployer deployer) 122 { 123 implementationDeployers.addLast(deployer); 124 } 125 126 public ImplementationDeployer[] 127 getImplementationDeployers() 128 { 129 return (ImplementationDeployer[]) 130 implementationDeployers 131 .toArray(new ImplementationDeployer[implementationDeployers.size()]); 132 } 133 134 141 public void 142 initialize() 143 throws InitializationError 144 { 145 if(getSoftpkg()==null) 146 getErrorManager() 147 .submitException(new InitializationError(this,"Connection on softpkg bean is required"+ 148 "check the handler code it must specify this connection")); 149 getLifeCycleManager().stepEndedSuccessFully(); 150 } 151 152 153 } 154 | Popular Tags |