Class URLFilter

    • Constructor Detail

      • URLFilter

        public URLFilter()
    • Method Detail

      • getDataSource

        public DataSource getDataSource()
        Returns the data source for the filter.
        Specified by:
        getDataSource in interface DataTarget
        The data source.
      • setDataSource

        public void setDataSource​(DataSource ds)
        Sets the data source.
        Specified by:
        setDataSource in interface DataTarget
        ds - The data source.
      • getValue

        public Object getValue​(ExpressionRuntime runtime,
                               ReportElement element)
        Tries to form a url from the object returned from the datasource. This function will return null if the datasource is null or returned null when getValue was called.

        Null is also returned if the datasources value is not an url, a String or a file. If the creation of the url failed with an MalformedURLException or the datasource returned a file which is not readable, also null is returned.

        Specified by:
        getValue in interface DataSource
        runtime - the expression runtime that is used to evaluate formulas and expressions when computing the value of this filter.
        element -
        created url or null if something went wrong on url creation.
      • getBaseURL

        public URL getBaseURL()
        Gets the base url used to make relative URLs absolute.
        the base url used to complete relative urls.
      • setBaseURL

        public void setBaseURL​(URL baseURL)
        Defines the base url used to complete relative urls.
        baseURL - the base URL.