1 23 24 package com.sun.enterprise.deployment.archivist; 25 26 import java.io.InputStream ; 27 import java.io.IOException ; 28 import java.util.logging.Level ; 29 import javax.enterprise.deploy.shared.ModuleType ; 30 31 import com.sun.enterprise.deployment.ConnectorDescriptor; 32 import com.sun.enterprise.deployment.deploy.shared.AbstractArchive; 33 import com.sun.enterprise.deployment.Descriptor; 34 import com.sun.enterprise.deployment.io.ConnectorDeploymentDescriptorFile; 35 import com.sun.enterprise.deployment.io.DeploymentDescriptorFile; 36 import com.sun.enterprise.deployment.io.runtime.ConnectorRuntimeDDFile; 37 import com.sun.enterprise.deployment.node.connector.ConnectorNode; 38 import com.sun.enterprise.deployment.util.DOLUtils; 39 40 46 public class ConnectorArchivist extends Archivist { 47 48 ConnectorDescriptor descriptor = null; 49 50 53 DeploymentDescriptorFile standardDD = new ConnectorDeploymentDescriptorFile(); 54 55 56 public ConnectorArchivist() { 57 } 58 59 64 public ModuleType getModuleType() { 65 return ModuleType.RAR; 66 } 67 68 71 public void setDescriptor(Descriptor descriptor) { 72 if (descriptor instanceof ConnectorDescriptor) { 73 this.descriptor = (ConnectorDescriptor) descriptor; 74 } else { 75 DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.descriptorFailure", new Object [] {this}); 76 } 77 } 78 79 83 public DeploymentDescriptorFile getStandardDDFile() { 84 return standardDD; 85 } 86 87 91 public DeploymentDescriptorFile getConfigurationDDFile() { 92 return new ConnectorRuntimeDDFile(); 93 } 94 95 98 public Descriptor getDescriptor() { 99 return descriptor; 100 } 101 102 105 public Descriptor getDefaultBundleDescriptor() { 106 ConnectorDescriptor connectorDesc = 107 new ConnectorDescriptor(); 108 return connectorDesc; 109 } 110 111 protected boolean postHandles(AbstractArchive abstractArchive) 112 throws IOException { 113 return false; 114 } 115 116 protected String getArchiveExtension() { 117 return CONNECTOR_EXTENSION; 118 } 119 } 120 | Popular Tags |