incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmatth...@apache.org
Subject svn commit: r1063298 [2/2] - in /incubator/isis/trunk: alternatives/embedded/src/main/java/org/apache/isis/alternatives/embedded/internal/ alternatives/remoting/common/src/main/java/org/apache/isis/alternatives/remoting/common/client/persistence/ alter...
Date Tue, 25 Jan 2011 14:26:44 GMT
Modified: incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/JavaUtilDateValueSemanticsProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/JavaUtilDateValueSemanticsProviderTest.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/JavaUtilDateValueSemanticsProviderTest.java
(original)
+++ incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/JavaUtilDateValueSemanticsProviderTest.java
Tue Jan 25 14:26:42 2011
@@ -33,6 +33,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetHolderImpl;
 import org.apache.isis.core.metamodel.facets.object.parseable.TextEntryParseException;
@@ -78,7 +79,7 @@ public class JavaUtilDateValueSemanticsP
     @Test
     public void testTitleOf() {
         final String EXPECTED = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new java.util.Date(0));
-        assertEquals(EXPECTED, getValue().displayTitleOf(date));
+        assertEquals(EXPECTED, getValue().displayTitleOf(date, (Localization) null));
     }
 
     @Test

Modified: incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/LongValueSemanticsProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/LongValueSemanticsProviderTest.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/LongValueSemanticsProviderTest.java
(original)
+++ incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/LongValueSemanticsProviderTest.java
Tue Jan 25 14:26:42 2011
@@ -29,6 +29,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetHolderImpl;
 import org.apache.isis.core.metamodel.facets.object.parseable.TextEntryParseException;
@@ -68,7 +69,7 @@ public class LongValueSemanticsProviderT
 
     @Test
     public void testOutputAsString() {
-        assertEquals("367,322", value.displayTitleOf(longObj));
+        assertEquals("367,322", value.displayTitleOf(longObj, (Localization) null));
     }
 
     @Test

Modified: incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/MoneyValueSemanticsProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/MoneyValueSemanticsProviderTest.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/MoneyValueSemanticsProviderTest.java
(original)
+++ incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/MoneyValueSemanticsProviderTest.java
Tue Jan 25 14:26:42 2011
@@ -30,6 +30,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.applib.value.Money;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetHolderImpl;
@@ -80,17 +81,17 @@ public class MoneyValueSemanticsProvider
     @Test
     public void testTitleOfWithPounds() {
         originalMoney = new Money(10.5, "gbp");
-        assertEquals(POUND_SYMBOL + "10.50", adapter.displayTitleOf(originalMoney));
+        assertEquals(POUND_SYMBOL + "10.50", adapter.displayTitleOf(originalMoney, (Localization)
null));
     }
 
     @Test
     public void testTitleOfWithNonLocalCurrency() {
-        assertEquals("10.50 USD", adapter.displayTitleOf(createMoney(10.50, "usd")));
+        assertEquals("10.50 USD", adapter.displayTitleOf(createMoney(10.50, "usd"), (Localization)
null));
     }
 
     @Test
     public void testTitleWithUnknownCurrency() {
-        assertEquals("10.50 UNK", adapter.displayTitleOf(createMoney(10.50, "UNK")));
+        assertEquals("10.50 UNK", adapter.displayTitleOf(createMoney(10.50, "UNK"), (Localization)
null));
     }
 
     @Test
@@ -117,14 +118,14 @@ public class MoneyValueSemanticsProvider
     @Test
     public void testSpecifyingCurrencyInEntry() {
         final Object parsed = adapter.parseTextEntry(originalMoney, "3021.50 EUr");
-        assertEquals("3,021.50 EUR", adapter.displayTitleOf(parsed));
+        assertEquals("3,021.50 EUR", adapter.displayTitleOf(parsed, (Localization) null));
     }
 
     @Test
     public void testUsingLocalCurrencySymbol() {
         // MoneyValueSemanticsProvider adapter = new MoneyValueSemanticsProvider(new Money(0L,
"gbp"));
         final Object parsed = adapter.parseTextEntry(originalMoney, POUND_SYMBOL + "3021.50");
-        assertEquals(POUND_SYMBOL + "3,021.50", adapter.titleString(parsed));
+        assertEquals(POUND_SYMBOL + "3,021.50", adapter.titleString(parsed, null));
     }
 
     @Test
@@ -146,7 +147,7 @@ public class MoneyValueSemanticsProvider
     @Test
     public void testNewValueDefaultsToLocalCurrency() throws Exception {
         final Money parsed = adapter.parseTextEntry(originalMoney, "3021.50");
-        assertEquals(POUND_SYMBOL + "3,021.50", adapter.displayTitleOf(parsed));
+        assertEquals(POUND_SYMBOL + "3,021.50", adapter.displayTitleOf(parsed, (Localization)
null));
     }
 
     @Test

