Java Doc for JProp.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » common » 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 » JOnAS 4.8.6 » org.objectweb.jonas.common 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.objectweb.jonas.common.JProp

JProp
public class JProp (Code)
This class manages configuration properties for a JOnAS Server. It adopts the singleton design-pattern. Configuration parameters are read from .properties file (jonas.properties or resource.properties). In order to support dynamically created resources, JProp also allows for a .properties file generation using a java.lang.Properties object content
author:
   jonas-team
author:
   Adriana Danes
author:
   Florent Benoit
author:
  

    author:
      

  • author:
       ../03/2003 Adriana Danes
    author:
      

      author:
        
    1. Manage unique instances for resource.properties
      author:
        
    2. Replace 'config' with 'conf'
      author:
        
    3. Change initial configuration policy : read properties file in a sole location : JONAS_BASE/CONFIG_DIR/
      author:
        
    4. Replace method name getFilesEnv to getConfigFileEnv
      author:
        

    author:
      

  • author:
       05/05/2003 Adriana Danes. Support JProp instance creation for dynamically created resources.
    author:
      

author:
   05/2003 Florent Benoit. Add support of xml files and checkstyle


Field Summary
final public static  StringDOMAIN_NAME
    
final public static  StringJONASPREFIX
    
final public static  StringJONAS_BASE
    
final public static  StringJONAS_DEF_NAME
    
final public static  StringJONAS_NAME
    
final public static  StringJONAS_VERSIONS
    


Method Summary
public static  voiddeleteInstance(String fileName)
    
public  voidenv2Ctx(Context ctx)
    
public static  StringgetConfDir()
    
public  PropertiesgetConfigFileEnv()
     Returns JOnAS environment as configured with files properties only.
public  StringgetConfigFileXml()
    
public  PropertiesgetEnv()
     Returns JOnAS environment as configured with configuration file properties content and system properties.
public static  StringgetInstallRoot()
     Static method which return the JOnAS install root value.
public static  JPropgetInstance()
     Get the unique instance corresponding to the JOnAS server.
public static  JPropgetInstance(String fileName)
     Get one of the multiple instances corresponding to a given resource.
public static  JPropgetInstance(String fileName, Properties props)
     Get one of the multiple instances corresponding to a given resource.
public static  StringgetJonasBase()
    
public  StringgetPropFile()
    
public  StringgetValue(String key, String defaultVal)
     Returns the value of the related property.
public  StringgetValue(String key)
     Returns the value of the related property.
public  String[]getValueAsArray(String key)
     Returns the value of the related property as String [].
public  booleangetValueAsBoolean(String key, boolean def)
     Returns the value of the related property as boolean.
public  StringgetVersionFile()
    
public static  StringgetWorkDir()
    
public static  voidmain(String args)
     Displays the JOnAS properties values, as they are set by the different property files.
public static  voidremoveInstance(String fileName)
    
public  StringtoString()
    

Field Detail
DOMAIN_NAME
final public static String DOMAIN_NAME(Code)
Domain name



JONASPREFIX
final public static String JONASPREFIX(Code)
Prefix for jonas.properties file



JONAS_BASE
final public static String JONAS_BASE(Code)
-Djonas.base property



JONAS_DEF_NAME
final public static String JONAS_DEF_NAME(Code)
Default server name



JONAS_NAME
final public static String JONAS_NAME(Code)
JOnAS server name



JONAS_VERSIONS
final public static String JONAS_VERSIONS(Code)





Method Detail
deleteInstance
public static void deleteInstance(String fileName)(Code)
Remove the JProp instance corresponding to the given file name from the 'multiple' data structure and delete the file
Parameters:
  fileName - file name corresponding to the name of the resource to be removedand deleted from the file system



env2Ctx
public void env2Ctx(Context ctx) throws Exception(Code)
Bind all the properties found in file properties in a naming context the naming context must be allocated by the caller
Parameters:
  ctx - given context for bindings properties
throws:
  Exception - if it fails



getConfDir
public static String getConfDir()(Code)
Static method which return the working directory in jonas.base the jonas.base property



getConfigFileEnv
public Properties getConfigFileEnv()(Code)
Returns JOnAS environment as configured with files properties only. JOnAS properties



getConfigFileXml
public String getConfigFileXml()(Code)
Returns xml content of the resource file xml content of the resource file



getEnv
public Properties getEnv()(Code)
Returns JOnAS environment as configured with configuration file properties content and system properties. JOnAS properties



getInstallRoot
public static String getInstallRoot()(Code)
Static method which return the JOnAS install root value. the JOnAS install root value.



getInstance
public static JProp getInstance()(Code)
Get the unique instance corresponding to the JOnAS server. Create it at first call. unique instance corresponding to the JOnAS server.
throws:
  Exception - if no JProp can be built



getInstance
public static JProp getInstance(String fileName)(Code)
Get one of the multiple instances corresponding to a given resource. Create it at first call with a given configuration file name
Parameters:
  fileName - the name of the configuration file which is given by the resource name one of the multiple instances corresponding to a given resource.
throws:
  Exception - if no JProp can be built



getInstance
public static JProp getInstance(String fileName, Properties props)(Code)
Get one of the multiple instances corresponding to a given resource. Create it at first call with a given configuration file name
Parameters:
  fileName - the name of the configuration file
Parameters:
  props - the content of the configuration file to be written in fileName one of the multiple instances corresponding to a given resource.
throws:
  Exception - if no JProp can be built



getJonasBase
public static String getJonasBase()(Code)
Static method which return the jonas.base property the jonas.base property



getPropFile
public String getPropFile()(Code)
Returns properties filename JOnAS properties filename



getValue
public String getValue(String key, String defaultVal)(Code)
Returns the value of the related property. With default values.
Parameters:
  key - the search key
Parameters:
  defaultVal - if the key is not found return this default value property value



getValue
public String getValue(String key)(Code)
Returns the value of the related property. The method returns null if the property is not found.
Parameters:
  key - the wanted key property value, null if not exist



getValueAsArray
public String[] getValueAsArray(String key)(Code)
Returns the value of the related property as String []. The method returns null if the property is not found.
Parameters:
  key - the wanted key property value, null if not exist



getValueAsBoolean
public boolean getValueAsBoolean(String key, boolean def)(Code)
Returns the value of the related property as boolean.
Parameters:
  key - the wanted key
Parameters:
  def - default run if not found property value, true or false.



getVersionFile
public String getVersionFile()(Code)



getWorkDir
public static String getWorkDir()(Code)
Static method which return the working directory in jonas.base the jonas.base property



main
public static void main(String args)(Code)
Displays the JOnAS properties values, as they are set by the different property files.
Parameters:
  args - the arguments for launching this program



removeInstance
public static void removeInstance(String fileName)(Code)
Remove the JProp instance corresponding to the given file name from the 'multiple' data structure
Parameters:
  fileName - file name corresponding to the name of the resource to be removed



toString
public String toString()(Code)
String representation of the object for trace purpose String representation of this object



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.