Java Doc for JRProperties.java in  » Report » jasperreports-2.0.1 » net » sf » jasperreports » engine » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Report » jasperreports 2.0.1 » net.sf.jasperreports.engine.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sf.jasperreports.engine.util.JRProperties

JRProperties
public class JRProperties (Code)
Class that provides static methods for loading, getting and setting properties.

The following actions are performed:

  • The default (hardcoded) properties are set.
  • If the system property "net.sf.jasperreports.properties" has been set then the specified proprties file is loaded.
  • Otherwise "jasperreports.properties" is loaded if found in the classpath.
  • For backward compatibility, system properties like "jasper.reports.compile.xml.validation" are checked and their values are used. This way of specifying properties is deprecated.

  • author:
       Lucian Chirita (lucianc@users.sourceforge.net)
    version:
       $Id: JRProperties.java 1828 2007-08-24 13:58:43Z teodord $

Inner Class :public static class PropertySuffix

Field Summary
final public static  StringCOMPILER_CLASS
     The name of the class to be used for report compilation.
final public static  StringCOMPILER_CLASSPATH
     The classpath used by the report compiler.
final public static  StringCOMPILER_KEEP_JAVA_FILE
     Whether to keep the java file generated when the report is compiled.
final public static  StringCOMPILER_TEMP_DIR
     The temporary directory used by the report compiler.
final public static  StringCOMPILER_XML_VALIDATION
     Whether to validate the xml report when compiling.
final protected static  StringDEFAULT_PROPERTIES_FILE
     The default properties file.
final public static  StringEXPORT_XML_VALIDATION
     Validation flag used by the XML exporter.
final public static  StringPDF_FONT_DIRS_PREFIX
     Prefix of properties that specify font directories for the PDF exporter.
final public static  StringPDF_FONT_FILES_PREFIX
     Prefix of properties that specify font files for the PDF exporter.
final public static  StringPDF_FORCE_LINEBREAK_POLICY
    
final public static  StringPROPERTIES_FILE
     The name of the system property that specifies the properties file name.
final public static  StringPROPERTY_PREFIX
     The prefix used by all properties.
final public static  StringQUERY_EXECUTER_FACTORY_PREFIX
    
final public static  StringSUBREPORT_RUNNER_FACTORY
    
protected static  Propertiesprops
    
protected static  PropertiessavedProps
    


Method Summary
public static  booleanasBoolean(String value)
     Converts a String value into a boolean.
public static  intasInteger(String value)
     Converts a String value into a int.
public static  longasLong(String value)
     Converts a String value into a long.
public static  voidbackupProperties()
     Saves a copy of the current properties.
public static  booleangetBooleanProperty(String key)
     Returns a property as a boolean value.
public static  booleangetBooleanProperty(JRPropertiesMap propertiesMap, String key, boolean defaultValue)
     Returns the value of a property as a boolean, looking first in the supplied properties map and then in the system properties.
protected static  PropertiesgetDefaults()
     Sets the default properties.
public static  intgetIntegerProperty(String key)
     Returns a property as an integer value.
public static  intgetIntegerProperty(JRPropertiesMap propertiesMap, String key, int defaultValue)
     Returns the value of a property as an integer, looking first in the supplied properties map and then in the system properties.
public static  intgetIntegerProperty(String key, int defaultValue)
     Returns the value of a property as an integer.
public static  longgetLongProperty(String key)
     Returns a property as a long value.
public static  longgetLongProperty(JRPropertiesMap propertiesMap, String key, int defaultValue)
     Returns the value of a property as a long, looking first in the supplied properties map and then in the system properties.
public static  ListgetProperties(String prefix)
     Returns the list of all properties for a key prefix.
public static  ListgetProperties(JRPropertiesMap propertiesMap, String prefix)
     Returns the list of all properties for a key prefix.
public static  StringgetProperty(String key)
     Returns the value of the property.
public static  StringgetProperty(JRPropertiesMap propertiesMap, String key)
     Returns the value of a property, looking first in the supplied properties map and then in the system properties.
protected static  StringgetSystemProperty(String propertyName)
    
protected static  voidinitProperties()
     Loads the properties.
public static  PropertiesloadProperties(String name, Properties defaults)
     Loads a properties file from the classpath.
protected static  voidloadSystemProperties()
    
protected static  voidloadSystemProperty(String sysKey, String propKey)
    
public static  voidrestoreProperties()
     Restores previously saved properties.
public static  voidsetProperty(String key, String value)
     Sets the value of a property.
public static  voidsetProperty(String key, boolean value)
     Sets the value of a property.

Field Detail
COMPILER_CLASS
final public static String COMPILER_CLASS(Code)
The name of the class to be used for report compilation.

No default value. net.sf.jasperreports.engine.design.COMPILER_PREFIX




COMPILER_CLASSPATH
final public static String COMPILER_CLASSPATH(Code)
The classpath used by the report compiler.

Defaults to System.getProperty("java.class.path").




COMPILER_KEEP_JAVA_FILE
final public static String COMPILER_KEEP_JAVA_FILE(Code)
Whether to keep the java file generated when the report is compiled.

Defaults to false.




COMPILER_TEMP_DIR
final public static String COMPILER_TEMP_DIR(Code)
The temporary directory used by the report compiler.

Defaults to System.getProperty("user.dir").




COMPILER_XML_VALIDATION
final public static String COMPILER_XML_VALIDATION(Code)
Whether to validate the xml report when compiling.

Defaults to true.




DEFAULT_PROPERTIES_FILE
final protected static String DEFAULT_PROPERTIES_FILE(Code)
The default properties file.



EXPORT_XML_VALIDATION
final public static String EXPORT_XML_VALIDATION(Code)
Validation flag used by the XML exporter.

