/*
Copyright 2002-2005 The Members of the OSS through Java(TM) Initiative.
All rights reserved. Use is subject to license terms.
*/
package javax.oss;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.bind.annotation.XmlType;

import ossj.common.ApplicationContextAdapter;

@XmlType
@XmlJavaTypeAdapter(value=ApplicationContextAdapter.class)

/**
 * The ApplicationContext interface contains the URL and
 * other system properties required to set up an initial
 * connection with the JNDI provider into which the
 * components in charge of that managed entity are registered.
 * <p>
 * Security Credentials are not passed.
 * <p>
 * @author OSS through Java Initiative, Vincent Perrot Sun Microsystems Inc.
 * @version 1.1
 * @since March 2005
 * @ossj:complexdata
 */
public interface ApplicationContext extends java.io.Serializable, java.lang.Cloneable {
    /**
     * @return A deep copy of the ApplicationContext object.
     */
    public Object clone();

    /**
     * The name of the factory class required to setup the
     * initial context with the JNDI provider.
     *
     * @return name of factory class
     * @ossj:minOccursField value=1
     * @ossj:nillableField value=false
     */
    public String getFactoryClass();

    /**
     * The URL of the JNDI provider where the Home interfaces
     * of the Session Bean(s) in charge of the entity could be found.
     *
     * @return URL of the JNDI provider
     * @ossj:minOccursField value=1
     * @ossj:nillableField value=false
         */
    public String getURL();

    /**
     * Other properties that may be necessary and
     * vendor specific to setup an initial context with the
     * JNDI Provider.
     *
     * @return Map of system properties
     * @ossj:minOccursField value=1
     * @ossj:nillableField value=false
         */
    public java.util.Map getSystemProperties();

    /**
     * Set the Factory Class Name.
     *
     * @param factoryClassName
     */
    public void setFactoryClass(String factoryClassName)
        throws java.lang.IllegalArgumentException;

    /**
     * Set the System properties.
     *
     * @param properties
     */
    public void setSystemProperties(java.util.Map properties)
        throws java.lang.IllegalArgumentException;

    /**
     * Set the URL.
     *
     * @param URL
     */
    public void setURL(String URL) throws java.lang.IllegalArgumentException;
}
