<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>2000</year>
      <year>2016</year>
      <holder>Ericsson AB, All Rights Reserved</holder>
    </copyright>
    <legalnotice>
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
 
      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

  The Initial Developer of the Original Code is Ericsson AB.
    </legalnotice>

    <title>CosPropertyService_PropertySet</title>
    <prepared></prepared>
    <responsible></responsible>
    <docno></docno>
    <approved></approved>
    <checked></checked>
    <date>2000-07-25</date>
    <rev>1.0</rev>
  </header>
  <module>CosPropertyService_PropertySet</module>
  <modulesummary>This module implements the OMG CosPropertyService::PropertySet interface.</modulesummary>
  <description>
    <p>To get access to the record definitions for the structures use:      <br></br>
<c>-include_lib("cosProperty/include/CosPropertyService.hrl").</c></p>
  </description>
  <funcs>
    <func>
      <name>define_property(PropertySet, Name, Value) -> Reply</name>
      <fsummary>Add a new property to the target object</fsummary>
      <type>
        <v>PropertySet = #objref</v>
        <v>Name = non-empty string()</v>
        <v>Value = #any</v>
        <v>Reply = ok | {'EXCEPTION', #CosPropertyService_InvalidPropertyName{}} | {'EXCEPTION', #CosPropertyService_ConflictingProperty{}} | {'EXCEPTION', #CosPropertyService_UnsupportedTypeCode{}} | {'EXCEPTION', #CosPropertyService_UnsupportedProperty{}} | {'EXCEPTION', #CosPropertyService_ReadOnlyProperty{}}</v>
      </type>
      <desc>
        <p>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.</p>
      </desc>
    </func>
    <func>
      <name>define_properties(PropertySet, Properties) -> Reply</name>
      <fsummary>Add new properties to the target object</fsummary>
      <type>
        <v>PropertySet = #objref</v>
        <v>Properties = [#'CosPropertyService_Property'{property_name = Name, property_value = Value}]</v>
        <v>Name = string()</v>
        <v>Value = #any</v>
        <v>Reply = ok | {'EXCEPTION', #CosPropertyService_MultipleExceptions{exceptions = Excs}}</v>
        <v>Excs = [#'CosPropertyService_PropertyException{reason = Reason, failing_property_name = Name}]</v>
        <v>Reason = invalid_property_name | conflicting_property | property_not_found | unsupported_type_code | unsupported_property | unsupported_mode | fixed_property | read_only_property</v>
      </type>
      <desc>
        <p>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.</p>
      </desc>
    </func>
    <func>
      <name>get_number_of_properties(PropertySet) -> ulong()</name>
      <fsummary>Get the number of properties associated with the target object</fsummary>
      <type>
        <v>PropertySet = #objref</v>
      </type>
      <desc>
        <p>This operation returns the number of properties associated with the target
          object.</p>
      </desc>
    </func>
    <func>
      <name>get_all_property_names(PropertySet, Max) -> Reply</name>
      <fsummary>Get <c>Max</c>property names. If the target object have additional associated properties they will be put in the returned Iterator</fsummary>
      <type>
        <v>PropertySet = NamesIterator = #objref</v>
        <v>Max = ulong()</v>
        <v>Reply = {ok, Names, NamesIterator}</v>
        <v>Names = [string()]</v>
      </type>
      <desc>
        <p>This operation returns up to <c>Max</c> property names. If the target
          object have additional associated properties they will be put in the
          returned Iterator, otherwise the Iterator will be a <c>NIL</c> object.</p>
      </desc>
    </func>
    <func>
      <name>get_property_value(PropertySet, Name) -> Reply</name>
      <fsummary>Return the property value associated with given name</fsummary>
      <type>
        <v>PropertySet = #objref</v>
        <v>Name = string()</v>
        <v>Reply = #any | {'EXCEPTION', #CosPropertyService_PropertyNotFound{}} | {'EXCEPTION', #CosPropertyService_InvalidPropertyName{}}</v>
      </type>
      <desc>
        <p>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.</p>
      </desc>
    </func>
    <func>
      <name>get_properties(PropertySet, Names) -> Reply</name>
      <fsummary>Return all properties associated with given names</fsummary>
      <type>
        <v>PropertySet = #objref</v>
        <v>Names = [string()]</v>
        <v>Reply = {boolean(), Properties}</v>
        <v>Properties = [#'CosPropertyService_Property'{property_name = Name, property_value = Value}]</v>
      </type>
      <desc>
        <p>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 <c>tk_void</c> was not found.</p>
      </desc>
    </func>
    <func>
      <name>get_all_properties(PropertySet, Max) -> Reply</name>
      <fsummary>Return a list <c>Max</c>properties or less. If more  properties are associated with the target object they will be put in the<c>PropertiesIterator</c>.</fsummary>
      <type>
        <v>PropertySet = PropertiesIterator = #objref</v>
        <v>Reply = {ok, Properties, PropertiesIterator}</v>
        <v>Properties = [#'CosPropertyService_Property'{property_name = Name, property_value = Value}]</v>
      </type>
      <desc>
        <p>This operation return a list <c>Max</c> properties or less. If more 
          properties are associated with the target object they will be put in the
          <c>PropertiesIterator</c>. If the object had less than <c>Max</c> 
          associated properties the Iterator will be a <c>NIL</c> object.</p>
      </desc>
    </func>
    <func>
      <name>delete_property(PropertySet, Name) -> Reply</name>
      <fsummary>Delete the property with given Name</fsummary>
      <type>
        <v>PropertySet = #objref</v>
        <v>Name = string()</v>
        <v>Reply = ok | {'EXCEPTION', #CosPropertyService_FixedProperty{}} | {'EXCEPTION', #CosPropertyService_PropertyNotFound{}} | {'EXCEPTION', #CosPropertyService_InvalidPropertyName{}}</v>
      </type>
      <desc>
        <p>This operation tries to delete the property with given Name. An exception
          which indicates why it failed is raised if so needed.</p>
      </desc>
    </func>
    <func>
      <name>delete_properties(PropertySet, Names) -> Reply</name>
      <fsummary>Delete all properties with given Names</fsummary>
      <type>
        <v>PropertySet = #objref</v>
        <v>Names = [string()]</v>
        <v>Reply = ok | {'EXCEPTION', #CosPropertyService_MultipleExceptions{exceptions = Excs}}</v>
        <v>Excs = [#'CosPropertyService_PropertyException{reason = Reason, failing_property_name = Name}]</v>
        <v>Reason = invalid_property_name | conflicting_property | property_not_found | unsupported_type_code | unsupported_property | unsupported_mode | fixed_property | read_only_property</v>
      </type>
      <desc>
        <p>This operation tries to delete all given Properties. If one or more removal
          fails an exception is raised which describe why.</p>
      </desc>
    </func>
    <func>
      <name>delete_all_properties(PropertySet) -> boolean()</name>
      <fsummary>Delete all properties</fsummary>
      <type>
        <v>PropertySet = #objref</v>
      </type>
      <desc>
        <p>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.</p>
      </desc>
    </func>
    <func>
      <name>is_property_defined(PropertySet, Name) -> Reply</name>
      <fsummary>Return true if the target have an associated property with given name</fsummary>
      <type>
        <v>PropertySet = #objref</v>
        <v>Name = non-empty string()</v>
        <v>Reply = boolean() | {'EXCEPTION', #CosPropertyService_InvalidPropertyName{}}</v>
      </type>
      <desc>
        <p>This operation returns true if the target have an associated property with
          given name.</p>
      </desc>
    </func>
  </funcs>
  
</erlref>

