// LifeCycleService.idl,v 1.6 2003/06/02 05:46:56 bala Exp

// ============================================================================
//
// = FILENAME
//    LifeCycleService.idl
//
// = DESCRIPTION
//    A generic creation service named lifecycle service using
//    the GenericFactory interface of the LifeCycle Service specification.
//
// = AUTHOR
//    Michael Kircher (mk1@cs.wustl.edu)
//
// ============================================================================

#ifndef TAO_LIFECYCLESERVICE_IDL
#define TAO_LIFECYCLESERVICE_IDL

#include "CosLifeCycle.idl"

module LifeCycleService
{
  interface Life_Cycle_Service : CosLifeCycle::GenericFactory
    {
      // = TITLE
      //   Wrapper for the CosLifeCycle GenericFactory
      //
      // = inherits:
      //    boolean supports(in Key k);
      //    Object create_object(in Key k, in Criteria the_criteria)
      //          raises (NoFactory, InvalidCriteria, CannotMeetCriteria);

      void register_factory (in string name,
                             in string location,
                             in string description,
                             in Object _object);
      // provide an method for registering factories with their properties
    };

  interface Criteria_Evaluator
    {
      // = TITLE
      //   Criteria Evaluator
      //
      // = DESCRIPTION
      //   Interface description for an evaluator of CosLifeCycle
      //   Criterias. It is mainly a wrapper, which should make
      //   access easier.
      //
      // @@ NOTE: The definition should be this. But see note below!
      // typedef sequence <CosLifeCycle::NameValuePair> SeqNamedValuePair;

      // @@ NOTE: This is just a workaround for a problem seen with
      // explicit template builds. This file and CosLifeCycle.idl
      // define a sequence of the same data structure which creates
      // multiply defined symbols in the above configuration. We need
      // to fix the IDL compile at some point of time. Till then this
      // should be okay...
      typedef CosLifeCycle::Criteria SeqNamedValuePair;
      typedef CosLifeCycle::Criteria Criteria;

      exception NotAvailable { string reason; };
      // raised if the questioned configuration is not available

      SeqNamedValuePair getInitialization ();
      // get the initialization

      string getFilter ();
      // get a filter string

      SeqNamedValuePair getLogicalLocation ();
      // get the logical location

      string getPreferences ();
      // get the preferences, not implemented

      void setCriteria (in Criteria criteria_);
      // set the Criteria which is searched for keywords
    };
};

#endif /* TAO_LIFECYCLESERVICE_IDL */
