code: public static IModel<String> newResourceModel(final String resourceKey,
  		final Object[] parameters, final Component component, final String defaultValue)
  	{
  		if ((parameters != null) && (parameters.length > 0))
  		{
  			if ((defaultValue != null) && !defaultValue.isEmpty())
  			{
  				return ResourceModelFactory.newResourceModel(resourceKey, defaultValue, component,
  					parameters);
  			}
  			else
  			{
  				return ResourceModelFactory.newResourceModel(resourceKey, component, parameters);
  			}
  		}
  		else
  		{
  			if ((defaultValue != null) && !defaultValue.isEmpty())
  			{
  				return ResourceModelFactory.newResourceModel(resourceKey, component, defaultValue);
  			}
  			else
  			{
  				return ResourceModelFactory.newResourceModel(resourceKey, component);
  			}
  		}
  	}
docs: Factory method to create a new {@link StringResourceModel} from the given resource key, the
  parameters as an Object array, the component and a default value.
  
  @param resourceKey
  the resource key
  @param parameters
  the parameters
  @param component
  the component
  @param defaultValue
  the default value
  @return a new {@link StringResourceModel} as an {@link IModel}