org.omg.CosPropertyService
Class PropertySetPOATie

java.lang.Object
  extended by org.omg.PortableServer.Servant
      extended by org.omg.CosPropertyService.PropertySetPOA
          extended by org.omg.CosPropertyService.PropertySetPOATie
All Implemented Interfaces:
org.omg.CORBA.portable.InvokeHandler, PropertySetOperations

public class PropertySetPOATie
extends PropertySetPOA

The PropertySet interface provides operations to define and modify properties, list and get properties, and delete properties.

The PropertySet interface also provides "batch" operations, such as define_properties, to deal with sets of properties as a whole. The execution of the "batch" operations is considered best effort (i.e., not an atomic set) in that not all suboperations need succeed for any suboperation to succeed.

For define_properties and delete_properties, if any suboperation fails, a MultipleExceptions exception is returned to identify which property name had which exception.

For example, a client may invoke define_properties using three property structures. The first property could be accepted (added or modified), the second could fail due to an InvalidPropertyName, and the third could fail due to a ConflictingProperty. In this case a property is either added or modified in the PropertySet, and a MultipleExceptions is raised with two items in the PropertyExceptions sequence.

The get_properties and delete_all_properties "batch" operations utilize a boolean flag to identify that mixed results occurred and additional processing may be required to fully analyze the exceptions.

Making "batch" operations behave in an atomic manner is considered an implementation issue that could be accomplished via specialization of this property service.


Constructor Summary
PropertySetPOATie(PropertySetOperations tieObject)
          Constructor
PropertySetPOATie(PropertySetOperations tieObject, org.omg.PortableServer.POA poa)
          Constructor
 
Method Summary
 org.omg.PortableServer.POA _default_POA()
          _default_POA method
 PropertySetOperations _delegate()
          Get the delegate
 void _delegate(PropertySetOperations delegate_)
          Set the delegate
 void define_properties(Property[] nproperties)
          Operation define_properties
 void define_property(java.lang.String property_name, org.omg.CORBA.Any property_value)
          Operation define_property
 boolean delete_all_properties()
          Operation delete_all_properties
 void delete_properties(java.lang.String[] property_names)
          Operation delete_properties
 void delete_property(java.lang.String property_name)
          Operation delete_property
 void get_all_properties(int how_many, PropertiesHolder nproperties, PropertiesIteratorHolder rest)
          Operation get_all_properties
 void get_all_property_names(int how_many, PropertyNamesHolder property_names, PropertyNamesIteratorHolder rest)
          Operation get_all_property_names
 int get_number_of_properties()
          Operation get_number_of_properties
 boolean get_properties(java.lang.String[] property_names, PropertiesHolder nproperties)
          Operation get_properties
 org.omg.CORBA.Any get_property_value(java.lang.String property_name)
          Operation get_property_value
 boolean is_property_defined(java.lang.String property_name)
          Operation is_property_defined
 
Methods inherited from class org.omg.CosPropertyService.PropertySetPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertySetPOATie

public PropertySetPOATie(PropertySetOperations tieObject)
Constructor


PropertySetPOATie

public PropertySetPOATie(PropertySetOperations tieObject,
                         org.omg.PortableServer.POA poa)
Constructor

Method Detail

_delegate

public PropertySetOperations _delegate()
Get the delegate


_delegate

public void _delegate(PropertySetOperations delegate_)
Set the delegate


_default_POA

public org.omg.PortableServer.POA _default_POA()
_default_POA method

Overrides:
_default_POA in class org.omg.PortableServer.Servant

define_property

public void define_property(java.lang.String property_name,
                            org.omg.CORBA.Any property_value)
                     throws InvalidPropertyName,
                            ConflictingProperty,
                            UnsupportedTypeCode,
                            UnsupportedProperty,
                            ReadOnlyProperty
Operation define_property

Parameters:
property_name - the property name.
property_value - the property value.
Throws:
InvalidPropertyName - Indicates that the property name is invalid (A property name of length 0 is invalid; implementations may place other restrictions oneway property names.)
ConflictingProperty - Indicates that the property indicated created a conflict in the type or value provided.
UnsupportedTypeCode - Indicates that the any TypeCode of the property_value field is not supported in this PropertySet.
UnsupportedProperty - Indicates that the supplied property is not supported in this PropertySet, either due to PropertyName restrictions or specific name-value pair restrictions.
ReadOnlyProperty - Indicates that the property does not support client modification of the property_value field.

define_properties

public void define_properties(Property[] nproperties)
                       throws MultipleExceptions
Operation define_properties

Parameters:
nproperties - the sequence of properties to define
Throws:
MultipleExceptions - The PropertyExceptions sequence may contain any of the exceptions that may be raised by the define_property operation, multiple times and in any order.

get_number_of_properties

public int get_number_of_properties()
Operation get_number_of_properties

Returns:
the current number of properties associated with this PropertySet.

get_all_property_names

public void get_all_property_names(int how_many,
                                   PropertyNamesHolder property_names,
                                   PropertyNamesIteratorHolder rest)
Operation get_all_property_names

Parameters:
how_many - the number of property names to retrieve.
property_names - the sequence of property names retrieved is returned in the output parameter.
rest - the iterator to return the remaining property names.

get_property_value

public org.omg.CORBA.Any get_property_value(java.lang.String property_name)
                                     throws PropertyNotFound,
                                            InvalidPropertyName
Operation get_property_value

Parameters:
property_name - the property name.
Returns:
the property value.
Throws:
PropertyNotFound - Indicates that the specified property was not defined for this PropertySet.
InvalidPropertyName - Indicates the property name is invalid. (A property name of length 0 is invalid; implementations may place other restrictions oneway property names.)

get_properties

public boolean get_properties(java.lang.String[] property_names,
                              PropertiesHolder nproperties)
Operation get_properties

Parameters:
property_names - the sequence of property names.
nproperties - the properties are returned in the output parameter.
Returns:
true if the Properties parameter contains valid values for all requested property names. If false, properties with a value of type tk_void may have failed due to PropertyNotFound or InvalidPropertyName.

get_all_properties

public void get_all_properties(int how_many,
                               PropertiesHolder nproperties,
                               PropertiesIteratorHolder rest)
Operation get_all_properties

Parameters:
how_many - the number of properties to retrieve.
nproperties - the sequence of properties retrieved is returned in the output parameter.
rest - the iterator to return the remaining properties.

delete_property

public void delete_property(java.lang.String property_name)
                     throws PropertyNotFound,
                            InvalidPropertyName,
                            FixedProperty
Operation delete_property

Parameters:
property_name - the property name.
Throws:
PropertyNotFound - Indicates that the specified property was not defined for this PropertySet.
InvalidPropertyName - Indicates the property name is invalid. (A property name of length 0 is invalid; implementations may place other restrictions oneway property names.)
FixedProperty - Indicates that the PropertySet does not support the deletion of the specified property.

delete_properties

public void delete_properties(java.lang.String[] property_names)
                       throws MultipleExceptions
Operation delete_properties

Parameters:
property_names - the sequence of property names.
Throws:
MultipleExceptions - The PropertyExceptions sequence may contain any of the exceptions that may be raised by the delete_property operation, multiple times and in any order.

delete_all_properties

public boolean delete_all_properties()
Operation delete_all_properties

Returns:
false if not all properties were deleted.

is_property_defined

public boolean is_property_defined(java.lang.String property_name)
                            throws InvalidPropertyName
Operation is_property_defined

Parameters:
property_name - the property name.
Throws:
InvalidPropertyName - Indicates the property name is invalid. (A property name of length 0 is invalid; implementations may place other restrictions oneway property names.)