/* Generated by Together */

package cobalt.deployment.descriptor.dist;

import java.util.Iterator;

import cobalt.deployment.descriptor.EjbDescriptor;
import cobalt.deployment.descriptor.MethodDescriptor;
import cobalt.deployment.util.CommonUtil;

public class Websphere30EjbDescriptor {
    public Websphere30EjbDescriptor(EjbDescriptor ejbDesc) {
        descriptor = ejbDesc;
        methodControl = new Websphere30MethodControl();
        serName = CommonUtil.getClassName(getRemoteInterface()) + "DD.ser";
    }

    public EjbDescriptor getDescriptor(){ return descriptor; }

    public void setDescriptor(EjbDescriptor descriptor){ this.descriptor = descriptor; }

    public String getSerName() {
        return serName;
    }

    public void setSerName(String serName) {
        this.serName = serName;
    }

    public String getJndiName() {
        return descriptor.getJndiName();
    }

    public void setJndiName(String name) {
        descriptor.setJndiName(name);
    }

    public String getEjbName() {
        return descriptor.getEjbName();
    }

    public String getEjbType() {
        return descriptor.getEjbType();
    }

    public String getHomeInterface() {
        return descriptor.getHomeInterface();
    }

    public String getEnterpriseBean() {
        return descriptor.getBeanClass();
    }

    public String getRemoteInterface() {
        return descriptor.getRemoteInterface();
    }

    public String getTransactionAttr(){
            return transactionAttr;
        }

    public void setTransactionAttr(String transactionAttr){
            this.transactionAttr = transactionAttr;
        }

    public String getIsolationLevel(){
            return isolationLevel;
        }

    public void setIsolationLevel(String isolationLevel){
            this.isolationLevel = isolationLevel;
        }

    public String getRunAsMode(){ return runAsMode; }

    public void setRunAsMode(String runAsMode){ this.runAsMode = runAsMode; }

    public String getRunAsId(){ return runAsId; }

    public void setRunAsId(String runAsId){ this.runAsId = runAsId; }

    public Websphere30MethodControl getMethodControl(){ return methodControl; }

    public void setMethodControl(cobalt.deployment.descriptor.dist.Websphere30MethodControl methodControl){ this.methodControl = methodControl; }

    public Iterator getMethodDescriptorIterator() {
        return descriptor.getMethodDescriptorIterator();
    }

    public MethodDescriptor getMethod(int index) {
        return descriptor.getMethod(index);
    }

    private EjbDescriptor descriptor;
    private String serName;
    private String transactionAttr;
    private String isolationLevel;
    private String runAsMode;
    private String runAsId;
    public static final String[] TRANSACTION_ATTR = {
        "TX_REQUIRED",  "TX_REQUIRES_NEW", "TX_NOT_SUPPORTED", "TX_BEAN_MANAGED","TX_MANDATORY", "TX_SUPPORTS"
    };
    private Websphere30MethodControl methodControl;
    public static final String[] RUN_MODE = {
        "", "SYSTEM_IDENTITY", "CLIENT_IDENTITY", "SPECIFIED_IDENTITY"
    };
}
