Java Doc for HierarchicalProperties.java in  » Web-Framework » rife-1.6.1 » com » uwyn » rife » ioc » 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 » rife 1.6.1 » com.uwyn.rife.ioc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.uwyn.rife.ioc.HierarchicalProperties

HierarchicalProperties
public class HierarchicalProperties (Code)
This class allows the creation of a hierarchical tree of named PropertyValue instances.

When a property is looked up in a child HierarchicalProperties instance, the lookup will be propagated to its parent when it couldn't be found in the child. A single hierarchical line is thus considered to be one collection that groups all involved HierarchicalProperties instances. Retrieving the names and the size will recursively take all the properties of the parents into account and return the consolidated result. To offer these features, intelligent caching has been implemented to ensure optimal performance.
author:
   Geert Bevin (gbevin[remove] at uwyn dot com)
version:
   $Revision: 3643 $
since:
   1.1




Constructor Summary
public  HierarchicalProperties()
    

Method Summary
public  booleancontains(String name)
     Checks the HierarchicalProperties hierarchy for the presence of the specified name.
public  HierarchicalPropertiescreateShadow(HierarchicalProperties limit)
     Creates a copy of this HierarchicalProperties hierarchy until a certain instance is reached.

Each copied instance will shared the datastructure in which the properties are stored with the original.

public  PropertyValueget(String name)
     Retrieves the PropertyValue for a specific name from the HierarchicalProperties hierarchy.
public  Collection<String>getInjectableNames()
     Retrieves a Set with the unique names that are present in the HierarchicalProperties hierarchy and that conform to the Java rules for valid identifiers.
public  Map<String, PropertyValue>getLocalMap()
     Retrieves the Map with only the properties that are locally present in this HierarchicalProperties instance.
public  Collection<String>getNames()
     Retrieves a Set with the unique names that are present in the HierarchicalProperties hierarchy.
public  HierarchicalPropertiesgetParent()
     Retrieves the parent of this HierarchicalProperties instance.
public  HierarchicalPropertiesgetRoot()
     Retrieves the first parent of this HierarchicalProperties hierarchy.
public  ObjectgetValue(String name)
     Retrieves the value of PropertyValue for a specific name from the HierarchicalProperties hierarchy.
public  ObjectgetValue(String name, Object defaultValue)
     Retrieves the value of PropertyValue for a specific name from the HierarchicalProperties hierarchy.
public  StringgetValueString(String name)
     Retrieves the string value of PropertyValue for a specific name from the HierarchicalProperties hierarchy.
public  StringgetValueString(String name, String defaultValue)
     Retrieves the string value of PropertyValue for a specific name from the HierarchicalProperties hierarchy.
public  TgetValueTyped(String name, Class<T> type)
     Retrieves the typed value of PropertyValue for a specific name from the HierarchicalProperties hierarchy.
public  TgetValueTyped(String name, Class<T> type, T defaultValue)
     Retrieves the typed value of PropertyValue for a specific name from the HierarchicalProperties hierarchy.
public  HierarchicalPropertiesparent(HierarchicalProperties parent)
     Sets the parent of this HierarchicalProperties instance.
public  HierarchicalPropertiesput(String name, PropertyValue value)
     Associates the specified value with the specified name in this HierarchicalProperties instance.
public  HierarchicalPropertiesput(String name, Object value)
     Associates the specified fixed object value with the specified name in this HierarchicalProperties instance.
public  HierarchicalPropertiesputAll(HierarchicalProperties source)
     Copies all of the named properties from the specified HierarchicalProperties instance to this HierarchicalProperties instance.
public  HierarchicalPropertiesputAll(Map source)
     Copies all of the entries for a Map instance to this HierarchicalProperties instance.
public  PropertyValueremove(String name)
     Removes the mapping for this name from this HierarchicalProperties instance, if it is present.
public  voidsetParent(HierarchicalProperties parent)
     Sets the parent of this HierarchicalProperties instance.
public  intsize()
     Retrieves the number of unique names in the HierarchicalProperties hierarchy.


Constructor Detail
HierarchicalProperties
public HierarchicalProperties()(Code)




Method Detail
contains
public boolean contains(String name)(Code)
Checks the HierarchicalProperties hierarchy for the presence of the specified name.
Parameters:
  name - the name whose presence will be checked true if the name was found; or

false otherwise
See Also:   HierarchicalProperties.get
since:
   1.1




createShadow
public HierarchicalProperties createShadow(HierarchicalProperties limit)(Code)
Creates a copy of this HierarchicalProperties hierarchy until a certain instance is reached.

