Java Doc for VDSProperties.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » common » 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 » pegasus 2.1.0 » org.griphyn.common.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.griphyn.common.util.VDSProperties

VDSProperties
public class VDSProperties (Code)
This class creates a common interface to handle package properties. The package properties are meant as read-only (so far, until requirements crop up for write access). The class is implemented as a Singleton pattern.
author:
   Jens-S. Vöckler
author:
   Yong Zhao
author:
   Karan Vahi
version:
   $Revision: 70 $


Field Summary
final public static  StringOLD_USER_PROPERTY_FILENAME
     Basename of the (old) file to read for user properties.
final public static  StringPROPERTY_FILENAME
    
final public static  StringUSER_PROPERTY_FILENAME
     Basename of the (new) file to read for user properties.

Constructor Summary
protected  VDSProperties(String propFilename)
     ctor.

Method Summary
protected static  PropertiesaddProperties(Properties a, Properties b)
     Adds new properties to an existing set of properties while substituting variables.
public  FilegetDataDir()
     Accessor to $PEGASUS_HOME/share.
public  FilegetLocalStateDir()
     Accessor to $PEGASUS_HOME/var.
public  StringgetPegasusHome()
     Accessor: Obtains the root directory of the Pegasus runtime system.
public  StringgetProperty(String key)
     Accessor: access to the internal properties as read from file. An existing system property of the same key will have precedence over any project property.
public  StringgetProperty(String key, String defValue)
     Accessor: access to the internal properties as read from file An existing system property of the same key will have precedence over any project property.
public  FilegetSharedStateDir()
     Accessor to $PEGASUS_HOME/com.
public  FilegetSysConfDir()
     Accessor to $PEGASUS_HOME/etc.
public  StringgetVDSHome()
     Accessor: Obtains the root directory of the VDS runtime system.
public static  VDSPropertiesinstance()
     Singleton threading: Creates the one and only instance of the properties in the current application.
public  PropertiesmatchingSubset(String prefix, boolean keepPrefix)
     Extracts a specific property key subset from the known properties. The prefix may be removed from the keys in the resulting dictionary, or it may be kept.
public static  PropertiesmatchingSubset(Properties properties, String prefix, boolean keepPrefix)
     Extracts a specific property key subset from the properties passed. The prefix may be removed from the keys in the resulting dictionary, or it may be kept.
public static  VDSPropertiesnoHassleInstance()
     Singleton interface: Creates the one and only instance of the properties in the current application, and does not bother the programmer with exceptions.
public static  VDSPropertiesnonSingletonInstance(String propFilename)
     Create a temporary property that is not attached to the Singleton. This may be helpful with portal, which do magic things during the lifetime of a process.
Parameters:
  propFilename - is the full path name to the location of theproperties file to read.
public  EnumerationpropertyNames()
    
public  ObjectsetProperty(String key, String value)
     Accessor: Overwrite any properties from within the program.
Parameters:
  key - is the key to look up
Parameters:
  value - is the new property value to place in the system.
public  intsize()
     Accessor: Obtains the number of properties known to the project.

Field Detail
OLD_USER_PROPERTY_FILENAME
final public static String OLD_USER_PROPERTY_FILENAME(Code)
Basename of the (old) file to read for user properties. Warning, the old name will eventually fall prey to bit rot.



PROPERTY_FILENAME
final public static String PROPERTY_FILENAME(Code)
Basename of the file to read to obtain system properties



USER_PROPERTY_FILENAME
final public static String USER_PROPERTY_FILENAME(Code)
Basename of the (new) file to read for user properties.




Constructor Detail
VDSProperties
protected VDSProperties(String propFilename) throws IOException, MissingResourceException(Code)
ctor. This initializes the local instance of properties from a central file.
Parameters:
  propFilename - is the basename of the file to read. This filewill be looked for in the $PEGASUS_HOME/etc directory. Usually, the namewill be set from the PROPERTY_FILENAME constant above.Alternatively, the name will be ignored, if an alternative propertieslocation is specified via -Dpegasus.properties.
exception:
  IOException - will be thrown if reading the property filegoes awry.
exception:
  MissingResourceException - will be thrown if you forgotto specify the -Dpegasus.home=$PEGASUS_HOME to the runtimeenvironment.




Method Detail
addProperties
protected static Properties addProperties(Properties a, Properties b)(Code)
Adds new properties to an existing set of properties while substituting variables. This function will allow value substitutions based on other property values. Value substitutions may not be nested. A value substitution will be ${property.key}, where the dollar-brace and close-brace are being stripped before looking up the value to replace it with. Note that the ${..} combination must be escaped from the shell.
Parameters:
  a - is the initial set of known properties (besides System ones)
Parameters:
  b - is the set of properties to add to a the combined set of properties from a and b.



getDataDir
public File getDataDir()(Code)
Accessor to $PEGASUS_HOME/share. The files in this directory have a low change frequency, are effectively read-only, can be shared via a networked FS, and they are valid for multiple users. the "share" directory of the VDS runtime system.



getLocalStateDir
public File getLocalStateDir()(Code)
Accessor to $PEGASUS_HOME/var. The files in this directory have a high change frequency, are effectively read-write, they reside on a per-machine basis, and they are valid usually for a single user. the "var" directory of the VDS runtime system.



