1 26 package org.objectweb.openccm.descriptor.softpkg.ccm; 27 28 import org.objectweb.openccm.descriptor.softpkg.beans.LinkBean; 29 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.ChildDeployerContext; 30 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.InitializationError; 31 39 public class LinkDeployerContext 40 extends ChildDeployerContext 41 { 42 private LinkBean linkBean; 48 66 public LinkBean 67 getLink() 68 { 69 return linkBean; 70 } 71 72 75 public void 76 connectLink(LinkBean bean) 77 { 78 linkBean = bean; 79 connectDeployerDescription(bean); 80 } 81 82 89 public void initialize() throws InitializationError { 90 if (getLink() == null) 91 getErrorManager().submitException( 92 new InitializationError( 93 this, 94 "Connection on link bean is required" 95 + "check the handler code it must specify this connection")); 96 if (getLink().getValue().length() == 0&&getLink().getHref()==null) 97 getErrorManager().submitException( 98 new InitializationError( 99 this, 100 " The link element msut be fullfilled")); 101 getLifeCycleManager().stepEndedSuccessFully(); 103 } 104 105 } 106 | Popular Tags |