Interface Importable

  • All Superinterfaces:
    EntityProvider, Exportable

    public interface Importable
    extends Exportable
    Indicates an entity provider has the capability of importing entity data that was previously exported via the Exportable capability which will be related to other entities, note that the way to associate the data is left up to the implementor based on the reference supplied
    This is one of the capability extensions for the EntityProvider interface
    Author:
    Aaron Zeckoski (aaronz@vt.edu)
    • Method Detail

      • importData

        String[] importData​(String reference,
                            InputStream data,
                            String encodingKey,
                            Map<String,​Object> params)
        Request that an import stream be turned into real data related to the entities in this provider and associated with a specific entity (this will probably not be an entity in this provider)
        Parameters:
        reference - a globally unique reference to an entity, this is the entity that the imported data should be associated with (e.g. a reference to a site object or user)
        data - a stream of data from the archiver/importer, this should match a previous export stream exactly (or at least very closely in order for the importer to be able to understand it)
        encodingKey - a string representing the encoding used and possibly other info like a version, this should be the string sent with the export
        params - (optional) incoming set of parameters which may be used to send data specific to this request, may be null
        Returns:
        the array of all entity references which were created from the import OR empty if none created
        Throws:
        IllegalArgumentException - if any arguments are invalid or missing
        IllegalStateException - if a failure occurs with the import (message should be as descriptive as possible)