public abstract class MetadataEnvironmentFactory
extends java.lang.Object
MetadataEnvironment
instances.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTEXT_PARAMETER_PREFIX
The prefix of the names of the context parameters:
"adfmde-" . |
Modifier | Constructor and Description |
---|---|
protected |
MetadataEnvironmentFactory()
Constructs a factory.
|
Modifier and Type | Method and Description |
---|---|
static void |
configureCurrentADFSessionOptions()
Deprecated.
Call AdfMetadataEnvironment.prepareDefaultMetadataContext()
instead. This method will be removed from this class because
it handles
ADFSessionOptions objects which are
specific to MDS repositories.
Configures the current ADFSessionOptions object according to
the current MetadataEnvironment object. Being "the current"
means an object is returned by ADFContext.getCurrent() . |
protected void |
configureCurrentADFSessionOptions(MetadataEnvironment env)
Deprecated.
New subclasses should not override this method. This method
will be removed in the future because it handles
ADFSessionOptions which are specific to MDS
repositories.
Configures the current ADFSessionOptions object for a given
MetadataEnvironment object. |
protected java.lang.String |
getContextParameter(ADFContext context,
java.lang.String name)
Returns the value of a parameter of a context for this factory to create
a new metadata environment.
|
static java.lang.String |
getContextParameter(java.lang.String name)
Returns the value of a parameter of the current context.
|
abstract boolean |
isCustomMetadataEnvironment(MetadataEnvironment e)
Returns
true if the given instance is a custom instance. |
static boolean |
isUnified()
Returns
true if the current state of the system supports
unified metadata environments. |
abstract MetadataEnvironment |
newInstance(java.util.Map<java.lang.String,java.lang.Object> config)
Creates a new instance of
MetadataEnvironment based on the
current user context and the configuration. |
protected boolean |
supportsUnifiedEnvironments()
Returns
true if the metadata environments created by this
factory are unified environments. |
public static final java.lang.String CONTEXT_PARAMETER_PREFIX
"adfmde-"
.protected MetadataEnvironmentFactory()
public abstract MetadataEnvironment newInstance(java.util.Map<java.lang.String,java.lang.Object> config)
MetadataEnvironment
based on the
current user context and the configuration.config
- the configuration of the new instance; null
if
the default configuration should be usedMetadataEnvironment
based on the
current user context and the configuration if suppliedpublic abstract boolean isCustomMetadataEnvironment(MetadataEnvironment e)
true
if the given instance is a custom instance. A
custom instance is an instance that is not created by this factory.e
- the instance to be checkedtrue
if the given instance is a custom instancenewInstance(java.util.Map<java.lang.String, java.lang.Object>)
protected boolean supportsUnifiedEnvironments()
true
if the metadata environments created by this
factory are unified environments.
A unified environment supports multiple repositories. A non-unified
environment supports only one single MDS repository. By default this
method returns true
. The implementation may allow this
method to return false
in a system that is not ready to
be transitioned into a unified environment but the new code is already
in place.
true
if the metadata environment is unified;
false
otherwisepublic static boolean isUnified()
true
if the current state of the system supports
unified metadata environments.true
if the current state of the system supports
unified metadata environments; false
otherwise@Deprecated protected void configureCurrentADFSessionOptions(MetadataEnvironment env)
ADFSessionOptions
which are specific to MDS
repositories.
Configures the current ADFSessionOptions
object for a given
MetadataEnvironment
object.env
- the MetadataEnvironment
object according to which
the current ADFSessionOptions
should be configuredjava.lang.IllegalArgumentException
- if the given argument is nulljava.lang.UnsupportedOperationException
- if this feature is unsupported@Deprecated public static void configureCurrentADFSessionOptions()
ADFSessionOptions
objects which are
specific to MDS repositories.
Configures the current ADFSessionOptions
object according to
the current MetadataEnvironment
object. Being "the current"
means an object is returned by ADFContext.getCurrent()
.java.lang.UnsupportedOperationException
- if this feature is unsupportedprotected java.lang.String getContextParameter(ADFContext context, java.lang.String name)
context
- the context for this factory to create a new metadata
environmentname
- the name of the parameternull
if the
value is null or the parameter does not existjava.lang.UnsupportedOperationException
- if this method is not supportedpublic static java.lang.String getContextParameter(java.lang.String name)
name
- the name of the parameternull
if the
value is null or the parameter does not existjava.lang.UnsupportedOperationException
- if this method is not supportedgetContextParameter(ADFContext, String)