Java Doc for ConfigurationBase.java in  » Web-Framework » jpublish » com » anthonyeden » lib » config » 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 » Web Framework » jpublish » com.anthonyeden.lib.config 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.anthonyeden.lib.config.ConfigurationBase

ConfigurationBase
public class ConfigurationBase implements MutableConfiguration(Code)
The ConfigurationBase is a base implementation of the MutableConfiguration interface.
author:
   Anthony Eden
author:
   Florin T.PATRASCU


Field Summary
final public static  StringENCODING
    

Constructor Summary
public  ConfigurationBase(String name, Object value, Configuration parent)
     Construct a new ConfigurationBase object.
public  ConfigurationBase(String name, Object value, Configuration parent, Location location)
     Construct a new ConfigurationBase object.
public  ConfigurationBase(String name, Object value, List children, Map attributes, Configuration parent)
     Construct a new ConfigurationBase object.
public  ConfigurationBase(String name, Object value, List children, Map attributes, Configuration parent, Location location)
     Construct a new ConfigurationBase object.

Method Summary
public  voidaddAttribute(String name, Object value)
     Add an attribute with the given name.
public  MutableConfigurationaddChild(String name)
     Add a child node with no child value to the configuration.
public  MutableConfigurationaddChild(String name, Object value)
     Add a child node to the configuration.
public  MutableConfigurationaddChild(String name, Object value, Object defaultValue)
     Add a child node to the configuration.
public  voidaddChild(Configuration configuration)
     Add the configuration object as a child of this configuration object.
public  voidclearChildren()
     Remove all of the children of this configuration node.
public  Configurationcopy()
     This would be a deep copy if you used immutable objects such as Strings for values and attributes, and shallow otherwise.
public  Configurationcopy(Configuration parentConfig)
     This would be a deep copy if you used immutable objects such as Strings for values and attributes, and shallow otherwise.
public  StringgetAttribute(String name)
     Get the named attribute or null.
public  StringgetAttribute(String name, String defaultValue)
     Get the named attribute.
public  ListgetAttributeNames()
     Get a List of attribute names.
public  ConfigurationgetChild(String name)
     Get the child configuration object with the given name.
public  StringgetChildValue(String name)
     Get the value of the first child configuration object with the given name.
public  StringgetChildValue(String name, String defaultValue)
     Get the value of the first child configuration object with the given name.
public  ListgetChildren()
     Get a list of all child nodes.
public  ListgetChildren(String name)
     Get a list of all child nodes with the given name.
public  LocationgetLocation()
     Get location information for this configuration object.
public  StringgetName()
     Get the node's name.
public  ConfigurationgetParent()
     Get the parent configuration object.
public  StringgetValue()
     Get the node's value or null if the node contains no data.
public  StringgetValue(String defaultValue)
     Get the node's value.
public  voidremoveChild(Configuration configuration)
     Remove the specified configuration object.
public  voidsave(OutputStream out)
     Save the configuration data to the specified output stream.
public  voidsave(Writer out)
     Save the configuration data to the specified output stream.
public  voidsetLocation(String id)
    
public  voidsetName(String name)
     Set the node name.
public  voidsetValue(String value)
     Set the configuration object's value.
 voidwrite(Configuration configuration, XMLOutputter xmlOut)
     Write the given Configuration object to the XMLOutputter.

Field Detail
ENCODING
final public static String ENCODING(Code)




Constructor Detail
ConfigurationBase
public ConfigurationBase(String name, Object value, Configuration parent)(Code)
Construct a new ConfigurationBase object.
Parameters:
  name - The configuration object name
Parameters:
  value - The configuration object value
Parameters:
  parent - The parent Configuration



ConfigurationBase
public ConfigurationBase(String name, Object value, Configuration parent, Location location)(Code)
Construct a new ConfigurationBase object.
Parameters:
  name - The configuration object name
Parameters:
  value - The configuration object value
Parameters:
  parent - The parent Configuration
Parameters:
  location - The Location object or null



ConfigurationBase
public ConfigurationBase(String name, Object value, List children, Map attributes, Configuration parent)(Code)
Construct a new ConfigurationBase object.
Parameters:
  name - The configuration object name
Parameters:
  value - The configuration object value
Parameters:
  children - The List of children
Parameters:
  attributes - The Map of attributes
Parameters:
  parent - The parent Configuration



ConfigurationBase
public ConfigurationBase(String name, Object value, List children, Map attributes, Configuration parent, Location location)(Code)
Construct a new ConfigurationBase object.
Parameters:
  name - The configuration object name
Parameters:
  value - The configuration object value
Parameters:
  children - The List of children
Parameters:
  attributes - The Map of attributes
Parameters:
  parent - The parent Configuration
Parameters:
  location - The Location or null