Modified: incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/PercentageValueSemanticsProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/PercentageValueSemanticsProviderTest.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/PercentageValueSemanticsProviderTest.java
(original)
+++ incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/PercentageValueSemanticsProviderTest.java
Tue Jan 25 14:26:42 2011
@@ -28,6 +28,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.applib.value.Percentage;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetHolderImpl;
@@ -88,7 +89,7 @@ public class PercentageValueSemanticsPro
 
     @Test
     public void testTitleOf() {
-        assertEquals("10%", adapter.displayTitleOf(percentage));
+        assertEquals("10%", adapter.displayTitleOf(percentage, (Localization) null));
     }
 
     @Test

Modified: incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/PolishMoneyValueSemanticsProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/PolishMoneyValueSemanticsProviderTest.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/PolishMoneyValueSemanticsProviderTest.java
(original)
+++ incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/PolishMoneyValueSemanticsProviderTest.java
Tue Jan 25 14:26:42 2011
@@ -31,6 +31,7 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.applib.value.Money;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetHolderImpl;
@@ -83,17 +84,17 @@ public class PolishMoneyValueSemanticsPr
 
     @Test
     public void testTitleOfWithZlotych() {
-        assertEquals("10,5 " + ZLOTYCH_SYMBOL, adapter.displayTitleOf(originalMoney));
+        assertEquals("10,5 " + ZLOTYCH_SYMBOL, adapter.displayTitleOf(originalMoney, (Localization)
null));
     }
 
     @Test
     public void testTitleOfWithNonLocalCurrency() {
-        assertEquals("10,5 USD", adapter.displayTitleOf(createMoney(10.50, "usd")));
+        assertEquals("10,5 USD", adapter.displayTitleOf(createMoney(10.50, "usd"), (Localization)
null));
     }
 
     @Test
     public void testTitleWithUnknownCurrency() {
-        assertEquals("10,5 UNK", adapter.displayTitleOf(createMoney(10.50, "UNK")));
+        assertEquals("10,5 UNK", adapter.displayTitleOf(createMoney(10.50, "UNK"), (Localization)
null));
     }
 
     @Test
@@ -118,20 +119,20 @@ public class PolishMoneyValueSemanticsPr
     @Test
     public void testSpecifyingCurrencyInEntry() {
         final Object parsed = adapter.parseTextEntry(originalMoney, "3021,50 cad");
-        assertEquals("3" + CURRENCY_SPACE + "021,5 CAD", adapter.displayTitleOf(parsed));
+        assertEquals("3" + CURRENCY_SPACE + "021,5 CAD", adapter.displayTitleOf(parsed, (Localization)
null));
     }
 
     @Test
     public void testUsingLocalCurrencySymbol() {
         // MoneyValueSemanticsProvider adapter = new MoneyValueSemanticsProvider(new Money(0L,
"gbp"));
         final Object parsed = adapter.parseTextEntry(originalMoney, "3021,50 " + ZLOTYCH_SYMBOL);
-        assertEquals("3" + CURRENCY_SPACE + "021,5 " + ZLOTYCH_SYMBOL, adapter.titleString(parsed));
+        assertEquals("3" + CURRENCY_SPACE + "021,5 " + ZLOTYCH_SYMBOL, adapter.titleString(parsed,
(Localization) null));
     }
 
     @Test
     public void testInvalidCurrencySuffixRejected() throws Exception {
         final Object parsed = adapter.parseTextEntry(originalMoney, "3" + CURRENCY_SPACE
+ "021,50  Dm");
-        assertEquals("3" + CURRENCY_SPACE + "021,5 " + ZLOTYCH_SYMBOL, adapter.titleString(parsed));
+        assertEquals("3" + CURRENCY_SPACE + "021,5 " + ZLOTYCH_SYMBOL, adapter.titleString(parsed,
null));
     }
 
     @Test
@@ -145,7 +146,7 @@ public class PolishMoneyValueSemanticsPr
     @Test
     public void testNewValueDefaultsToLocalCurrency() throws Exception {
         final Money parsed = adapter.parseTextEntry(originalMoney, "3021,50");
-        assertEquals("3" + CURRENCY_SPACE + "021,5 " + ZLOTYCH_SYMBOL, adapter.displayTitleOf(parsed));
+        assertEquals("3" + CURRENCY_SPACE + "021,5 " + ZLOTYCH_SYMBOL, adapter.displayTitleOf(parsed,
(Localization) null));
     }
 
     @Test

