org.jopendocument.util
Class ProductInfo
java.lang.Object
org.jopendocument.util.ProductInfo
public class ProductInfo
- extends java.lang.Object
Useful for defining product wide values, like version, from a property file.
- Author:
- Sylvain
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTIES_NAME
public static final java.lang.String PROPERTIES_NAME
- See Also:
- Constant Field Values
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
VERSION
public static final java.lang.String VERSION
- See Also:
- Constant Field Values
ProductInfo
public ProductInfo(java.lang.String name)
ProductInfo
public ProductInfo(java.util.Map<java.lang.String,java.lang.String> map)
ProductInfo
public ProductInfo(java.util.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 java.io.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:
java.io.IOException - if properties couldn't be loaded.
getProperty
public final java.lang.String getProperty(java.lang.String name)
getProperty
public final java.lang.String getProperty(java.lang.String name,
java.lang.String def)
getName
public final java.lang.String getName()
getVersion
public final java.lang.String getVersion()