1 26 27 package org.objectweb.openccm.descriptor.softpkg.ccm; 28 29 import java.io.IOException ; 30 import java.io.InputStream ; 31 import java.util.LinkedList ; 32 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.DeployerInactiveState; 33 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.installer.DependencyDeployerVisitor; 34 import org.omg.Components.ConfigValue; 35 import org.omg.Components.Deployment.ComponentInstallation; 36 37 44 public class SoftpkgDeployer 45 extends SoftpkgDeployerContext 46 { 47 private LinkedList configValues; 53 private ComponentInstallation componentInstallation; 54 public SoftpkgDeployer(){ 60 configValues=new LinkedList (); 61 } 62 77 public ConfigValue[] 78 processDependencies(ComponentInstallation componentInstallation) 79 throws DependencyResolutionFailureException 80 { 81 82 try{ 83 this.componentInstallation=componentInstallation; 84 traverse(this,getDependencyDeployers()); 85 return (ConfigValue[])configValues.toArray(new ConfigValue[configValues.size()]); 86 } 87 catch(Exception e){ 88 throw (DependencyResolutionFailureException)e; 89 } 90 } 91 98 public void 99 visit(DependencyDeployer deployer, DeployerInactiveState status) 100 throws DependencyResolutionFailureException 101 { 102 configValues.add(deployer.resolveDependency(componentInstallation)); 103 } 104 110 public InputStream 111 getComponentArchiveStream() 112 throws IOException 113 { 114 return getZipEntryRetriever().getNewInputStream(); 115 } 116 117 123 public void 124 visitDependencyDeployers(DependencyDeployerVisitor depVisitor) 125 throws DependencyResolutionFailureException 126 { 127 DependencyDeployer depDepl[]=getDependencyDeployers(); 128 for(int i=0;i<depDepl.length;i++) 129 depVisitor.visit(depDepl[i]); 130 } 131 } 132 | Popular Tags |