Java Doc for JNDIAdapter.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.JNDIAdapter

JNDIAdapter
public class JNDIAdapter (Code)
This class is used for reading configuration parameters using JNDI. It coresponds between InitialContext object and application's Config and ConfigFile object.
author:
   Tanja Jovanovic
version:
   1.0


Field Summary
final public static  StringCONTEXT_FOR_ENV_BIND
     Application component Context environment.
final public static  StringFILE_JNDI_ABS_PATH_NAME
     Absolute path to application configuration file.

Constructor Summary
public  JNDIAdapter()
     Default constructor for empty adapter.
public  JNDIAdapter(String fileAbsolutePath, String factoryClass)
     Constructor with defined file.

Method Summary
public  booleancontainsKey(String key)
     Returns true if the specified key is found, false otherwise.
public synchronized  Objectget(String keyword)
     Get the value of a field as an object.
Parameters:
  keyword - The keyword of the field.
public synchronized  Objectget(String keyword, Object defaultValue)
     Get the value of a field as an object, return a default if it does not exist.
Parameters:
  keyword - The keyword of the field.
public synchronized  ObjectgetResource(String jndiName)
    
public  String[]getStrings(String key)
     Get the value of a field as String array.
Parameters:
  key - The keyword of the field.
public static  booleanisArray(String key)
     Returns true if key has indicator that the field is array (the key ends with "[]")
Parameters:
  key - The keyword of the field.
public synchronized  String[]keys()
     Get the keywords in the table.
public synchronized  String[]leafKeys()
     Recursively get the keywords for the entire table.
public static  StringmakeConfigString(String oldString)
     From Context String (delimiters are / signs) makes Config String (delimiters are . signs).
public static  StringmakeContextString(String oldString)
     From Config String (delimiters are . signs) makes Context String (delimiters are / signs).
public static  StringmakeStringFromStrings(String[] strings)
     From String array makes String in which are String array elements separated with , sign.
Parameters:
  strings - String array.
public synchronized  voidremove(String keyword)
     Removes field with the defined key.
public  StringremoveArrayMark(String key)
     Removes array indicator (the key ends with "[]") if exists.
Parameters:
  key - The keyword of the field.
public synchronized  voidset(String keyword, String value)
     Sets the value of a field with the defined key.

Field Detail
CONTEXT_FOR_ENV_BIND
final public static String CONTEXT_FOR_ENV_BIND(Code)
Application component Context environment.



FILE_JNDI_ABS_PATH_NAME
final public static String FILE_JNDI_ABS_PATH_NAME(Code)
Absolute path to application configuration file.




Constructor Detail
JNDIAdapter
public JNDIAdapter()(Code)
Default constructor for empty adapter.



JNDIAdapter
public JNDIAdapter(String fileAbsolutePath, String factoryClass)(Code)
Constructor with defined file. This is used if file other than web.xml is used for reading Application's parameters with JNDI.
Parameters:
  fileAbsolutePath - absolute file path.
Parameters:
  factoryClass - InitialContextFactory class used for creatingapplication InitialContext.




Method Detail
containsKey
public boolean containsKey(String key)(Code)
Returns true if the specified key is found, false otherwise.
Parameters:
  key - The key whose existence is to be tested. true if the key was found, otherwise false.



get
public synchronized Object get(String keyword) throws NamingException(Code)
Get the value of a field as an object.
Parameters:
  keyword - The keyword of the field. This can be a simple keywordor a recursive, dot-seperated keyword path. The object value or null if its not found.
exception:
  KeywordValueException - If the keyword is not syntacticallylegal or is a non-leaf element of the keyword is not a section.



get
public synchronized Object get(String keyword, Object defaultValue) throws NamingException(Code)
Get the value of a field as an object, return a default if it does not exist.
Parameters:
  keyword - The keyword of the field. This can be a simple keywordor a recursive, dot-seperated keyword path.
Parameters:
  defaultValue - The default value to return it the keyword does notexist. The object value or defaultValue if its not found.
exception:
  KeywordValueException - If the keyword is not syntacticallylegal or is a non-leaf element of the keyword is not a section.



getResource
public synchronized Object getResource(String jndiName) throws NamingException(Code)



getStrings
public String[] getStrings(String key)(Code)
Get the value of a field as String array.
Parameters:
  key - The keyword of the field. This can be a simple keywordor a recursive, dot-seperated keyword path. The object value as String[] or null if its not found.



isArray
public static boolean isArray(String key)(Code)
Returns true if key has indicator that the field is array (the key ends with "[]")
Parameters:
  key - The keyword of the field. true if key has indicator that the field is array,otherwise false.



keys
public synchronized String[] keys()(Code)
Get the keywords in the table. This is only the keywords at the top level, its doesn't recurse. An string array of the keywords.



leafKeys
public synchronized String[] leafKeys()(Code)
Recursively get the keywords for the entire table. This returns the full keyword of all leaf values. An string array of the keywords.



makeConfigString
public static String makeConfigString(String oldString)(Code)
From Context String (delimiters are / signs) makes Config String (delimiters are . signs).
Parameters:
  oldString - Context String Transformed Config String.



makeContextString
public static String makeContextString(String oldString)(Code)
From Config String (delimiters are . signs) makes Context String (delimiters are / signs).
Parameters:
  oldString - Config String Transformed Context String.



makeStringFromStrings
public static String makeStringFromStrings(String[] strings)(Code)
From String array makes String in which are String array elements separated with , sign.
Parameters:
  strings - String array. Transformed String.



remove
public synchronized void remove(String keyword)(Code)
Removes field with the defined key.
Parameters:
  keyword - The keyword of the field.



removeArrayMark
public String removeArrayMark(String key)(Code)
Removes array indicator (the key ends with "[]") if exists.
Parameters:
  key - The keyword of the field. Keyword without "[]".



set
public synchronized void set(String keyword, String value)(Code)
Sets the value of a field with the defined key.
Parameters:
  keyword - The keyword of the field.
Parameters:
  value - The new field value.



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.