Java Doc for PropertiesHandler.java in  » GIS » openjump » de » fho » jump » pirol » utilities » Properties » 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 » GIS » openjump » de.fho.jump.pirol.utilities.Properties 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.fho.jump.pirol.utilities.Properties.PropertiesHandler

PropertiesHandler
public class PropertiesHandler implements de.fho.jump.pirol.utilities.apiTools.HandlerToMakeYourLifeEasier(Code)
Class that enables easy access for reading and writing properties files.
author:
   Ole Rahn
author:
  

author:
  
FH Osnabrück - University of Applied Sciences Osnabrück,
author:
  
Project: PIROL (2005),
author:
  
Subproject: Daten- und Wissensmanagement
version:
   $Rev: 856 $


Field Summary
protected  Propertiesproperties
    
protected  StringpropertiesFile
    
final public static  StringpropertiesFileEnding
    

Constructor Summary
public  PropertiesHandler(String propertiesFileName)
     Constructor
Parameters:
  propertiesFileName - the file name (with out path!) of the properties file, that is to be read or written.

Method Summary
public  booleancontains(Object value)
    
public  booleancontainsKey(Object key)
    
public  booleancontainsValue(Object value)
    
public  Enumerationelements()
    
public  Map<String, Object>getAll()
     get all properties as Map object (e.g.
public  StringgetPropertiesFile()
    
public  StringgetProperty(String key, String defaultValue)
    
public  StringgetProperty(String key)
    
public  booleangetPropertyAsBoolean(String key)
     Gets the property value with the key key and parses it to an boolean if possible.
public  booleangetPropertyAsBoolean(String key, boolean defaultValue)
     Gets the property value with the key key and parses it to an boolean if possible.
public  ColorgetPropertyAsColor(String key)
     Gets the property value with the key key and parses it to a Color if possible.
public  ColorgetPropertyAsColor(String key, Color defaultValue)
     Gets the property value with the key key and parses it to a Color if possible.
public  doublegetPropertyAsDouble(String key)
     Gets the property value with the key key and parses it to a double if possible.
public  doublegetPropertyAsDouble(String key, double defaultValue)
     Gets the property value with the key key and parses it to a double if possible.
public  intgetPropertyAsInt(String key)
     Gets the property value with the key key and parses it to an int if possible.
public  intgetPropertyAsInt(String key, int defaultValue)
     Gets the property value with the key key and parses it to an int if possible.
public  booleanisEmpty()
    
public  SetkeySet()
    
public  Enumerationkeys()
    
public  voidload()
    
public  voidputAll(Map<String, Object> arg0)
    
public  Objectremove(Object arg0)
    
public  ObjectsetProperty(String key, String value)
    
public  ObjectsetProperty(String key, Color value)
    
public  voidstore(String comments)
     Stores the current properties map to the file.
public  voidstore()
     Stores the current properties map to the file.

Field Detail
properties
protected Properties properties(Code)



propertiesFile
protected String propertiesFile(Code)



propertiesFileEnding
final public static String propertiesFileEnding(Code)




Constructor Detail
PropertiesHandler
public PropertiesHandler(String propertiesFileName)(Code)
Constructor
Parameters:
  propertiesFileName - the file name (with out path!) of the properties file, that is to be read or written. It will automatically be placed in the config directory.
See Also:   PirolPlugInSettings.configDirectory




Method Detail
contains
public boolean contains(Object value)(Code)

See Also:   Properties



containsKey
public boolean containsKey(Object key)(Code)

See Also:   Properties



containsValue
public boolean containsValue(Object value)(Code)

See Also:   Properties



elements
public Enumeration elements()(Code)

See Also:   Properties



getAll
public Map<String, Object> getAll()(Code)
get all properties as Map object (e.g. to feed into an other map...)



getPropertiesFile
public String getPropertiesFile()(Code)
the file name of the properties file handled by this instance



getProperty
public String getProperty(String key, String defaultValue)(Code)

See Also:   Properties



getProperty
public String getProperty(String key)(Code)

See Also:   Properties



getPropertyAsBoolean
public boolean getPropertyAsBoolean(String key)(Code)
Gets the property value with the key key and parses it to an boolean if possible. An exception will be thrown, if this key is not found within the properties and if the value could not be parsed as desired.
Parameters:
  key - the key to get the value of the value of the property



getPropertyAsBoolean
public boolean getPropertyAsBoolean(String key, boolean defaultValue)(Code)
Gets the property value with the key key and parses it to an boolean if possible. If this key is not found within the properties the given default-Value will be returned. An exception will be thrown, if the value is existent, but could not be parsed as desired.
Parameters:
  key - the key to get the value of
Parameters:
  defaultValue - value to be filled in, if the given key wasn't found the value of the property



getPropertyAsColor
public Color getPropertyAsColor(String key)(Code)
Gets the property value with the key key and parses it to a Color if possible. An exception will be thrown, if this key is not found within the properties and if the value could not be parsed as desired.
Parameters:
  key - the key to get the value of the value of the property



getPropertyAsColor
public Color getPropertyAsColor(String key, Color defaultValue)(Code)
Gets the property value with the key key and parses it to a Color if possible. If this key is not found within the properties the given default-Value will be returned. An exception will be thrown, if the value is existent, but could not be parsed as desired.
Parameters:
  key - the key to get the value of
Parameters:
  defaultValue - value to be filled in, if the given key wasn't found the value of the property



getPropertyAsDouble
public double getPropertyAsDouble(String key)(Code)
Gets the property value with the key key and parses it to a double if possible. An exception will be thrown, if this key is not found within the properties and if the value could not be parsed as desired.
Parameters:
  key - the key to get the value of the value of the property



getPropertyAsDouble
public double getPropertyAsDouble(String key, double defaultValue)(Code)
Gets the property value with the key key and parses it to a double if possible. If this key is not found within the properties the given default-Value will be returned. An exception will be thrown, if the value is existent, but could not be parsed as desired.
Parameters:
  key - the key to get the value of
Parameters:
  defaultValue - value to be filled in, if the given key wasn't found the value of the property



getPropertyAsInt
public int getPropertyAsInt(String key)(Code)
Gets the property value with the key key and parses it to an int if possible. An exception will be thrown, if this key is not found within the properties and if the value could not be parsed as desired.
Parameters:
  key - the key to get the value of the value of the property



getPropertyAsInt
public int getPropertyAsInt(String key, int defaultValue)(Code)
Gets the property value with the key key and parses it to an int if possible. If this key is not found within the properties the given default-Value will be returned. An exception will be thrown, if the value is existent, but could not be parsed as desired.
Parameters:
  key - the key to get the value of
Parameters:
  defaultValue - value to be filled in, if the given key wasn't found the value of the property



isEmpty
public boolean isEmpty()(Code)

See Also:   Properties



keySet
public Set keySet()(Code)

See Also:   Properties



keys
public Enumeration keys()(Code)

See Also:   Properties



load
public void load() throws IOException(Code)
load the properties from the file
throws:
  IOException -



putAll
public void putAll(Map<String, Object> arg0)(Code)

See Also:   Properties



remove
public Object remove(Object arg0)(Code)

See Also:   Properties



setProperty
public Object setProperty(String key, String value)(Code)
Sets a property key-value pair, replaces a pair with the same key!
Parameters:
  key - the key for the pair
Parameters:
  value - the value return value like Properties would return
See Also:   Properties



setProperty
public Object setProperty(String key, Color value)(Code)
Sets a property key-value pair, replaces a pair with the same key!
Parameters:
  key - the key for the pair
Parameters:
  value - the value return value like Properties would return
See Also:   Properties



store
public void store(String comments) throws IOException(Code)
Stores the current properties map to the file.
Parameters:
  comments - comments that will appear in the first lines of the file
throws:
  IOException -



store
public void store() throws IOException(Code)
Stores the current properties map to the file.
throws:
  IOException -



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.