getPegasusHome
public String getPegasusHome()(Code)
Accessor: Obtains the root directory of the Pegasus runtime system. the root directory of the Pegasus runtime system, as initiallyset from the system properties.



getProperty
public String getProperty(String key)(Code)
Accessor: access to the internal properties as read from file. An existing system property of the same key will have precedence over any project property. This method will remove leading and trailing ASCII control characters and whitespaces.
Parameters:
  key - is the key to look up the value for the key, or null, if not found.



getProperty
public String getProperty(String key, String defValue)(Code)
Accessor: access to the internal properties as read from file An existing system property of the same key will have precedence over any project property. This method will remove leading and trailing ASCII control characters and whitespaces.
Parameters:
  key - is the key to look up
Parameters:
  defValue - is a default to use, if no value can be found for the key. the value for the key, or the default value, if not found.



getSharedStateDir
public File getSharedStateDir()(Code)
Accessor to $PEGASUS_HOME/com. The files in this directory have a high change frequency, are effectively read-write, they reside on a per-machine basis, and they are valid usually for a single user. the "com" directory of the VDS runtime system.



getSysConfDir
public File getSysConfDir()(Code)
Accessor to $PEGASUS_HOME/etc. The files in this directory have a low change frequency, are effectively read-only, they reside on a per-machine basis, and they are valid usually for a single user. the "etc" directory of the VDS runtime system.



getVDSHome
public String getVDSHome()(Code)
Accessor: Obtains the root directory of the VDS runtime system. Kept to make ChimeraProperties.java to compile for time being the root directory of the Pegasus runtime system, as initiallyset from the system properties.



instance
public static VDSProperties instance() throws IOException, MissingResourceException(Code)
Singleton threading: Creates the one and only instance of the properties in the current application. a reference to the properties.
exception:
  IOException - will be thrown if reading the property filegoes awry.
exception:
  MissingResourceException - will be thrown if you forgotto specify the -Dpegasus.home=$PEGASUS_HOME to the runtimeenvironment.
See Also:   VDSProperties.noHassleInstance()



matchingSubset
public Properties matchingSubset(String prefix, boolean keepPrefix)(Code)
Extracts a specific property key subset from the known properties. The prefix may be removed from the keys in the resulting dictionary, or it may be kept. In the latter case, exact matches on the prefix will also be copied into the resulting dictionary.
Parameters:
  prefix - is the key prefix to filter the properties by.
Parameters:
  keepPrefix - if true, the key prefix is kept in the resultingdictionary. As side-effect, a key that matches the prefix exactlywill also be copied. If false, the resulting dictionary's keys areshortened by the prefix. An exact prefix match will not be copied,as it would result in an empty string key. a property dictionary matching the filter key. May bean empty dictionary, if no prefix matches were found.
See Also:   VDSProperties.getProperty(String)
See Also:    is used to assemble matches



matchingSubset
public static Properties matchingSubset(Properties properties, String prefix, boolean keepPrefix)(Code)
Extracts a specific property key subset from the properties passed. The prefix may be removed from the keys in the resulting dictionary, or it may be kept. In the latter case, exact matches on the prefix will also be copied into the resulting dictionary.
Parameters:
  prefix - is the key prefix to filter the properties by.
Parameters:
  keepPrefix - if true, the key prefix is kept in the resultingdictionary. As side-effect, a key that matches the prefix exactlywill also be copied. If false, the resulting dictionary's keys areshortened by the prefix. An exact prefix match will not be copied,as it would result in an empty string key. a property dictionary matching the filter key. May bean empty dictionary, if no prefix matches were found.
See Also:   VDSProperties.getProperty(String)
See Also:    is used to assemble matches



noHassleInstance
public static VDSProperties noHassleInstance()(Code)
Singleton interface: Creates the one and only instance of the properties in the current application, and does not bother the programmer with exceptions. Rather, exceptions from the underlying instance() call are caught, converted to an error message on stderr, and the program is exited. a reference to the properties.
See Also:   VDSProperties.instance()



nonSingletonInstance
public static VDSProperties nonSingletonInstance(String propFilename) throws IOException, MissingResourceException(Code)
Create a temporary property that is not attached to the Singleton. This may be helpful with portal, which do magic things during the lifetime of a process.
Parameters:
  propFilename - is the full path name to the location of theproperties file to read. In case of null, the default locationwill be taken a reference to the parsed properties.
exception:
  IOException - will be thrown if reading the property filegoes awry.
exception:
  MissingResourceException - will be thrown if you forgotto specify the -Dpegasus.home=$PEGASUS_HOME to the runtimeenvironment.
See Also:   VDSProperties.instance()



propertyNames
public Enumeration propertyNames()(Code)
Accessor: enumerate all keys known to this property collection an enumerator for the keys of the properties.



setProperty
public Object setProperty(String key, String value)(Code)
Accessor: Overwrite any properties from within the program.
Parameters:
  key - is the key to look up
Parameters:
  value - is the new property value to place in the system. the old value, or null if it didn't exist before.



size
public int size()(Code)
Accessor: Obtains the number of properties known to the project. number of properties in the project property space.



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.