Each copied instance will shared the datastructure in which the properties are stored with the original. Creating a shadow is this for changing the hierarchical structure but maintaining a centralized management of the properties.
Parameters:
  limit - the HierarchicalProperties instance that willnot be part of the shadow copy and interrupt the copying process; ornull if the entire hierachy should be copied. the shadow copy of this HierarchicalPropertieshierarchyhierarchy
since:
   1.1




get
public PropertyValue get(String name)(Code)
Retrieves the PropertyValue for a specific name from the HierarchicalProperties hierarchy.
Parameters:
  name - the name whose associated value will be returned the associated PropertyValue; or

null if the name could not be found
See Also:   HierarchicalProperties.contains
since:
   1.1




getInjectableNames
public Collection<String> getInjectableNames()(Code)
Retrieves a Set with the unique names that are present in the HierarchicalProperties hierarchy and that conform to the Java rules for valid identifiers. The names in this set are thus usable for injection through bean setters. a Set with the unique injectable names
See Also:   HierarchicalProperties.getNames
since:
   1.1



getLocalMap
public Map<String, PropertyValue> getLocalMap()(Code)
Retrieves the Map with only the properties that are locally present in this HierarchicalProperties instance. the local Map of thisHierarchicalProperties instance
since:
   1.1



getNames
public Collection<String> getNames()(Code)
Retrieves a Set with the unique names that are present in the HierarchicalProperties hierarchy. a collection with the unique names
See Also:   HierarchicalProperties.getInjectableNames
since:
   1.1



getParent
public HierarchicalProperties getParent()(Code)
Retrieves the parent of this HierarchicalProperties instance. the parent of this HierarchicalPropertiesinstance; or

null if this instance is isolated
See Also:   HierarchicalProperties.parent
since:
   1.1




getRoot
public HierarchicalProperties getRoot()(Code)
Retrieves the first parent of this HierarchicalProperties hierarchy. the root of this HierarchicalPropertieshierarchy
since:
   1.1



getValue
public Object getValue(String name) throws PropertyValueException(Code)
Retrieves the value of PropertyValue for a specific name from the HierarchicalProperties hierarchy.
Parameters:
  name - the name whose associated value will be returned the associated PropertyValue; or

null if the name could not be found
throws:
  PropertyValueException - when an error occurred while retrieving theproperty value
See Also:   HierarchicalProperties.get
See Also:   HierarchicalProperties.getValue(String,Object)
since:
   1.1




getValue
public Object getValue(String name, Object defaultValue) throws PropertyValueException(Code)
Retrieves the value of PropertyValue for a specific name from the HierarchicalProperties hierarchy. If the property couldn't be found or if the value was null, the default value will be returned.
Parameters:
  name - the name whose associated value will be returned
Parameters:
  defaultValue - the value that should be used as a fallback the associated PropertyValue; or

the defaultValue if the property couldn't be found or ifthe value was null
throws:
  PropertyValueException - when an error occurred while retrieving theproperty value
See Also:   HierarchicalProperties.get
See Also:   HierarchicalProperties.getValue(String)
since:
   1.1




getValueString
public String getValueString(String name) throws PropertyValueException(Code)
Retrieves the string value of PropertyValue for a specific name from the HierarchicalProperties hierarchy.
Parameters:
  name - the name whose associated value will be returned the string value of the retrieved PropertyValue; or

null if the name could not be found
throws:
  PropertyValueException - when an error occurred while retrieving theproperty value
See Also:   HierarchicalProperties.get
See Also:   HierarchicalProperties.getValueString(String,String)
See Also:   HierarchicalProperties.getValueTyped
since:
   1.1




getValueString
public String getValueString(String name, String defaultValue) throws PropertyValueException(Code)
Retrieves the string value of PropertyValue for a specific name from the HierarchicalProperties hierarchy. If the property couldn't be found, if the value was null or if the value was empty, the default value will be returned.
Parameters:
  name - the name whose associated value will be returned
Parameters:
  defaultValue - the value that should be used as a fallback the string value of the retrieved PropertyValue; or

the defaultValue if the property couldn't be found or ifthe value was null or an empty string
throws:
  PropertyValueException - when an error occurred while retrieving theproperty value
See Also:   HierarchicalProperties.get
See Also:   HierarchicalProperties.getValueString(String)
See Also:   HierarchicalProperties.getValueTyped
since:
   1.1




getValueTyped
public T getValueTyped(String name, Class<T> type) throws PropertyValueException(Code)
Retrieves the typed value of PropertyValue for a specific name from the HierarchicalProperties hierarchy.

