Class ReportKeyFactory

  • All Implemented Interfaces:
    java.io.Serializable

    public class ReportKeyFactory
    extends java.lang.Object
    implements java.io.Serializable
    This class represents the description / identification of a report. It contains the properties that describes how the engine should render this report (i.e. to HTML or PDF), but also the name and location of the report file.
    For more information about the report URL parameters, please refer to the i-net Clear Reports documentation. The instance of the ReportKeyFactory is intended to be serialized and used by a remote service, but it can be useful for a standalone application, too.
    Since:
    3.0
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ReportKeyFactory​(java.lang.String url)
      Creates a new instance of com.inet.report.ReportKeyFactory.
      ReportKeyFactory​(java.util.Properties props)
      Creates a new instance of com.inet.report.ReportKeyFactory.
      Please see ReportKeyFactory(String) for an example.
      For more information about the report URL properties please refer to the i-net Clear Reports documentation.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void decodeProps​(java.util.Properties props)
      FOR INTERNAL USE ONLY Decode the properties that are send from a client request.
      java.lang.String getExportFormat()
      Returns the export format of the report that was set via the properties object in the constructor.
      java.lang.String getOutputFormat()
      Returns the output format of the report that was set via the properties object in the constructor.
      java.util.Properties getProperties()
      Returns the properties object that describes / identifies the report, see the i-net Clear Reports documentation.
      static java.lang.String getRelevantParams​(java.util.Properties props)
      Returns a String representation of all relevant parameters from the given properties object.
      static java.lang.String getRelevantParamsNoSort​(java.util.Properties props)
      Returns a String representation of all relevant parameters from the given properties object.
      java.lang.String getReportId()
      Generates an ID which is unique to identify a report.
      java.lang.String getReportName()
      A synonym for getReportId().
      java.lang.String toString()
      Generates a String representation of this object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ReportKeyFactory

        public ReportKeyFactory​(java.lang.String url)
        Creates a new instance of com.inet.report.ReportKeyFactory. The keys and values must be java.net.URLEncoded, please see the i-net Clear Reports documentation
        The instance of the ReportKeyFactory is intended to be serialized and used by a remote service, but it can be useful for a standalone application, too.
        Example:
        Properties properties = (new ReportKeyFactory("report=file:c:/test.rpt&user=USER&password=PWD")).getProperties();
        Parameters:
        url - The properties that describe / identify a report in the following format: key1=val1&key2=val2.
        Since:
        3.0
        See Also:
        ReportKeyFactory(Properties)
      • ReportKeyFactory

        public ReportKeyFactory​(java.util.Properties props)
        Creates a new instance of com.inet.report.ReportKeyFactory.
        Please see ReportKeyFactory(String) for an example.
        For more information about the report URL properties please refer to the i-net Clear Reports documentation.
        Parameters:
        props - The properties that describe / identify a report.
        Since:
        15.0
        See Also:
        ReportKeyFactory(String)
    • Method Detail

      • getRelevantParams

        public static java.lang.String getRelevantParams​(java.util.Properties props)
        Returns a String representation of all relevant parameters from the given properties object. This can be used for the Key generation but not for building a URL.
        Parameters:
        props - The properties that describe / identify the report
        Returns:
        A sorted string representation of all relevant parameters
        Since:
        3.0
        See Also:
        getRelevantParamsNoSort(Properties)
      • getRelevantParamsNoSort

        public static java.lang.String getRelevantParamsNoSort​(java.util.Properties props)
        Returns a String representation of all relevant parameters from the given properties object. This can be used for building a URL. Because the sorting is undefined this can't be used for a key.
        Parameters:
        props - The properties that describe / identify the report
        Returns:
        An unsorted string representation of all relevant parameters
        Since:
        3.0
        See Also:
        getRelevantParams(Properties)
      • decodeProps

        public static void decodeProps​(java.util.Properties props)
        FOR INTERNAL USE ONLY Decode the properties that are send from a client request.
      • getReportId

        public java.lang.String getReportId()
        Generates an ID which is unique to identify a report. From this ID also the primary key is generated.
        Returns:
        A unique ID to identify a report.
        Since:
        3.0
      • getReportName

        public java.lang.String getReportName()
        A synonym for getReportId(). Generates an ID which is unique to identify a report. From this ID also the primary key is generated.
        Returns:
        A unique ID to identify a report.
        Since:
        3.0
        See Also:
        getReportId()
      • getProperties

        public java.util.Properties getProperties()
        Returns the properties object that describes / identifies the report, see the i-net Clear Reports documentation.
        Returns:
        The properties object that describe / identifies the report
        Since:
        3.0
      • getOutputFormat

        public java.lang.String getOutputFormat()
        Returns the output format of the report that was set via the properties object in the constructor.
        Returns:
        The output format of the report.
        Since:
        3.0
        See Also:
        ReportKeyFactory
      • getExportFormat

        public java.lang.String getExportFormat()
        Returns the export format of the report that was set via the properties object in the constructor.
        Returns:
        The export format of the report.
        Since:
        3.0
        See Also:
        ReportKeyFactory
      • toString

        public java.lang.String toString()
        Generates a String representation of this object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A String representation of this object
        Since:
        3.0