/*
Copyright 2002-2006 The Members of the OSS through Java(TM) Initiative.
All rights reserved. Use is subject to license terms.
*/

package javax.oss;


/**
 * Every JVT&lt;ApplicationType&gt; Local Session Bean interface must derive from
 * the following local base session interface. The base JVTSessionLocalBusiness interface
 * provides a common set of operations shared by all the local JVT Session Beans.
 * The implementation of the <CODE>JVTSessionLocalBusiness</CODE> operations are mandatory.
 * <br>
 * The differences between remote and local clients are discussed in Sections
 * 5.2 through 5.4 of Enterprise JavaBeansTM Specification, Version 2.1.
 * 
 * 
 * @author OSS through Java Initiative, Vincent Perrot Sun Microsystems Inc.
 * @version 1.4
 * @since June 2006
 */
public interface JVTSessionLocalBusiness {
    /**
     * Get the names of the optional operations supported by this JVT
     * Session Bean. The names of the optional operations are defined
     * in the <CODE>JVT&lt;ApplicationType&gt;SessionOptionalOps</CODE> interface as
     * defined by the API.
     *
     * @return String array which contains the names of all the optional
     * operations supported by an implementation of a JVT Session Bean.
     *
     */
    String[] getSupportedOptionalOperations();
    
    /**
     * Get the Managed Entity types supported by a JVT Session Bean.
     *
     * @return String array which contains the fully qualified names of the leaf
     * node interfaces representing the supported managed entity types.
     * Note that it is not the implementation class name that is returned.
     */
    String[] getManagedEntityTypes();
    
    /**
     * Get the Event Type names supported by the JVT Session Bean
     *
     * @return String array which contains the fully qualified names of the
     * leaf node interfaces representing the supported event types.
     */
    
    //Get the Event Type Names supported by the Session Component
    String[] getEventTypes();
    
    /**
     * Get the EventPropertyDescriptor associated with an event type name.
     *
     * @param eventType fully qualified name of the leaf node Event interface.
     * @return EventPropertyDescriptor which can be used to discover the
     * filterable properties of the specified event type.
     * @exception javax.oss.OssIllegalArgumentException unknown or unsupported
     * event type.
     */
    EventPropertyDescriptor getEventDescriptor(String eventType)
    throws javax.oss.OssIllegalArgumentException;
    
    /**
     * Create a Value Type object for a specific Managed Entity type.
     * Not to be confused with the creation of a Managed Entity.
     * The Session Bean is used as a factory for the creation of
     * Value Types.
     *
     * @param valueType fully qualified name of the leaf managed entity value
     * interface.
     * @return managed entity value object of the specified type.
     * @exception javax.oss.OssIllegalArgumentException unknown or unsupported
     * managed entity value type.
     */
    ManagedEntityValue makeManagedEntityValue(String valueType)
    throws javax.oss.OssIllegalArgumentException;
    
    /**
     * Create a UpdateProcedureValue Instance matching a Update Procedure type name.
     * The Session Bean is used as a factory for the creation of
     * Update Procedure values.
     *
     * @param type fully qualified name of the leaf node UpdateProcedureValue interface.
     * @return Update Procedure value object of the specified type.
     * @exception javax.oss.OssIllegalArgumentException unknown or unsupported
     * Update Procedure type.
     */
    UpdateProcedureValue makeUpdateProcedureValue(String type)
    throws javax.oss.OssIllegalArgumentException ;
    
    /**
     * Executes the given update procedure.
     *
     * @param updateValue a UpdateProcedureValue object representing the Update Procedure to be performed.
     * @return a UpdateProcedureResponse resulting from the Update Procedure execution.
     * @exception javax.oss.OssIllegalArgumentException unsupported Update Procedure value type.
     *
     * @ossj:nillableField name=methodReturnValue value=true
     * @ossj:minOccursField name=methodReturnValue value=0
     * @ossj:minOccursField name=updateValue value=0
     */
    UpdateProcedureResponse update(UpdateProcedureValue updateValue)
    throws javax.oss.OssIllegalArgumentException ;
    
    /**
     * Get the UpdateProcedure type names supported by a JVT Session Bean
     *
     * @return String array which contains the fully qualified names of the leaf
     * node interfaces representing the supported update procedure value types,
     * i.e., interfaces which extend UpdateProcedureValue.
     */
    
    String[] getUpdateProcedureTypes();
    
    /**
     * Query multiple Entities using a NamedQueryValue.
     *
     * @param namedQuery a NamedQueryValue object representing the query.
     * @return a NamedQueryResponse used to extract the results of the query.
     * @exception javax.oss.OssIllegalArgumentException unsupported named query value type.
     *
     * @ossj:nillableField name=methodReturnValue value=true
     * @ossj:minOccursField name=methodReturnValue value=0
     * @ossj:minOccursField name=namedQuery value=0
     */
    NamedQueryResponse query(NamedQueryValue namedQuery)
    throws javax.oss.OssIllegalArgumentException;

    /**
     * Get the Named Query type names supported by a JVT Session Bean
     *
     * @return String array which contains the fully qualified names of the leaf
     * node interfaces representing the supported named query value types,
     * i.e., interfaces which extend NamedQueryValue.
     */
    String[] getNamedQueryTypes();
    
    /**
     * Create a NamedQueryValue Instance matching a Named Query type name.
     * The Session Bean is used as a factory for the creation of
     * named query values.
     *
     * @param type fully qualified name of the leaf node NamedQueryValue interface.
     * @return query value object of the specified type.
     * @exception javax.oss.OssIllegalArgumentException unknown or unsupported
     * named query type.
     */
    NamedQueryValue makeNamedQueryValue(String type) throws javax.oss.OssIllegalArgumentException;
    
}