Note that no conversion will occurr, the value is simple verified to be assignable to the requested type and then casted to it.
Parameters:
  name - the name whose associated value will be returned
Parameters:
  type - the class that the value has to be retrieved as the associated PropertyValue as an instance of theprovided type; or

null if the name could not be found
throws:
  IncompatiblePropertyValueTypeException - when the type of the propertyvalue wasn't compatible with the requested type
throws:
  PropertyValueException - when an error occurred while retrieving theproperty value
See Also:   HierarchicalProperties.get
See Also:   HierarchicalProperties.getValueString
See Also:   HierarchicalProperties.getValueTyped(String,Class)
since:
   1.6




getValueTyped
public T getValueTyped(String name, Class<T> type, T defaultValue) throws PropertyValueException(Code)
Retrieves the typed value of PropertyValue for a specific name from the HierarchicalProperties hierarchy.

Note that no conversion will occurr, the value is simple verified to be assignable to the requested type and then casted to it.
Parameters:
  name - the name whose associated value will be returned
Parameters:
  type - the class that the value has to be retrieved as
Parameters:
  defaultValue - the value that should be used as a fallback the associated PropertyValue as an instance of theprovided type; or

the defaultValue if the property couldn't be found or ifthe value was null
throws:
  IncompatiblePropertyValueTypeException - when the type of the propertyvalue wasn't compatible with the requested type
throws:
  PropertyValueException - when an error occurred while retrieving theproperty value
See Also:   HierarchicalProperties.get
See Also:   HierarchicalProperties.getValueString
See Also:   HierarchicalProperties.getValueTyped(String,Class)
since:
   1.6




parent
public HierarchicalProperties parent(HierarchicalProperties parent)(Code)
Sets the parent of this HierarchicalProperties instance.
Parameters:
  parent - the parent of this instance; or null if thisinstance should be isolated this HierarchicalProperties instance
See Also:   HierarchicalProperties.getParent
since:
   1.1



put
public HierarchicalProperties put(String name, PropertyValue value)(Code)
Associates the specified value with the specified name in this HierarchicalProperties instance. If it previously contained a mapping for this name, the old value is replaced by the specified value.
Parameters:
  name - the name that will be associated with the property
Parameters:
  value - the property value that will be associated with thespecified name this HierarchicalProperties instance
See Also:   HierarchicalProperties.put(String,Object)
See Also:   HierarchicalProperties.putAll
since:
   1.1



put
public HierarchicalProperties put(String name, Object value)(Code)
Associates the specified fixed object value with the specified name in this HierarchicalProperties instance. If it previously contained a mapping for this name, the old value is replaced by the specified value.
Parameters:
  name - the name that will be associated with the property
Parameters:
  value - the property value that will be associated with thespecified name, note that this method will create a PropertyValueObjectinstance that will contain the value in a fixed manner this HierarchicalProperties instance
See Also:   HierarchicalProperties.put(String,PropertyValue)
See Also:   HierarchicalProperties.putAll
since:
   1.6



putAll
public HierarchicalProperties putAll(HierarchicalProperties source)(Code)
Copies all of the named properties from the specified HierarchicalProperties instance to this HierarchicalProperties instance. The effect of this call is equivalent to that of calling HierarchicalProperties.put on this HierarchicalProperties once for each mapping from the specified HierarchicalProperties instance.
Parameters:
  source - the properties that will be stored in thisHierarchicalProperties instance this HierarchicalProperties instance
See Also:   HierarchicalProperties.put
since:
   1.1



putAll
public HierarchicalProperties putAll(Map source)(Code)
Copies all of the entries for a Map instance to this HierarchicalProperties instance.
Parameters:
  source - the map entries that will be stored in thisHierarchicalProperties instance this HierarchicalProperties instance
since:
   1.5



remove
public PropertyValue remove(String name)(Code)
Removes the mapping for this name from this HierarchicalProperties instance, if it is present.
Parameters:
  name - the name that will be removed the previously associated value; or

null if the name wasn't found in thisHierarchicalProperties instance
since:
   1.1




setParent
public void setParent(HierarchicalProperties parent)(Code)
Sets the parent of this HierarchicalProperties instance.
Parameters:
  parent - the parent of this instance; or null if thisinstance should be isolated
See Also:   HierarchicalProperties.getParent
since:
   1.1



size
public int size()(Code)
Retrieves the number of unique names in the HierarchicalProperties hierarchy. the amount of unique names
since:
   1.1



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.