Interface UADExporter<T>
- All Superinterfaces:
UADComponent<T>
- All Known Implementing Classes:
DynamicQueryUADExporter
Handles converting the user-related type
T entities into a format
that can be written to a file and downloaded.-
Method Summary
Modifier and TypeMethodDescriptionlongcount(long userId) Returns the number of typeTentities associated with the user.byte[]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 typeTentities related to the user.default longgetExportDataCount(long userId) Returns the number of export data items of typeTentities 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 typeTentities 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
Returns a byte array representing the entity, ready to be written to a file.- Parameters:
t- the typeTentity 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 typeTentities 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 typeTentities 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
-