Defaults to true.




PDF_FONT_DIRS_PREFIX
final public static String PDF_FONT_DIRS_PREFIX(Code)
Prefix of properties that specify font directories for the PDF exporter.



PDF_FONT_FILES_PREFIX
final public static String PDF_FONT_FILES_PREFIX(Code)
Prefix of properties that specify font files for the PDF exporter.



PDF_FORCE_LINEBREAK_POLICY
final public static String PDF_FORCE_LINEBREAK_POLICY(Code)
net.sf.jasperreports.engine.export.JRPdfExporterParameter.PROPERTY_FORCE_LINEBREAK_POLICY



PROPERTIES_FILE
final public static String PROPERTIES_FILE(Code)
The name of the system property that specifies the properties file name.



PROPERTY_PREFIX
final public static String PROPERTY_PREFIX(Code)
The prefix used by all properties.



QUERY_EXECUTER_FACTORY_PREFIX
final public static String QUERY_EXECUTER_FACTORY_PREFIX(Code)
net.sf.jasperreports.engine.query.QUERY_EXECUTER_FACTORY_PREFIX



SUBREPORT_RUNNER_FACTORY
final public static String SUBREPORT_RUNNER_FACTORY(Code)
net.sf.jasperreports.engine.fill.JRSubreportRunnerFactory.SUBREPORT_RUNNER_FACTORY



props
protected static Properties props(Code)



savedProps
protected static Properties savedProps(Code)





Method Detail
asBoolean
public static boolean asBoolean(String value)(Code)
Converts a String value into a boolean.
Parameters:
  value - the value the value as a boolean



asInteger
public static int asInteger(String value)(Code)
Converts a String value into a int.
Parameters:
  value - the value the value as a int



asLong
public static long asLong(String value)(Code)
Converts a String value into a long.
Parameters:
  value - the value the value as a long



backupProperties
public static void backupProperties()(Code)
Saves a copy of the current properties.
See Also:   JRProperties.restoreProperties()
See Also:   



getBooleanProperty
public static boolean getBooleanProperty(String key)(Code)
Returns a property as a boolean value.
Parameters:
  key - the key the property value as a boolean



getBooleanProperty
public static boolean getBooleanProperty(JRPropertiesMap propertiesMap, String key, boolean defaultValue)(Code)
Returns the value of a property as a boolean, looking first in the supplied properties map and then in the system properties.
Parameters:
  propertiesMap - the properties map
Parameters:
  key - the key
Parameters:
  defaultValue - the default value used if the property is not found the property value



getDefaults
protected static Properties getDefaults() throws JRException(Code)
Sets the default properties. the default properties



getIntegerProperty
public static int getIntegerProperty(String key)(Code)
Returns a property as an integer value.
Parameters:
  key - the key the property value as an integer



getIntegerProperty
public static int getIntegerProperty(JRPropertiesMap propertiesMap, String key, int defaultValue)(Code)
Returns the value of a property as an integer, looking first in the supplied properties map and then in the system properties.
Parameters:
  propertiesMap - the properties map
Parameters:
  key - the key
Parameters:
  defaultValue - the default value used if the property is not found the property value



getIntegerProperty
public static int getIntegerProperty(String key, int defaultValue)(Code)
Returns the value of a property as an integer.
Parameters:
  key - the key
Parameters:
  defaultValue - the default value used if the property is not found the property value



getLongProperty
public static long getLongProperty(String key)(Code)
Returns a property as a long value.
Parameters:
  key - the key the property value as a long



getLongProperty
public static long getLongProperty(JRPropertiesMap propertiesMap, String key, int defaultValue)(Code)
Returns the value of a property as a long, looking first in the supplied properties map and then in the system properties.
Parameters:
  propertiesMap - the properties map
Parameters:
  key - the key
Parameters:
  defaultValue - the default value used if the property is not found the property value



getProperties
public static List getProperties(String prefix)(Code)
Returns the list of all properties for a key prefix.
Parameters:
  prefix - the key prefix a list of PropertySuffix PropertySuffix objects containing the suffix of the key and the value



getProperties
public static List getProperties(JRPropertiesMap propertiesMap, String prefix)(Code)
Returns the list of all properties for a key prefix.
Parameters:
  propertiesMap - the properties map
Parameters:
  prefix - the key prefix a list of PropertySuffix PropertySuffix objects containing the suffix of the key and the value



getProperty
public static String getProperty(String key)(Code)
Returns the value of the property.
Parameters:
  key - the key the property value



getProperty
public static String getProperty(JRPropertiesMap propertiesMap, String key)(Code)
Returns the value of a property, looking first in the supplied properties map and then in the system properties.
Parameters:
  propertiesMap - the properties map
Parameters:
  key - the key the property value



getSystemProperty
protected static String getSystemProperty(String propertyName)(Code)



initProperties
protected static void initProperties()(Code)
Loads the properties.



loadProperties
public static Properties loadProperties(String name, Properties defaults) throws JRException(Code)
Loads a properties file from the classpath.
Parameters:
  name - the resource name
Parameters:
  defaults - the default properties the loaded properties if the resource is found, null otherwise
throws:
  JRException -



loadSystemProperties
protected static void loadSystemProperties()(Code)



loadSystemProperty
protected static void loadSystemProperty(String sysKey, String propKey)(Code)



restoreProperties
public static void restoreProperties()(Code)
Restores previously saved properties.
See Also:   JRProperties.backupProperties()
See Also:   



setProperty
public static void setProperty(String key, String value)(Code)
Sets the value of a property.
Parameters:
  key - the key
Parameters:
  value - the value



setProperty
public static void setProperty(String key, boolean value)(Code)
Sets the value of a property.
Parameters:
  key - the key
Parameters:
  value - the value



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.