com.silverpeas.export
Class ImportDescriptor

java.lang.Object
  extended by com.silverpeas.export.ImportExportDescriptor
      extended by com.silverpeas.export.ImportDescriptor

public class ImportDescriptor
extends ImportExportDescriptor

It represents a descriptor about the import of resources from a reader or an input stream. As such it defines the reader, the input stream and the format from which the resources have to be imported. With the descriptor parameters, additional information about the import process can be passed to the importer.


Field Summary
 
Fields inherited from class com.silverpeas.export.ImportExportDescriptor
NO_FORMAT
 
Constructor Summary
ImportDescriptor()
           
 
Method Summary
 InputStream getInputStream()
          Gets the input stream with which the resources have to be imported.
 Reader getReader()
          Gets the reader with which the resources have to be imported.
static ImportDescriptor withInputStream(InputStream inputStream)
          Creates and initializes a new descriptor on an import process with the specified input stream and import format.
static ImportDescriptor withReader(Reader reader)
          Creates and initializes a new descriptor on an import process with the specified reader and import format.
 
Methods inherited from class com.silverpeas.export.ImportExportDescriptor
getFormat, getParameter, getParameters, inFormat, isParameterSet, setParameter, withoutParameter, withParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportDescriptor

public ImportDescriptor()
Method Detail

withReader

public static ImportDescriptor withReader(Reader reader)
Creates and initializes a new descriptor on an import process with the specified reader and import format. The input stream is initialized with the specified reader.

Parameters:
reader - the reader to use for importing the serializable resources.
Returns:
an import descriptor.

withInputStream

public static ImportDescriptor withInputStream(InputStream inputStream)
Creates and initializes a new descriptor on an import process with the specified input stream and import format. The reader is initialized with the specified input stream.

Parameters:
inputStream - the input stream to use for importing the serializable resources.
Returns:
an import descriptor.

getReader

public Reader getReader()
Gets the reader with which the resources have to be imported.

Returns:
the reader.

getInputStream

public InputStream getInputStream()
Gets the input stream with which the resources have to be imported.

Returns:
the input stream.


Copyright © 2016 Silverpeas. All Rights Reserved.