Erlang -- CosPropertyService_­PropertySet

User's Guide
Reference Manual
Release Notes
PDF
Top

cosProperty
Reference Manual
Version 1.1.13

Expand All
Contract All

Table of Contents

- cosProperty
  - Top of manual page
  - install/0
  - install_db/0
  - uninstall/0
  - uninstall_db/0
  - start/0
  - start_SetDefFactory/0
  - start_SetFactory/0
  - stop_SetDefFactory/1
  - stop_SetFactory/1
  - stop/0
- CosPropertyService_PropertySetFactory
  - Top of manual page
  - create_propertyset/1
  - create_constrained_propertyset/3
  - create_initial_propertyset/2
- CosPropertyService_PropertySetDefFactory
  - Top of manual page
  - create_propertysetdef/1
  - create_constrained_propertysetdef/3
  - create_initial_propertysetdef/2
- CosPropertyService_PropertySet
  - Top of manual page
  - define_property/3
  - define_properties/2
  - get_number_of_properties/1
  - get_all_property_names/2
  - get_property_value/2
  - get_properties/2
  - get_all_properties/2
  - delete_property/2
  - delete_properties/2
  - delete_all_properties/1
  - is_property_defined/2
- CosPropertyService_PropertySetDef
  - Top of manual page
  - get_allowed_property_types/1
  - get_allowed_properties/1
  - define_property_with_mode/4
  - define_properties_with_modes/2
  - get_property_mode/2
  - get_property_modes/2
  - set_property_mode/3
  - set_property_modes/2
- CosPropertyService_PropertiesIterator
  - Top of manual page
  - reset/1
  - next_one/1
  - next_n/2
  - destroy/1
- CosPropertyService_PropertyNamesIterator
  - Top of manual page
  - reset/1
  - next_one/1
  - next_n/2
  - destroy/1

# CosPropertyService_PropertySet

### MODULE

CosPropertyService_PropertySet

### MODULE SUMMARY

This module implements the OMG CosPropertyService::PropertySet interface.

### DESCRIPTION

To get access to the record definitions for the structures use:
-include_lib("cosProperty/include/CosPropertyService.hrl").

### EXPORTS

define_property(PropertySet, Name, Value) -> Reply

Types:

PropertySet = #objref
Name = non-empty string()
Value = #any
Reply = ok | {'EXCEPTION', #CosPropertyService_InvalidPropertyName{}} | {'EXCEPTION', #CosPropertyService_ConflictingProperty{}} | {'EXCEPTION', #CosPropertyService_UnsupportedTypeCode{}} | {'EXCEPTION', #CosPropertyService_UnsupportedProperty{}} | {'EXCEPTION', #CosPropertyService_ReadOnlyProperty{}}

This operation adds a new property to the given object. Depending on which initial arguments was supplied when starting the object several exceptions may be raised.

define_properties(PropertySet, Properties) -> Reply

Types:

PropertySet = #objref
Properties = [#'CosPropertyService_Property'{property_name = Name, property_value = Value}]
Name = string()
Value = #any
Reply = ok | {'EXCEPTION', #CosPropertyService_MultipleExceptions{exceptions = Excs}}
Excs = [#'CosPropertyService_PropertyException{reason = Reason, failing_property_name = Name}]
Reason = invalid_property_name | conflicting_property | property_not_found | unsupported_type_code | unsupported_property | unsupported_mode | fixed_property | read_only_property

This operation adds several new properties to the given object. Depending on which initial arguments was supplied when starting the object an exceptions may be raised listing the properties failing.

get_number_of_properties(PropertySet) -> ulong()

Types:

PropertySet = #objref

This operation returns the number of properties associated with the target object.

get_all_property_names(PropertySet, Max) -> Reply

Types:

PropertySet = NamesIterator = #objref
Max = ulong()
Reply = {ok, Names, NamesIterator}
Names = [string()]

This operation returns up to Max property names. If the target object have additional associated properties they will be put in the returned Iterator, otherwise the Iterator will be a NIL object.

get_property_value(PropertySet, Name) -> Reply

Types:

PropertySet = #objref
Name = string()
Reply = #any | {'EXCEPTION', #CosPropertyService_PropertyNotFound{}} | {'EXCEPTION', #CosPropertyService_InvalidPropertyName{}}

This operation returns the property value associated with given name. If no such property exists or the given name is an empty string an exception will be raised.

get_properties(PropertySet, Names) -> Reply

Types:

PropertySet = #objref
Names = [string()]
Reply = {boolean(), Properties}
Properties = [#'CosPropertyService_Property'{property_name = Name, property_value = Value}]

This operation returns all properties associated with given names. If the boolean flag is true all properties where retrieved correctly, otherwise, all properties with the type tk_void was not found.

get_all_properties(PropertySet, Max) -> Reply

Types:

PropertySet = PropertiesIterator = #objref
Reply = {ok, Properties, PropertiesIterator}
Properties = [#'CosPropertyService_Property'{property_name = Name, property_value = Value}]

This operation return a list Max properties or less. If more properties are associated with the target object they will be put in the PropertiesIterator. If the object had less than Max associated properties the Iterator will be a NIL object.

delete_property(PropertySet, Name) -> Reply

Types:

PropertySet = #objref
Name = string()
Reply = ok | {'EXCEPTION', #CosPropertyService_FixedProperty{}} | {'EXCEPTION', #CosPropertyService_PropertyNotFound{}} | {'EXCEPTION', #CosPropertyService_InvalidPropertyName{}}

This operation tries to delete the property with given Name. An exception which indicates why it failed is raised if so needed.

delete_properties(PropertySet, Names) -> Reply

Types:

PropertySet = #objref
Names = [string()]
Reply = ok | {'EXCEPTION', #CosPropertyService_MultipleExceptions{exceptions = Excs}}
Excs = [#'CosPropertyService_PropertyException{reason = Reason, failing_property_name = Name}]
Reason = invalid_property_name | conflicting_property | property_not_found | unsupported_type_code | unsupported_property | unsupported_mode | fixed_property | read_only_property

This operation tries to delete all given Properties. If one or more removal fails an exception is raised which describe why.

delete_all_properties(PropertySet) -> boolean()

Types:

PropertySet = #objref

This operation deletes all properties. The boolean flag, if set to false, indicates that it was not possible to remove one or more properties, e.g., may be read only.

is_property_defined(PropertySet, Name) -> Reply

Types:

PropertySet = #objref
Name = non-empty string()
Reply = boolean() | {'EXCEPTION', #CosPropertyService_InvalidPropertyName{}}

This operation returns true if the target have an associated property with given name.