Package org.apache.openjpa.lib.conf
Class ProductDerivations
- java.lang.Object
-
- org.apache.openjpa.lib.conf.ProductDerivations
-
public class ProductDerivations extends java.lang.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 void
afterSpecificationSet(Configuration conf)
ApplyProductDerivation.afterSpecificationSet(org.apache.openjpa.lib.conf.Configuration)
callbacks to the the given instance.static void
beforeClose(Configuration conf)
Called as the first step of a Configuration's close() method.static void
beforeConfigurationConstruct(ConfigurationProvider cp)
ApplyProductDerivation.beforeConfigurationConstruct(org.apache.openjpa.lib.conf.ConfigurationProvider)
callbacks to the the given instance.static void
beforeConfigurationLoad(Configuration conf)
ApplyProductDerivation.beforeConfigurationLoad(org.apache.openjpa.lib.conf.Configuration)
callbacks to the the given instance.static java.lang.String
getConfigurationKey(java.lang.String partialKey, java.util.Map map)
Determine the full key name forpartialKey
, given the registered prefixes and the entries inmap
.static java.lang.String[]
getConfigurationPrefixes()
Return the recognized prefixes for configuration properties.static java.util.List<java.lang.String>
getFullyQualifiedAnchorsInPropertiesLocation(java.lang.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 java.util.Set<java.lang.String>
getSupportedQueryHints()
static ConfigurationProvider
load(java.io.File file, java.lang.String anchor, java.lang.ClassLoader loader)
Load given file, or return false if it is not a file this provider understands.static ConfigurationProvider
load(java.lang.String resource, java.lang.String anchor, java.lang.ClassLoader loader)
Load the given given resource, or return false if it is not a resource this provider understands.static ConfigurationProvider
loadDefaults(java.lang.ClassLoader loader)
Return aConfigurationProvider
that has parsed system defaults.static ConfigurationProvider
loadGlobals(java.lang.ClassLoader loader)
Return aConfigurationProvider
that has parsed system globals.static void
main(java.lang.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 java.lang.String[] getConfigurationPrefixes()
Return the recognized prefixes for configuration properties.
-
getConfigurationKey
public static java.lang.String getConfigurationKey(java.lang.String partialKey, java.util.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 throughmap
for a key starting with any of the known configuration prefixes and ending withpartialKey
and, if a value is found, using the prefix of that key. Otherwise, it uses the first registered prefix. The givenpartialKey
is 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 fatalBootstrapException
are 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 fatalBootstrapException
are 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 fatalBootstrapException
are 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(java.lang.String resource, java.lang.String anchor, java.lang.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(java.io.File file, java.lang.String anchor, java.lang.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(java.lang.ClassLoader loader)
Return aConfigurationProvider
that has parsed system defaults.
-
loadGlobals
public static ConfigurationProvider loadGlobals(java.lang.ClassLoader loader)
Return aConfigurationProvider
that has parsed system globals.
-
getFullyQualifiedAnchorsInPropertiesLocation
public static java.util.List<java.lang.String> getFullyQualifiedAnchorsInPropertiesLocation(java.lang.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
-
getSupportedQueryHints
public static java.util.Set<java.lang.String> getSupportedQueryHints()
-
main
public static void main(java.lang.String[] args)
Prints product derivation information.
-
-