Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

CosTrading.idl

Go to the documentation of this file.
00001 /* docdef: costrade */
00002 #ifndef COS_TRADING_IDL
00003 #define COS_TRADING_IDL
00004 
00005 #pragma prefix "omg.org"
00006 
00012 module CosTrading
00013 {
00014    typedef Object TypeRepository;
00015    typedef string Istring;
00016    /* doc: 6 */
00017    typedef Istring ServiceTypeName;
00018    /* enddoc */
00019    typedef Istring Constraint;
00020    typedef Istring PropertyName;
00021    typedef sequence <PropertyName> PropertyNameSeq;
00022    typedef any PropertyValue;
00023    typedef string OfferId;
00024    typedef sequence <OfferId> OfferIdSeq;
00025    typedef Istring LinkName;
00026    typedef sequence <LinkName> LinkNameSeq;
00027    typedef LinkNameSeq TraderName;
00028    typedef string PolicyName;
00029    typedef sequence <PolicyName> PolicyNameSeq;
00030    typedef any PolicyValue;
00031 
00039    struct Property
00040    {
00041       PropertyName name;
00042       PropertyValue value;
00043    };
00044    typedef sequence <Property> PropertySeq;
00045 
00051    struct Offer
00052    {
00053       Object reference;
00054       PropertySeq properties;
00055    };
00056    typedef sequence <Offer> OfferSeq;
00057 
00063    struct Policy
00064    {
00065       PolicyName name;
00066       PolicyValue value;
00067    };
00068    typedef sequence <Policy> PolicySeq;
00069 
00079    enum FollowOption
00080    {
00081       local_only,
00082       if_no_local,
00083       always
00084    };
00085 
00086    interface Lookup;
00087    interface Register;
00088    interface Link;
00089    interface Proxy;
00090    interface Admin;
00091    interface OfferIterator;
00092    interface OfferIdIterator;
00093 
00094    exception IllegalServiceType
00095    {
00096       ServiceTypeName type;
00097    };
00098    exception UnknownServiceType
00099    {
00100       ServiceTypeName type;
00101    };
00102    exception IllegalConstraint
00103    {
00104       Constraint constr;
00105    };
00106    exception IllegalOfferId
00107    {
00108       OfferId id;
00109    };
00110    exception IllegalPropertyName
00111    {
00112       PropertyName name;
00113    };
00114    exception InvalidLookupRef
00115    {
00116       Lookup target;
00117    };
00118    exception DuplicatePolicyName
00119    {
00120       PolicyName name;
00121    };
00122    exception DuplicatePropertyName
00123    {
00124       PropertyName name;
00125    };
00126    exception MissingMandatoryProperty
00127    {
00128       ServiceTypeName type;
00129       PropertyName name;
00130    };
00131    exception PropertyTypeMismatch
00132    {
00133       ServiceTypeName type;
00134       Property prop;
00135    };
00136    exception ReadonlyDynamicProperty
00137    {
00138       ServiceTypeName type;
00139       PropertyName name;
00140    };
00141    exception UnknownOfferId
00142    {
00143       OfferId id;
00144    };
00145    exception UnknownMaxLeft {};
00146    exception NotImplemented {};
00147 
00153    interface TraderComponents
00154    {
00155       readonly attribute Lookup lookup_if;
00156       readonly attribute Register register_if;
00157       readonly attribute Link link_if;
00158       readonly attribute Proxy proxy_if;
00159       readonly attribute Admin admin_if;
00160    };
00161 
00166    interface SupportAttributes
00167    {
00168       readonly attribute boolean supports_modifiable_properties;
00169       readonly attribute boolean supports_dynamic_properties;
00170       readonly attribute boolean supports_proxy_offers;
00171       readonly attribute TypeRepository type_repos;
00172    };
00173 
00178    interface ImportAttributes
00179    {
00180       readonly attribute unsigned long def_search_card;
00181       readonly attribute unsigned long max_search_card;
00182       readonly attribute unsigned long def_match_card;
00183       readonly attribute unsigned long max_match_card;
00184       readonly attribute unsigned long def_return_card;
00185       readonly attribute unsigned long max_return_card;
00186       readonly attribute unsigned long max_list;
00187       readonly attribute unsigned long def_hop_count;
00188       readonly attribute unsigned long max_hop_count;
00189       readonly attribute FollowOption def_follow_policy;
00190       readonly attribute FollowOption max_follow_policy;
00191    };
00192 
00198    interface LinkAttributes
00199    {
00200       readonly attribute FollowOption max_link_follow_policy;
00201    };
00202 
00208    interface OfferIdIterator
00209    {
00218       unsigned long max_left () raises (UnknownMaxLeft);
00219 
00228       boolean next_n (in unsigned long n, out OfferIdSeq ids);
00229 
00235       void destroy ();
00236    };
00237 
00243    interface OfferIterator
00244    {
00253       unsigned long max_left () raises (UnknownMaxLeft);
00254 
00263       boolean next_n (in unsigned long n, out OfferSeq offers);
00264 
00270       void destroy ();
00271    };
00272 
00277    interface Lookup : TraderComponents, SupportAttributes, ImportAttributes
00278    {
00279       typedef Istring Preference;
00280 
00290       enum HowManyProps
00291       {
00292          none,
00293          some,
00294          all
00295       };
00296 
00303       union SpecifiedProps switch (HowManyProps)
00304       {
00305          case some : PropertyNameSeq prop_names;
00306       };
00307 
00308       exception IllegalPreference
00309       {
00310          Preference pref;
00311       };
00312       exception IllegalPolicyName
00313       {
00314          PolicyName name;
00315       };
00316       exception InvalidPolicyValue
00317       {
00318          Policy the_policy;
00319       };
00320       exception PolicyTypeMismatch
00321       {
00322          Policy the_policy;
00323       };
00324 
00360       /* doc: 25 */
00361       void query
00362       (
00363          in ServiceTypeName type,
00364          in Constraint constr,
00365          in Preference pref,
00366          in PolicySeq policies,
00367          in SpecifiedProps desired_props,
00368          in unsigned long how_many,
00369          out OfferSeq offers,
00370          out OfferIterator offer_iter,
00371          out PolicyNameSeq limits_applied
00372       )
00373       raises
00374       (
00375          IllegalServiceType,
00376          UnknownServiceType,
00377          IllegalConstraint,
00378          IllegalPreference,
00379          IllegalPolicyName,
00380          PolicyTypeMismatch,
00381          InvalidPolicyValue,
00382          IllegalPropertyName,
00383          DuplicatePropertyName,
00384          DuplicatePolicyName
00385       );
00386       /* enddoc */
00387    };
00388 
00393    interface Register : TraderComponents, SupportAttributes
00394    {
00395       exception IllegalTraderName
00396       {
00397          TraderName name;
00398       };
00399       exception InvalidObjectRef
00400       {
00401          Object ref;
00402       };
00403       exception InterfaceTypeMismatch
00404       {
00405          ServiceTypeName type;
00406          Object reference;
00407       };
00408       exception MandatoryProperty
00409       {
00410          ServiceTypeName type;
00411          PropertyName name;
00412       };
00413       exception NoMatchingOffers
00414       {
00415          Constraint constr;
00416       };
00417       exception ProxyOfferId
00418       {
00419          OfferId id;
00420       };
00421       exception ReadonlyProperty
00422       {
00423          ServiceTypeName type;
00424          PropertyName name;
00425       };
00426       exception RegisterNotSupported
00427       {
00428          TraderName name;
00429       };
00430       exception UnknownPropertyName
00431       {
00432          PropertyName name;
00433       };
00434       exception UnknownTraderName
00435       {
00436          TraderName name;
00437       };
00438 
00446       struct OfferInfo
00447       {
00448          Object reference;
00449          ServiceTypeName type;
00450          PropertySeq properties;
00451       };
00452 
00479       /* doc: 37 */
00480       OfferId export
00481       (
00482          in Object reference,
00483          in ServiceTypeName type,
00484          in PropertySeq properties
00485       )
00486       raises
00487       (
00488          InvalidObjectRef,
00489          IllegalServiceType,
00490          UnknownServiceType,
00491          InterfaceTypeMismatch,
00492          IllegalPropertyName,
00493          PropertyTypeMismatch,
00494          ReadonlyDynamicProperty,
00495          MissingMandatoryProperty,
00496          DuplicatePropertyName
00497       );
00498       /* enddoc */
00509       /* doc: 35 */
00510       void withdraw
00511       (
00512          in OfferId id
00513       )
00514       raises
00515       (
00516          IllegalOfferId,
00517          UnknownOfferId,
00518          ProxyOfferId
00519       );
00520       /* enddoc */
00521 
00533       /* doc: 31 */
00534       OfferInfo describe
00535       (
00536          in OfferId id
00537       )
00538       raises
00539       (
00540          IllegalOfferId,
00541          UnknownOfferId,
00542          ProxyOfferId
00543       );
00544       /* enddoc */
00545 
00570       void modify
00571       (
00572          in OfferId id,
00573          in PropertyNameSeq del_list,
00574          in PropertySeq modify_list
00575       )
00576       raises
00577       (
00578          NotImplemented,
00579          IllegalOfferId,
00580          UnknownOfferId,
00581          ProxyOfferId,
00582          IllegalPropertyName,
00583          UnknownPropertyName,
00584          PropertyTypeMismatch,
00585          ReadonlyDynamicProperty,
00586          MandatoryProperty,
00587          ReadonlyProperty,
00588          DuplicatePropertyName
00589       );
00590 
00606       void withdraw_using_constraint
00607       (
00608          in ServiceTypeName type,
00609          in Constraint constr
00610       )
00611       raises
00612       (
00613          IllegalServiceType,
00614          UnknownServiceType,
00615          IllegalConstraint,
00616          NoMatchingOffers
00617       );
00618 
00629       Register resolve
00630       (
00631          in TraderName name
00632       )
00633       raises
00634       (
00635          IllegalTraderName,
00636          UnknownTraderName,
00637          RegisterNotSupported
00638       );
00639    };
00640 
00645    interface Link : TraderComponents, SupportAttributes, LinkAttributes
00646    {
00653       struct LinkInfo
00654       {
00655          Lookup target;
00656          Register target_reg;
00657          FollowOption def_pass_on_follow_rule;
00658          FollowOption limiting_follow_rule;
00659       };
00660 
00661       exception IllegalLinkName
00662       {
00663          LinkName name;
00664       };
00665 
00666       exception UnknownLinkName
00667       {
00668          LinkName name;
00669       };
00670 
00671       exception DuplicateLinkName
00672       {
00673          LinkName name;
00674       };
00675 
00676       exception DefaultFollowTooPermissive
00677       {
00678          FollowOption def_pass_on_follow_rule;
00679          FollowOption limiting_follow_rule;
00680       };
00681 
00682       exception LimitingFollowTooPermissive
00683       {
00684          FollowOption limiting_follow_rule;
00685          FollowOption max_link_follow_policy;
00686       };
00687 
00708       void add_link
00709       (
00710          in LinkName name,
00711          in Lookup target,
00712          in FollowOption def_pass_on_follow_rule,
00713          in FollowOption limiting_follow_rule
00714       )
00715       raises
00716       (
00717          IllegalLinkName,
00718          DuplicateLinkName,
00719          InvalidLookupRef,
00720          DefaultFollowTooPermissive,
00721          LimitingFollowTooPermissive
00722       );
00723 
00732       void remove_link
00733       (
00734          in LinkName name
00735       )
00736       raises
00737       (
00738          IllegalLinkName,
00739          UnknownLinkName
00740       );
00741 
00752       LinkInfo describe_link
00753       (
00754          in LinkName name
00755       )
00756       raises
00757       (
00758          IllegalLinkName,
00759          UnknownLinkName
00760       );
00761 
00764       LinkNameSeq list_links ();
00765 
00785       void modify_link
00786       (
00787          in LinkName name,
00788          in FollowOption def_pass_on_follow_rule,
00789          in FollowOption limiting_follow_rule
00790       )
00791       raises
00792       (
00793          IllegalLinkName,
00794          UnknownLinkName,
00795          DefaultFollowTooPermissive,
00796          LimitingFollowTooPermissive
00797       );
00798    };
00799 
00804    interface Proxy : TraderComponents, SupportAttributes
00805    {
00806       typedef Istring ConstraintRecipe;
00807 
00808       struct ProxyInfo
00809       {
00810          ServiceTypeName type;
00811          Lookup target;
00812          PropertySeq properties;
00813          boolean if_match_all;
00814          ConstraintRecipe recipe;
00815          PolicySeq policies_to_pass_on;
00816       };
00817 
00818       exception IllegalRecipe
00819       {
00820          ConstraintRecipe recipe;
00821       };
00822 
00823       exception NotProxyOfferId
00824       {
00825          OfferId id;
00826       };
00827 
00828       /* doc: 51 */
00829       OfferId export_proxy
00830       (
00831          in Lookup target,
00832          in ServiceTypeName type,
00833          in PropertySeq properties,
00834          in boolean if_match_all,
00835          in ConstraintRecipe recipe,
00836          in PolicySeq policies_to_pass_on
00837       )
00838       raises
00839       (
00840          IllegalServiceType,
00841          UnknownServiceType,
00842          InvalidLookupRef,
00843          IllegalPropertyName,
00844          PropertyTypeMismatch,
00845          ReadonlyDynamicProperty,
00846          MissingMandatoryProperty,
00847          IllegalRecipe,
00848          DuplicatePropertyName,
00849          DuplicatePolicyName
00850       );
00851       /* enddoc */
00852 
00853       void withdraw_proxy
00854       (
00855          in OfferId id
00856       )
00857       raises
00858       (
00859          IllegalOfferId,
00860          UnknownOfferId,
00861          NotProxyOfferId
00862       );
00863 
00864       ProxyInfo describe_proxy
00865       (
00866          in OfferId id
00867       )
00868       raises
00869       (
00870          IllegalOfferId,
00871          UnknownOfferId,
00872          NotProxyOfferId
00873       );
00874    };
00875 
00881    interface Admin :
00882       TraderComponents,
00883       SupportAttributes,
00884       ImportAttributes,
00885       LinkAttributes
00886    {
00887       typedef sequence <octet> OctetSeq;
00888 
00889       readonly attribute OctetSeq request_id_stem;
00890 
00891 /* This operation sets the default search cardinality applied to queries.
00892  *
00893  * @returns - The previous default search cardinality.
00894  * @param value - The new default serach cardinality.
00895  */
00896 
00897       unsigned long set_def_search_card (in unsigned long value);
00898 
00899 /* This operation sets the maximum search cardinality applied to queries.
00900  *
00901  * @returns - The previous maximum search cardinality.
00902  * @param value - The new maximum search cardinality.
00903  */
00904 
00905       unsigned long set_max_search_card (in unsigned long value);
00906 
00907 /* This operation sets the default match cardinality applied to queries.
00908  *
00909  * @returns - The previous default match cardinality.
00910  * @param value - The new default match cardinality.
00911  */
00912 
00913       unsigned long set_def_match_card  (in unsigned long value);
00914 
00915 /* This operation sets the maximum match cardinality applied to queries.
00916  *
00917  * @returns - The previous maximum match cardinality.
00918  * @param value - The new maximum match cardinality.
00919  */
00920 
00921       unsigned long set_max_match_card  (in unsigned long value);
00922 
00923 /* This operation sets the default return cardinality applied to queries.
00924  *
00925  * @returns - The previous default return cardinality.
00926  * @param value - The new default return cardinality.
00927  */
00928 
00929       unsigned long set_def_return_card (in unsigned long value);
00930 
00931 /* This operation sets the maximum return cardinality applied to queries.
00932  *
00933  * @returns - The previous maximum return cardinality.
00934  * @param value - The new maximum return cardinality.
00935  */
00936 
00937       unsigned long set_max_return_card (in unsigned long value);
00938 
00939 /* This operation sets the maximum size for an iterator.
00940  *
00941  * @returns - The previous maximum iterator size.
00942  * @param value - The new maximum iterator size.
00943  */
00944 
00945       unsigned long set_max_list (in unsigned long value);
00946 
00947 /* This operation sets the default hop count used when resolving
00948  * federated queries.
00949  *
00950  * @returns - The previous default hop count.
00951  * @param value - The new default hop count.
00952  */
00953 
00954       unsigned long set_def_hop_count (in unsigned long value);
00955 
00956 /* This operation sets the maximum hop count used when resolving
00957  * federated queries.
00958  *
00959  * @returns - The previous maximum hop count.
00960  * @param value - The new maximum hop count.
00961  */
00962 
00963       unsigned long set_max_hop_count (in unsigned long value);
00964 
00965 /* This operation sets whether the trader supports modifiable
00966  * properties.
00967  *
00968  * @returns - TRUE if modifiable properties were supported.
00969  * @param value - TRUE if modifiable properties are to be supported.
00970  */
00971 
00972       boolean set_supports_modifiable_properties (in boolean value);
00973 
00974 /* This operation sets whether the trader supports dynamic
00975  * properties.
00976  *
00977  * @returns - TRUE if dynamic properties were supported.
00978  * @param value - TRUE if dynamic properties are to be supported.
00979  */
00980 
00981       boolean set_supports_dynamic_properties (in boolean value);
00982 
00983 /* This operation sets whether the trader supports proxy
00984  * offers.
00985  *
00986  * @returns - TRUE if proxy offers were supported.
00987  * @param value - TRUE if proxy offers are to be supported.
00988  */
00989 
00990       boolean set_supports_proxy_offers (in boolean value);
00991 
00992 /* This operation sets the default follow option applied to link
00993  * traversal for query resolution.
00994  *
00995  * @returns - The previous default follow option.
00996  * @param value - The new default follow option.
00997  */
00998 
00999       FollowOption set_def_follow_policy (in FollowOption policy);
01000 
01001 /* This operation sets the maximum follow option applied to link
01002  * traversal for query resolution.
01003  *
01004  * @returns - The previous maximum follow option.
01005  * @param value - The new maximum follow option.
01006  */
01007 
01008       FollowOption set_max_follow_policy (in FollowOption policy);
01009 
01010 /* This operation sets the maximum follow option that can
01011  * be applied to links.
01012  *
01013  * @returns - The previous maximum link follow option.
01014  * @param value - The new maximum link follow option.
01015  */
01016 
01017       FollowOption set_max_link_follow_policy (in FollowOption policy);
01018 
01019 /* This operation sets the service type repository for a trader.
01020  *
01021  * @returns - The previous service type repository.
01022  * @param repository - The new service type repository.
01023  */
01024 
01025       TypeRepository set_type_repos (in TypeRepository repository);
01026 
01027 /* This operation sets a request identifier stem value.
01028  * This is used to generate unique query identifiers to
01029  * prevent cyclic query resolution amongst federated traders.
01030  *
01031  * @returns - The previous identifier stem.
01032  * @param stem - The new identifier stem.
01033  */
01034 
01035       OctetSeq set_request_id_stem (in OctetSeq stem);
01036 
01037 /* This operation returns a list of offers made by the
01038  * trader. Offer identifiers not returned in the returned
01039  * sequence can be accessed through the returned iterator.
01040  *
01041  * @param how_many - The number of offers to return.
01042  * @param ids - The sequence of returned offer identifiers.
01043  * @param id_itr - The returned offer iterator.
01044  *
01045  * @raises NotImplemented - If this operation is not implemented by the trader.
01046  */
01047       /* doc: 19 */
01048       void list_offers
01049       (
01050          in unsigned long how_many,
01051          out OfferIdSeq ids,
01052          out OfferIdIterator id_itr
01053       )
01054       raises
01055       (
01056          NotImplemented
01057       );
01058       /* enddoc */
01059 
01060 /* This operation returns a list of proxy offers made by the
01061  * trader. Offer identifiers not returned in the returned
01062  * sequence can be accessed through the returned iterator.
01063  *
01064  * @param how_many - The number of offers to return.
01065  * @param ids - The sequence of returned offer identifiers.
01066  * @param id_itr - The returned offer iterator.
01067  *
01068  * @raises NotImplemented - If the proxy interface is not implemented
01069  *  by the trader
01070  */
01071 
01072       void list_proxies
01073       (
01074          in unsigned long how_many,
01075          out OfferIdSeq ids,
01076          out OfferIdIterator id_itr
01077       ) raises
01078       (
01079          NotImplemented
01080       );
01081    };
01082 };
01083 
01084 #endif