org.kuali.rice.kns.web.struts.action
Class KualiPropertyMessageResourcesFactory

java.lang.Object
  extended by org.apache.struts.util.MessageResourcesFactory
      extended by org.apache.struts.util.PropertyMessageResourcesFactory
          extended by org.kuali.rice.kns.web.struts.action.KualiPropertyMessageResourcesFactory
All Implemented Interfaces:
Serializable

public class KualiPropertyMessageResourcesFactory
extends org.apache.struts.util.PropertyMessageResourcesFactory

A custom MessageResourceFactory that delegates to the KualiConfigurationService's pre-loaded properties. This factory can be used in struts-config.xml files by specifying a factory attribute in the tag. Example:

See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
 
Fields inherited from class org.apache.struts.util.MessageResourcesFactory
clazz, config, factoryClass, returnNull
 
Constructor Summary
KualiPropertyMessageResourcesFactory()
           
 
Method Summary
 org.apache.struts.util.MessageResources createResources(String config)
          Uses KualiPropertyMessageResources, which allows multiple property files to be loaded into the defalt message set.
private  String removeSpacesAround(String csv)
          Removes the spaces around the elements on a csv list of elements.
 
Methods inherited from class org.apache.struts.util.MessageResourcesFactory
createFactory, getConfig, getFactoryClass, getReturnNull, setConfig, setFactoryClass, setReturnNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

KualiPropertyMessageResourcesFactory

public KualiPropertyMessageResourcesFactory()
Method Detail

createResources

public org.apache.struts.util.MessageResources createResources(String config)
Uses KualiPropertyMessageResources, which allows multiple property files to be loaded into the defalt message set.

Overrides:
createResources in class org.apache.struts.util.PropertyMessageResourcesFactory
See Also:
MessageResourcesFactory.createResources(java.lang.String)

removeSpacesAround

private String removeSpacesAround(String csv)
Removes the spaces around the elements on a csv list of elements.

A null input will return a null output.

Parameters:
csv - a list of elements in csv format e.g. foo, bar, baz
Returns:
a list of elements in csv format without spaces e.g. foo,bar,baz


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.