Modified: incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/ShortValueSemanticsProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/ShortValueSemanticsProviderTest.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/ShortValueSemanticsProviderTest.java
(original)
+++ incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/ShortValueSemanticsProviderTest.java
Tue Jan 25 14:26:42 2011
@@ -29,6 +29,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetHolderImpl;
 import org.apache.isis.core.metamodel.facets.object.parseable.TextEntryParseException;
@@ -68,12 +69,12 @@ public class ShortValueSemanticsProvider
 
     @Test
     public void testTitleOfForPositiveValue() {
-        assertEquals("32", value.displayTitleOf(short1));
+        assertEquals("32", value.displayTitleOf(short1, (Localization) null));
     }
 
     @Test
     public void testTitleOfForLargestNegativeValue() {
-        assertEquals("-128", value.displayTitleOf(Short.valueOf((short) -128)));
+        assertEquals("-128", value.displayTitleOf(Short.valueOf((short) -128), (Localization)
null));
     }
 
     @Test

Modified: incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/StringValueSemanticsProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/StringValueSemanticsProviderTest.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/StringValueSemanticsProviderTest.java
(original)
+++ incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/StringValueSemanticsProviderTest.java
Tue Jan 25 14:26:42 2011
@@ -27,6 +27,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetHolderImpl;
 import org.apache.isis.core.progmodel.facets.value.string.StringValueSemanticsProvider;
@@ -49,7 +50,7 @@ public class StringValueSemanticsProvide
 
     @Test
     public void testTitleOf() {
-        assertEquals("text entry", value.displayTitleOf(string));
+        assertEquals("text entry", value.displayTitleOf(string, (Localization) null));
     }
 
     @Test

Modified: incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/TimeStampValueSemanticsProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/TimeStampValueSemanticsProviderTest.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/TimeStampValueSemanticsProviderTest.java
(original)
+++ incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/TimeStampValueSemanticsProviderTest.java
Tue Jan 25 14:26:42 2011
@@ -62,7 +62,7 @@ public class TimeStampValueSemanticsProv
 
     @Test
     public void testTitle() {
-        assertEquals("01/01/70 00:00:00 UTC", adapter.titleString(timestamp));
+        assertEquals("01/01/70 00:00:00 UTC", adapter.titleString(timestamp, null));
     }
 
     @Test

Modified: incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/ValueSemanticsProviderAbstractTestCase.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/ValueSemanticsProviderAbstractTestCase.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/ValueSemanticsProviderAbstractTestCase.java
(original)
+++ incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/ValueSemanticsProviderAbstractTestCase.java
Tue Jan 25 14:26:42 2011
@@ -37,6 +37,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -176,7 +177,7 @@ public abstract class ValueSemanticsProv
 
     @Test
     public void testTitleOfForNullObject() {
-        assertEquals("", valueSemanticsProvider.displayTitleOf(null));
+        assertEquals("", valueSemanticsProvider.displayTitleOf(null, (Localization) null));
     }
     
     

Modified: incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/fixturesinstaller/ProfileServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/fixturesinstaller/ProfileServiceImpl.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/fixturesinstaller/ProfileServiceImpl.java
(original)
+++ incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/fixturesinstaller/ProfileServiceImpl.java
Tue Jan 25 14:26:42 2011
@@ -140,8 +140,8 @@ class PerspectiveImpl implements Perspec
 	}
 
 	@Override
