org.jopendocument.util
Class ProductInfo
java.lang.Object
org.jopendocument.util.ProductInfo
public class ProductInfo
- extends Object
Useful for defining product wide values, like version, from a property file.
- Author:
- Sylvain
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTIES_NAME
public static final String PROPERTIES_NAME
- See Also:
- Constant Field Values
NAME
public static final String NAME
- See Also:
- Constant Field Values
VERSION
public static final String VERSION
- See Also:
- Constant Field Values
ProductInfo
public ProductInfo(String name)
ProductInfo
public ProductInfo(Map<String,String> map)
ProductInfo
public ProductInfo(Properties props)
getInstance
public static final ProductInfo getInstance()
- If
setInstance(ProductInfo)
was called with a non-null value, return that ;
otherwise use createDefault()
.
- Returns:
- the current instance, can be
null
.
setInstance
public static void setInstance(ProductInfo i)
- Set the current instance.
- Parameters:
i
- the new instance, can be null
.
createDefault
public static final ProductInfo createDefault()
throws IOException
- Create a product info from the default properties file, "/product.properties".
- Returns:
- the default properties, or
null
if they couldn't be found.
- Throws:
IOException
- if properties couldn't be loaded.
getProperty
public final String getProperty(String name)
getProperty
public final String getProperty(String name,
String def)
getName
public final String getName()
getVersion
public final String getVersion()
Copyright © 2010 jOpenDocument All Rights Reserved.