Package org.apache.struts.util
Class MessageResourcesFactory
java.lang.Object
org.apache.struts.util.MessageResourcesFactory
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PropertyMessageResourcesFactory
Factory for
MessageResources
instances. The general usage
pattern for this class is:
- Call
MessageResourcesFactory().createFactory()
to retrieve aMessageResourcesFactory
instance. - Set properties as
required to configure this factory instance to create
MessageResources
instances with desired characteristics. - Call the
createResources()
method of the factory to retrieve a newly instantiatedMessageResources
instance.
- Version:
- $Rev$ $Date: 2005-08-29 23:57:50 -0400 (Mon, 29 Aug 2005) $
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected static Class
<? extends MessageResourcesFactory> The Java class to be used forMessageResourcesFactory
instances.protected MessageResourcesConfig
Configuration information for Message Resources.protected static String
The fully qualified class name to be used forMessageResourcesFactory
instances.protected boolean
The "return null" property value to which newly created MessageResourcess should be initialized. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MessageResourcesFactory
Create and return aMessageResourcesFactory
instance of the appropriate class, which can be used to create customizedMessageResources
instances.abstract MessageResources
createResources
(String config) Create and return a newly instansiatedMessageResources
.Set the configuration information for Message Resources.static String
The fully qualified class name that is used forMessageResourcesFactory
instances.boolean
Get default value of the "returnNull" property used to initialize newly created MessageResourcess.void
setConfig
(MessageResourcesConfig config) Return the configuration information for Message Resources.static void
setFactoryClass
(String factoryClass) Set the fully qualified class name that is used forMessageResourcesFactory
instances.void
setReturnNull
(boolean returnNull) Set the default value of the "returnNull" property newly created MessageResourcess are initialized to.
-
Field Details
-
clazz
The Java class to be used forMessageResourcesFactory
instances. -
factoryClass
The fully qualified class name to be used forMessageResourcesFactory
instances. -
config
Configuration information for Message Resources. -
returnNull
protected boolean returnNullThe "return null" property value to which newly created MessageResourcess should be initialized.
-
-
Constructor Details
-
MessageResourcesFactory
public MessageResourcesFactory()
-
-
Method Details
-
getConfig
Set the configuration information for Message Resources.- Since:
- Struts 1.2.8
-
setConfig
Return the configuration information for Message Resources.- Since:
- Struts 1.2.8
-
getReturnNull
public boolean getReturnNull()Get default value of the "returnNull" property used to initialize newly created MessageResourcess.- Returns:
- default value of the "returnNull" property newly created MessageResourcess are initialized to.
-
setReturnNull
public void setReturnNull(boolean returnNull) Set the default value of the "returnNull" property newly created MessageResourcess are initialized to.- Parameters:
returnNull
- default value of the "returnNull" MessageResourcess are initialized to.
-
createResources
Create and return a newly instansiatedMessageResources
. This method must be implemented by concrete subclasses.- Parameters:
config
- Configuration parameter(s) for the requested bundle
-
getFactoryClass
The fully qualified class name that is used forMessageResourcesFactory
instances.- Returns:
- class name that is used for
MessageResourcesFactory
instances
-
setFactoryClass
Set the fully qualified class name that is used forMessageResourcesFactory
instances.- Parameters:
factoryClass
- name that is used forMessageResourcesFactory
instances
-
createFactory
Create and return aMessageResourcesFactory
instance of the appropriate class, which can be used to create customizedMessageResources
instances. If no such factory can be created, returnnull
instead.
-