org.broadleafcommerce.admin.server.service.export
Interface AdminExporter


public interface AdminExporter

Author:
Phillip Verheyden

Method Summary
 List<Property> getCriteriaFields()
           The list of field names that are necessary for this exporter to function properly.
 String getFileName()
          The file name used in the Content-Disposition header for "attachment"
 String getFriendlyName()
          The friendly name of this exporter to display to the user to select from
 String getName()
          The name of this exporter.
 AdminExporterType getType()
          The type of this exporter
 void writeExport(javax.servlet.ServletOutputStream out, Map<String,String> params)
           
 

Method Detail

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

List<Property> 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:

These methods can be null, but can contain values to further control display:

For instance, this would be an example of creating start date and end date criteria fields:

 List<Property> criteria = new ArrayList<Property>();
  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

AdminExporterType 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(javax.servlet.ServletOutputStream out,
                 Map<String,String> params)
                 throws IOException
Throws:
IOException


Copyright © 2012. All Rights Reserved.