Java Doc for VariableBundle.java in  » Mail-Clients » pooka » net » suberic » 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 » Mail Clients » pooka » net.suberic.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.suberic.util.VariableBundle

VariableBundle
public class VariableBundle extends Object (Code)
VariableBundle is a combination of a Properties object, a ResourceBundle object, and (optionally) a second Properties object to act as the 'parent' properties. This allows both for a single point of reference for variables, as well as the ability to do hierarchical lookups with the parent (see getProperty() for an example). The order of lookup is as follows: Local properties are checked first, then parent properties, and then finally (if the value is not found in any properties) the ResourceBundle is checked.



Constructor Summary
public  VariableBundle(InputStream propertiesFile, String resourceFile, VariableBundle newParentProperties)
    
public  VariableBundle(File propertiesFile, VariableBundle newParentProperties)
    
public  VariableBundle(InputStream propertiesFile, String resourceFile)
    
public  VariableBundle(InputStream propertiesFile, VariableBundle newParentProperties)
    
public  VariableBundle(Properties editableProperties, VariableBundle newParentProperties)
    

Method Summary
public  voidaddValueChangeListener(ValueChangeListener vcl, String property)
     This adds the ValueChangeListener to listen for changes in the given property.
public  voidclearRemoveList()
     Clears the removeList.
protected  voidconfigure(InputStream propertiesFile, String resourceFile, VariableBundle newParentProperties)
     Configures the VariableBundle.
public static  ListconvertToList(String value)
     Converts a value which has multiple values separated by a ':' (colon) to a java.util.List.
public static  StringconvertToString(List pValue)
     Converts a List of Strings to a colon-delimited String.
public static  VectorconvertToVector(String value)
     Converts a value which has multiple values separated by a ':' (colon) to a java.util.Vector.
public  StringescapeWhiteSpace(String sourceString)
     Escapes whitespace in a string by putting a '\' in front of each whitespace character.
public  voidfireValueChanged(String changedValue)
     This notifies all registered listeners for changedValue that its value has changed.
public  MapgetAllListeners()
     Returns all of the ValueChangeListeners registered.
public  VariableBundlegetParentProperties()
    
public  PropertiesgetProperties()
    
public  StringgetProperty(String key, String defaultValue)
    
public  StringgetProperty(String key)
    
public  EnumerationgetPropertyAsEnumeration(String propertyName, String defaultValue)
     Returns a property which has multiple values separated by a ':' (colon) as a java.util.Enumeration.
public  ListgetPropertyAsList(String propertyName, String defaultValue)
     Converts the given property value to a List using the convertToList call.
public  VectorgetPropertyAsVector(String propertyName, String defaultValue)
     Converts the given property value to a Vector using the convertToVector call.
public  ResourceBundlegetResources()
    
public  FilegetSaveFile()
     Returns the current saveFile.
public  PropertiesgetWritableProperties()
    
public  booleanpropertyIsRemoved(String prop)
     Returns true if the property is in the removeList for this VariableBundle.
public  voidremoveProperty(String remProp)
     This removes the property from the currently VariableBundle.
public  voidremoveValueChangeListener(ValueChangeListener vcl)
     This removes the given ValueChangeListener for all the values that it's listening to.
public  voidremoveValueChangeListener(ValueChangeListener vcl, String property)
     This removes the given ValueChangeListener from listening on the given property.
public  voidsaveProperties()
     Saves the current properties in the VariableBundle to a file.
public  voidsaveProperties(File pSaveFile)
     Saves the current properties in the VariableBundle to a file.
public  voidsetProperties(Properties newProperties)
    
public  voidsetProperty(String propertyName, String propertyValue)
    
