Package org.silverpeas.core.importexport
Class ImportDescriptor
- java.lang.Object
-
- org.silverpeas.core.importexport.ImportExportDescriptor
-
- org.silverpeas.core.importexport.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 org.silverpeas.core.importexport.ImportExportDescriptor
NO_MIMETYPE
-
-
Constructor Summary
Constructors Constructor Description ImportDescriptor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 org.silverpeas.core.importexport.ImportExportDescriptor
getMimeType, getParameter, getParameters, inMimeType, isParameterSet, setParameter, withoutParameter, withParameter
-
-
-
-
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.
-
-