Class DataFilter

    • Constructor Detail

      • DataFilter

        public DataFilter()
    • Method Detail

      • initialize

        public void initialize​(Configurator configG,
                               @Nullable
                               String filterName,
                               Configurator filterConfig)
        Initialize reads the configuration items for this filter
        Specified by:
        initialize in interface IDropOffFilter
        Overrides:
        initialize in class AbstractFilter
        Parameters:
        configG - the configurator to read from
        filterName - the configured name of this filter or null for the default
        filterConfig - the configuration for the specific filter
      • filter

        public int filter​(IBaseDataObject d,
                          Map<String,​Object> params)
        Output one payload item
        Parameters:
        d - the payload
        params - the map of configuration items
        Returns:
        status value
      • isPrimaryViewOutputtable

        protected boolean isPrimaryViewOutputtable​(String lang,
                                                   String fileType,
                                                   String currentForm)
      • isViewOutputtable

        protected boolean isViewOutputtable​(String lang,
                                            String fileType,
                                            String currentForm,
                                            String viewName)
      • writeDataFile

        protected boolean writeDataFile​(IBaseDataObject d,
                                        IBaseDataObject tld,
                                        String baseFileName,
                                        byte[] data,
                                        @Nullable
                                        String type)
        Write a file, either the primary view or an alt view
        Parameters:
        d - the DataObject to output
        tld - the TLD Object to extract metadata (if applicable)
        baseFileName - the base file name
        data - the bytes to write
        type - of data
      • main

        public static void main​(String[] args)
        Main to test output types