com.businessobjects.sdk.biar
Interface IExporter


public interface IExporter

The IExporter interface is used for exporting info objects from their source system to some destination specific to the implementation.

Use the IExporter.export(IInfoObject) method or one of the exportAll methods to export info objects to the destination. Then call the IExporter.finish() method to complete the export. Finally, call the IExporter.close() method to release all resources associated with the IExporter object.


Method Summary
 void close()
          Closes the archive anad releases all resources that were used to create it.
 boolean export(IInfoObject infoObj)
          Exports a single info object to the archive.
 java.util.Set exportAll(IInfoObjects objs)
          Exports a collection of info objects to the archive.
 java.util.Set exportAll(java.util.Iterator itr)
          Exports a collection of info objects to the archive.
 void finish()
          Finalizes the archive.
 

Method Detail

export

boolean export(IInfoObject infoObj)
               throws BIARException
Exports a single info object to the archive. Objects are only exported once. If the object has already been exported to the archive, this method returns false.

Parameters:
infoObj - the info object to export.
Returns:
true if the export is successful or false if the object has already been exported.
Throws:
BIARException - if export fails.

exportAll

java.util.Set exportAll(IInfoObjects objs)
                        throws BIARException
Exports a collection of info objects to the archive. Objects are only exported to an archive once. If the collection contains the same object more than once, only the first occurrence is exported.

Parameters:
objs - the collection of objects to export.
Returns:
a set containing the IDs of all the objects that were exported.
Throws:
BIARException - if export fails.

exportAll

java.util.Set exportAll(java.util.Iterator itr)
                        throws BIARException
Exports a collection of info objects to the archive. Objects are only exported to an archive once. If the collection contains the same object more than once, only the first occurrence is exported.

Parameters:
itr - an iterator over the collection of info objects to export.
Returns:
a set containing the IDs of all the objects that were exported.
Throws:
BIARException - if export fails.

finish

void finish()
            throws BIARException
Finalizes the archive. This method must be called after all objects have been exported and before the BIAROutput is IExporter.close() closed. If this method is not called, the archive will be corrupted and unusable.

Throws:
BIARException

close

void close()
           throws BIARException
Closes the archive anad releases all resources that were used to create it. If this method is called and the archive has not been finalized, the archive will be corrupted and unusable.

Throws:
BIARException - if some resources were not released.
See Also:
IExporter.finish()