Java Doc for AbsConfigFile.java in  » J2EE » Enhydra-Application-Framework » org » enhydra » 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 » J2EE » Enhydra Application Framework » org.enhydra.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.enhydra.util.AbsConfigFile

All known Subclasses:   com.lutris.util.ConfigFile,  org.enhydra.util.XMLConfigFile,
AbsConfigFile
abstract public class AbsConfigFile implements ConfigFileInterface(Code)
AbsConfigFile is abstract class which contains methods used to manipulate application's configuration file to read its configuration parameters.
See Also:    Config, ConfigFileInterface
author:
   Tanja Jovanovic
version:
   1.0


Field Summary
protected  Hashtablecomments
     Comments of configuration parameters.
protected  Configconfig
     The configuration object to which this configuration file belongs to.
protected  Filefile
     The associated file (if any).
protected  JNDIAdapterjndiAdapt
     JNDI Adapter used for reading application's parameters.
protected  HashtablejndiParameterNames
     Parameters from configuration file whose values are jndi names of resources.
protected  Vectororder
     Order in which are configuration parameters added.

Constructor Summary
public  AbsConfigFile()
     Default constructor for an empty configuration file.
public  AbsConfigFile(File file)
     Constructor from a File.
public  AbsConfigFile(KeywordValueTable kvt)
     Constructor from a KeywordValueTable.

Method Summary
public  voidaddEntry(String key, String[] values, String comment)
     Adds an entry to the configuration.
Parameters:
  key - The config element name.
Parameters:
  values - A string array of values.
Parameters:
  comment - A string containing a properly commented configuration file comment.
public  voidaddEntry(String kkey, String value, String comment)
     Adds an entry to the configuration.
public  StringgetComment(String key)
     Returns the comment associated with a given key, or null if there is no comment.
public  ConfiggetConfig()
     Returns the Config object representing the config data in the file.
public  FilegetFile()
     Gets the associated file.
protected  voidreadJndi()
     Reads application configuration parameters using JNDI Context.
public  voidremoveEntry(String key)
     Removes an entry from the configuration.
public  voidsetFile(File file)
     Sets the configuration file.
public  voidwrite()
     Writes this config to the associated configuration file.
abstract public  voidwrite(OutputStream outputStream)
     Writes out a configuration file to the OutputStream specified.

Field Detail
comments
protected Hashtable comments(Code)
Comments of configuration parameters.



config
protected Config config(Code)
The configuration object to which this configuration file belongs to.



file
protected File file(Code)
The associated file (if any).



jndiAdapt
protected JNDIAdapter jndiAdapt(Code)
JNDI Adapter used for reading application's parameters.



jndiParameterNames
protected Hashtable jndiParameterNames(Code)
Parameters from configuration file whose values are jndi names of resources.



order
protected Vector order(Code)
Order in which are configuration parameters added.




Constructor Detail
AbsConfigFile
public AbsConfigFile()(Code)
Default constructor for an empty configuration file.



AbsConfigFile
public AbsConfigFile(File file) throws ConfigException, IOException(Code)
Constructor from a File. Allows to later write back the configuration to the same file.
Parameters:
  file - The local file to parse.
exception:
  IOException -
exception:
  ConfigException -



AbsConfigFile
public AbsConfigFile(KeywordValueTable kvt) throws ConfigException(Code)
Constructor from a KeywordValueTable.
Parameters:
  kvt - A KeywordValueTable from which to populate the configuration file.
exception:
  ConfigException -




Method Detail
addEntry
public void addEntry(String key, String[] values, String comment) throws KeywordValueException(Code)
Adds an entry to the configuration.
Parameters:
  key - The config element name.
Parameters:
  values - A string array of values.
Parameters:
  comment - A string containing a properly commented configuration file comment.
exception:
  KeywordValueException -



addEntry
public void addEntry(String kkey, String value, String comment) throws KeywordValueException(Code)
Adds an entry to the configuration.
Parameters:
  key - The config element name.
Parameters:
  value - A String value.
Parameters:
  comment - A string containing a properly commented configuration file comment.
exception:
  KeywordValueException -



getComment
public String getComment(String key)(Code)
Returns the comment associated with a given key, or null if there is no comment. Pass in ConfigFileInterface.TRAILING_COMMENT to get the trailing comment.
Parameters:
  key - the key to look up. the associated comment or null



getConfig
public Config getConfig()(Code)
Returns the Config object representing the config data in the file. The Config object for this ConfigFile.



getFile
public File getFile()(Code)
Gets the associated file. If no file is associated with this config, null is returned. associated file



readJndi
protected void readJndi() throws ConfigException(Code)
Reads application configuration parameters using JNDI Context. Subclasses should override this method.



removeEntry
public void removeEntry(String key) throws KeywordValueException(Code)
Removes an entry from the configuration.
Parameters:
  key - The config element name.
exception:
  KeywordValueException -



setFile
public void setFile(File file)(Code)
Sets the configuration file. This method can be useful in case when in construction of ConfigFile object is not defined associated file. After the file is set, Configuration parameters are read by using JNDI Context.
Parameters:
  file - given reference to configuration file represented as File object.



write
public void write() throws IOException, FileNotFoundException(Code)
Writes this config to the associated configuration file. If no file is associated with this config, throws a FileNotFoundException.
exception:
  IOException -
exception:
  FileNotFoundException -



write
abstract public void write(OutputStream outputStream)(Code)
Writes out a configuration file to the OutputStream specified.
Parameters:
  outputStream - The output stream on which to write the config file.



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.