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 aMessageResourcesFactoryinstance. - Set properties as
required to configure this factory instance to create
MessageResourcesinstances with desired characteristics. - Call the
createResources()method of the factory to retrieve a newly instantiatedMessageResourcesinstance.
- Version:
- $Rev$ $Date: 2005-08-29 23:57:50 -0400 (Mon, 29 Aug 2005) $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static Class<? extends MessageResourcesFactory> The Java class to be used forMessageResourcesFactoryinstances.protected MessageResourcesConfigConfiguration information for Message Resources.protected static StringThe fully qualified class name to be used forMessageResourcesFactoryinstances.protected booleanThe "return null" property value to which newly created MessageResourcess should be initialized. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageResourcesFactoryCreate and return aMessageResourcesFactoryinstance of the appropriate class, which can be used to create customizedMessageResourcesinstances.abstract MessageResourcescreateResources(String config) Create and return a newly instansiatedMessageResources.Set the configuration information for Message Resources.static StringThe fully qualified class name that is used forMessageResourcesFactoryinstances.booleanGet default value of the "returnNull" property used to initialize newly created MessageResourcess.voidsetConfig(MessageResourcesConfig config) Return the configuration information for Message Resources.static voidsetFactoryClass(String factoryClass) Set the fully qualified class name that is used forMessageResourcesFactoryinstances.voidsetReturnNull(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 forMessageResourcesFactoryinstances. -
factoryClass
The fully qualified class name to be used forMessageResourcesFactoryinstances. -
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 forMessageResourcesFactoryinstances.- Returns:
- class name that is used for
MessageResourcesFactoryinstances
-
setFactoryClass
Set the fully qualified class name that is used forMessageResourcesFactoryinstances.- Parameters:
factoryClass- name that is used forMessageResourcesFactoryinstances
-
createFactory
Create and return aMessageResourcesFactoryinstance of the appropriate class, which can be used to create customizedMessageResourcesinstances. If no such factory can be created, returnnullinstead.
-