| org.apache.openjpa.lib.conf.ProductDerivation
All known Subclasses: org.apache.openjpa.lib.conf.AbstractProductDerivation,
ProductDerivation | public interface ProductDerivation (Code) | | Hooks for deriving products with additional functionality.
Parses configuration information from global, default or explictly-specified
resources. All implementations of this interface will have a chance to mutate
a
Configuration both before and after the user-specified
configuration data is loaded. The order in which the product derivations are
evaluated is determined by the specificity of the derivation type.
author: Abe White author: Pinaki Poddar since: 0.4.1 |
TYPE_FEATURE | final public static int TYPE_FEATURE(Code) | | |
TYPE_PRODUCT | final public static int TYPE_PRODUCT(Code) | | |
afterSpecificationSet | public boolean afterSpecificationSet(Configuration conf)(Code) | | Called after the specification has been set.
true if given Configuration has been mutated. |
beforeConfigurationClose | public void beforeConfigurationClose(Configuration conf)(Code) | | Called before the given Configuration is closed.
since: 0.9.7 |
beforeConfigurationConstruct | public boolean beforeConfigurationConstruct(ConfigurationProvider cp)(Code) | | Provides the instance with a callback to mutate the initial properties
of the
ConfigurationProvider . This is primarily to alter or
add properties that determine what type of configuration is constructed,
and therefore is typically used at runtime only.
true if given ConfigurationProvider has been mutated. |
beforeConfigurationLoad | public boolean beforeConfigurationLoad(Configuration conf)(Code) | | Provides the instance with the opportunity to mutate
conf before the user configuration is applied.
true if given Configuration has been mutated. |
getAnchorsInResource | public List getAnchorsInResource(String resource) throws Exception(Code) | | Return a List of all the anchors defined in
resource . The returned names are not
fully-qualified, so must be used in conjunction with
resource in calls to
ProductDerivation.load(java.io.File,String) .
Returns null or an empty list if no anchors could be found.
since: 1.1.0 |
getConfigurationPrefix | public String getConfigurationPrefix()(Code) | | Return the configuration prefix for properties of this product.
|
getDefaultResourceLocation | public String getDefaultResourceLocation()(Code) | | Return a string identifying the default resource location for this
product derivation, if one exists. If there is no default location,
returns null .
since: 1.1.0 |
getType | public int getType()(Code) | | Return the type of derivation.
|
load | public ConfigurationProvider load(String resource, String anchor, ClassLoader loader) throws Exception(Code) | | Load the given given resource into the returned ConfigurationProvider,
or return null if it is not a resource this receiver understands.
The given class loader may be null.
Parameters: anchor - optional named anchor within a multiple-configurationresource |
load | public ConfigurationProvider load(File file, String anchor) throws Exception(Code) | | Load given file, or return null if it is not a file this receiver
understands.
Parameters: anchor - optional named anchor within a multiple-configuration file |
validate | public void validate() throws Exception(Code) | | Ensure that this derivation is valid. This action might consist of
loading classes for the product this derivation represents to be sure
they exist. Throw any throwable to indicate an invalid derivation.
Invalid derivations will not be used.
|
|
|