Java Doc for PropertyManager.java in  » Forum » yazd » com » Yasna » forum » 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 » Forum » yazd » com.Yasna.forum 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.Yasna.forum.PropertyManager

PropertyManager
public class PropertyManager (Code)
Manages properties for the entire Yazd system. Properties are merely pieces of information that need to be saved in between server restarts. The class also reports the version of Yazd.

At the moment, properties are stored in a Java Properties file. In a version of Yazd coming soon, the properties file format will move to XML. XML properties will allow hierarchical property structures which may mean the API of this class will have to change.

Yazd properties are only meant to be set and retrevied by core Yazd classes. Therefore, skin writers should probably ignore this class.

This class is implemented as a singleton since many classloaders seem to take issue with doing classpath resource loading from a static context.





Method Summary
protected  voiddeleteProp(String name)
    
public static  voiddeleteProperty(String name)
     Deletes a Yazd property.
protected  StringgetProp(String name)
     Gets a Yazd property.
public static  StringgetProperty(String name)
     Returns a Yazd property.
Parameters:
  name - the name of the property to return.
public static  StringgetYazdVersion()
     Returns the version number of Yazd as a String.
public static  intgetYazdVersionMajor()
     Returns the major version number of Yazd.
public static  intgetYazdVersionMinor()
     Returns the minor version number of Yazd.
public static  intgetYazdVersionRevision()
     Returns the revision version number of Yazd.
public  booleanpropFileExists()
     Returns true if the yazd.properties file exists where the path property purports that it does.
public  booleanpropFileIsReadable()
     Returns true if the properties are readable.
public  booleanpropFileIsWritable()
     Returns true if the properties are writable.
protected  EnumerationpropNames()
    
public static  booleanpropertyFileExists()
     Returns true if the yazd.properties file exists where the path property purports that it does.
public static  booleanpropertyFileIsReadable()
     Returns true if the properties are readable.
public static  booleanpropertyFileIsWritable()
     Returns true if the properties are writable.
public static  EnumerationpropertyNames()
     Returns the names of the Yazd properties.
public static  voidsetPath(String path)
    
protected  voidsetProp(String name, String value)
     Sets a Yazd property.
public static  voidsetProperty(String name, String value)
     Sets a Yazd property.



Method Detail
deleteProp
protected void deleteProp(String name)(Code)



deleteProperty
public static void deleteProperty(String name)(Code)
Deletes a Yazd property. If the property doesn't exist, the method does nothing.
Parameters:
  name - the name of the property to delete.



getProp
protected String getProp(String name)(Code)
Gets a Yazd property. Yazd properties are stored in yazd.properties. The properties file should be accesible from the classpath. Additionally, it should have a path field that gives the full path to where the file is located. Getting properties is a fast operation.
Parameters:
  name - the name of the property to get. the property specified by name.



getProperty
public static String getProperty(String name)(Code)
Returns a Yazd property.
Parameters:
  name - the name of the property to return. the property value specified by name.



getYazdVersion
public static String getYazdVersion()(Code)
Returns the version number of Yazd as a String. i.e. -- major.minor.revision



getYazdVersionMajor
public static int getYazdVersionMajor()(Code)
Returns the major version number of Yazd. i.e. -- 1.x.x



getYazdVersionMinor
public static int getYazdVersionMinor()(Code)
Returns the minor version number of Yazd. i.e. -- x.1.x



getYazdVersionRevision
public static int getYazdVersionRevision()(Code)
Returns the revision version number of Yazd. i.e. -- x.x.1



propFileExists
public boolean propFileExists()(Code)
Returns true if the yazd.properties file exists where the path property purports that it does.



propFileIsReadable
public boolean propFileIsReadable()(Code)
Returns true if the properties are readable. This method is mainly valuable at setup time to ensure that the properties file is setup correctly.



propFileIsWritable
public boolean propFileIsWritable()(Code)
Returns true if the properties are writable. This method is mainly valuable at setup time to ensure that the properties file is setup correctly.



propNames
protected Enumeration propNames()(Code)



propertyFileExists
public static boolean propertyFileExists()(Code)
Returns true if the yazd.properties file exists where the path property purports that it does.



propertyFileIsReadable
public static boolean propertyFileIsReadable()(Code)
Returns true if the properties are readable. This method is mainly valuable at setup time to ensure that the properties file is setup correctly.



propertyFileIsWritable
public static boolean propertyFileIsWritable()(Code)
Returns true if the properties are writable. This method is mainly valuable at setup time to ensure that the properties file is setup correctly.



propertyNames
public static Enumeration propertyNames()(Code)
Returns the names of the Yazd properties. an Enumeration of the Yazd property names.



setPath
public static void setPath(String path)(Code)



setProp
protected void setProp(String name, String value)(Code)
Sets a Yazd property. Because the properties must be saved to disk every time a property is set, property setting is relatively slow.



setProperty
public static void setProperty(String name, String value)(Code)
Sets a Yazd property. If the property doesn't already exists, a new one will be created.
Parameters:
  name - the name of the property being set.
Parameters:
  value - the value of the property being set.



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.