Package org.silverpeas.components.kmelia.export

# Class KmeliaPublicationExporter

java.lang.Object
org.silverpeas.components.kmelia.export.KmeliaPublicationExporter

All Implemented Interfaces:
  `org.silverpeas.core.importexport.Exporter<KmeliaPublication>`

@Bean @Singleton public class KmeliaPublicationExporter extends Object implements org.silverpeas.core.importexport.Exporter<KmeliaPublication>
An exporter of Kmelia publications into a document in a given format. This exporter waits for the following parameters in the export descriptor:

- the name of the document into which the export should be done,
- the detail of the user for which the export should be done,
- the language with which the export of the publication has to be done.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `EXPORT_FOR_USER`
  Expected export parameter giving the detail about the user that calls the export of a publication.
  `static final String`
  `EXPORT_LANGUAGE`
  Expected export parameter giving the language with which the export of a publication has to be performed.
  `static final String`
  `EXPORT_TOPIC`
  Optional export parameter giving the topic within which the export of a publication has to be performed.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `KmeliaPublicationExporter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `exports(org.silverpeas.core.importexport.ExportDescriptor descriptor, Supplier<KmeliaPublication> supplier)`
  Only the first publication is taken in charge by this exporter.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### EXPORT_FOR_USER

    public static final String EXPORT_FOR_USER
    Expected export parameter giving the detail about the user that calls the export of a publication.
    See Also:
      - Constant Field Values

  - ### EXPORT_LANGUAGE

    public static final String EXPORT_LANGUAGE
    Expected export parameter giving the language with which the export of a publication has to be performed.
    See Also:
      - Constant Field Values

  - ### EXPORT_TOPIC

    public static final String EXPORT_TOPIC
    Optional export parameter giving the topic within which the export of a publication has to be performed.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### KmeliaPublicationExporter

    public KmeliaPublicationExporter()

- ## Method Details

  - ### exports

    public void exports(org.silverpeas.core.importexport.ExportDescriptor descriptor, Supplier<KmeliaPublication> supplier) throws org.silverpeas.core.importexport.ExportException
    Only the first publication is taken in charge by this exporter.
    Specified by:
      `exports` in interface `org.silverpeas.core.importexport.Exporter<KmeliaPublication>`
    Parameters:
      `descriptor` - the descriptor providing enough information about the export to perform (document name, user for which the export is, the language in which the export has to be done, ...)
      `supplier` - a supplier of the publication to export. If several publications are passed as parameter, only the first one is taken.
    Throws:
      `org.silverpeas.core.importexport.ExportException` - if an error occurs while exporting the publication.