org.apache.struts.util

Class MessageResourcesFactory

public abstract class MessageResourcesFactory extends Object implements Serializable

Factory for MessageResources instances. The general usage pattern for this class is:

Version: $Rev: 264684 $ $Date: 2005-08-30 04:08:01 +0100 (Tue, 30 Aug 2005) $

Field Summary
protected static Classclazz
The Java class to be used for MessageResourcesFactory instances.
protected MessageResourcesConfigconfig
Configuration information for Message Resources.
protected static StringfactoryClass
The fully qualified class name to be used for MessageResourcesFactory instances.
static LogLOG
Commons Logging instance.
protected booleanreturnNull
The "return null" property value to which newly created MessageResourcess should be initialized.
Method Summary
static MessageResourcesFactorycreateFactory()
Create and return a MessageResourcesFactory instance of the appropriate class, which can be used to create customized MessageResources instances.
abstract MessageResourcescreateResources(String config)
Create and return a newly instansiated MessageResources.
MessageResourcesConfiggetConfig()
Set the configuration information for Message Resources.
static StringgetFactoryClass()
The fully qualified class name that is used for MessageResourcesFactory instances.
booleangetReturnNull()
Get 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 for MessageResourcesFactory instances.
voidsetReturnNull(boolean returnNull)
Set the default value of the "returnNull" property newly created MessageResourcess are initialized to.

Field Detail

clazz

protected static transient Class clazz
The Java class to be used for MessageResourcesFactory instances.

config

protected MessageResourcesConfig config
Configuration information for Message Resources.

factoryClass

protected static String factoryClass
The fully qualified class name to be used for MessageResourcesFactory instances.

LOG

private static Log LOG
Commons Logging instance.

returnNull

protected boolean returnNull
The "return null" property value to which newly created MessageResourcess should be initialized.

Method Detail

createFactory

public static MessageResourcesFactory createFactory()
Create and return a MessageResourcesFactory instance of the appropriate class, which can be used to create customized MessageResources instances. If no such factory can be created, return null instead.

createResources

public abstract MessageResources createResources(String config)
Create and return a newly instansiated MessageResources. This method must be implemented by concrete subclasses.

Parameters: config Configuration parameter(s) for the requested bundle

getConfig

public MessageResourcesConfig getConfig()
Set the configuration information for Message Resources.

Since: Struts 1.2.8

getFactoryClass

public static String getFactoryClass()
The fully qualified class name that is used for MessageResourcesFactory instances.

Returns: class name that is used for MessageResourcesFactory instances

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.

setConfig

public void setConfig(MessageResourcesConfig config)
Return the configuration information for Message Resources.

Since: Struts 1.2.8

setFactoryClass

public static void setFactoryClass(String factoryClass)
Set the fully qualified class name that is used for MessageResourcesFactory instances.

Parameters: factoryClass name that is used for MessageResourcesFactory instances

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.

Copyright B) 2000-2007 - The Apache Software Foundation