summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/PortableGroup.idl
blob: 22432553dd8ae4a587cc577b2a47ea20156c4614 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
// -*- IDL -*-

// ================================================================
/**
 * @file  PortableGroup.idl
 *
 * $Id$
 *
 * IDL for proposed "PortableGroup" module that is intended to be
 * common to services that perform object group management.
 */
// ================================================================

#ifndef _PortableGroup_IDL_
#define _PortableGroup_IDL_

#include "CosNaming.idl" 	// 98-10-19.idl
#include "tao/IOP.pidl" 		// from 98-03-01.idl
#include "tao/GIOP.pidl" 		// from 98-03-01.idl
// #include "CORBA.idl" 		// from 98-03-01.idl

#pragma prefix "omg.org"

// module IOP {
// const ComponentId TAG_GROUP = OMG_assigned;
// };

module PortableGroup {

  // Specification for Interoperable Object Group References
  typedef string GroupDomainId;
  typedef unsigned long long ObjectGroupId;
  typedef unsigned long ObjectGroupRefVersion;

  struct TagGroupTaggedComponent { // tag = TAG_GROUP;
    GIOP::Version group_version;
    GroupDomainId group_domain_id;
    ObjectGroupId object_group_id;
    ObjectGroupRefVersion object_group_ref_version;
  };

  // Specification of Common Types and Exceptions for Group Management
  interface GenericFactory;

  typedef CORBA::RepositoryId TypeId;
  typedef Object ObjectGroup;
  typedef CosNaming::Name Name;
  typedef any Value;

  struct Property {
    Name nam;
    Value val;
  };

  typedef sequence<Property> Properties;
  typedef Name Location;
  typedef sequence<Location> Locations;
  typedef Properties Criteria;

  struct FactoryInfo {
    GenericFactory the_factory;
    Location the_location;
    Criteria the_criteria;
  };

  typedef sequence<FactoryInfo> FactoryInfos;
  typedef unsigned short MembershipStyleValue;
  const MembershipStyleValue MEMB_APP_CTRL = 0;
  const MembershipStyleValue MEMB_INF_CTRL = 1;
  typedef FactoryInfos FactoriesValue;
  typedef unsigned short InitialNumberMembersValue;
  typedef unsigned short MinimumNumberMembersValue;

  exception InterfaceNotFound {};
  exception ObjectGroupNotFound {};
  exception MemberNotFound {};
  exception ObjectNotFound {};
  exception MemberAlreadyPresent {};
  exception ObjectNotCreated {};
  exception ObjectNotAdded {};
  exception UnsupportedProperty {
    Name nam;
    Value val;
  };
  exception InvalidProperty {
    Name nam;
    Value val;
  };
  exception NoFactory {
    Location the_location;
    TypeId type_id;
  };
  exception InvalidCriteria {
    Criteria invalid_criteria;
  };
  exception CannotMeetCriteria {
    Criteria unmet_criteria;
  };

  // Specification of PropertyManager Interface
  interface PropertyManager {

    void set_default_properties(in Properties props)
      raises (InvalidProperty, UnsupportedProperty);

    Properties get_default_properties();

    void remove_default_properties(in Properties props)
      raises (InvalidProperty, UnsupportedProperty);

    void set_type_properties(in TypeId type_id, in Properties overrides)
      raises (InvalidProperty, UnsupportedProperty);

    Properties get_type_properties(in TypeId type_id);

    void remove_type_properties(in TypeId type_id, in Properties props)
      raises (InvalidProperty, UnsupportedProperty);

    void set_properties_dynamically(in ObjectGroup object_group,
                                    in Properties overrides)
      raises(ObjectGroupNotFound,
             InvalidProperty,
             UnsupportedProperty);

    Properties get_properties(in ObjectGroup object_group)
      raises(ObjectGroupNotFound);

  }; // end PropertyManager

  // Specification of ObjectGroupManager Interface
  interface ObjectGroupManager {
    ObjectGroup create_member(in ObjectGroup object_group,
                              in Location the_location,
                              in TypeId type_id,
                              in Criteria the_criteria)
      raises(ObjectGroupNotFound,
             MemberAlreadyPresent,
             NoFactory,
             ObjectNotCreated,
             InvalidCriteria,
             CannotMeetCriteria);

    ObjectGroup add_member(in ObjectGroup object_group,
                           in Location the_location,
                           in Object member)
      raises(ObjectGroupNotFound,
             MemberAlreadyPresent,
             ObjectNotAdded);

    ObjectGroup remove_member(in ObjectGroup object_group,
                              in Location the_location)
      raises(ObjectGroupNotFound, MemberNotFound);

    Locations locations_of_members(in ObjectGroup object_group)
      raises(ObjectGroupNotFound);

    ObjectGroupId get_object_group_id(in ObjectGroup object_group)
      raises(ObjectGroupNotFound);

    ObjectGroup get_object_group_ref(in ObjectGroup object_group)
      raises(ObjectGroupNotFound);

    Object get_member_ref(in ObjectGroup object_group, in Location loc)
      raises(ObjectGroupNotFound, MemberNotFound);

  }; // end ObjectGroupManager

  // Specification of GenericFactory Interface
  interface GenericFactory {

    typedef any FactoryCreationId;

    Object create_object(in TypeId type_id,
                         in Criteria the_criteria,
                         out FactoryCreationId factory_creation_id)
      raises(NoFactory,
             ObjectNotCreated,
             InvalidCriteria,
             InvalidProperty,
             CannotMeetCriteria);

    void delete_object(in FactoryCreationId factory_creation_id)
      raises (ObjectNotFound);

  }; // end GenericFactory

}; // end PortableGroup


#pragma prefix ""

#endif // for #ifndef _PortableGroup_IDL_