|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jasperreports.engine.util.JRProperties
Class that provides static methods for loading, getting and setting properties.
The following actions are performed:
Nested Class Summary | |
static class |
JRProperties.PropertySuffix
Class used by getProperties(String) . |
Field Summary | |
static java.lang.String |
COMPILER_CLASS
The name of the class to be used for report compilation. |
static java.lang.String |
COMPILER_CLASSPATH
The classpath used by the report compiler. |
static java.lang.String |
COMPILER_KEEP_JAVA_FILE
Whether to keep the java file generated when the report is compiled. |
static java.lang.String |
COMPILER_TEMP_DIR
The temporary directory used by the report compiler. |
static java.lang.String |
COMPILER_XML_VALIDATION
Whether to validate the xml report when compiling. |
protected static java.lang.String |
DEFAULT_PROPERTIES_FILE
The default properties file. |
static java.lang.String |
EXPORT_XML_VALIDATION
Validation flag used by the XML exporter. |
static java.lang.String |
PDF_FONT_DIRS_PREFIX
Prefix of properties that specify font directories for the PDF exporter. |
static java.lang.String |
PDF_FONT_FILES_PREFIX
Prefix of properties that specify font files for the PDF exporter. |
static java.lang.String |
PROPERTIES_FILE
The name of the system property that specifies the properties file name. |
protected static java.lang.String |
PROPERTY_PREFIX
The prefix used by all properties. |
protected static java.util.Properties |
props
|
protected static java.util.Properties |
savedProps
|
Constructor Summary | |
JRProperties()
|
Method Summary | |
static void |
backupProperties()
Saves a copy of the current properties. |
static boolean |
getBooleanProperty(java.lang.String key)
Returns a property as a boolean value. |
protected static java.util.Properties |
getDefaults()
Sets the default properties. |
static java.util.List |
getProperties(java.lang.String prefix)
Returns the list of all properties for a key prefix. |
static java.lang.String |
getProperty(java.lang.String key)
Returns the value of the property. |
protected static void |
initProperties()
Loads the properties. |
static java.util.Properties |
loadProperties(java.lang.String name,
java.util.Properties defaults)
Loads a properties file from the classpath. |
protected static void |
loadSystemProperties()
|
protected static void |
loadSystemProperty(java.lang.String sysKey,
java.lang.String propKey)
|
static void |
restoreProperties()
Restores previously saved properties. |
static void |
setProperty(java.lang.String key,
boolean value)
Sets the value of a property. |
static void |
setProperty(java.lang.String key,
java.lang.String value)
Sets the value of a property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String DEFAULT_PROPERTIES_FILE
protected static final java.lang.String PROPERTY_PREFIX
public static final java.lang.String PROPERTIES_FILE
public static final java.lang.String COMPILER_CLASS
No default value.
public static final java.lang.String COMPILER_XML_VALIDATION
Defaults to true
.
public static final java.lang.String COMPILER_KEEP_JAVA_FILE
Defaults to false
.
public static final java.lang.String COMPILER_TEMP_DIR
Defaults to System.getProperty("user.dir")
.
public static final java.lang.String COMPILER_CLASSPATH
Defaults to System.getProperty("java.class.path")
.
public static final java.lang.String EXPORT_XML_VALIDATION
Defaults to true
.
public static final java.lang.String PDF_FONT_FILES_PREFIX
public static final java.lang.String PDF_FONT_DIRS_PREFIX
protected static java.util.Properties props
protected static java.util.Properties savedProps
Constructor Detail |
public JRProperties()
Method Detail |
protected static void initProperties()
protected static void loadSystemProperties()
protected static java.util.Properties getDefaults()
protected static void loadSystemProperty(java.lang.String sysKey, java.lang.String propKey)
public static java.util.Properties loadProperties(java.lang.String name, java.util.Properties defaults) throws JRException
name
- the resource namedefaults
- the default properties
null
otherwise
JRException
public static java.lang.String getProperty(java.lang.String key)
key
- the key
public static boolean getBooleanProperty(java.lang.String key)
key
- the key
public static void setProperty(java.lang.String key, java.lang.String value)
key
- the keyvalue
- the valuepublic static void setProperty(java.lang.String key, boolean value)
key
- the keyvalue
- the valuepublic static void backupProperties()
restoreProperties()
public static void restoreProperties()
backupProperties()
public static java.util.List getProperties(java.lang.String prefix)
prefix
- the key prefix
PropertySuffix
objects containing the suffix of the key and the value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |