1 26 package org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.binder; 27 28 import org.objectweb.openccm.descriptor.componentassembly.Publishesport; 29 import org.objectweb.openccm.descriptor.componentassembly.beans.PublishesportBean; 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.installer.ComponentinstantiationDeployer; 33 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.util.FindbyDeployer; 34 35 43 public class PublishesportDeployerContext 44 extends ChildDeployerContext 45 { 46 private PublishesportBean publishesport; 52 private FindbyDeployer findbyDeployer; 53 private ComponentinstantiationDeployer componentinstantiationDeployer; 54 70 73 public FindbyDeployer 74 getFindbyDeployer() 75 { 76 return findbyDeployer; 77 } 78 79 82 public Publishesport 83 getPublishesport() 84 { 85 return publishesport; 86 } 87 88 91 public void 92 connectFindbyDeployer(FindbyDeployer deployer) 93 { 94 findbyDeployer = deployer; 95 } 96 97 100 public void 101 connectPublishesport(PublishesportBean publishesport) 102 { 103 this.publishesport = publishesport; 104 connectDeployerDescription(publishesport); 105 } 106 109 public ComponentinstantiationDeployer 110 getComponentinstantiationDeployer() 111 { 112 return componentinstantiationDeployer; 113 } 114 115 118 public void 119 connectComponentinstantiationDeployer(ComponentinstantiationDeployer deployer) 120 { 121 componentinstantiationDeployer = deployer; 122 } 123 124 131 public void 132 initialize() 133 throws InitializationError 134 { 135 if(getPublishesport()==null) 136 getErrorManager() 137 .submitException(new InitializationError(this,"Connection on Publishesport bean is required"+ 138 "check the handler code it must specify this connection")); 139 140 if(getPublishesport().getComponentinstantiationref()!=null&&( 141 getPublishesport().getComponentinstantiationref().getIdref()==null || 142 getPublishesport().getComponentinstantiationref().getIdref().length()==0)) 143 getErrorManager() 144 .submitException( new InitializationError(this,"The idref attribute of the componentinstantiationref element"+ 145 "must be fullfilled, check thePublishesport element"+ 146 "description\n."+getStringifiedDeployerDescription())); 147 if(getPublishesport().getComponentinstantiationref()==null&&getFindbyDeployer()==null) 148 getErrorManager() 149 .submitException( new InitializationError(this,"One of componentinstantiationref/findby children must be"+ 150 "specified check the Publishesport element"+ 151 "description\n."+getStringifiedDeployerDescription())); 152 getLifeCycleManager().stepEndedSuccessFully(); 153 } 154 155 156 } 157 | Popular Tags |