/*
 * Copyright (c) 2009, Oracle and its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

/*
 * $Id: EJBLiteClientIF.java 62592 2011-04-20 20:07:16Z kgrucci $
 */

package com.sun.ts.tests.common.vehicle.ejbliteshare;

import java.io.File;
import java.util.Map;

import javax.ejb.embeddable.EJBContainer;

public interface EJBLiteClientIF {
    public static final String TEST_PASSED = "[TEST PASSED] ";

    public static final String TEST_FAILED = "[TEST FAILED] ";
    
    public static final String JAVA_GLOBAL_PREFIX = "java:global/";
    
    public static final String JAVA_COMP_ENV_PREFIX = "java:comp/env/";
    
    public static final String ADDITIONAL_MODULES_KEY = "-additionalModule";
    
    public static final String EJBEMBED_JAR_NAME_BASE = "ejbembed_vehicle_ejb";
    
    public void setInjectionSupported(Boolean injectionSupported);

    public Boolean getInjectionSupported();

    public void runTestInVehicle();

    public String getTestName();

    public void setTestName(String testName);

    public String getStatus();

    public String getReason();

    public String getModuleName();

    public void setModuleName(String mn);
    
    public Map<String, String> getJndiMapping();
    
    public EJBContainer getContainer();

    public void setContainer(EJBContainer container);

    public javax.naming.Context getContext();
    
    public void setAdditionalModules(File[] additionalModules);

    public void setContext(javax.naming.Context context);
    
    /**
     * Subclass client can override this method to customize the container creation.
     * The default implementation returns null in EJBLiteClientBase.  Since the method
     * must be invoked prior to container creation, way ahead of actual test method,
     * this customization is only possible at test client level, not at test method level.  
     */
    public Map<String, Object> getContainerInitProperties();
    
    /**
     * This method is called by test client to set context ClassLoader to include 
     * additional classes and ejb modules.  This method is called prior to creating
     * EJBContainer.  The default implementation does nothing and makes no change to 
     * the context ClassLoader in the current thread.  Subclass client may choose to
     * override this method to provide for additional ejb modules and classes.
     */
    public void setContextClassLoader();
}