Method Detail
addAttribute
public void addAttribute(String name, Object value)(Code)
Add an attribute with the given name. The value's toString() method will be used to convert the value to a String.
Parameters:
  name - The attribute name
Parameters:
  value - The attribute value



addChild
public MutableConfiguration addChild(String name)(Code)
Add a child node with no child value to the configuration. This method should be the same as calling addChild(name, null)
Parameters:
  name - The name of the new configuration node The configuration node



addChild
public MutableConfiguration addChild(String name, Object value)(Code)
Add a child node to the configuration. The value's toString() method will be used to convert the value to a String.
Parameters:
  name - The name of the new configuration node
Parameters:
  value - The value of the new configuration node The configuration node



addChild
public MutableConfiguration addChild(String name, Object value, Object defaultValue)(Code)
Add a child node to the configuration. The value's toString() method will be used to convert the value to a String. If the value is null use the default value.
Parameters:
  name - The name of the new configuration node
Parameters:
  value - The value of the new configuration node
Parameters:
  defaultValue - value to use if the value was null The configuration node



addChild
public void addChild(Configuration configuration)(Code)
Add the configuration object as a child of this configuration object.
Parameters:
  configuration - The child configuration object



clearChildren
public void clearChildren()(Code)
Remove all of the children of this configuration node.



copy
public Configuration copy()(Code)
This would be a deep copy if you used immutable objects such as Strings for values and attributes, and shallow otherwise. It clones the Location object, however it sets the parent to null. copy of this Configuration



copy
public Configuration copy(Configuration parentConfig)(Code)
This would be a deep copy if you used immutable objects such as Strings for values and attributes, and shallow otherwise. It clones the Location object, however it sets the parent to null. copy of this Configuration
Parameters:
  parentConfig -



getAttribute
public String getAttribute(String name)(Code)
Get the named attribute or null.
Parameters:
  name - The attribute name The attribute value



getAttribute
public String getAttribute(String name, String defaultValue)(Code)
Get the named attribute. If the attribute is not found then return the given default value.
Parameters:
  name - The attribute name
Parameters:
  defaultValue - The default value The attribute value



getAttributeNames
public List getAttributeNames()(Code)
Get a List of attribute names. A List of attribute names



getChild
public Configuration getChild(String name)(Code)
Get the child configuration object with the given name. If the child with the name does not exist then this method returns null. If more than one child with the given name exists then this method returns the first child.
Parameters:
  name - The child name The first named child or null



getChildValue
public String getChildValue(String name)(Code)
Get the value of the first child configuration object with the given name. If the child cannot be found or the child had no data then this method returns null.
Parameters:
  name - The child name The value or null



getChildValue
public String getChildValue(String name, String defaultValue)(Code)
Get the value of the first child configuration object with the given name. If the child cannot be found or the child had no data then this method returns the given default value.
Parameters:
  name - The child name
Parameters:
  defaultValue - The default value The value



getChildren
public List getChildren()(Code)
Get a list of all child nodes. A List of Configuration objects



getChildren
public List getChildren(String name)(Code)
Get a list of all child nodes with the given name.
Parameters:
  name - The child node name A List of Configuration objects



getLocation
public Location getLocation()(Code)
Get location information for this configuration object. Location



getName
public String getName()(Code)
Get the node's name. The node's name



getParent
public Configuration getParent()(Code)
Get the parent configuration object. This method will return null if this configuration object is the top-most configuration object in the configuration tree. The parent configuration object or null



getValue
public String getValue()(Code)
Get the node's value or null if the node contains no data. The node value or null



getValue
public String getValue(String defaultValue)(Code)
Get the node's value. If the node contains no data then return the given default value.
Parameters:
  defaultValue - The default value The node value



removeChild
public void removeChild(Configuration configuration)(Code)
Remove the specified configuration object.
Parameters:
  configuration - The child configuration object



save
public void save(OutputStream out) throws ConfigurationException(Code)
Save the configuration data to the specified output stream. Please note that the caller must close the OutputStream.
Parameters:
  out - The OutputStream
throws:
  ConfigurationException -



save
public void save(Writer out) throws ConfigurationException(Code)
Save the configuration data to the specified output stream. Please note that the caller must close the writer.
Parameters:
  out - The Writer
throws:
  ConfigurationException -



setLocation
public void setLocation(String id)(Code)



setName
public void setName(String name)(Code)
Set the node name.
Parameters:
  name - The new node name



setValue
public void setValue(String value)(Code)
Set the configuration object's value.
Parameters:
  value - The new value



write
void write(Configuration configuration, XMLOutputter xmlOut) throws IOException(Code)
Write the given Configuration object to the XMLOutputter. This method is recursive and will call itself until all children are printed.
Parameters:
  configuration - The Configuration object
Parameters:
  xmlOut - The XMLOutputter
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.