incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1234453 [15/33] - in /incubator/isis/trunk/framework/core: commons/src/main/java/org/apache/isis/core/commons/authentication/ commons/src/main/java/org/apache/isis/core/commons/components/ commons/src/main/java/org/apache/isis/core/commons...
Date Sun, 22 Jan 2012 06:59:23 GMT
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/title/annotation/TitleAnnotationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/title/annotation/TitleAnnotationFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/title/annotation/TitleAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/title/annotation/TitleAnnotationFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -38,7 +38,6 @@ import org.apache.isis.core.progmodel.fa
 import org.apache.isis.core.progmodel.facets.fallback.FallbackFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.title.annotation.TitleFacetViaTitleAnnotation.TitleComponent;
 
-import com.google.common.base.Function;
 import com.google.common.base.Splitter;
 import com.google.common.collect.Lists;
 
@@ -52,19 +51,21 @@ public class TitleAnnotationFacetFactory
     }
 
     /**
-     * If no method tagged with {@link Title} annotation then will use Facets provided by {@link FallbackFacetFactory} instead.
+     * If no method tagged with {@link Title} annotation then will use Facets
+     * provided by {@link FallbackFacetFactory} instead.
      */
     @Override
     public void process(final ProcessClassContext processClassContext) {
         final Class<?> cls = processClassContext.getCls();
         final FacetHolder facetHolder = processClassContext.getFacetHolder();
 
-        List<Method> methods = MethodFinderUtils.findMethodsWithAnnotation(cls, MethodScope.OBJECT, Title.class);
+        final List<Method> methods = MethodFinderUtils.findMethodsWithAnnotation(cls, MethodScope.OBJECT, Title.class);
 
         Collections.sort(methods, new Comparator<Method>() {
             Comparator<String> comparator = new SequenceComparator();
+
             @Override
-            public int compare(Method o1, Method o2) {
+            public int compare(final Method o1, final Method o2) {
                 final Title a1 = o1.getAnnotation(Title.class);
                 final Title a2 = o2.getAnnotation(Title.class);
                 return comparator.compare(a1.sequence(), a2.sequence());
@@ -72,16 +73,16 @@ public class TitleAnnotationFacetFactory
         });
         if (methods.isEmpty()) {
             return;
-        } 
-        List<TitleComponent> titleComponents = Lists.transform(methods, TitleComponent.FROM_METHOD);
+        }
+        final List<TitleComponent> titleComponents = Lists.transform(methods, TitleComponent.FROM_METHOD);
         FacetUtil.addFacet(new TitleFacetViaTitleAnnotation(titleComponents, facetHolder, adapterMap, localizationProvider));
     }
-    
+
     static class SequenceComparator implements Comparator<String> {
 
         @Override
-        public int compare(String sequence1, String sequence2) {
-            
+        public int compare(final String sequence1, final String sequence2) {
+
             final List<String> components1 = componentsFor(sequence1);
             final List<String> components2 = componentsFor(sequence2);
 
@@ -126,19 +127,19 @@ public class TitleAnnotationFacetFactory
             }
         }
 
-        private static List<String> componentsFor(String sequence) {
+        private static List<String> componentsFor(final String sequence) {
             return Lists.newArrayList(Splitter.on('.').split(sequence));
         }
-        
+
     }
 
     @Override
-    public void setLocalizationProvider(LocalizationProvider localizationProvider) {
+    public void setLocalizationProvider(final LocalizationProvider localizationProvider) {
         this.localizationProvider = localizationProvider;
     }
 
     @Override
-    public void setAdapterMap(AdapterMap adapterMap) {
+    public void setAdapterMap(final AdapterMap adapterMap) {
         this.adapterMap = adapterMap;
     }
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/title/annotation/TitleFacetViaTitleAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/title/annotation/TitleFacetViaTitleAnnotation.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/title/annotation/TitleFacetViaTitleAnnotation.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/title/annotation/TitleFacetViaTitleAnnotation.java Sun Jan 22 06:58:43 2012
@@ -37,7 +37,7 @@ import org.apache.log4j.Logger;
 import com.google.common.base.Function;
 import com.google.common.base.Strings;
 
-public class TitleFacetViaTitleAnnotation extends TitleFacetAbstract  {
+public class TitleFacetViaTitleAnnotation extends TitleFacetAbstract {
 
     private static final Logger LOG = Logger.getLogger(TitleFacetViaTitleAnnotation.class);
     private final List<TitleComponent> components;
@@ -48,42 +48,46 @@ public class TitleFacetViaTitleAnnotatio
         public static final Function<? super Method, ? extends TitleComponent> FROM_METHOD = new Function<Method, TitleComponent>() {
 
             @Override
-            public TitleComponent apply(Method input) {
+            public TitleComponent apply(final Method input) {
                 return TitleComponent.of(input);
             }
         };
 
-
         private final String prepend;
         private final String append;
         private final Method method;
         private final int abbreviateTo;
-        
-        private TitleComponent(String prepend, String append, Method method, int abbreviateTo) {
+
+        private TitleComponent(final String prepend, final String append, final Method method, final int abbreviateTo) {
             super();
             this.prepend = prepend;
             this.append = append;
             this.method = method;
             this.abbreviateTo = abbreviateTo;
         }
+
         public String getPrepend() {
             return prepend;
         }
+
         public String getAppend() {
             return append;
         }
+
         public Method getMethod() {
             return method;
         }
-        public static TitleComponent of(Method method) {
+
+        public static TitleComponent of(final Method method) {
             final Title annotation = method.getAnnotation(Title.class);
-            final String prepend = annotation!=null?annotation.prepend():" ";
-            final String append = annotation!=null?annotation.append():"";
-            final int abbreviateTo = annotation!=null?annotation.abbreviatedTo():Integer.MAX_VALUE;
+            final String prepend = annotation != null ? annotation.prepend() : " ";
+            final String append = annotation != null ? annotation.append() : "";
+            final int abbreviateTo = annotation != null ? annotation.abbreviatedTo() : Integer.MAX_VALUE;
             return new TitleComponent(prepend, append, method, abbreviateTo);
         }
     }
-    public TitleFacetViaTitleAnnotation(final List<TitleComponent> components, final FacetHolder holder, AdapterMap adapterMap, LocalizationProvider localizationProvider) {
+
+    public TitleFacetViaTitleAnnotation(final List<TitleComponent> components, final FacetHolder holder, final AdapterMap adapterMap, final LocalizationProvider localizationProvider) {
         super(holder);
         this.components = components;
         this.adapterMap = adapterMap;
@@ -92,31 +96,31 @@ public class TitleFacetViaTitleAnnotatio
 
     @Override
     public String title(final ObjectAdapter owningAdapter, final Localization localization) {
-    	StringBuilder stringBuilder = new StringBuilder();
-    	
+        final StringBuilder stringBuilder = new StringBuilder();
+
         try {
-        	for (TitleComponent component : this.components) {
-        		String title = null;
+            for (final TitleComponent component : this.components) {
+                String title = null;
                 final Object titlePart = AdapterInvokeUtils.invoke(component.getMethod(), owningAdapter);
-        		if(titlePart != null) {
-        		    // use either titleFacet...
-        		    title = titleOf(titlePart);
-        		    if (Strings.isNullOrEmpty(title)) {
-        		        // or the toString() otherwise
-        		        title = titlePart.toString().trim();
-        		    }
+                if (titlePart != null) {
+                    // use either titleFacet...
+                    title = titleOf(titlePart);
+                    if (Strings.isNullOrEmpty(title)) {
+                        // or the toString() otherwise
+                        title = titlePart.toString().trim();
+                    }
+                }
+                if (Strings.isNullOrEmpty(title)) {
+                    continue;
                 }
-        		if (Strings.isNullOrEmpty(title)) {
-        		    continue;
-        		}
-        		if(stringBuilder.length() > 0) {
-        		    stringBuilder.append(component.getPrepend());
-        		}
-        		stringBuilder.append(abbreviated(title, component.abbreviateTo));
-        		stringBuilder.append(component.getAppend());
-        	}
+                if (stringBuilder.length() > 0) {
+                    stringBuilder.append(component.getPrepend());
+                }
+                stringBuilder.append(abbreviated(title, component.abbreviateTo));
+                stringBuilder.append(component.getAppend());
+            }
 
-        	return stringBuilder.toString().trim();
+            return stringBuilder.toString().trim();
         } catch (final RuntimeException ex) {
             LOG.warn("Title failure", ex);
             return "Failed Title";
@@ -125,11 +129,11 @@ public class TitleFacetViaTitleAnnotatio
 
     private String titleOf(final Object domainObject) {
         final ObjectAdapter adapter = adapterMap.getAdapterFor(domainObject);
-        if(adapter == null) {
+        if (adapter == null) {
             return null;
-        } 
+        }
         final ObjectSpecification returnSpec = adapter.getSpecification();
-        if(!returnSpec.containsFacet(TitleFacet.class)) {
+        if (!returnSpec.containsFacet(TitleFacet.class)) {
             return null;
         }
         return returnSpec.getTitle(adapter, localizationProvider.getLocalization());
@@ -138,10 +142,9 @@ public class TitleFacetViaTitleAnnotatio
     public List<TitleComponent> getComponents() {
         return components;
     }
-    
-    private static String abbreviated(String str, int maxLength) {
-        return str.length() < maxLength?str:str.substring(0, maxLength-3)+"...";
-    }
 
+    private static String abbreviated(final String str, final int maxLength) {
+        return str.length() < maxLength ? str : str.substring(0, maxLength - 3) + "...";
+    }
 
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validate/ValidateObjectFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validate/ValidateObjectFacet.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validate/ValidateObjectFacet.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validate/ValidateObjectFacet.java Sun Jan 22 06:58:43 2012
@@ -26,15 +26,18 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.interactions.ValidatingInteractionAdvisor;
 
 /**
- * Mechanism for determining whether this object is in a valid state, for example so that it can be persisted or
- * updated.
+ * Mechanism for determining whether this object is in a valid state, for
+ * example so that it can be persisted or updated.
  * 
  * <p>
- * Even though all the properties of an object may themselves be valid, there could be inter-property dependencies which
- * are invalid. For example <tt>fromDate</tt> > <tt>toDate</tt> would probably represent an invalid state.
+ * Even though all the properties of an object may themselves be valid, there
+ * could be inter-property dependencies which are invalid. For example
+ * <tt>fromDate</tt> > <tt>toDate</tt> would probably represent an invalid
+ * state.
  * 
  * <p>
- * In the standard Apache Isis Programming Model, typically corresponds to the <tt>validate</tt> method.
+ * In the standard Apache Isis Programming Model, typically corresponds to the
+ * <tt>validate</tt> method.
  * 
  * @see PersistingCallbackFacet
  * @see UpdatingCallbackFacet

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validate/method/ValidateObjectViaValidateMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validate/method/ValidateObjectViaValidateMethodFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validate/method/ValidateObjectViaValidateMethodFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validate/method/ValidateObjectViaValidateMethodFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -43,8 +43,7 @@ public class ValidateObjectViaValidateMe
         final Class<?> cls = processClassContext.getCls();
         final FacetHolder facetHolder = processClassContext.getFacetHolder();
 
-        final Method method =
-            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, VALIDATE_PREFIX, String.class, NO_PARAMETERS_TYPES);
+        final Method method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, VALIDATE_PREFIX, String.class, NO_PARAMETERS_TYPES);
         if (method != null) {
             FacetUtil.addFacet(new ValidateObjectFacetViaValidateMethod(method, facetHolder));
             processClassContext.removeMethod(method);

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validprops/ObjectValidPropertiesFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validprops/ObjectValidPropertiesFacet.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validprops/ObjectValidPropertiesFacet.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validprops/ObjectValidPropertiesFacet.java Sun Jan 22 06:58:43 2012
@@ -25,8 +25,9 @@ import org.apache.isis.core.metamodel.in
 import org.apache.isis.core.metamodel.interactions.ValidatingInteractionAdvisor;
 
 /**
- * Object-level {@link ValidatingInteractionAdvisor validator} that ensures that all {@link MandatoryFacet mandatory}
- * properties are entered prior to persisting the object.
+ * Object-level {@link ValidatingInteractionAdvisor validator} that ensures that
+ * all {@link MandatoryFacet mandatory} properties are entered prior to
+ * persisting the object.
  */
 public interface ObjectValidPropertiesFacet extends Facet, ValidatingInteractionAdvisor {
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validprops/ObjectValidPropertiesFacetImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validprops/ObjectValidPropertiesFacetImpl.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validprops/ObjectValidPropertiesFacetImpl.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validprops/ObjectValidPropertiesFacetImpl.java Sun Jan 22 06:58:43 2012
@@ -36,8 +36,7 @@ public class ObjectValidPropertiesFacetI
     public String invalidReason(final ObjectValidityContext context) {
         final StringBuilder buf = new StringBuilder();
         final ObjectAdapter adapter = context.getTarget();
-        for (final ObjectAssociation property : adapter.getSpecification().getAssociations(
-            ObjectAssociationFilters.PROPERTIES)) {
+        for (final ObjectAssociation property : adapter.getSpecification().getAssociations(ObjectAssociationFilters.PROPERTIES)) {
             // ignore hidden properties
             if (property.isVisible(context.getSession(), adapter).isVetoed()) {
                 continue;

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ImmutableFacetViaValueSemantics.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ImmutableFacetViaValueSemantics.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ImmutableFacetViaValueSemantics.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ImmutableFacetViaValueSemantics.java Sun Jan 22 06:58:43 2012
@@ -30,9 +30,9 @@ public class ImmutableFacetViaValueSeman
     public ImmutableFacetViaValueSemantics(final FacetHolder holder) {
         super(When.ALWAYS, holder);
     }
-    
+
     @Override
-    public void copyOnto(FacetHolder holder) {
+    public void copyOnto(final FacetHolder holder) {
         final Facet facet = new ImmutableFacetViaValueSemantics(holder);
         FacetUtil.addFacet(facet);
     }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/TypicalLengthFacetUsingParser.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/TypicalLengthFacetUsingParser.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/TypicalLengthFacetUsingParser.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/TypicalLengthFacetUsingParser.java Sun Jan 22 06:58:43 2012
@@ -30,8 +30,7 @@ public class TypicalLengthFacetUsingPars
     private final Parser<?> parser;
     private final DependencyInjector dependencyInjector;
 
-    public TypicalLengthFacetUsingParser(final Parser<?> parser, final FacetHolder holder,
-        final DependencyInjector dependencyInjector) {
+    public TypicalLengthFacetUsingParser(final Parser<?> parser, final FacetHolder holder, final DependencyInjector dependencyInjector) {
         super(TypicalLengthFacet.class, holder, false);
         this.parser = parser;
         this.dependencyInjector = dependencyInjector;

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetAbstract.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetAbstract.java Sun Jan 22 06:58:43 2012
@@ -44,14 +44,11 @@ public abstract class ValueFacetAbstract
         return ValueFacet.class;
     }
 
-    private static ValueSemanticsProvider<?> newValueSemanticsProviderOrNull(final Class<?> semanticsProviderClass,
-        final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
+    private static ValueSemanticsProvider<?> newValueSemanticsProviderOrNull(final Class<?> semanticsProviderClass, final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
         if (semanticsProviderClass == null) {
             return null;
         }
-        return (ValueSemanticsProvider<?>) ClassUtil.newInstance(semanticsProviderClass, new Class<?>[] {
-            FacetHolder.class, IsisConfiguration.class, ValueSemanticsProviderContext.class }, new Object[] { holder,
-            configuration, context });
+        return (ValueSemanticsProvider<?>) ClassUtil.newInstance(semanticsProviderClass, new Class<?>[] { FacetHolder.class, IsisConfiguration.class, ValueSemanticsProviderContext.class }, new Object[] { holder, configuration, context });
     }
 
     // to look after the facets (since MultiTyped)
@@ -74,34 +71,34 @@ public abstract class ValueFacetAbstract
         }
     }
 
-    public ValueFacetAbstract(final Class<?> semanticsProviderClass,
-        final AddFacetsIfInvalidStrategy addFacetsIfInvalid, final FacetHolder holder,
-        final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        this(newValueSemanticsProviderOrNull(semanticsProviderClass, holder, configuration, context),
-            addFacetsIfInvalid, holder, context);
+    public ValueFacetAbstract(final Class<?> semanticsProviderClass, final AddFacetsIfInvalidStrategy addFacetsIfInvalid, final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
+        this(newValueSemanticsProviderOrNull(semanticsProviderClass, holder, configuration, context), addFacetsIfInvalid, holder, context);
     }
 
-    public ValueFacetAbstract(final ValueSemanticsProvider<?> semanticsProvider,
-        final AddFacetsIfInvalidStrategy addFacetsIfInvalid, final FacetHolder holder,
-        final ValueSemanticsProviderContext context) {
+    public ValueFacetAbstract(final ValueSemanticsProvider<?> semanticsProvider, final AddFacetsIfInvalidStrategy addFacetsIfInvalid, final FacetHolder holder, final ValueSemanticsProviderContext context) {
         super(type(), holder);
 
         this.semanticsProvider = semanticsProvider;
         this.context = context;
 
-        // note: we can't use the runtimeContext to inject dependencies into the semanticsProvider,
-        // because there won't be any PersistenceSession when initially building the metamodel.
+        // note: we can't use the runtimeContext to inject dependencies into the
+        // semanticsProvider,
+        // because there won't be any PersistenceSession when initially building
+        // the metamodel.
         // so, we defer until we use the parser.
 
         if (!isValid() && !addFacetsIfInvalid.shouldAddFacetsIfInvalid()) {
             return;
         }
 
-        // we now figure add all the facets supported. Note that we do not use FacetUtil.addFacet,
-        // because we need to add them explicitly to our delegate facetholder but have the
+        // we now figure add all the facets supported. Note that we do not use
+        // FacetUtil.addFacet,
+        // because we need to add them explicitly to our delegate facetholder
+        // but have the
         // facets themselves reference this value's holder.
 
-        facetHolder.addFacet((Facet) this); // add just ValueFacet.class initially.
+        facetHolder.addFacet((Facet) this); // add just ValueFacet.class
+                                            // initially.
 
         // we used to add aggregated here, but this was wrong.
         // An immutable value is not aggregated, it is shared.
@@ -123,15 +120,14 @@ public abstract class ValueFacetAbstract
             // install the EncodeableFacet if we've been given an EncoderDecoder
             final EncoderDecoder<?> encoderDecoder = semanticsProvider.getEncoderDecoder();
             if (encoderDecoder != null) {
-                facetHolder.addFacet(new EncodableFacetUsingEncoderDecoder(encoderDecoder, holder, getAdapterMap(),
-                    getDependencyInjector()));
+                facetHolder.addFacet(new EncodableFacetUsingEncoderDecoder(encoderDecoder, holder, getAdapterMap(), getDependencyInjector()));
             }
 
-            // install the ParseableFacet and other facets if we've been given a Parser
+            // install the ParseableFacet and other facets if we've been given a
+            // Parser
             final Parser<?> parser = semanticsProvider.getParser();
             if (parser != null) {
-                facetHolder.addFacet(new ParseableFacetUsingParser(parser, holder, getAuthenticationSessionProvider(),
-                    getDependencyInjector(), getAdapterMap()));
+                facetHolder.addFacet(new ParseableFacetUsingParser(parser, holder, getAuthenticationSessionProvider(), getDependencyInjector(), getAdapterMap()));
                 facetHolder.addFacet(new TitleFacetUsingParser(parser, holder, getDependencyInjector()));
                 facetHolder.addFacet(new TypicalLengthFacetUsingParser(parser, holder, getDependencyInjector()));
             }
@@ -139,8 +135,7 @@ public abstract class ValueFacetAbstract
             // install the DefaultedFacet if we've been given a DefaultsProvider
             final DefaultsProvider<?> defaultsProvider = semanticsProvider.getDefaultsProvider();
             if (defaultsProvider != null) {
-                facetHolder.addFacet(new DefaultedFacetUsingDefaultsProvider(defaultsProvider, holder,
-                    getDependencyInjector()));
+                facetHolder.addFacet(new DefaultedFacetUsingDefaultsProvider(defaultsProvider, holder, getDependencyInjector()));
             }
         }
     }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetFromConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetFromConfiguration.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetFromConfiguration.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetFromConfiguration.java Sun Jan 22 06:58:43 2012
@@ -24,10 +24,8 @@ import org.apache.isis.core.metamodel.fa
 
 public class ValueFacetFromConfiguration extends ValueFacetAbstract {
 
-    public ValueFacetFromConfiguration(final String candidateSemanticsProviderName, final FacetHolder holder,
-        final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(ValueSemanticsProviderUtil.valueSemanticsProviderOrNull(null, candidateSemanticsProviderName),
-            AddFacetsIfInvalidStrategy.DONT_ADD, holder, configuration, context);
+    public ValueFacetFromConfiguration(final String candidateSemanticsProviderName, final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
+        super(ValueSemanticsProviderUtil.valueSemanticsProviderOrNull(null, candidateSemanticsProviderName), AddFacetsIfInvalidStrategy.DONT_ADD, holder, configuration, context);
     }
 
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetUsingSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetUsingSemanticsProvider.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetUsingSemanticsProvider.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetUsingSemanticsProvider.java Sun Jan 22 06:58:43 2012
@@ -25,8 +25,7 @@ import org.apache.isis.core.metamodel.fa
 
 public class ValueFacetUsingSemanticsProvider extends ValueFacetAbstract {
 
-    public ValueFacetUsingSemanticsProvider(final ValueSemanticsProvider<?> adapter,
-        final Facet underlyingValueTypeFacet, final ValueSemanticsProviderContext context) {
+    public ValueFacetUsingSemanticsProvider(final ValueSemanticsProvider<?> adapter, final Facet underlyingValueTypeFacet, final ValueSemanticsProviderContext context) {
         super(adapter, AddFacetsIfInvalidStrategy.DO_ADD, underlyingValueTypeFacet.getFacetHolder(), context);
 
         // add the adapter in as its own facet (eg StringFacet).

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderAndFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderAndFacetAbstract.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderAndFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderAndFacetAbstract.java Sun Jan 22 06:58:43 2012
@@ -46,8 +46,7 @@ import org.apache.isis.core.metamodel.ru
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLookup;
 
-public abstract class ValueSemanticsProviderAndFacetAbstract<T> extends FacetAbstract implements
-    ValueSemanticsProvider<T>, EncoderDecoder<T>, Parser<T>, DefaultsProvider<T> {
+public abstract class ValueSemanticsProviderAndFacetAbstract<T> extends FacetAbstract implements ValueSemanticsProvider<T>, EncoderDecoder<T>, Parser<T>, DefaultsProvider<T> {
 
     private final Class<T> adaptedClass;
     private final int typicalLength;
@@ -63,10 +62,8 @@ public abstract class ValueSemanticsProv
     private final IsisConfiguration configuration;
     private final ValueSemanticsProviderContext context;
 
-    public ValueSemanticsProviderAndFacetAbstract(final Class<? extends Facet> adapterFacetType,
-        final FacetHolder holder, final Class<T> adaptedClass, final int typicalLength, final boolean immutable,
-        final boolean equalByContent, final T defaultValue, final IsisConfiguration configuration,
-        final ValueSemanticsProviderContext context) {
+    public ValueSemanticsProviderAndFacetAbstract(final Class<? extends Facet> adapterFacetType, final FacetHolder holder, final Class<T> adaptedClass, final int typicalLength, final boolean immutable, final boolean equalByContent, final T defaultValue, final IsisConfiguration configuration,
+            final ValueSemanticsProviderContext context) {
         super(adapterFacetType, holder, false);
         this.adaptedClass = adaptedClass;
         this.typicalLength = typicalLength;
@@ -89,8 +86,9 @@ public abstract class ValueSemanticsProv
      * The underlying class that has been adapted.
      * 
      * <p>
-     * Used to determine whether an empty string can be parsed, (for primitive types a non-null entry is required, see
-     * {@link #mustHaveEntry()}), and potentially useful for debugging.
+     * Used to determine whether an empty string can be parsed, (for primitive
+     * types a non-null entry is required, see {@link #mustHaveEntry()}), and
+     * potentially useful for debugging.
      */
     public final Class<T> getAdaptedClass() {
         return adaptedClass;
@@ -100,7 +98,8 @@ public abstract class ValueSemanticsProv
      * We don't replace any (none no-op) facets.
      * 
      * <p>
-     * For example, if there is already a {@link PropertyDefaultFacet} then we shouldn't replace it.
+     * For example, if there is already a {@link PropertyDefaultFacet} then we
+     * shouldn't replace it.
      */
     @Override
     public boolean alwaysReplace() {
@@ -159,7 +158,8 @@ public abstract class ValueSemanticsProv
      * @param context
      *            - the underlying object, or <tt>null</tt>.
      * @param entry
-     *            - the proposed new object, as a string representation to be parsed
+     *            - the proposed new object, as a string representation to be
+     *            parsed
      */
     protected abstract T doParse(Object context, String entry);
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderContext.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderContext.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderContext.java Sun Jan 22 06:58:43 2012
@@ -27,9 +27,7 @@ public class ValueSemanticsProviderConte
     private final AdapterMap adapterManager;
     private final DependencyInjector dependencyInjector;
 
-    public ValueSemanticsProviderContext(final AuthenticationSessionProvider authenticationSessionProvider,
-        final SpecificationLookup specificationLookup, final AdapterMap adapterManager,
-        final DependencyInjector dependencyInjector) {
+    public ValueSemanticsProviderContext(final AuthenticationSessionProvider authenticationSessionProvider, final SpecificationLookup specificationLookup, final AdapterMap adapterManager, final DependencyInjector dependencyInjector) {
         this.authenticationSessionProvider = authenticationSessionProvider;
         this.specificationLookup = specificationLookup;
         this.adapterManager = adapterManager;

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderUtil.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderUtil.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderUtil.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderUtil.java Sun Jan 22 06:58:43 2012
@@ -33,22 +33,16 @@ public final class ValueSemanticsProvide
     public static final String SEMANTICS_PROVIDER_NAME_KEY_PREFIX = "isis.core.progmodel.value.";
     public static final String SEMANTICS_PROVIDER_NAME_KEY_SUFFIX = ".semanticsProviderName";
 
-    public static String semanticsProviderNameFromConfiguration(final Class<?> type,
-        final IsisConfiguration configuration) {
-        final String key =
-            SEMANTICS_PROVIDER_NAME_KEY_PREFIX + type.getCanonicalName() + SEMANTICS_PROVIDER_NAME_KEY_SUFFIX;
+    public static String semanticsProviderNameFromConfiguration(final Class<?> type, final IsisConfiguration configuration) {
+        final String key = SEMANTICS_PROVIDER_NAME_KEY_PREFIX + type.getCanonicalName() + SEMANTICS_PROVIDER_NAME_KEY_SUFFIX;
         final String semanticsProviderName = configuration.getString(key);
         return !StringUtils.isNullOrEmpty(semanticsProviderName) ? semanticsProviderName : null;
     }
 
     @SuppressWarnings("unchecked")
-    public static Class<? extends ValueSemanticsProvider<?>> valueSemanticsProviderOrNull(
-        final Class<?> candidateClass, final String classCandidateName) {
-        final Class clazz =
-            candidateClass != null ? JavaClassUtils.implementingClassOrNull(candidateClass.getName(),
-                ValueSemanticsProvider.class, FacetHolder.class) : null;
-        return clazz != null ? clazz : JavaClassUtils.implementingClassOrNull(classCandidateName,
-            ValueSemanticsProvider.class, FacetHolder.class);
+    public static Class<? extends ValueSemanticsProvider<?>> valueSemanticsProviderOrNull(final Class<?> candidateClass, final String classCandidateName) {
+        final Class clazz = candidateClass != null ? JavaClassUtils.implementingClassOrNull(candidateClass.getName(), ValueSemanticsProvider.class, FacetHolder.class) : null;
+        return clazz != null ? clazz : JavaClassUtils.implementingClassOrNull(classCandidateName, ValueSemanticsProvider.class, FacetHolder.class);
     }
 
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueUsingValueSemanticsProviderFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueUsingValueSemanticsProviderFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueUsingValueSemanticsProviderFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueUsingValueSemanticsProviderFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -32,8 +32,7 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjectorAware;
 
-public abstract class ValueUsingValueSemanticsProviderFacetFactory<T> extends FacetFactoryAbstract implements
-    IsisConfigurationAware, AuthenticationSessionProviderAware, AdapterMapAware, DependencyInjectorAware {
+public abstract class ValueUsingValueSemanticsProviderFacetFactory<T> extends FacetFactoryAbstract implements IsisConfigurationAware, AuthenticationSessionProviderAware, AdapterMapAware, DependencyInjectorAware {
 
     private IsisConfiguration configuration;
     private AuthenticationSessionProvider authenticationSessionProvider;
@@ -49,8 +48,7 @@ public abstract class ValueUsingValueSem
     }
 
     protected void addFacets(final ValueSemanticsProviderAndFacetAbstract<T> adapter) {
-        final ValueFacetUsingSemanticsProvider facet =
-            new ValueFacetUsingSemanticsProvider(adapter, adapter, getContext());
+        final ValueFacetUsingSemanticsProvider facet = new ValueFacetUsingSemanticsProvider(adapter, adapter, getContext());
         FacetUtil.addFacet(facet);
     }
 
@@ -64,9 +62,7 @@ public abstract class ValueUsingValueSem
 
     public ValueSemanticsProviderContext getContext() {
         if (context == null) {
-            context =
-                new ValueSemanticsProviderContext(authenticationSessionProvider, getSpecificationLookup(),
-                    adapterManager, dependencyInjector);
+            context = new ValueSemanticsProviderContext(authenticationSessionProvider, getSpecificationLookup(), adapterManager, dependencyInjector);
         }
         return context;
     }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/annotation/ValueFacetAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/annotation/ValueFacetAnnotation.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/annotation/ValueFacetAnnotation.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/annotation/ValueFacetAnnotation.java Sun Jan 22 06:58:43 2012
@@ -43,21 +43,17 @@ public class ValueFacetAnnotation extend
         return annotation.semanticsProviderClass();
     }
 
-    public ValueFacetAnnotation(final Class<?> annotatedClass, final FacetHolder holder,
-        final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        this(semanticsProviderName(annotatedClass, configuration), semanticsProviderClass(annotatedClass), holder,
-            configuration, context);
+    public ValueFacetAnnotation(final Class<?> annotatedClass, final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
+        this(semanticsProviderName(annotatedClass, configuration), semanticsProviderClass(annotatedClass), holder, configuration, context);
     }
 
-    private ValueFacetAnnotation(final String candidateSemanticsProviderName,
-        final Class<?> candidateSemanticsProviderClass, final FacetHolder holder,
-        final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(ValueSemanticsProviderUtil.valueSemanticsProviderOrNull(candidateSemanticsProviderClass,
-            candidateSemanticsProviderName), AddFacetsIfInvalidStrategy.DO_ADD, holder, configuration, context);
+    private ValueFacetAnnotation(final String candidateSemanticsProviderName, final Class<?> candidateSemanticsProviderClass, final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
+        super(ValueSemanticsProviderUtil.valueSemanticsProviderOrNull(candidateSemanticsProviderClass, candidateSemanticsProviderName), AddFacetsIfInvalidStrategy.DO_ADD, holder, configuration, context);
     }
 
     /**
-     * Always valid, even if the specified semanticsProviderName might have been wrong.
+     * Always valid, even if the specified semanticsProviderName might have been
+     * wrong.
      */
     @Override
     public boolean isValid() {

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/annotation/ValueFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/annotation/ValueFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/annotation/ValueFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/annotation/ValueFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -52,24 +52,27 @@ import org.apache.isis.core.progmodel.fa
  * <p>
  * As a result, will always install the following facets:
  * <ul>
- * <li> {@link TitleFacet} - based on the <tt>title()</tt> method if present, otherwise uses <tt>toString()</tt></li>
- * <li> {@link IconFacet} - based on the <tt>iconName()</tt> method if present, otherwise derived from the class name</li>
+ * <li> {@link TitleFacet} - based on the <tt>title()</tt> method if present,
+ * otherwise uses <tt>toString()</tt></li>
+ * <li> {@link IconFacet} - based on the <tt>iconName()</tt> method if present,
+ * otherwise derived from the class name</li>
  * </ul>
  * <p>
  * In addition, the following facets may be installed:
  * <ul>
- * <li> {@link ParseableFacet} - if a {@link Parser} has been specified explicitly in the annotation (or is picked up
- * through an external configuration file)</li>
- * <li> {@link EncodableFacet} - if an {@link EncoderDecoder} has been specified explicitly in the annotation (or is
- * picked up through an external configuration file)</li>
+ * <li> {@link ParseableFacet} - if a {@link Parser} has been specified
+ * explicitly in the annotation (or is picked up through an external
+ * configuration file)</li>
+ * <li> {@link EncodableFacet} - if an {@link EncoderDecoder} has been specified
+ * explicitly in the annotation (or is picked up through an external
+ * configuration file)</li>
  * <li> {@link ImmutableFacet} - if specified explicitly in the annotation
  * <li> {@link EqualByContentFacet} - if specified explicitly in the annotation
  * </ul>
  * <p>
  * Note that {@link AggregatedFacet} is <i>not</i> installed.
  */
-public class ValueFacetFactory extends AnnotationBasedFacetFactoryAbstract implements IsisConfigurationAware,
-    AuthenticationSessionProviderAware, AdapterMapAware, DependencyInjectorAware {
+public class ValueFacetFactory extends AnnotationBasedFacetFactoryAbstract implements IsisConfigurationAware, AuthenticationSessionProviderAware, AdapterMapAware, DependencyInjectorAware {
 
     private IsisConfiguration configuration;
     private AuthenticationSessionProvider authenticationSessionProvider;
@@ -93,20 +96,16 @@ public class ValueFacetFactory extends A
         // create from annotation, if present
         final Value annotation = getAnnotation(cls, Value.class);
         if (annotation != null) {
-            final ValueFacetAnnotation facet =
-                new ValueFacetAnnotation(cls, holder, getIsisConfiguration(), createValueSemanticsProviderContext());
+            final ValueFacetAnnotation facet = new ValueFacetAnnotation(cls, holder, getIsisConfiguration(), createValueSemanticsProviderContext());
             if (facet.isValid()) {
                 return facet;
             }
         }
 
         // otherwise, try to create from configuration, if present
-        final String semanticsProviderName =
-            ValueSemanticsProviderUtil.semanticsProviderNameFromConfiguration(cls, configuration);
+        final String semanticsProviderName = ValueSemanticsProviderUtil.semanticsProviderNameFromConfiguration(cls, configuration);
         if (!StringUtils.isNullOrEmpty(semanticsProviderName)) {
-            final ValueFacetFromConfiguration facet =
-                new ValueFacetFromConfiguration(semanticsProviderName, holder, getIsisConfiguration(),
-                    createValueSemanticsProviderContext());
+            final ValueFacetFromConfiguration facet = new ValueFacetFromConfiguration(semanticsProviderName, holder, getIsisConfiguration(), createValueSemanticsProviderContext());
             if (facet.isValid()) {
                 return facet;
             }
@@ -117,8 +116,7 @@ public class ValueFacetFactory extends A
     }
 
     protected ValueSemanticsProviderContext createValueSemanticsProviderContext() {
-        return new ValueSemanticsProviderContext(getAuthenticationSessionProvider(), getSpecificationLookup(),
-            getAdapterManager(), getDependencyInjector());
+        return new ValueSemanticsProviderContext(getAuthenticationSessionProvider(), getSpecificationLookup(), getAdapterManager(), getDependencyInjector());
     }
 
     // ////////////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/ActionParameterChoicesFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/ActionParameterChoicesFacetAbstract.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/ActionParameterChoicesFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/ActionParameterChoicesFacetAbstract.java Sun Jan 22 06:58:43 2012
@@ -36,8 +36,7 @@ public abstract class ActionParameterCho
     private final SpecificationLookup specificationLookup;
     private final AdapterMap adapterMap;
 
-    public ActionParameterChoicesFacetAbstract(final FacetHolder holder, final SpecificationLookup specificationLookup,
-        final AdapterMap adapterManager) {
+    public ActionParameterChoicesFacetAbstract(final FacetHolder holder, final SpecificationLookup specificationLookup, final AdapterMap adapterManager) {
         super(type(), holder, false);
         this.specificationLookup = specificationLookup;
         this.adapterMap = adapterManager;

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/ActionParameterChoicesFacetNone.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/ActionParameterChoicesFacetNone.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/ActionParameterChoicesFacetNone.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/ActionParameterChoicesFacetNone.java Sun Jan 22 06:58:43 2012
@@ -26,8 +26,7 @@ import org.apache.isis.core.metamodel.sp
 
 public class ActionParameterChoicesFacetNone extends ActionParameterChoicesFacetAbstract {
 
-    public ActionParameterChoicesFacetNone(final FacetHolder holder, final SpecificationLookup specificationLookup,
-        final AdapterMap adapterManager) {
+    public ActionParameterChoicesFacetNone(final FacetHolder holder, final SpecificationLookup specificationLookup, final AdapterMap adapterManager) {
         super(holder, specificationLookup, adapterManager);
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/enums/ActionParameterChoicesFacetDerivedFromChoicesFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/enums/ActionParameterChoicesFacetDerivedFromChoicesFacet.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/enums/ActionParameterChoicesFacetDerivedFromChoicesFacet.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/enums/ActionParameterChoicesFacetDerivedFromChoicesFacet.java Sun Jan 22 06:58:43 2012
@@ -30,8 +30,7 @@ import org.apache.isis.core.progmodel.fa
 
 public class ActionParameterChoicesFacetDerivedFromChoicesFacet extends ActionParameterChoicesFacetAbstract {
 
-    public ActionParameterChoicesFacetDerivedFromChoicesFacet(final FacetHolder holder,
-        final SpecificationLookup specificationLookup, final AdapterMap adapterManager) {
+    public ActionParameterChoicesFacetDerivedFromChoicesFacet(final FacetHolder holder, final SpecificationLookup specificationLookup, final AdapterMap adapterManager) {
         super(holder, specificationLookup, adapterManager);
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/enums/ParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/enums/ParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/enums/ParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/enums/ParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -25,8 +25,7 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 
-public class ParameterChoicesFacetDerivedFromChoicesFacetFacetFactory extends FacetFactoryAbstract implements
-    AdapterMapAware {
+public class ParameterChoicesFacetDerivedFromChoicesFacetFacetFactory extends FacetFactoryAbstract implements AdapterMapAware {
 
     private AdapterMap adapterMap;
 
@@ -36,15 +35,13 @@ public class ParameterChoicesFacetDerive
 
     @Override
     public void processParams(final ProcessParameterContext processParameterContext) {
-        final Class<?> paramType =
-            processParameterContext.getMethod().getParameterTypes()[processParameterContext.getParamNum()];
+        final Class<?> paramType = processParameterContext.getMethod().getParameterTypes()[processParameterContext.getParamNum()];
 
         if (!paramType.isEnum()) {
             return;
         }
 
-        FacetUtil.addFacet(new ActionParameterChoicesFacetDerivedFromChoicesFacet(processParameterContext
-            .getFacetHolder(), getSpecificationLookup(), getAdapterMap()));
+        FacetUtil.addFacet(new ActionParameterChoicesFacetDerivedFromChoicesFacet(processParameterContext.getFacetHolder(), getSpecificationLookup(), getAdapterMap()));
     }
 
     // /////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/method/ActionChoicesFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/method/ActionChoicesFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/method/ActionChoicesFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/method/ActionChoicesFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -41,7 +41,8 @@ public class ActionChoicesFacetFactory e
     private AdapterMap adapterMap;
 
     /**
-     * Note that the {@link Facet}s registered are the generic ones from noa-architecture (where they exist)
+     * Note that the {@link Facet}s registered are the generic ones from
+     * noa-architecture (where they exist)
      */
     public ActionChoicesFacetFactory() {
         super(FeatureType.ACTIONS_ONLY, PREFIXES);
@@ -82,14 +83,11 @@ public class ActionChoicesFacetFactory e
 
         final Class<?> returnType = actionMethod.getReturnType();
         final FacetHolder action = processMethodContext.getFacetHolder();
-        final ActionChoicesFacetViaMethod facet =
-            new ActionChoicesFacetViaMethod(choicesMethod, returnType, action, getSpecificationLookup(),
-                getAdapterMap());
+        final ActionChoicesFacetViaMethod facet = new ActionChoicesFacetViaMethod(choicesMethod, returnType, action, getSpecificationLookup(), getAdapterMap());
         FacetUtil.addFacet(facet);
     }
 
-    protected Method findChoicesMethodReturning(final ProcessMethodContext processMethodContext,
-        final Class<?> returnType2) {
+    protected Method findChoicesMethodReturning(final ProcessMethodContext processMethodContext, final Class<?> returnType2) {
         Method choicesMethod;
         final Class<?> cls = processMethodContext.getCls();
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/method/ActionChoicesFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/method/ActionChoicesFacetViaMethod.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/method/ActionChoicesFacetViaMethod.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/method/ActionChoicesFacetViaMethod.java Sun Jan 22 06:58:43 2012
@@ -42,8 +42,7 @@ public class ActionChoicesFacetViaMethod
     private final SpecificationLookup specificationLookup;
     private final AdapterMap adapterMap;
 
-    public ActionChoicesFacetViaMethod(final Method method, final Class<?> choicesType, final FacetHolder holder,
-        final SpecificationLookup specificationLookup, final AdapterMap adapterManager) {
+    public ActionChoicesFacetViaMethod(final Method method, final Class<?> choicesType, final FacetHolder holder, final SpecificationLookup specificationLookup, final AdapterMap adapterManager) {
         super(holder);
         this.method = method;
         this.choicesType = choicesType;
@@ -52,7 +51,8 @@ public class ActionChoicesFacetViaMethod
     }
 
     /**
-     * Returns a singleton list of the {@link Method} provided in the constructor.
+     * Returns a singleton list of the {@link Method} provided in the
+     * constructor.
      */
     @Override
     public List<Method> getMethods() {
@@ -73,9 +73,7 @@ public class ActionChoicesFacetViaMethod
     public Object[][] getChoices(final ObjectAdapter owningAdapter) {
         final Object invoke = AdapterInvokeUtils.invoke(method, owningAdapter);
         if (!(invoke instanceof Object[])) {
-            throw new DomainModelException(
-                "Expected an array of collections (Object[]) containing choices for all parameters, but got " + invoke
-                    + " instead. Perhaps the parameter number is missing!");
+            throw new DomainModelException("Expected an array of collections (Object[]) containing choices for all parameters, but got " + invoke + " instead. Perhaps the parameter number is missing!");
         }
         final Object[] options = (Object[]) invoke;
         final Object[][] results = new Object[options.length][];

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/methodnum/ActionParameterChoicesFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/methodnum/ActionParameterChoicesFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/methodnum/ActionParameterChoicesFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/methodnum/ActionParameterChoicesFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -41,15 +41,15 @@ import org.apache.isis.core.progmodel.fa
 /**
  * Sets up all the {@link Facet}s for an action in a single shot.
  */
-public class ActionParameterChoicesFacetFactory extends MethodPrefixBasedFacetFactoryAbstract implements
-    AdapterMapAware {
+public class ActionParameterChoicesFacetFactory extends MethodPrefixBasedFacetFactoryAbstract implements AdapterMapAware {
 
     private static final String[] PREFIXES = {};
 
     private AdapterMap adapterMap;
 
     /**
-     * Note that the {@link Facet}s registered are the generic ones from noa-architecture (where they exist)
+     * Note that the {@link Facet}s registered are the generic ones from
+     * noa-architecture (where they exist)
      */
     public ActionParameterChoicesFacetFactory() {
         super(FeatureType.ACTIONS_ONLY, PREFIXES);
@@ -69,8 +69,7 @@ public class ActionParameterChoicesFacet
 
     }
 
-    private void attachChoicesFacetForParametersIfChoicesNumMethodIsFound(
-        final ProcessMethodContext processMethodContext, final List<FacetedMethodParameter> parameters) {
+    private void attachChoicesFacetForParametersIfChoicesNumMethodIsFound(final ProcessMethodContext processMethodContext, final List<FacetedMethodParameter> parameters) {
 
         if (parameters.isEmpty()) {
             return;
@@ -100,13 +99,11 @@ public class ActionParameterChoicesFacet
 
             // add facets directly to parameters, not to actions
             final FacetedMethodParameter paramAsHolder = parameters.get(i);
-            FacetUtil.addFacet(new ActionParameterChoicesFacetViaMethod(choicesMethod, arrayOfParamType, paramAsHolder,
-                getSpecificationLookup(), getAdapterMap()));
+            FacetUtil.addFacet(new ActionParameterChoicesFacetViaMethod(choicesMethod, arrayOfParamType, paramAsHolder, getSpecificationLookup(), getAdapterMap()));
         }
     }
 
-    private Method findChoicesNumMethodReturning(final ProcessMethodContext processMethodContext, final int i,
-        final Class<?> arrayOfParamType) {
+    private Method findChoicesNumMethodReturning(final ProcessMethodContext processMethodContext, final int i, final Class<?> arrayOfParamType) {
 
         final Class<?> cls = processMethodContext.getCls();
         final Method actionMethod = processMethodContext.getMethod();

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/methodnum/ActionParameterChoicesFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/methodnum/ActionParameterChoicesFacetViaMethod.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/methodnum/ActionParameterChoicesFacetViaMethod.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/methodnum/ActionParameterChoicesFacetViaMethod.java Sun Jan 22 06:58:43 2012
@@ -34,21 +34,20 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.progmodel.facets.CollectionUtils;
 import org.apache.isis.core.progmodel.facets.param.choices.ActionParameterChoicesFacetAbstract;
 
-public class ActionParameterChoicesFacetViaMethod extends ActionParameterChoicesFacetAbstract implements
-    ImperativeFacet {
+public class ActionParameterChoicesFacetViaMethod extends ActionParameterChoicesFacetAbstract implements ImperativeFacet {
 
     private final Method method;
     private final Class<?> choicesType;
 
-    public ActionParameterChoicesFacetViaMethod(final Method method, final Class<?> choicesType,
-        final FacetHolder holder, final SpecificationLookup specificationLookup, final AdapterMap adapterManager) {
+    public ActionParameterChoicesFacetViaMethod(final Method method, final Class<?> choicesType, final FacetHolder holder, final SpecificationLookup specificationLookup, final AdapterMap adapterManager) {
         super(holder, specificationLookup, adapterManager);
         this.method = method;
         this.choicesType = choicesType;
     }
 
     /**
-     * Returns a singleton list of the {@link Method} provided in the constructor.
+     * Returns a singleton list of the {@link Method} provided in the
+     * constructor.
      */
     @Override
     public List<Method> getMethods() {

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/ActionParameterDefaultsFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/ActionParameterDefaultsFacetAbstract.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/ActionParameterDefaultsFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/ActionParameterDefaultsFacetAbstract.java Sun Jan 22 06:58:43 2012
@@ -24,8 +24,7 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.param.defaults.ActionParameterDefaultsFacet;
 
-public abstract class ActionParameterDefaultsFacetAbstract extends FacetAbstract implements
-    ActionParameterDefaultsFacet {
+public abstract class ActionParameterDefaultsFacetAbstract extends FacetAbstract implements ActionParameterDefaultsFacet {
 
     public static Class<? extends Facet> type() {
         return ActionParameterDefaultsFacet.class;

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ActionParameterDefaultFacetDerivedFromTypeFacets.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ActionParameterDefaultFacetDerivedFromTypeFacets.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ActionParameterDefaultFacetDerivedFromTypeFacets.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ActionParameterDefaultFacetDerivedFromTypeFacets.java Sun Jan 22 06:58:43 2012
@@ -28,8 +28,7 @@ public class ActionParameterDefaultFacet
 
     private final DefaultedFacet[] defaultedFacets;
 
-    public ActionParameterDefaultFacetDerivedFromTypeFacets(final DefaultedFacet[] defaultedFacets,
-        final FacetHolder holder) {
+    public ActionParameterDefaultFacetDerivedFromTypeFacets(final DefaultedFacet[] defaultedFacets, final FacetHolder holder) {
         super(holder, true);
         this.defaultedFacets = defaultedFacets;
     }
@@ -38,7 +37,8 @@ public class ActionParameterDefaultFacet
      * Return the defaults.
      * 
      * <p>
-     * Note that we get the defaults fresh each time in case the defaults might conceivably change.
+     * Note that we get the defaults fresh each time in case the defaults might
+     * conceivably change.
      */
     @Override
     public Object[] getDefaults(final ObjectAdapter inObject) {

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ParameterDefaultDerivedFromTypeFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ParameterDefaultDerivedFromTypeFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ParameterDefaultDerivedFromTypeFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ParameterDefaultDerivedFromTypeFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -33,8 +33,8 @@ public class ParameterDefaultDerivedFrom
     }
 
     /**
-     * If there is a {@link DefaultedFacet} on any of the action's parameter types, then installs a
-     * {@link ActionDefaultsFacet} for the action.
+     * If there is a {@link DefaultedFacet} on any of the action's parameter
+     * types, then installs a {@link ActionDefaultsFacet} for the action.
      */
     @Override
     public void processParams(final ProcessParameterContext processParameterContext) {
@@ -53,8 +53,7 @@ public class ParameterDefaultDerivedFrom
             hasAtLeastOneDefault = hasAtLeastOneDefault | (parameterTypeDefaultedFacets[i] != null);
         }
         if (hasAtLeastOneDefault) {
-            FacetUtil.addFacet(new ActionParameterDefaultFacetDerivedFromTypeFacets(parameterTypeDefaultedFacets,
-                processParameterContext.getFacetHolder()));
+            FacetUtil.addFacet(new ActionParameterDefaultFacetDerivedFromTypeFacets(parameterTypeDefaultedFacets, processParameterContext.getFacetHolder()));
         }
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/methodnum/ActionParameterDefaultsFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/methodnum/ActionParameterDefaultsFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/methodnum/ActionParameterDefaultsFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/methodnum/ActionParameterDefaultsFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -40,15 +40,15 @@ import org.apache.isis.core.progmodel.fa
 /**
  * Sets up all the {@link Facet}s for an action in a single shot.
  */
-public class ActionParameterDefaultsFacetFactory extends MethodPrefixBasedFacetFactoryAbstract implements
-    AdapterMapAware {
+public class ActionParameterDefaultsFacetFactory extends MethodPrefixBasedFacetFactoryAbstract implements AdapterMapAware {
 
     private static final String[] PREFIXES = {};
 
     private AdapterMap adapterMap;
 
     /**
-     * Note that the {@link Facet}s registered are the generic ones from noa-architecture (where they exist)
+     * Note that the {@link Facet}s registered are the generic ones from
+     * noa-architecture (where they exist)
      */
     public ActionParameterDefaultsFacetFactory() {
         super(FeatureType.ACTIONS_ONLY, PREFIXES);
@@ -67,8 +67,7 @@ public class ActionParameterDefaultsFace
         attachDefaultFacetForParametersIfDefaultsNumMethodIsFound(processMethodContext, holderList);
     }
 
-    private static void attachDefaultFacetForParametersIfDefaultsNumMethodIsFound(
-        final ProcessMethodContext processMethodContext, final List<FacetedMethodParameter> parameters) {
+    private static void attachDefaultFacetForParametersIfDefaultsNumMethodIsFound(final ProcessMethodContext processMethodContext, final List<FacetedMethodParameter> parameters) {
 
         if (parameters.isEmpty()) {
             return;
@@ -82,9 +81,7 @@ public class ActionParameterDefaultsFace
 
         for (int i = 0; i < paramTypes.length; i++) {
 
-            final Method defaultMethod =
-                MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.DEFAULT_PREFIX + i
-                    + capitalizedName, paramTypes[i], new Class[0]);
+            final Method defaultMethod = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.DEFAULT_PREFIX + i + capitalizedName, paramTypes[i], new Class[0]);
 
             if (defaultMethod == null) {
                 continue;
@@ -93,8 +90,7 @@ public class ActionParameterDefaultsFace
 
             final FacetedMethod facetedMethod = processMethodContext.getFacetHolder();
             if (facetedMethod.containsDoOpFacet(ActionDefaultsFacet.class)) {
-                throw new MetaModelException(cls + " uses both old and new default syntax for "
-                    + actionMethod.getName() + "(...) - must use one or other");
+                throw new MetaModelException(cls + " uses both old and new default syntax for " + actionMethod.getName() + "(...) - must use one or other");
             }
 
             // add facets directly to parameters, not to actions

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/methodnum/ActionParameterDefaultsFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/methodnum/ActionParameterDefaultsFacetViaMethod.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/methodnum/ActionParameterDefaultsFacetViaMethod.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/methodnum/ActionParameterDefaultsFacetViaMethod.java Sun Jan 22 06:58:43 2012
@@ -29,8 +29,7 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.ImperativeFacet;
 import org.apache.isis.core.progmodel.facets.param.defaults.ActionParameterDefaultsFacetAbstract;
 
-public class ActionParameterDefaultsFacetViaMethod extends ActionParameterDefaultsFacetAbstract implements
-    ImperativeFacet {
+public class ActionParameterDefaultsFacetViaMethod extends ActionParameterDefaultsFacetAbstract implements ImperativeFacet {
 
     private final Method method;
 
@@ -40,7 +39,8 @@ public class ActionParameterDefaultsFace
     }
 
     /**
-     * Returns a singleton list of the {@link Method} provided in the constructor.
+     * Returns a singleton list of the {@link Method} provided in the
+     * constructor.
      */
     @Override
     public List<Method> getMethods() {

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/describedas/annotation/DescribedAsAnnotationOnParameterFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/describedas/annotation/DescribedAsAnnotationOnParameterFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/describedas/annotation/DescribedAsAnnotationOnParameterFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/describedas/annotation/DescribedAsAnnotationOnParameterFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -40,8 +40,7 @@ public class DescribedAsAnnotationOnPara
 
         final int paramNum = processParameterContext.getParamNum();
         final Class<?> parameterType = processParameterContext.getMethod().getParameterTypes()[paramNum];
-        final Annotation[] parameterAnnotations =
-            getParameterAnnotations(processParameterContext.getMethod())[paramNum];
+        final Annotation[] parameterAnnotations = getParameterAnnotations(processParameterContext.getMethod())[paramNum];
         for (final Annotation parameterAnnotation : parameterAnnotations) {
             if (parameterAnnotation instanceof DescribedAs) {
                 FacetUtil.addFacet(create((DescribedAs) parameterAnnotation, processParameterContext.getFacetHolder()));
@@ -49,11 +48,11 @@ public class DescribedAsAnnotationOnPara
             }
         }
 
-        // otherwise, fall back to a description on the parameter's type, if available
+        // otherwise, fall back to a description on the parameter's type, if
+        // available
         final DescribedAsFacet parameterTypeDescribedAsFacet = getDescribedAsFacet(parameterType);
         if (parameterTypeDescribedAsFacet != null) {
-            FacetUtil.addFacet(new DescribedAsFacetForParameterDerivedFromType(parameterTypeDescribedAsFacet,
-                processParameterContext.getFacetHolder()));
+            FacetUtil.addFacet(new DescribedAsFacetForParameterDerivedFromType(parameterTypeDescribedAsFacet, processParameterContext.getFacetHolder()));
             return;
         }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/describedas/staticmethod/ActionParameterDescriptionsMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/describedas/staticmethod/ActionParameterDescriptionsMethodFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/describedas/staticmethod/ActionParameterDescriptionsMethodFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/describedas/staticmethod/ActionParameterDescriptionsMethodFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -38,15 +38,15 @@ import org.apache.isis.core.progmodel.fa
 import org.apache.isis.core.progmodel.facets.MethodPrefixConstants;
 import org.apache.isis.core.progmodel.facets.members.describedas.staticmethod.DescribedAsFacetViaMethod;
 
-public class ActionParameterDescriptionsMethodFacetFactory extends MethodPrefixBasedFacetFactoryAbstract implements
-    AdapterMapAware {
+public class ActionParameterDescriptionsMethodFacetFactory extends MethodPrefixBasedFacetFactoryAbstract implements AdapterMapAware {
 
     private static final String[] PREFIXES = { MethodPrefixConstants.DESCRIPTION_PREFIX };
 
     private AdapterMap adapterMap;
 
     /**
-     * Note that the {@link Facet}s registered are the generic ones from noa-architecture (where they exist)
+     * Note that the {@link Facet}s registered are the generic ones from
+     * noa-architecture (where they exist)
      */
     public ActionParameterDescriptionsMethodFacetFactory() {
         super(FeatureType.ACTIONS_ONLY, PREFIXES);
@@ -65,8 +65,7 @@ public class ActionParameterDescriptions
         attachDescribedAsFacetForParametersIfParameterDescriptionsMethodIsFound(processMethodContext, holderList);
     }
 
-    private static void attachDescribedAsFacetForParametersIfParameterDescriptionsMethodIsFound(
-        final ProcessMethodContext processMethodContext, final List<FacetedMethodParameter> parameters) {
+    private static void attachDescribedAsFacetForParametersIfParameterDescriptionsMethodIsFound(final ProcessMethodContext processMethodContext, final List<FacetedMethodParameter> parameters) {
 
         if (parameters.isEmpty()) {
             return;
@@ -77,9 +76,7 @@ public class ActionParameterDescriptions
         final String capitalizedName = NameUtils.capitalizeName(actionMethod.getName());
 
         final Class<?> cls = processMethodContext.getCls();
-        final Method descriptionMethod =
-            MethodFinderUtils.findMethod(cls, MethodScope.CLASS, MethodPrefixConstants.DESCRIPTION_PREFIX
-                + capitalizedName, String[].class, new Class[0]);
+        final Method descriptionMethod = MethodFinderUtils.findMethod(cls, MethodScope.CLASS, MethodPrefixConstants.DESCRIPTION_PREFIX + capitalizedName, String[].class, new Class[0]);
         if (descriptionMethod == null) {
             return;
         }
@@ -100,8 +97,7 @@ public class ActionParameterDescriptions
             // ignore
         }
         if (descriptions == null || descriptions.length != numElementsRequired) {
-            throw new MetaModelException(descriptionMethod
-                + " must return an String[] array of same size as number of parameters of action");
+            throw new MetaModelException(descriptionMethod + " must return an String[] array of same size as number of parameters of action");
         }
         return descriptions;
     }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/mandatory/annotation/MandatoryFacetInvertedByOptionalForParameter.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/mandatory/annotation/MandatoryFacetInvertedByOptionalForParameter.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/mandatory/annotation/MandatoryFacetInvertedByOptionalForParameter.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/mandatory/annotation/MandatoryFacetInvertedByOptionalForParameter.java Sun Jan 22 06:58:43 2012
@@ -27,8 +27,8 @@ import org.apache.isis.core.metamodel.fa
  * Derived by presence of an <tt>@Optional</tt> method.
  * 
  * <p>
- * This implementation indicates that the {@link FacetHolder} is <i>not</i> mandatory, as per
- * {@link #isInvertedSemantics()}.
+ * This implementation indicates that the {@link FacetHolder} is <i>not</i>
+ * mandatory, as per {@link #isInvertedSemantics()}.
  */
 public class MandatoryFacetInvertedByOptionalForParameter extends MandatoryFacetAbstract {
 
@@ -37,7 +37,8 @@ public class MandatoryFacetInvertedByOpt
     }
 
     /**
-     * Always returns <tt>false</tt>, indicating that the facet holder is in fact optional.
+     * Always returns <tt>false</tt>, indicating that the facet holder is in
+     * fact optional.
      */
     @Override
     public boolean isRequiredButNull(final ObjectAdapter adapter) {

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/mandatory/annotation/OptionalAnnotationForParameterFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/mandatory/annotation/OptionalAnnotationForParameterFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/mandatory/annotation/OptionalAnnotationForParameterFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/mandatory/annotation/OptionalAnnotationForParameterFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -42,12 +42,10 @@ public class OptionalAnnotationForParame
         if (parameterTypes[processParameterContext.getParamNum()].isPrimitive()) {
             return;
         }
-        final Annotation[] parameterAnnotations =
-            getParameterAnnotations(processParameterContext.getMethod())[processParameterContext.getParamNum()];
+        final Annotation[] parameterAnnotations = getParameterAnnotations(processParameterContext.getMethod())[processParameterContext.getParamNum()];
         for (final Annotation parameterAnnotation : parameterAnnotations) {
             if (parameterAnnotation instanceof Optional) {
-                FacetUtil.addFacet(new MandatoryFacetInvertedByOptionalForParameter(processParameterContext
-                    .getFacetHolder()));
+                FacetUtil.addFacet(new MandatoryFacetInvertedByOptionalForParameter(processParameterContext.getFacetHolder()));
                 return;
             }
         }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/mandatory/dflt/MandatoryDefaultForParametersFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/mandatory/dflt/MandatoryDefaultForParametersFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/mandatory/dflt/MandatoryDefaultForParametersFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/mandatory/dflt/MandatoryDefaultForParametersFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -29,12 +29,15 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.specloader.facetprocessor.FacetProcessor;
 
 /**
- * Simply installs a {@link MandatoryFacetDefault} onto all properties and parameters.
+ * Simply installs a {@link MandatoryFacetDefault} onto all properties and
+ * parameters.
  * 
  * <p>
- * The idea is that this {@link FacetFactory} is included early on in the {@link FacetProcessor}, but other
- * {@link MandatoryFacet} implementations which don't require mandatory semantics will potentially replace these where
- * the property or parameter is annotated or otherwise indicated as being optional.
+ * The idea is that this {@link FacetFactory} is included early on in the
+ * {@link FacetProcessor}, but other {@link MandatoryFacet} implementations
+ * which don't require mandatory semantics will potentially replace these where
+ * the property or parameter is annotated or otherwise indicated as being
+ * optional.
  */
 public class MandatoryDefaultForParametersFacetFactory extends FacetFactoryAbstract {
 



Mime
View raw message