Class DefaultJasperReportsContext

  • All Implemented Interfaces:
    JasperReportsContext

    public class DefaultJasperReportsContext
    extends java.lang.Object
    implements JasperReportsContext
    Author:
    Teodor Danciu (teodord@users.sourceforge.net)
    • Field Detail

      • DEFAULT_PROPERTIES_FILE

        public static final java.lang.String DEFAULT_PROPERTIES_FILE
        The default properties file.
        See Also:
        Constant Field Values
      • PROPERTIES_FILE

        public static final java.lang.String PROPERTIES_FILE
        The name of the system property that specifies the properties file name.
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_LOAD_DEFAULT_PROPERTIES_FAILURE

        public static final java.lang.String EXCEPTION_MESSAGE_KEY_LOAD_DEFAULT_PROPERTIES_FAILURE
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_LOAD_PROPERTIES_FAILURE

        public static final java.lang.String EXCEPTION_MESSAGE_KEY_LOAD_PROPERTIES_FAILURE
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_LOAD_PROPERTIES_FILE_FAILURE

        public static final java.lang.String EXCEPTION_MESSAGE_KEY_LOAD_PROPERTIES_FILE_FAILURE
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_DEFAULT_PROPERTIES_FILE_NOT_FOUND

        public static final java.lang.String EXCEPTION_MESSAGE_KEY_DEFAULT_PROPERTIES_FILE_NOT_FOUND
        See Also:
        Constant Field Values
      • properties

        protected volatile java.util.concurrent.ConcurrentHashMap<java.lang.String,​java.lang.String> properties
    • Method Detail

      • initProperties

        protected void initProperties()
        Loads the properties.
      • loadSystemProperties

        protected void loadSystemProperties()
      • getDefaultProperties

        protected static java.util.Properties getDefaultProperties()
                                                            throws JRException
        Sets the default properties.
        Returns:
        the default properties
        Throws:
        JRException
      • getSystemProperty

        protected static java.lang.String getSystemProperty​(java.lang.String propertyName)
      • loadSystemProperty

        protected void loadSystemProperty​(java.lang.String sysKey,
                                          java.lang.String propKey)
      • setValue

        public void setValue​(java.lang.String key,
                             java.lang.Object value)
        Specified by:
        setValue in interface JasperReportsContext
      • getExtensions

        public <T> java.util.List<T> getExtensions​(java.lang.Class<T> extensionType)
        Returns a list of extension objects for a specific extension type.
        Specified by:
        getExtensions in interface JasperReportsContext
        Type Parameters:
        T - generic extension type
        Parameters:
        extensionType - the extension type
        Returns:
        a list of extension objects
      • getProperty

        public java.lang.String getProperty​(java.lang.String key)
        Returns the value of the property.
        Specified by:
        getProperty in interface JasperReportsContext
        Parameters:
        key - the key
        Returns:
        the property value