public  voidsetProperty(String propertyName, String propertyValue, boolean temporary)
     sets a property as temporary (so it won't be saved).
public  voidsetResourceBundle(ResourceBundle newResources)
    
public  voidsetSaveFile(File newFile)
     Sets the save file.
public  StringunEscapeString(String sourceString)
     resolves a whitespace-escaped string.
public  voidunRemoveProperty(String unRemProp)
     Removes a property from the removeList.


Constructor Detail
VariableBundle
public VariableBundle(InputStream propertiesFile, String resourceFile, VariableBundle newParentProperties)(Code)



VariableBundle
public VariableBundle(File propertiesFile, VariableBundle newParentProperties) throws java.io.FileNotFoundException(Code)



VariableBundle
public VariableBundle(InputStream propertiesFile, String resourceFile)(Code)



VariableBundle
public VariableBundle(InputStream propertiesFile, VariableBundle newParentProperties)(Code)



VariableBundle
public VariableBundle(Properties editableProperties, VariableBundle newParentProperties)(Code)




Method Detail
addValueChangeListener
public void addValueChangeListener(ValueChangeListener vcl, String property)(Code)
This adds the ValueChangeListener to listen for changes in the given property.



clearRemoveList
public void clearRemoveList()(Code)
Clears the removeList. This should generally be called after you do a writeProperties();



configure
protected void configure(InputStream propertiesFile, String resourceFile, VariableBundle newParentProperties)(Code)
Configures the VariableBundle.



convertToList
public static List convertToList(String value)(Code)
Converts a value which has multiple values separated by a ':' (colon) to a java.util.List.



convertToString
public static String convertToString(List pValue)(Code)
Converts a List of Strings to a colon-delimited String.



convertToVector
public static Vector convertToVector(String value)(Code)
Converts a value which has multiple values separated by a ':' (colon) to a java.util.Vector.



escapeWhiteSpace
public String escapeWhiteSpace(String sourceString)(Code)
Escapes whitespace in a string by putting a '\' in front of each whitespace character.



fireValueChanged
public void fireValueChanged(String changedValue)(Code)
This notifies all registered listeners for changedValue that its value has changed.



getAllListeners
public Map getAllListeners()(Code)
Returns all of the ValueChangeListeners registered.



getParentProperties
public VariableBundle getParentProperties()(Code)



getProperties
public Properties getProperties()(Code)



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



getProperty
public String getProperty(String key) throws MissingResourceException(Code)



getPropertyAsEnumeration
public Enumeration getPropertyAsEnumeration(String propertyName, String defaultValue)(Code)
Returns a property which has multiple values separated by a ':' (colon) as a java.util.Enumeration.



getPropertyAsList
public List getPropertyAsList(String propertyName, String defaultValue)(Code)
Converts the given property value to a List using the convertToList call.



getPropertyAsVector
public Vector getPropertyAsVector(String propertyName, String defaultValue)(Code)
Converts the given property value to a Vector using the convertToVector call.



getResources
public ResourceBundle getResources()(Code)



getSaveFile
public File getSaveFile()(Code)
Returns the current saveFile.



getWritableProperties
public Properties getWritableProperties()(Code)



propertyIsRemoved
public boolean propertyIsRemoved(String prop)(Code)
Returns true if the property is in the removeList for this VariableBundle.



removeProperty
public void removeProperty(String remProp)(Code)
This removes the property from the currently VariableBundle. This is different than setting the value to "" (or null) in that, if the property is removed, it is removed from the source property file.



removeValueChangeListener
public void removeValueChangeListener(ValueChangeListener vcl)(Code)
This removes the given ValueChangeListener for all the values that it's listening to.



removeValueChangeListener
public void removeValueChangeListener(ValueChangeListener vcl, String property)(Code)
This removes the given ValueChangeListener from listening on the given property.



saveProperties
public void saveProperties()(Code)
Saves the current properties in the VariableBundle to a file. Note that this only saves the writableProperties of this particular VariableBundle--underlying defaults are not written.



saveProperties
public void saveProperties(File pSaveFile)(Code)
Saves the current properties in the VariableBundle to a file. Note that this only saves the writableProperties of this particular VariableBundle--underlying defaults are not written.



setProperties
public void setProperties(Properties newProperties)(Code)



setProperty
public void setProperty(String propertyName, String propertyValue)(Code)



setProperty
public void setProperty(String propertyName, String propertyValue, boolean temporary)(Code)
sets a property as temporary (so it won't be saved).



setResourceBundle
public void setResourceBundle(ResourceBundle newResources)(Code)



setSaveFile
public void setSaveFile(File newFile)(Code)
Sets the save file.



unEscapeString
public String unEscapeString(String sourceString)(Code)
resolves a whitespace-escaped string.



unRemoveProperty
public void unRemoveProperty(String unRemProp)(Code)
Removes a property from the removeList. Only necessary if a property had been removed since the last save, and now has been set to a new value. It's probably a good idea, though, to call this method any time a property has its value set.



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.