1 26 package org.objectweb.openccm.descriptor.softpkg.ccm; 27 28 import java.net.ServerSocket ; 29 30 import org.objectweb.openccm.descriptor.softpkg.beans.FileinarchiveBean; 31 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.*; 32 33 42 public class FileinarchiveDeployerContext 43 extends ChildDeployerContext 44 { 45 private FileinarchiveBean fileinarchive; 51 private LinkDeployer linkDeployer; 53 71 public FileinarchiveBean 72 getFileinarchive() 73 { 74 return fileinarchive; 75 } 76 77 80 public void 81 connectFileinarchive(FileinarchiveBean bean) 82 { 83 fileinarchive = bean; 84 connectDeployerDescription(fileinarchive); 85 } 86 87 public void 88 connectLinkDeployer(LinkDeployer linkDeployer) 89 { 90 this.linkDeployer=linkDeployer; 91 } 92 93 public LinkDeployer 94 getLinkDeployer() 95 { 96 return linkDeployer; 97 } 98 public ServerSocket 99 getServerSocket() 100 { 101 return getRootDeployerContext().getServerSocket(); 102 } 103 104 111 public void 112 initialize() 113 throws InitializationError 114 { 115 if(getFileinarchive()==null) 117 getErrorManager() 118 .submitException(new InitializationError(this,"Connection on fileinarchive bean is required"+ 119 "check the handler code it must specify this connection")); 120 if(getZipEntryRetriever()==null) 121 getErrorManager() 122 .submitException(new InitializationError(this,"Connection on zipentryretriever is required"+ 123 "check the handler code it must specify this connection")); 124 125 if((getFileinarchive().getName()==null|| 126 getFileinarchive().getName()=="")&&getLinkDeployer()==null) 127 getErrorManager() 128 .submitException(new InitializationError(this,"The name attribute of fileinarchive element msut be fullfilled"+ 129 "check the fileinarchive element"+ 130 "description\n."+getStringifiedDeployerDescription())); 131 132 getLifeCycleManager().stepEndedSuccessFully(); 133 } 134 135 136 } 137 | Popular Tags |