com.silverpeas.export
Interface Importer<T extends Serializable>

Type Parameters:
T - The type of the serializable resources to import.

public interface Importer<T extends Serializable>

This interface defines the features an immporter of serializable resources in Silverpeas have to satisfy. All importer in Silverpeas should implement this interface. An importer in Silverpeas is defined for a specific type of serializable resources and it has the responsability to know how to import them from a specific or a specified format.


Method Summary
 T importFrom(ImportDescriptor descriptor)
          Imports a serialized resource from either the reader or the input stream and according to the import parameters carried by the specified descriptor.
 

Method Detail

importFrom

T importFrom(ImportDescriptor descriptor)
                                  throws ImportException
Imports a serialized resource from either the reader or the input stream and according to the import parameters carried by the specified descriptor. The resource is deserialized in an instance of T.

Parameters:
descriptor - the import descriptor in which information about the import process is indicated.
Returns:
an instance of T corresponfding to the imported resource.
Throws:
ImportException - when an unexpected error occurs while importing the resource.


Copyright © 2016 Silverpeas. All Rights Reserved.