-    public void addToServices(Class<?> cls) {
-		entry.addToServices(cls);
+    public Object addToServices(Class<?> cls) {
+		return entry.addToServices(cls);
 	}
 	@Override
 	public void removeFromServices(Class<?> cls) {

Modified: incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/persistence/adapterfactory/pojo/PojoAdapter.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/persistence/adapterfactory/pojo/PojoAdapter.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/persistence/adapterfactory/pojo/PojoAdapter.java
(original)
+++ incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/persistence/adapterfactory/pojo/PojoAdapter.java
Tue Jan 25 14:26:42 2011
@@ -25,6 +25,7 @@ import static org.hamcrest.CoreMatchers.
 
 import org.apache.log4j.Logger;
 
+import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.core.commons.ensure.Assert;
 import org.apache.isis.core.commons.ensure.Ensure;
 import org.apache.isis.core.commons.exceptions.IsisException;
@@ -282,7 +283,8 @@ public class PojoAdapter extends Instanc
             return "";
         } else {
             final ObjectSpecification specification = getSpecification();
-            String title = specification.getTitle(this);
+            Localization localization = IsisContext.getUserProfile().getLocalization();
+            String title = specification.getTitle(this, localization);
             if (title == null) {
                 if (resolveState.isGhost()) {
                     if (LOG.isInfoEnabled()) {

Added: incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/UserLocalization.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/UserLocalization.java?rev=1063298&view=auto
==============================================================================
--- incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/UserLocalization.java
(added)
+++ incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/UserLocalization.java
Tue Jan 25 14:26:42 2011
@@ -0,0 +1,45 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.core.runtime.userprofile;
+
+import java.util.Locale;
+import java.util.TimeZone;
+
+import org.apache.isis.applib.adapters.Localization;
+
+public class UserLocalization implements Localization {
+
+    private final TimeZone timeZone;
+    private final Locale locale;
+
+    public UserLocalization(Locale locale, TimeZone timeZone) {
+        this.locale = locale == null ? Locale.getDefault() : locale;
+        this.timeZone = timeZone == null ? TimeZone.getDefault() : timeZone;
+    }
+
+    public Locale getLocale() {
+        return locale;
+    }
+
+    public TimeZone getTimeZone() {
+        return timeZone;
+    }
+
+}
+

Propchange: incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/UserLocalization.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/UserProfile.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/UserProfile.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/UserProfile.java
(original)
+++ incubator/isis/trunk/core/runtime/src/main/java/org/apache/isis/core/runtime/userprofile/UserProfile.java
Tue Jan 25 14:26:42 2011
@@ -23,6 +23,7 @@ package org.apache.isis.core.runtime.use
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.core.commons.debug.DebuggableWithTitle;
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.commons.exceptions.IsisException;
@@ -34,6 +35,7 @@ public class UserProfile implements Debu
     private final Options options = new Options();
     private final List<PerspectiveEntry> entries = new ArrayList<PerspectiveEntry>();
     private PerspectiveEntry entry;
+    private Localization localization;
 
     public UserProfile() {}
 
@@ -88,6 +90,14 @@ public class UserProfile implements Debu
         return options;
     }
 
+    public Localization getLocalization() {
+        return localization;
+    }
+    
+    public void setLocalization(Localization localization) {
+        this.localization = localization;
+    }
+    
     public PerspectiveEntry newPerspective(String name) {
         entry = new PerspectiveEntry();
         entry.setName(name);

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/MovieSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/MovieSpecification.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/MovieSpecification.java
(original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/MovieSpecification.java
Tue Jan 25 14:26:42 2011
@@ -23,6 +23,7 @@ package org.apache.isis.core.runtime.tes
 import java.util.Arrays;
 import java.util.List;
 
+import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.Allow;
@@ -238,7 +239,7 @@ public class MovieSpecification extends 
     }
 
     @Override
-    public String getTitle(final ObjectAdapter adapter) {
+    public String getTitle(final ObjectAdapter adapter, Localization localization) {
         return ((Movie) adapter.getObject()).title();
     }
 

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/PersonSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/PersonSpecification.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/PersonSpecification.java
(original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/PersonSpecification.java
Tue Jan 25 14:26:42 2011
@@ -23,6 +23,7 @@ package org.apache.isis.core.runtime.tes
 import java.util.Arrays;
 import java.util.List;
 
+import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.Allow;
 import org.apache.isis.core.metamodel.consent.Consent;
@@ -149,7 +150,7 @@ public class PersonSpecification extends
     }
 
     @Override
-    public String getTitle(final ObjectAdapter adapter) {
+    public String getTitle(final ObjectAdapter adapter, Localization localization) {
         return ((Person) adapter.getObject()).title();
     }
 

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestSpecification.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestSpecification.java
(original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestSpecification.java
Tue Jan 25 14:26:42 2011
@@ -27,6 +27,7 @@ import java.util.List;
 import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.applib.filter.Filter;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.exceptions.IsisException;
@@ -217,7 +218,7 @@ public class TestSpecification extends F
     }
 
     @Override
-    public String getTitle(final ObjectAdapter adapter) {
+    public String getTitle(final ObjectAdapter adapter, Localization localization) {
         return title;
     }
 

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractTextParsableContent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractTextParsableContent.java?rev=1063298&r1=1063297&r2=1063298&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractTextParsableContent.java
(original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractTextParsableContent.java
Tue Jan 25 14:26:42 2011
@@ -74,7 +74,7 @@ public abstract class AbstractTextParsab
         
         TitleFacet titleFacet = propertyOrParam.getFacet(TitleFacet.class);
         if (titleFacet != null) {
-            return titleFacet.title(propertyOrParamValue);
+            return titleFacet.title(propertyOrParamValue, null);
         } else {
             return propertyOrParamValue.titleString();
         }



Mime
View raw message