Interface AdminExporter
public interface AdminExporter
- Author:
- Phillip Verheyden
-
Method Summary
Modifier and TypeMethodDescriptionThe list of field names that are necessary for this exporter to function properly.The file name used in the Content-Disposition header for "attachment"The friendly name of this exporter to display to the user to select fromgetName()The name of this exporter.getType()The type of this exportervoidwriteExport(jakarta.servlet.ServletOutputStream out, Map<String, String> params)
-
Method Details
-
getName
String getName()The name of this exporter. Should be unique- Returns:
-
getFriendlyName
String getFriendlyName()The friendly name of this exporter to display to the user to select from- Returns:
-
getCriteriaFields
The list of field names that are necessary for this exporter to function properly. For instance, an Order exporter might request a start date and end date for criteria. While this returns a list of Property, only a subset of the available fields on Property are used to build the form. Methods that should not return null:
- property.getName()
- property.getMetadata().getPresentationAttributes().getFriendlyName()
- property.getMetaData().getFieldType()
These methods can be null, but can contain values to further control display:
- property.getMetadata().getLength()
- property.getMetadata().getPresentationAttributes().isLargeEntry()
- property.getMetadata().getPresentationAttributes().getTooltip()
- property.getMetadata().getPresentationAttributes().getRequiredOverride()
For instance, this would be an example of creating start date and end date criteria fields:
List<Property> criteria = new ArrayList<>(); Property startDate = new Property(); startDate.setName("startDate"); startDate.getMetadata().getPresentationAttributes().setFriendlyName("Start Date"); startDate.getMetadata().setFieldType(SupportedFieldType.DATE); criteria.add(startDate); Property endDate = new Property(); endDate.setName("endDate"); endDate.getMetadata().getPresentationAttributes().setFriendlyName("End Date"); endDate.getMetadata().setFieldType(SupportedFieldType.DATE); criteria.add(endDate); return criteria;- Returns:
- null if no additional criteria is needed
-
getType
String getType()The type of this exporter- Returns:
-
getFileName
String getFileName()The file name used in the Content-Disposition header for "attachment"- Returns:
-
writeExport
void writeExport(jakarta.servlet.ServletOutputStream out, Map<String, String> params) throws IOException- Throws:
IOException
-