Package org.apache.openjpa.lib.conf
Class ProductDerivations
- java.lang.Object
 - 
- org.apache.openjpa.lib.conf.ProductDerivations
 
 
- 
public class ProductDerivations extends Object
Utilities for running product derivations.- Author:
 - Abe White, Pinaki Poddar
 
 
- 
- 
Constructor Summary
Constructors Constructor Description ProductDerivations() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidafterSpecificationSet(Configuration conf)ApplyProductDerivation.afterSpecificationSet(org.apache.openjpa.lib.conf.Configuration)callbacks to the the given instance.static voidbeforeClose(Configuration conf)Called as the first step of a Configuration's close() method.static voidbeforeConfigurationConstruct(ConfigurationProvider cp)ApplyProductDerivation.beforeConfigurationConstruct(org.apache.openjpa.lib.conf.ConfigurationProvider)callbacks to the the given instance.static voidbeforeConfigurationLoad(Configuration conf)ApplyProductDerivation.beforeConfigurationLoad(org.apache.openjpa.lib.conf.Configuration)callbacks to the the given instance.static StringgetConfigurationKey(String partialKey, Map map)Determine the full key name forpartialKey, given the registered prefixes and the entries inmap.static String[]getConfigurationPrefixes()Return the recognized prefixes for configuration properties.static List<String>getFullyQualifiedAnchorsInPropertiesLocation(String propertiesLocation)Return a Listof all the fully-qualified anchors specified in propertiesLocation.static ProductDerivation[]getProductDerivations()Return all the product derivations registered in the current classloaderstatic Set<String>getSupportedQueryHints()static ConfigurationProviderload(File file, String anchor, ClassLoader loader)Load given file, or return false if it is not a file this provider understands.static ConfigurationProviderload(String resource, String anchor, ClassLoader loader)Load the given given resource, or return false if it is not a resource this provider understands.static ConfigurationProviderloadDefaults(ClassLoader loader)Return aConfigurationProviderthat has parsed system defaults.static ConfigurationProviderloadGlobals(ClassLoader loader)Return aConfigurationProviderthat has parsed system globals.static voidmain(String[] args)Prints product derivation information. 
 - 
 
- 
- 
Method Detail
- 
getProductDerivations
public static ProductDerivation[] getProductDerivations()
Return all the product derivations registered in the current classloader 
- 
getConfigurationPrefixes
public static String[] getConfigurationPrefixes()
Return the recognized prefixes for configuration properties. 
- 
getConfigurationKey
public static String getConfigurationKey(String partialKey, Map map)
Determine the full key name forpartialKey, given the registered prefixes and the entries inmap. This method computes the appropriate configuration prefix to use by looking throughmapfor a key starting with any of the known configuration prefixes and ending withpartialKeyand, if a value is found, using the prefix of that key. Otherwise, it uses the first registered prefix. The givenpartialKeyis first tested for containment in the given map without any prefix.- Since:
 - 0.9.7
 
 
- 
beforeConfigurationConstruct
public static void beforeConfigurationConstruct(ConfigurationProvider cp)
ApplyProductDerivation.beforeConfigurationConstruct(org.apache.openjpa.lib.conf.ConfigurationProvider)callbacks to the the given instance. Exceptions other than fatalBootstrapExceptionare swallowed. 
- 
beforeConfigurationLoad
public static void beforeConfigurationLoad(Configuration conf)
ApplyProductDerivation.beforeConfigurationLoad(org.apache.openjpa.lib.conf.Configuration)callbacks to the the given instance. Exceptions other than fatalBootstrapExceptionare swallowed. 
- 
afterSpecificationSet
public static void afterSpecificationSet(Configuration conf)
ApplyProductDerivation.afterSpecificationSet(org.apache.openjpa.lib.conf.Configuration)callbacks to the the given instance. Exceptions other than fatalBootstrapExceptionare swallowed. 
- 
beforeClose
public static void beforeClose(Configuration conf)
Called as the first step of a Configuration's close() method. Exceptions are swallowed.- Since:
 - 0.9.7
 
 
- 
load
public static ConfigurationProvider load(String resource, String anchor, ClassLoader loader)
Load the given given resource, or return false if it is not a resource this provider understands. The given class loader may be null.- Parameters:
 anchor- optional named anchor within a multiple-configuration resource
 
- 
load
public static ConfigurationProvider load(File file, String anchor, ClassLoader loader)
Load given file, or return false if it is not a file this provider understands.- Parameters:
 anchor- optional named anchor within a multiple-configuration file
 
- 
loadDefaults
public static ConfigurationProvider loadDefaults(ClassLoader loader)
Return aConfigurationProviderthat has parsed system defaults. 
- 
loadGlobals
public static ConfigurationProvider loadGlobals(ClassLoader loader)
Return aConfigurationProviderthat has parsed system globals. 
- 
getFullyQualifiedAnchorsInPropertiesLocation
public static List<String> getFullyQualifiedAnchorsInPropertiesLocation(String propertiesLocation)
Return a Listof all the fully-qualified anchors specified in propertiesLocation. The return values must be used in conjunction withpropertiesLocation. If there are no product derivations or if no product derivations could find anchors, this returns an empty list.- Since:
 - 1.1.0
 
 
- 
main
public static void main(String[] args)
Prints product derivation information. 
 - 
 
 -