Class ImportJarResourcePlugin

    • Field Detail

      • _properties

        private final java.util.Map<java.lang.String,​java.lang.String> _properties
    • Constructor Detail

      • ImportJarResourcePlugin

        public ImportJarResourcePlugin()
    • Method Detail

      • extract

        public java.lang.Object extract​(Jar source,
                                        java.util.Locale locale)
                                 throws java.lang.Exception
        Description copied from interface: ReportEntryPlugin
        Extracts a piece of information from the source in arguments.

        If the source contains localized data, it will be extracted for the specified locale or a less specific if not found.

        Specified by:
        extract in interface ReportEntryPlugin<Jar>
        Parameters:
        source - the source to inspect, must not be null
        locale - the String representation of a Locale, must not be null
        Returns:
        a DTO representation or null if no data is available
        Throws:
        java.lang.Exception
      • resolveFile

        private java.io.InputStream resolveFile​(Jar source)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • convertFile

        private java.lang.Object convertFile​(java.io.InputStream inputStream,
                                             java.lang.String extension)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getAvailableConverterExtensions

        private java.lang.String[] getAvailableConverterExtensions()
      • getPath

        private java.lang.String getPath()
      • getType

        private java.lang.String getType()
      • setProperties

        public void setProperties​(java.util.Map<java.lang.String,​java.lang.String> map)
                           throws java.lang.Exception
        Description copied from interface: Plugin
        Give the plugin the remaining properties. When a plugin is declared, the clause can contain extra properties. All the properties and directives are given to the plugin to use.
        Specified by:
        setProperties in interface Plugin
        Parameters:
        map - attributes and directives for this plugin's clause
        Throws:
        java.lang.Exception
      • setReporter

        public void setReporter​(Reporter processor)
        Description copied from interface: Plugin
        Set the current reporter. This is called at init time. This plugin should report all errors and warnings to this reporter.
        Specified by:
        setReporter in interface Plugin
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.String> getProperties()
        Specified by:
        getProperties in interface ReportEntryPlugin<Jar>
        Returns:
        a map of properties, never null