Renamed org.springframework.ui.format package to simply org.springframework.format package; 'ui' is not adding any value - it makes the package name longer and also discourages use of formatters outside in other "non ui" environments where localized formatting of field values is needed.

This commit is contained in:
Keith Donald
2009-11-05 15:21:22 +00:00
parent f0de1c3069
commit a62b413be4
41 changed files with 80 additions and 76 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ui.format.date;
package org.springframework.format.datetime;
import java.text.ParseException;
import java.util.Calendar;
@@ -22,6 +22,7 @@ import java.util.Locale;
import static org.junit.Assert.*;
import org.junit.Test;
import org.springframework.format.datetime.DateFormatter;
/**
* @author Keith Donald

View File

@@ -1,4 +1,4 @@
package org.springframework.ui.format.jodatime;
package org.springframework.format.datetime.joda;
import static org.junit.Assert.assertEquals;
@@ -15,9 +15,10 @@ import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.ui.format.annotation.DateTimeFormat;
import org.springframework.ui.format.annotation.DateTimeFormat.Style;
import org.springframework.ui.format.support.FormattingConversionService;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.Style;
import org.springframework.format.datetime.joda.JodaTimeFormattingConfigurer;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.validation.DataBinder;
public class JodaTimeFormattingTests {

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ui.format.number;
package org.springframework.format.number;
import static org.junit.Assert.assertEquals;
@@ -24,6 +24,7 @@ import java.text.ParseException;
import java.util.Locale;
import org.junit.Test;
import org.springframework.format.number.CurrencyFormatter;
/**
* @author Keith Donald

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ui.format.number;
package org.springframework.format.number;
import static org.junit.Assert.assertEquals;
@@ -23,7 +23,7 @@ import java.text.ParseException;
import java.util.Locale;
import org.junit.Test;
import org.springframework.ui.format.number.DecimalFormatter;
import org.springframework.format.number.DecimalFormatter;
/**
* @author Keith Donald

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ui.format.number;
package org.springframework.format.number;
import static org.junit.Assert.assertEquals;
@@ -22,7 +22,7 @@ import java.text.ParseException;
import java.util.Locale;
import org.junit.Test;
import org.springframework.ui.format.number.IntegerFormatter;
import org.springframework.format.number.IntegerFormatter;
/**
* @author Keith Donald

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ui.format.number;
package org.springframework.format.number;
import static org.junit.Assert.assertEquals;
@@ -23,7 +23,7 @@ import java.text.ParseException;
import java.util.Locale;
import org.junit.Test;
import org.springframework.ui.format.number.PercentFormatter;
import org.springframework.format.number.PercentFormatter;
/**
* @author Keith Donald

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ui.format.support;
package org.springframework.format.support;
import static org.junit.Assert.assertEquals;
@@ -31,11 +31,12 @@ import org.junit.Test;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.core.convert.TypeDescriptor;
import org.springframework.core.convert.converter.Converter;
import org.springframework.ui.format.annotation.DateTimeFormat.Style;
import org.springframework.ui.format.jodatime.DateTimeFormatAnnotationFormatterFactory;
import org.springframework.ui.format.jodatime.DateTimeParser;
import org.springframework.ui.format.jodatime.ReadablePartialPrinter;
import org.springframework.ui.format.number.IntegerFormatter;
import org.springframework.format.annotation.DateTimeFormat.Style;
import org.springframework.format.datetime.joda.DateTimeFormatAnnotationFormatterFactory;
import org.springframework.format.datetime.joda.DateTimeParser;
import org.springframework.format.datetime.joda.ReadablePartialPrinter;
import org.springframework.format.number.IntegerFormatter;
import org.springframework.format.support.FormattingConversionService;
/**
* @author Keith Donald
@@ -105,7 +106,7 @@ public class FormattingConversionServiceTests {
private static class Model {
@SuppressWarnings("unused")
@org.springframework.ui.format.annotation.DateTimeFormat(dateStyle = Style.SHORT)
@org.springframework.format.annotation.DateTimeFormat(dateStyle = Style.SHORT)
public Date date;
}

View File

@@ -44,8 +44,8 @@ import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.context.support.ResourceBundleMessageSource;
import org.springframework.context.support.StaticMessageSource;
import org.springframework.core.convert.support.DefaultConversionService;
import org.springframework.ui.format.number.DecimalFormatter;
import org.springframework.ui.format.support.FormattingConversionService;
import org.springframework.format.number.DecimalFormatter;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.util.StringUtils;
/**