1 26 package org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.installer; 27 28 import org.objectweb.openccm.descriptor.componentassembly.Existinghome; 29 import org.objectweb.openccm.descriptor.componentassembly.beans.ExistinghomeBean; 30 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.ChildDeployerContext; 31 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.InitializationError; 32 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.util.FindbyDeployer; 33 34 42 public class ExistinghomeDeployerContext 43 extends ChildDeployerContext 44 { 45 private FindbyDeployer findby; 51 private ExistinghomeBean existinghome; 52 public void 68 connectExistinghome(ExistinghomeBean exitingHome) 69 { 70 this.existinghome=exitingHome; 71 connectDeployerDescription(existinghome); 72 } 73 public Existinghome 74 getExistingHome() 75 { 76 return existinghome; 77 } 78 79 public void 80 connectFindbyDeployer(FindbyDeployer findby) 81 { 82 this.findby=findby; 83 } 84 85 public FindbyDeployer 86 getFindbyDeployer() 87 { 88 return findby; 89 } 90 91 98 public void initialize() throws InitializationError{ 99 if(getExistingHome()==null) 100 getErrorManager() 101 .submitException( new InitializationError(this,"Connection on existinghome bean is required"+ 102 "check the handler code it must specify this connection")); 103 104 if(getFindbyDeployer()==null) 105 getErrorManager() 106 .submitException(new InitializationError(this,"Findby child must be"+ 107 "specified check the existinghome element"+ 108 "description\n."+getStringifiedDeployerDescription())); 109 getLifeCycleManager().stepEndedSuccessFully(); 110 } 111 } 112 113 | Popular Tags |