1 26 package org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.installer; 27 28 import java.util.LinkedList ; 29 import org.objectweb.openccm.descriptor.componentassembly.Componentfiles; 30 import org.objectweb.openccm.descriptor.componentassembly.beans.ComponentfilesBean; 31 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.*; 32 33 40 public class ComponentfilesDeployerContext 41 extends ChildDeployerContext 42 { 43 private LinkedList componentfileDeployers; 49 private ComponentfilesBean componentfiles; 50 public ComponentfilesDeployerContext() 56 { 57 componentfileDeployers=new LinkedList (); 58 } 59 70 public void 71 connectComponentfileDeployer(ComponentfileDeployer comp) 72 { 73 componentfileDeployers.addLast(comp); 74 } 75 76 public ComponentfileDeployer[] 77 getComponentfileDeployers(){ 78 return (ComponentfileDeployer[]) 79 componentfileDeployers. 80 toArray(new ComponentfileDeployer[componentfileDeployers.size()]); 81 } 82 85 public Componentfiles getComponentfiles() { 86 return componentfiles; 87 } 88 89 92 public void connectComponentfiles(ComponentfilesBean componentfiles) { 93 this.componentfiles = componentfiles; 94 connectDeployerDescription(componentfiles); 95 } 96 103 public void initialize() 104 throws InitializationError 105 { 106 if(getComponentfiles()==null) 107 getErrorManager() 108 .submitException(new InitializationError(this,"Connection on Componentfiles is required"+ 109 "check the handler code it must specify this connection")); 110 111 if(getComponentfileDeployers().length==0) 112 getErrorManager() 113 .submitException(new InitializationError(this,"At least one componentfile must be specified in"+ 114 "Componentfiles elements check you componentfiles element"+ 115 "description.\n"+getStringifiedDeployerDescription())); 116 getLifeCycleManager().stepEndedSuccessFully(); 117 } 118 119 120 } 121 | Popular Tags |