KosPropertyService Object Services | 19 | ![]() |
The KosPropertyService module is defined in the file named:
It's version information is:
$Id: KosPropertyService.idl,v 1.38 1997-08-07 17:03:20-04 wlf Exp $
It is defined in the Java package named:
org.cert.KosPropertyService
module KosPropertyService
{
Forward declarations:
interface PropertiesIterator;
interface PropertyNamesIterator;
interface PropertySet;
interface PropertySetDef;
interface PropertySetDefFactory;
interface PropertySetFactory;
Sequence declarations:
typedef sequence<PropertiesIterator> SeqOfPropertiesIterator;
typedef sequence<PropertyNamesIterator> SeqOfPropertyNamesIterator;
typedef sequence<PropertySet> SeqOfPropertySet;
typedef sequence<PropertySetDef> SeqOfPropertySetDef;
typedef sequence<PropertySetDefFactory> SeqOfPropertySetDefFactory;
typedef sequence<PropertySetFactory> SeqOfPropertySetFactory;
typedef string PropertyName;
enum PropertyModeType
{
normal,
read_only,
fixed_normal,
fixed_readonly,
undefined
};
struct PropertyMode {
PropertyName property_name;
PropertyModeType property_mode;
};
typedef sequence<PropertyName> PropertyNames;
typedef sequence<PropertyMode> PropertyModes;
typedef sequence<TypeCode> PropertyTypes;
exception ConstraintNotSupported {
};
exception InvalidPropertyName {
};
exception ConflictingProperty {
};
exception PropertyNotFound {
};
exception UnsupportedTypeCode {
};
exception UnsupportedProperty {
};
exception UnsupportedMode {
};
exception FixedProperty {
};
exception ReadOnlyProperty {
};
enum ExceptionReason
{
invalid_property_name,
conflicting_property,
property_not_found,
unsupported_type_code,
unsupported_property,
unsupported_mode,
fixed_property,
read_only_property
};
struct PropertyException {
ExceptionReason reason;
PropertyName failing_property_name;
};
typedef sequence<PropertyException> PropertyExceptions;
exception MultipleExceptions {
PropertyExceptions exceptions;
};
typedef any PropertyValue;
struct Property {
PropertyName property_name;
PropertyValue property_value;
};
struct PropertyDef {
PropertyName property_name;
PropertyModeType property_mode;
PropertyValue property_value;
};
typedef sequence<Property> Properties;
typedef sequence<PropertyDef> PropertyDefs;
interface PropertySetDef {
void get_allowed_property_types(
out PropertyTypes property_types
);
void get_allowed_properties(
out PropertyDefs property_defs
);
void define_property_with_mode(
in PropertyName property_name,
in any property_value,
in PropertyModeType property_mode
)
raises(
InvalidPropertyName,
ConflictingProperty,
UnsupportedTypeCode,
UnsupportedProperty,
UnsupportedMode,
ReadOnlyProperty
);
void define_properties_with_modes(
in PropertyName property_defs
)
raises(
MultipleExceptions
);
PropertyModeType get_property_mode(
in PropertyName property_name
)
raises(
PropertyNotFound,
InvalidPropertyName
);
boolean get_property_modes(
in PropertyNames property_names,
out PropertyModes property_modes
);
void set_property_mode(
in PropertyName property_name,
in PropertyModeType property_mode
)
raises(
InvalidPropertyName,
PropertyNotFound,
UnsupportedMode
);
void set_property_modes(
in PropertyModes property_modes
)
raises(
MultipleExceptions
);
};
interface PropertySetDefFactory {
PropertySetDef create_propertysetdef();
PropertySetDef create_constrained_propertysetdef(
in PropertyTypes allowed_property_types,
in PropertyDefs allowed_property_defs
)
raises(
ConstraintNotSupported
);
PropertySetDef create_initial_propertysetdef(
in PropertyDefs initial_property_defs
)
raises(
MultipleExceptions
);
};
interface PropertySet : KosAppService::Version {
Will modify or add a property to the PropertySet. If the property already exists, then the property type is checked before the value is overwritten. If the property does not exist, then the property is added to the PropertySet. To change the any TypeCode portion of the property_value of a property, a client must first delete_property, then invoke the define_property.
void define_property(
in PropertyName property_name,
in any property_value
)
raises(
InvalidPropertyName,
ConflictingProperty,
UnsupportedTypeCode,
UnsupportedProperty,
ReadOnlyProperty
);
Will modify or add each of the properties in Properties parameter to the PropertySet. For each property in the list, if the property already exists, then the property type is checked before overwriting the value. If the property does not exist, then the property is added to the PropertySet. This is a batch operation that returns the MultipleExceptions exception if any define operation failed.
void define_properties(
in Properties nproperties
)
raises(
MultipleExceptions
);
Returns the current number of properties associated with this PropertySet.
unsigned long get_number_of_properties();
Returns all of the property names currently defined in the PropertySet. If the PropertySet contains more than how_many property names, then the remaining property names are put into the PropertyNamesIterator.
void get_all_property_names(
in unsigned long how_many,
out PropertyNames property_names,
out PropertyNamesIterator rest
);
Returns the value of a property in the PropertySet.
any get_property_value(
in PropertyName property_name
)
raises(
PropertyNotFound,
InvalidPropertyName
);
Returns the values of the properties listed in property_names. When the boolean flag is true, the Properties parameter contains valid values for all requested property names. If false, then all properties with a value of type tk_void may have failed due to PropertyNotFound or InvalidPropertyName. A separate invocation of get_property for each such property name is necessary to determine the specific exception or to verify that tk_void is the correct any TypeCode for that property name. This approach was taken to avoid a complex, hard to program structure to carry mixed results.
boolean get_properties(
in PropertyNames property_names,
out Properties nproperties
);
Returns all of the properties defined in the PropertySet. If more than how_many properties are found, then the remaining properties are returned in
void get_all_properties(
in unsigned long how_many,
out Properties nproperties,
out PropertiesIterator rest
);
Deletes the specified property if it exists from a PropertySet.
void delete_property(
in PropertyName property_name
)
raises(
InvalidPropertyName,
FixedProperty
);
Deletes the properties defined in the property_names parameter. This is a batch operation that returns the MultipleExceptions exception if any delete failed.
void delete_properties(
in PropertyNames property_names
)
raises(
MultipleExceptions
);
Variation of delete_properties. Applies to all properties. Since some properties may be defined as fixed property types, it may be that not all properties are deleted. The boolean flag is set to false to indicate that not all properties were deleted. A client could invoke get_number_of_properties to determine how many properties remain. Then invoke get_all_property_names to extract the property names remaining. A separate invocation of delete_property for each such property name is necessary to determine the specific exception. Note – If the property is in a PropertySetDef, then the set_mode operation could be invoked to attempt to change the property mode to something other than fixed before using delete_property. This approach was taken to avoid the use of an iterator to return an indeterminate number of exceptions.
boolean delete_all_properties();
The is_property_defined operation returns true if the property is defined in the PropertySet, and returns false otherwise.
boolean is_property_defined(
in PropertyName property_name
)
raises(
InvalidPropertyName
);
void destroy();
};
typedef sequence<Object> Objects;
exception InvalidIterator {
};
interface PropertyNamesIterator : KosAppService::Version {
void reset();
boolean next_one(
out PropertyName property_name
)
raises(
InvalidIterator
);
boolean next_n(
in unsigned long how_many,
out PropertyNames property_names
)
raises(
InvalidIterator
);
void destroy();
};
interface PropertiesIterator : KosAppService::Version {
void reset();
boolean next_one(
out Property aproperty
)
raises(
InvalidIterator
);
boolean next_n(
in unsigned long how_many,
out Properties nproperties
)
raises(
InvalidIterator
);
void destroy();
};
typedef sequence<PropertySet> PropertySets;
interface PropertySetFactory : KosAppService::Version {
PropertySet create_propertyset(
in Object owner,
in string identifier
);
PropertySet create_propertyset__spec();
PropertySet create_constrained_propertyset(
in PropertyTypes allowed_property_types,
in Properties allowed_properties
)
raises(
ConstraintNotSupported
);
PropertySet create_initial_propertyset(
in Properties initial_properties
)
raises(
MultipleExceptions
);
Objects find_objects(
in string identifier,
in PropertyName property_name,
in any property_value
);
PropertySets find_propertyset(
in string identifier,
in PropertyName property_name,
in any property_value
);
};
const string PropertySetFactoryName = "KosPropertySetFactory";
};