SEDRIS Reference Manual
APPENDIX A - LEVEL 0 READ and WRITE API
Functions
SE AddComponentRelationship
extern SE_Status_Code
SE_AddComponentRelationship
(
SE_Object aggregate_object, (notes)
SE_Object component_object, (notes)
SE_Object link_object (notes)
);

Definition

Adds a composition relationship from aggregate_object to component_object, provided that the following criteria are met.

  1. Either aggregate_object or component_object shall be a resolved object, or both shall be resolved objects. If both aggregate_object and component_object are resolved, then link_object (if provided) shall be a resolved object; otherwise, link_object may be unresolved.


  2. aggregate_object shall reside in a transmittal that has been explicitly opened with either SE_AC_MODE_CREATE or SE_AC_MODE_UPDATE.


  3. component_object, if not in the same transmittal as aggregate_object, shall be a published object.


  4. link_object, if not in the same transmittal as aggregate_object, shall be a published object.
NOTE: Relationships between objects in different transmittals are not implicitly bi-directional, so if the component object is unresolved, then the relationship will be uni-directional from the aggregate to the component.


Returns

SE_STAT_CODE_SUCCESS and the requested composition relationship is added, if valid parameters were passed in and all operations succeeded.
SE_STAT_CODE_INVALID_OR_NULL_OBJECT and no changes are made, if
  1. aggregate_object is not a valid, saved object belonging to a valid DRM class;
  2. component_object is not a valid, saved object belonging to a valid DRM class;
  3. link_object is provided but is not a valid, saved object belonging to a valid DRM class.
SE_STAT_CODE_UNPUBLISHED_OBJECT and no changes are made, if component_object is in another transmittal than aggregate_object, but is not published by that transmittal or vice-versa.
SE_STAT_CODE_UNRESOLVED_START_OBJECT and no changes are made, if
  1. aggregate_object and component_object are unresolved, or
  2. link_object is an unresolved object, and the aggregate_object and component_object are both resolved.
SE_STAT_CODE_INVALID_ACCESS_MODE and no changes are made, if
  1. aggregate_object (or link_object if specified) is in a transmittal that is not open for creation or modification.
  2. component_object is in a transmittal that is not open for creation or modification.
SE_STAT_CODE_FAILURE and no changes are made, if the API implementation specified does not provide this function in its shared library, and dynamic binding is specified at compile time.


Parameters Notes


aggregate_object

 object to which a component is being added

component_object

 component object being added

link_object

 the link object that will be
    traversed to reach the component object, if applicable;
    must be resolved, if provided.


Prev: SE_AddAssociateRelationship. Next: SE_AddSymbolicAssociate. Up:Index.

Last updated: May 15, 2003 Copyright © 2003 SEDRIS™