Interface UADExporter<T>

All Superinterfaces:
UADComponent<T>
All Known Implementing Classes:
DynamicQueryUADExporter

@ProviderType public interface UADExporter<T> extends UADComponent<T>
Handles converting the user-related type T entities into a format that can be written to a file and downloaded.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    count(long userId)
    Returns the number of type T entities associated with the user.
    byte[]
    export(T t)
    Returns a byte array representing the entity, ready to be written to a file.
    exportAll(long userId, com.liferay.portal.kernel.zip.ZipWriterFactory zipWriterFactory)
    Returns a file object containing the data from all type T entities related to the user.
    default long
    getExportDataCount(long userId)
    Returns the number of export data items of type T entities associated with the user.

    Methods inherited from interface com.liferay.user.associated.data.component.UADComponent

    getTypeClass, getTypeKey
  • Method Details

    • count

      long count(long userId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the number of type T entities associated with the user.
      Parameters:
      userId - the primary key of the user whose data to count
      Returns:
      the number of entities associated with the user
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • export

      byte[] export(T t) throws com.liferay.portal.kernel.exception.PortalException
      Returns a byte array representing the entity, ready to be written to a file.
      Parameters:
      t - the type T entity to convert into a byte array
      Returns:
      a byte array representing the given entity
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • exportAll

      File exportAll(long userId, com.liferay.portal.kernel.zip.ZipWriterFactory zipWriterFactory) throws com.liferay.portal.kernel.exception.PortalException
      Returns a file object containing the data from all type T entities related to the user.
      Parameters:
      userId - the primary key of the user whose data to export
      Returns:
      a file containing the exported data
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getExportDataCount

      default long getExportDataCount(long userId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the number of export data items of type T entities associated with the user.
      Parameters:
      userId - the primary key of the user whose data to count
      Returns:
      the number of export data items
      Throws:
      com.liferay.portal.kernel.exception.PortalException