public static <T extends UIComponent, E extends Exporter<T>> void register(Class<T> targetClass, Class<E> exporter, String type) {
        PrimeApplicationContext primeAppContext = PrimeApplicationContext.getCurrentInstance(FacesContext.getCurrentInstance());
        Map<String, Class<? extends Exporter<?>>> supportedExporters = primeAppContext.getExporters().computeIfAbsent(targetClass, o -> new HashMap<>());

        String newType = type.toLowerCase();
        Class<? extends Exporter<?>> old = supportedExporters.put(newType, exporter);
        if (old != null) {
            LOGGER.log(Level.INFO, "Exporter {0} of type {1} has been replaced by {2}", new Object[]{old.getName(), newType, exporter.getName()});
        }
        else {
            LOGGER.log(Level.INFO, "New exporter {0} of type {1} has been registered", new Object[]{exporter.getName(), newType});
        }
    }
Register a new exporter. In case an exporter is already provided for the corresponding component
and file type: this new exporter will replace the old one
@param targetClass component type on which exporter should be available
@param exporter custom exporter implementing {@link Exporter}
@param type file type
primefaces/src/main/java/org/primefaces/component/export/DataExporters.java