Java Doc for CommonConfig.java in  » Workflow-Engines » obe-1.0 » org » obe » 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 » Workflow Engines » obe 1.0 » org.obe.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.obe.util.CommonConfig

All known Subclasses:   org.obe.client.api.ClientConfig,  org.obe.spi.service.ServerConfig,
CommonConfig
public class CommonConfig (Code)
Provides common configuration-related functionality.
author:
   Adrian Price


Field Summary
final public static  StringCONFIG_DIR_PROP
     Property key for the configuration directory.
final protected static  StringCONFIG_FILE
    
final public static  StringCREDENTIALS_PROP
     Property key for the default JAAS credentials.
final public static  StringDATE_FORMAT_PROP
     Property key for the default date format.
final public static  StringDURATION_UNIT_PROP
     Property key for the default duration unit.
final public static  StringPRINCIPAL_PROP
     Property key for the default JAAS principal name.
final public static  StringPROTOCOL_PROP
     Property key for the default client protocol type.
final protected static  Log_logger
    
final protected static  Properties_props
    

Constructor Summary
protected  CommonConfig()
    

Method Summary
public static  URLfindResource(String resource)
     Locates a configuration resource.
protected static  booleangetBooleanProperty(String propertyName, boolean defaultValue)
    
public static  FilegetConfigDir()
     Returns the configuration directory.
public static  StringgetCredentials()
     Returns the credentials with which the client should authenticate.
public static  StringgetDefaultDateFormat()
     Returns the date format to be used when rendering dates.
public static  StringgetDefaultDurationUnit()
     Returns the default duration unit to use if an XPDL file does not specify a default.
protected static  intgetIntProperty(String propertyName, int defaultValue)
    
public static  StringgetPrincipal()
     Returns the default client principal name.
public static  StringgetProtocol()
     Returns the default client protocol type.
protected static  StringgetStringProperty(String propertyName, String defaultValue)
    
public static  InputSourceopenInputSource(String resource)
     Opens a SAX input source for a resource.
public static  InputStreamopenInputStream(String resource)
     Opens an input stream for the specified resource.
public static  OutputStreamopenOutputStream(String resource)
     Opens an output stream for the specified resource.
public static  ReaderopenReader(String resource)
     Opens a character stream for a resource.

Field Detail
CONFIG_DIR_PROP
final public static String CONFIG_DIR_PROP(Code)
Property key for the configuration directory.
See Also:   CommonConfig.getConfigDir()



CONFIG_FILE
final protected static String CONFIG_FILE(Code)



CREDENTIALS_PROP
final public static String CREDENTIALS_PROP(Code)
Property key for the default JAAS credentials.
See Also:   CommonConfig.getCredentials()



DATE_FORMAT_PROP
final public static String DATE_FORMAT_PROP(Code)
Property key for the default date format.
See Also:   CommonConfig.getDefaultDateFormat()



DURATION_UNIT_PROP
final public static String DURATION_UNIT_PROP(Code)
Property key for the default duration unit.
See Also:   CommonConfig.getDefaultDurationUnit()



PRINCIPAL_PROP
final public static String PRINCIPAL_PROP(Code)
Property key for the default JAAS principal name.
See Also:   CommonConfig.getPrincipal()



PROTOCOL_PROP
final public static String PROTOCOL_PROP(Code)
Property key for the default client protocol type.
See Also:   CommonConfig.getProtocol()



_logger
final protected static Log _logger(Code)



_props
final protected static Properties _props(Code)




Constructor Detail
CommonConfig
protected CommonConfig()(Code)




Method Detail
findResource
public static URL findResource(String resource)(Code)
Locates a configuration resource. The resource can either be in the configuration directory, or it can be packaged in obeconfig.jar.
Parameters:
  resource - The resource name. The URL of the resource, or null if it could not belocated.



getBooleanProperty
protected static boolean getBooleanProperty(String propertyName, boolean defaultValue)(Code)



getConfigDir
public static File getConfigDir()(Code)
Returns the configuration directory. Loose files in this directory override their counterparts in the obeconfig.jar archive.

The setting reflects the string value of the system property obe.config.dir. The configuration directory, defaulting to the current directory.
See Also:   CommonConfig.CONFIG_DIR_PROP




getCredentials
public static String getCredentials()(Code)
Returns the credentials with which the client should authenticate.

The setting reflects the string value of the configuration property obe.client.credentials. Client credentials, defaulting to "password".
See Also:   CommonConfig.CREDENTIALS_PROP




getDefaultDateFormat
public static String getDefaultDateFormat()(Code)
Returns the date format to be used when rendering dates.

The setting reflects the value of the configuration property obe.xpdl.date.format. Date format, defaulting to yyyy-MM-dd'T'HH:mm:ssZ.
See Also:   CommonConfig.DATE_FORMAT_PROP




getDefaultDurationUnit
public static String getDefaultDurationUnit()(Code)
Returns the default duration unit to use if an XPDL file does not specify a default.

The setting reflects the value of the configuration property obe.xpdl.duration.unit. Default duration unit, defaulting to "D" (day).
See Also:   CommonConfig.DURATION_UNIT_PROP




getIntProperty
protected static int getIntProperty(String propertyName, int defaultValue)(Code)



getPrincipal
public static String getPrincipal()(Code)
Returns the default client principal name.

The setting reflects the string value of the configuration property obe.client.principal. Client principal name, defaulting to "system".
See Also:   CommonConfig.PRINCIPAL_PROP




getProtocol
public static String getProtocol()(Code)
Returns the default client protocol type.

The setting reflects the string value of the configuration property obe.client.protocol. Client protocol type, defaulting to "local".
See Also:   CommonConfig.PROTOCOL_PROP




getStringProperty
protected static String getStringProperty(String propertyName, String defaultValue)(Code)



openInputSource
public static InputSource openInputSource(String resource)(Code)
Opens a SAX input source for a resource. The caller is responsible for closing the associated byte stream afterwards.
Parameters:
  resource - The resource name. The input source, or null if the resource could notbe located.



openInputStream
public static InputStream openInputStream(String resource)(Code)
Opens an input stream for the specified resource. The caller is responsible for closing the input stream after reading from it. The implementation checks first whether the resource is present as a file in the configuration directory, and if this is not the case it checks for the presence of the resource inside the obeconfig.jar file.
Parameters:
  resource - The partially qualified resource name, relative tothe configuration directory or the root of obeconfig.jar. The input stream, or null if the resource could notbe located.



openOutputStream
public static OutputStream openOutputStream(String resource)(Code)
Opens an output stream for the specified resource. The caller is responsible for closing the output stream after writing to it. The implementation attempts to open the specified file in the configuration directory (or a subdirectory thereof if the resource name contains a path).
Parameters:
  resource - The partially qualified resource name, relative tothe configuration directory. The output stream, or null if the resource could notbe located.



openReader
public static Reader openReader(String resource)(Code)
Opens a character stream for a resource. The caller is responsible for closing the reader afterwards.
Parameters:
  resource - The resource name. The character stream, or null if the resource couldnot be located.



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.