|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jomc.model.modlet.DefaultModelProvider
public class DefaultModelProvider
Default object management and configuration ModelProvider
implementation.
ModelContext.findModel(java.lang.String)
Field Summary | |
---|---|
static String |
ENABLED_ATTRIBUTE_NAME
Constant for the name of the model context attribute backing property enabled . |
static String |
MODULE_LOCATION_ATTRIBUTE_NAME
Constant for the name of the model context attribute backing property moduleLocation . |
static String |
VALIDATING_ATTRIBUTE_NAME
Constant for the name of the model context attribute backing property validating . |
Constructor Summary | |
---|---|
DefaultModelProvider()
Creates a new DefaultModelProvider instance. |
Method Summary | |
---|---|
Model |
findModel(ModelContext context,
Model model)
|
Modules |
findModules(ModelContext context,
String model,
String location)
Searches a given context for modules. |
static String |
getDefaultModuleLocation()
Gets the default location searched for module resources. |
String |
getModuleLocation()
Gets the location searched for module resources. |
static boolean |
isDefaultEnabled()
Gets a flag indicating the provider is enabled by default. |
static boolean |
isDefaultValidating()
Gets a flag indicating the provider is validating resources by default. |
boolean |
isEnabled()
Gets a flag indicating the provider is enabled. |
boolean |
isValidating()
Gets a flag indicating the provider is validating resources. |
static void |
setDefaultEnabled(Boolean value)
Sets the flag indicating the provider is enabled by default. |
static void |
setDefaultModuleLocation(String value)
Sets the default location searched for module resources. |
static void |
setDefaultValidating(Boolean value)
Sets the flag indicating the provider is validating resources by default. |
void |
setEnabled(Boolean value)
Sets the flag indicating the provider is enabled. |
void |
setModuleLocation(String value)
Sets the location searched for module resources. |
void |
setValidating(Boolean value)
Sets the flag indicating the provider is validating resources. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ENABLED_ATTRIBUTE_NAME
enabled
.
findModel(org.jomc.modlet.ModelContext, org.jomc.modlet.Model)
,
ModelContext.getAttribute(java.lang.String)
,
Constant Field Valuespublic static final String MODULE_LOCATION_ATTRIBUTE_NAME
moduleLocation
.
findModel(org.jomc.modlet.ModelContext, org.jomc.modlet.Model)
,
ModelContext.getAttribute(java.lang.String)
,
Constant Field Valuespublic static final String VALIDATING_ATTRIBUTE_NAME
validating
.
findModules(org.jomc.modlet.ModelContext, java.lang.String, java.lang.String)
,
ModelContext.getAttribute(java.lang.String)
,
Constant Field ValuesConstructor Detail |
---|
public DefaultModelProvider()
DefaultModelProvider
instance.
Method Detail |
---|
public static boolean isDefaultEnabled()
The default enabled flag is controlled by system property
org.jomc.model.modlet.DefaultModelProvider.defaultEnabled
holding a value indicating the provider is
enabled by default. If that property is not set, the true
default is returned.
true
, if the provider is enabled by default; false
, if the provider is disabled by
default.setDefaultEnabled(java.lang.Boolean)
public static void setDefaultEnabled(Boolean value)
value
- The new value of the flag indicating the provider is enabled by default or null
.isDefaultEnabled()
public final boolean isEnabled()
true
, if the provider is enabled; false
, if the provider is disabled.isDefaultEnabled()
,
setEnabled(java.lang.Boolean)
public final void setEnabled(Boolean value)
value
- The new value of the flag indicating the provider is enabled or null
.isEnabled()
public static String getDefaultModuleLocation()
The default module location is controlled by system property
org.jomc.model.modlet.DefaultModelProvider.defaultModuleLocation
holding the location to search for
module resources by default. If that property is not set, the META-INF/jomc.xml
default is returned.
setDefaultModuleLocation(java.lang.String)
public static void setDefaultModuleLocation(String value)
value
- The new default location to search for module resources or null
.getDefaultModuleLocation()
public final String getModuleLocation()
getDefaultModuleLocation()
,
setModuleLocation(java.lang.String)
public final void setModuleLocation(String value)
value
- The new location to search for module resources or null
.getModuleLocation()
public static boolean isDefaultValidating()
The default validating flag is controlled by system property
org.jomc.model.modlet.DefaultModelProvider.defaultValidating
holding a value indicating the provider is
validating resources by default. If that property is not set, the true
default is returned.
true
, if the provider is validating resources by default; false
, if the provider is not
validating resources by default.isValidating()
,
setDefaultValidating(java.lang.Boolean)
public static void setDefaultValidating(Boolean value)
value
- The new value of the flag indicating the provider is validating resources by default or
null
.isDefaultValidating()
public final boolean isValidating()
true
, if the provider is validating resources; false
, if the provider is not validating
resources.isDefaultValidating()
,
setValidating(java.lang.Boolean)
public final void setValidating(Boolean value)
value
- The new value of the flag indicating the provider is validating resources or null
.isValidating()
public Modules findModules(ModelContext context, String model, String location) throws ModelException
context
- The context to search for modules.model
- The identifier of the model to search for modules.location
- The location to search at.
location
in context
or null
, if no modules are found.
NullPointerException
- if context
, model
or location
is null
.
ModelException
- if searching the context fails.isValidating()
,
VALIDATING_ATTRIBUTE_NAME
public Model findModel(ModelContext context, Model model) throws ModelException
findModel
in interface ModelProvider
Model
found in the context or null
, if no Model
is found or the provider is
disabled.
ModelException
isEnabled()
,
getModuleLocation()
,
findModules(org.jomc.modlet.ModelContext, java.lang.String, java.lang.String)
,
ENABLED_ATTRIBUTE_NAME
,
MODULE_LOCATION_ATTRIBUTE_NAME
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2005-2012 The JOMC Project. All Rights Reserved. |