incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1096928 [6/16] - in /incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel: facetdecorators/help/ facetdecorators/help/file/ facetdecorators/help/file/internal/ facetdecorators/i18n/ facetdecorators/i18n/internal...
Date Tue, 26 Apr 2011 22:03:55 GMT
Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadingCallbackFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadingCallbackFacetViaMethod.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadingCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadingCallbackFacetViaMethod.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.callbacks.load;
 
 import java.lang.reflect.Method;
@@ -30,7 +29,6 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.ImperativeFacet;
 
-
 public class LoadingCallbackFacetViaMethod extends LoadingCallbackFacetAbstract implements ImperativeFacet {
 
     private final List<Method> methods = new ArrayList<Method>();
@@ -40,25 +38,29 @@ public class LoadingCallbackFacetViaMeth
         addMethod(method);
     }
 
-	public void addMethod(Method method) {
-		methods.add(method);
-	}
+    @Override
+    public void addMethod(final Method method) {
+        methods.add(method);
+    }
 
+    @Override
     public List<Method> getMethods() {
-    	return Collections.unmodifiableList(methods);
+        return Collections.unmodifiableList(methods);
     }
 
-	public boolean impliesResolve() {
-		return false;
-	}
+    @Override
+    public boolean impliesResolve() {
+        return false;
+    }
 
-	public boolean impliesObjectChanged() {
-		return false;
-	}
+    @Override
+    public boolean impliesObjectChanged() {
+        return false;
+    }
 
     @Override
     public void invoke(final ObjectAdapter adapter) {
-    	AdapterInvokeUtils.invoke(methods, adapter);
+        AdapterInvokeUtils.invoke(methods, adapter);
     }
 
     @Override
@@ -67,4 +69,3 @@ public class LoadingCallbackFacetViaMeth
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
 
-package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
-
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
@@ -34,49 +33,53 @@ import org.apache.isis.core.metamodel.me
 import org.apache.isis.core.progmodel.facets.MethodFinderUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
 import org.apache.isis.core.progmodel.facets.MethodPrefixConstants;
-
-
-public class PersistCallbackFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
-
-    private static final String[] PREFIXES = { MethodPrefixConstants.PERSISTED_PREFIX, MethodPrefixConstants.PERSISTING_PREFIX, };
-
-    public PersistCallbackFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY, PREFIXES);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
+
+public class PersistCallbackFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
+
+    private static final String[] PREFIXES = { MethodPrefixConstants.PERSISTED_PREFIX,
+        MethodPrefixConstants.PERSISTING_PREFIX, };
+
+    public PersistCallbackFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY, PREFIXES);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
         final Class<?> cls = processClassContext.getCls();
         final FacetHolder facetHolder = processClassContext.getFacetHolder();
-
-        final List<Facet> facets = new ArrayList<Facet>();
-        final List<Method> methods = new ArrayList<Method>();
-
-        Method method = null;
-        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.PERSISTING_PREFIX, void.class, NO_PARAMETERS_TYPES);
-        if (method != null) {
-            methods.add(method);
-            PersistingCallbackFacet facet = facetHolder.getFacet(PersistingCallbackFacet.class);
-            if (facet == null) {
-            	facets.add(new PersistingCallbackFacetViaMethod(method, facetHolder));
-            } else {
-            	facet.addMethod(method);
-            }
-        }
-
-        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.PERSISTED_PREFIX, void.class, NO_PARAMETERS_TYPES);
-        if (method != null) {
-            methods.add(method);
-            PersistedCallbackFacet facet = facetHolder.getFacet(PersistedCallbackFacet.class);
-            if (facet == null) {
-            	facets.add(new PersistedCallbackFacetViaMethod(method, facetHolder));
-            } else {
-            	facet.addMethod(method);
-            }
-        }
-
-        processClassContext.removeMethods(methods);
-        FacetUtil.addFacets(facets);
-    }
-
-}
+
+        final List<Facet> facets = new ArrayList<Facet>();
+        final List<Method> methods = new ArrayList<Method>();
+
+        Method method = null;
+        method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.PERSISTING_PREFIX, void.class,
+                NO_PARAMETERS_TYPES);
+        if (method != null) {
+            methods.add(method);
+            final PersistingCallbackFacet facet = facetHolder.getFacet(PersistingCallbackFacet.class);
+            if (facet == null) {
+                facets.add(new PersistingCallbackFacetViaMethod(method, facetHolder));
+            } else {
+                facet.addMethod(method);
+            }
+        }
+
+        method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.PERSISTED_PREFIX, void.class,
+                NO_PARAMETERS_TYPES);
+        if (method != null) {
+            methods.add(method);
+            final PersistedCallbackFacet facet = facetHolder.getFacet(PersistedCallbackFacet.class);
+            if (facet == null) {
+                facets.add(new PersistedCallbackFacetViaMethod(method, facetHolder));
+            } else {
+                facet.addMethod(method);
+            }
+        }
+
+        processClassContext.removeMethods(methods);
+        FacetUtil.addFacets(facets);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackViaSaveMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackViaSaveMethodFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackViaSaveMethodFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackViaSaveMethodFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
 
-package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
-
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
@@ -34,49 +33,53 @@ import org.apache.isis.core.metamodel.me
 import org.apache.isis.core.progmodel.facets.MethodFinderUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
 import org.apache.isis.core.progmodel.facets.MethodPrefixConstants;
-
-
-public class PersistCallbackViaSaveMethodFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
-
-    private static final String[] PREFIXES = { MethodPrefixConstants.SAVED_PREFIX, MethodPrefixConstants.SAVING_PREFIX, };
-
-    public PersistCallbackViaSaveMethodFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY, PREFIXES);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
+
+public class PersistCallbackViaSaveMethodFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
+
+    private static final String[] PREFIXES =
+        { MethodPrefixConstants.SAVED_PREFIX, MethodPrefixConstants.SAVING_PREFIX, };
+
+    public PersistCallbackViaSaveMethodFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY, PREFIXES);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
         final Class<?> cls = processClassContext.getCls();
         final FacetHolder facetHolder = processClassContext.getFacetHolder();
-
-        final List<Facet> facets = new ArrayList<Facet>();
-        final List<Method> methods = new ArrayList<Method>();
-
-        Method method = null;
-        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.SAVING_PREFIX, void.class, NO_PARAMETERS_TYPES);
-        if (method != null) {
-            methods.add(method);
-            PersistingCallbackFacet facet = facetHolder.getFacet(PersistingCallbackFacet.class);
-            if (facet == null) {
-            	facets.add(new PersistingCallbackFacetViaMethod(method, facetHolder));
-            } else {
-            	facet.addMethod(method);
-            }
-        }
-
-        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.SAVED_PREFIX, void.class, NO_PARAMETERS_TYPES);
-        if (method != null) {
-            methods.add(method);
-            PersistedCallbackFacet facet = facetHolder.getFacet(PersistedCallbackFacet.class);
-            if (facet == null) {
-            	facets.add(new PersistedCallbackFacetViaMethod(method, facetHolder));
-            } else {
-            	facet.addMethod(method);
-            }
-        }
-
-        processClassContext.removeMethods(methods);
-        FacetUtil.addFacets(facets);
-    }
-
-}
+
+        final List<Facet> facets = new ArrayList<Facet>();
+        final List<Method> methods = new ArrayList<Method>();
+
+        Method method = null;
+        method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.SAVING_PREFIX, void.class,
+                NO_PARAMETERS_TYPES);
+        if (method != null) {
+            methods.add(method);
+            final PersistingCallbackFacet facet = facetHolder.getFacet(PersistingCallbackFacet.class);
+            if (facet == null) {
+                facets.add(new PersistingCallbackFacetViaMethod(method, facetHolder));
+            } else {
+                facet.addMethod(method);
+            }
+        }
+
+        method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.SAVED_PREFIX, void.class,
+                NO_PARAMETERS_TYPES);
+        if (method != null) {
+            methods.add(method);
+            final PersistedCallbackFacet facet = facetHolder.getFacet(PersistedCallbackFacet.class);
+            if (facet == null) {
+                facets.add(new PersistedCallbackFacetViaMethod(method, facetHolder));
+            } else {
+                facet.addMethod(method);
+            }
+        }
+
+        processClassContext.removeMethods(methods);
+        FacetUtil.addFacets(facets);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetAbstract.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetAbstract.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
@@ -25,7 +24,6 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.callbacks.PersistedCallbackFacet;
 import org.apache.isis.core.progmodel.facets.object.callbacks.CallbackFacetAbstract;
 
-
 public abstract class PersistedCallbackFacetAbstract extends CallbackFacetAbstract implements PersistedCallbackFacet {
 
     public static Class<? extends Facet> type() {
@@ -37,4 +35,3 @@ public abstract class PersistedCallbackF
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetViaMethod.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetViaMethod.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
 
 import java.lang.reflect.Method;
@@ -30,7 +29,6 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.ImperativeFacet;
 
-
 public class PersistedCallbackFacetViaMethod extends PersistedCallbackFacetAbstract implements ImperativeFacet {
 
     private final List<Method> methods = new ArrayList<Method>();
@@ -40,25 +38,29 @@ public class PersistedCallbackFacetViaMe
         addMethod(method);
     }
 
-	public void addMethod(Method method) {
-		methods.add(method);
-	}
+    @Override
+    public void addMethod(final Method method) {
+        methods.add(method);
+    }
 
+    @Override
     public List<Method> getMethods() {
-    	return Collections.unmodifiableList(methods);
+        return Collections.unmodifiableList(methods);
     }
 
-	public boolean impliesResolve() {
-		return false;
-	}
+    @Override
+    public boolean impliesResolve() {
+        return false;
+    }
 
-	public boolean impliesObjectChanged() {
-		return false;
-	}
+    @Override
+    public boolean impliesObjectChanged() {
+        return false;
+    }
 
     @Override
     public void invoke(final ObjectAdapter adapter) {
-    	AdapterInvokeUtils.invoke(methods, adapter);
+        AdapterInvokeUtils.invoke(methods, adapter);
     }
 
     @Override
@@ -67,4 +69,3 @@ public class PersistedCallbackFacetViaMe
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetAbstract.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetAbstract.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
@@ -25,7 +24,6 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.callbacks.PersistingCallbackFacet;
 import org.apache.isis.core.progmodel.facets.object.callbacks.CallbackFacetAbstract;
 
-
 public abstract class PersistingCallbackFacetAbstract extends CallbackFacetAbstract implements PersistingCallbackFacet {
 
     public static Class<? extends Facet> type() {
@@ -37,4 +35,3 @@ public abstract class PersistingCallback
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetViaMethod.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetViaMethod.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
 
 import java.lang.reflect.Method;
@@ -30,7 +29,6 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.ImperativeFacet;
 
-
 public class PersistingCallbackFacetViaMethod extends PersistingCallbackFacetAbstract implements ImperativeFacet {
 
     private final List<Method> methods = new ArrayList<Method>();
@@ -40,25 +38,29 @@ public class PersistingCallbackFacetViaM
         addMethod(method);
     }
 
-	public void addMethod(Method method) {
-		methods.add(method);
-	}
+    @Override
+    public void addMethod(final Method method) {
+        methods.add(method);
+    }
 
+    @Override
     public List<Method> getMethods() {
-    	return Collections.unmodifiableList(methods);
+        return Collections.unmodifiableList(methods);
     }
 
-	public boolean impliesResolve() {
-		return false;
-	}
+    @Override
+    public boolean impliesResolve() {
+        return false;
+    }
 
-	public boolean impliesObjectChanged() {
-		return false;
-	}
+    @Override
+    public boolean impliesObjectChanged() {
+        return false;
+    }
 
     @Override
     public void invoke(final ObjectAdapter adapter) {
-    	AdapterInvokeUtils.invoke(methods, adapter);
+        AdapterInvokeUtils.invoke(methods, adapter);
     }
 
     @Override
@@ -67,4 +69,3 @@ public class PersistingCallbackFacetViaM
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
 
-package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
-
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
@@ -34,49 +33,53 @@ import org.apache.isis.core.metamodel.me
 import org.apache.isis.core.progmodel.facets.MethodFinderUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
 import org.apache.isis.core.progmodel.facets.MethodPrefixConstants;
-
-
-public class RemoveCallbackFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
-
-    private static final String[] PREFIXES = { MethodPrefixConstants.REMOVED_PREFIX, MethodPrefixConstants.REMOVING_PREFIX, };
-
-    public RemoveCallbackFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY, PREFIXES);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
+
+public class RemoveCallbackFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
+
+    private static final String[] PREFIXES = { MethodPrefixConstants.REMOVED_PREFIX,
+        MethodPrefixConstants.REMOVING_PREFIX, };
+
+    public RemoveCallbackFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY, PREFIXES);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
         final Class<?> cls = processClassContext.getCls();
         final FacetHolder facetHolder = processClassContext.getFacetHolder();
-
-        final List<Facet> facets = new ArrayList<Facet>();
-        final List<Method> methods = new ArrayList<Method>();
-
-        Method method = null;
-        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.REMOVING_PREFIX, void.class, NO_PARAMETERS_TYPES);
-        if (method != null) {
-            methods.add(method);
-            RemovingCallbackFacet facet = facetHolder.getFacet(RemovingCallbackFacet.class);
-            if (facet == null) {
-            	facets.add(new RemovingCallbackFacetViaMethod(method, facetHolder));
-            } else {
-            	facet.addMethod(method);
-            }
-        }
-
-        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.REMOVED_PREFIX, void.class, NO_PARAMETERS_TYPES);
-        if (method != null) {
-            methods.add(method);
-            RemovedCallbackFacet facet = facetHolder.getFacet(RemovedCallbackFacet.class);
-            if (facet == null) {
-            	facets.add(new RemovedCallbackFacetViaMethod(method, facetHolder));
-            } else {
-            	facet.addMethod(method);
-            }
-        }
-
-        processClassContext.removeMethods(methods);
-        FacetUtil.addFacets(facets);
-    }
-
-}
+
+        final List<Facet> facets = new ArrayList<Facet>();
+        final List<Method> methods = new ArrayList<Method>();
+
+        Method method = null;
+        method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.REMOVING_PREFIX, void.class,
+                NO_PARAMETERS_TYPES);
+        if (method != null) {
+            methods.add(method);
+            final RemovingCallbackFacet facet = facetHolder.getFacet(RemovingCallbackFacet.class);
+            if (facet == null) {
+                facets.add(new RemovingCallbackFacetViaMethod(method, facetHolder));
+            } else {
+                facet.addMethod(method);
+            }
+        }
+
+        method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.REMOVED_PREFIX, void.class,
+                NO_PARAMETERS_TYPES);
+        if (method != null) {
+            methods.add(method);
+            final RemovedCallbackFacet facet = facetHolder.getFacet(RemovedCallbackFacet.class);
+            if (facet == null) {
+                facets.add(new RemovedCallbackFacetViaMethod(method, facetHolder));
+            } else {
+                facet.addMethod(method);
+            }
+        }
+
+        processClassContext.removeMethods(methods);
+        FacetUtil.addFacets(facets);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackViaDeleteMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackViaDeleteMethodFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackViaDeleteMethodFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackViaDeleteMethodFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
 
-package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
-
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
@@ -34,49 +33,53 @@ import org.apache.isis.core.metamodel.me
 import org.apache.isis.core.progmodel.facets.MethodFinderUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
 import org.apache.isis.core.progmodel.facets.MethodPrefixConstants;
-
-
-public class RemoveCallbackViaDeleteMethodFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
-
-    private static final String[] PREFIXES = { MethodPrefixConstants.DELETED_PREFIX, MethodPrefixConstants.DELETING_PREFIX, };
-
-    public RemoveCallbackViaDeleteMethodFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY, PREFIXES);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
+
+public class RemoveCallbackViaDeleteMethodFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
+
+    private static final String[] PREFIXES = { MethodPrefixConstants.DELETED_PREFIX,
+        MethodPrefixConstants.DELETING_PREFIX, };
+
+    public RemoveCallbackViaDeleteMethodFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY, PREFIXES);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
         final Class<?> cls = processClassContext.getCls();
         final FacetHolder holder = processClassContext.getFacetHolder();
-
-        final List<Facet> facets = new ArrayList<Facet>();
-        final List<Method> methods = new ArrayList<Method>();
-
-        Method method = null;
-        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.DELETING_PREFIX, void.class, NO_PARAMETERS_TYPES);
-        if (method != null) {
-            methods.add(method);
-            RemovingCallbackFacet facet = holder.getFacet(RemovingCallbackFacet.class);
-            if (facet == null) {
-            	facets.add(new RemovingCallbackFacetViaMethod(method, holder));
-            } else {
-            	facet.addMethod(method);
-            }
-        }
-
-        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.DELETED_PREFIX, void.class, NO_PARAMETERS_TYPES);
-        if (method != null) {
-            methods.add(method);
-            RemovedCallbackFacet facet = holder.getFacet(RemovedCallbackFacet.class);
-            if (facet == null) {
-            	facets.add(new RemovedCallbackFacetViaMethod(method, holder));
-            } else {
-            	facet.addMethod(method);
-            }
-        }
-
-        processClassContext.removeMethods(methods);
-        FacetUtil.addFacets(facets);
-    }
-
-}
+
+        final List<Facet> facets = new ArrayList<Facet>();
+        final List<Method> methods = new ArrayList<Method>();
+
+        Method method = null;
+        method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.DELETING_PREFIX, void.class,
+                NO_PARAMETERS_TYPES);
+        if (method != null) {
+            methods.add(method);
+            final RemovingCallbackFacet facet = holder.getFacet(RemovingCallbackFacet.class);
+            if (facet == null) {
+                facets.add(new RemovingCallbackFacetViaMethod(method, holder));
+            } else {
+                facet.addMethod(method);
+            }
+        }
+
+        method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.DELETED_PREFIX, void.class,
+                NO_PARAMETERS_TYPES);
+        if (method != null) {
+            methods.add(method);
+            final RemovedCallbackFacet facet = holder.getFacet(RemovedCallbackFacet.class);
+            if (facet == null) {
+                facets.add(new RemovedCallbackFacetViaMethod(method, holder));
+            } else {
+                facet.addMethod(method);
+            }
+        }
+
+        processClassContext.removeMethods(methods);
+        FacetUtil.addFacets(facets);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetAbstract.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetAbstract.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
@@ -25,7 +24,6 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.callbacks.RemovedCallbackFacet;
 import org.apache.isis.core.progmodel.facets.object.callbacks.CallbackFacetAbstract;
 
-
 public abstract class RemovedCallbackFacetAbstract extends CallbackFacetAbstract implements RemovedCallbackFacet {
 
     public static Class<? extends Facet> type() {
@@ -37,4 +35,3 @@ public abstract class RemovedCallbackFac
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetViaMethod.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetViaMethod.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
 
 import java.lang.reflect.Method;
@@ -30,7 +29,6 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.ImperativeFacet;
 
-
 public class RemovedCallbackFacetViaMethod extends RemovedCallbackFacetAbstract implements ImperativeFacet {
 
     private final List<Method> methods = new ArrayList<Method>();
@@ -40,25 +38,29 @@ public class RemovedCallbackFacetViaMeth
         addMethod(method);
     }
 
-	public void addMethod(Method method) {
-		methods.add(method);
-	}
+    @Override
+    public void addMethod(final Method method) {
+        methods.add(method);
+    }
 
+    @Override
     public List<Method> getMethods() {
-    	return Collections.unmodifiableList(methods);
+        return Collections.unmodifiableList(methods);
     }
 
-	public boolean impliesResolve() {
-		return false;
-	}
+    @Override
+    public boolean impliesResolve() {
+        return false;
+    }
 
-	public boolean impliesObjectChanged() {
-		return false;
-	}
+    @Override
+    public boolean impliesObjectChanged() {
+        return false;
+    }
 
     @Override
     public void invoke(final ObjectAdapter adapter) {
-    	AdapterInvokeUtils.invoke(methods, adapter);
+        AdapterInvokeUtils.invoke(methods, adapter);
     }
 
     @Override
@@ -67,4 +69,3 @@ public class RemovedCallbackFacetViaMeth
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetAbstract.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetAbstract.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
@@ -25,7 +24,6 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.callbacks.RemovingCallbackFacet;
 import org.apache.isis.core.progmodel.facets.object.callbacks.CallbackFacetAbstract;
 
-
 public abstract class RemovingCallbackFacetAbstract extends CallbackFacetAbstract implements RemovingCallbackFacet {
 
     public static Class<? extends Facet> type() {
@@ -37,4 +35,3 @@ public abstract class RemovingCallbackFa
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetViaMethod.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetViaMethod.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
 
 import java.lang.reflect.Method;
@@ -30,7 +29,6 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.ImperativeFacet;
 
-
 public class RemovingCallbackFacetViaMethod extends RemovingCallbackFacetAbstract implements ImperativeFacet {
 
     private final List<Method> methods = new ArrayList<Method>();
@@ -40,25 +38,29 @@ public class RemovingCallbackFacetViaMet
         addMethod(method);
     }
 
-	public void addMethod(Method method) {
-		methods.add(method);
-	}
-
-	public boolean impliesResolve() {
-		return false;
-	}
-
-	public boolean impliesObjectChanged() {
-		return false;
-	}
+    @Override
+    public void addMethod(final Method method) {
+        methods.add(method);
+    }
+
+    @Override
+    public boolean impliesResolve() {
+        return false;
+    }
+
+    @Override
+    public boolean impliesObjectChanged() {
+        return false;
+    }
 
+    @Override
     public List<Method> getMethods() {
-    	return Collections.unmodifiableList(methods);
+        return Collections.unmodifiableList(methods);
     }
 
     @Override
     public void invoke(final ObjectAdapter adapter) {
-    	AdapterInvokeUtils.invoke(methods, adapter);
+        AdapterInvokeUtils.invoke(methods, adapter);
     }
 
     @Override
@@ -67,4 +69,3 @@ public class RemovingCallbackFacetViaMet
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdateCallbackFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdateCallbackFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdateCallbackFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdateCallbackFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.callbacks.update;
 
-package org.apache.isis.core.progmodel.facets.object.callbacks.update;
-
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
@@ -32,39 +31,43 @@ import org.apache.isis.core.metamodel.me
 import org.apache.isis.core.progmodel.facets.MethodFinderUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
 import org.apache.isis.core.progmodel.facets.MethodPrefixConstants;
-
-
-public class UpdateCallbackFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
-
-    private static final String[] PREFIXES = { MethodPrefixConstants.UPDATED_PREFIX, MethodPrefixConstants.UPDATING_PREFIX, };
-
-    public UpdateCallbackFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY, PREFIXES);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
+
+public class UpdateCallbackFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
+
+    private static final String[] PREFIXES = { MethodPrefixConstants.UPDATED_PREFIX,
+        MethodPrefixConstants.UPDATING_PREFIX, };
+
+    public UpdateCallbackFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY, PREFIXES);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
         final Class<?> cls = processClassContext.getCls();
         final FacetHolder facetHolder = processClassContext.getFacetHolder();
-
-        final List<Facet> facets = new ArrayList<Facet>();
-        final List<Method> methods = new ArrayList<Method>();
-
-        Method method = null;
-        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.UPDATING_PREFIX, void.class, NO_PARAMETERS_TYPES);
-        if (method != null) {
-            methods.add(method);
-            facets.add(new UpdatingCallbackFacetViaMethod(method, facetHolder));
-        }
-
-        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.UPDATED_PREFIX, void.class, NO_PARAMETERS_TYPES);
-        if (method != null) {
-            methods.add(method);
-            facets.add(new UpdatedCallbackFacetViaMethod(method, facetHolder));
-        }
-
-        processClassContext.removeMethods(methods);
-        FacetUtil.addFacets(facets);
-    }
-
-}
+
+        final List<Facet> facets = new ArrayList<Facet>();
+        final List<Method> methods = new ArrayList<Method>();
+
+        Method method = null;
+        method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.UPDATING_PREFIX, void.class,
+                NO_PARAMETERS_TYPES);
+        if (method != null) {
+            methods.add(method);
+            facets.add(new UpdatingCallbackFacetViaMethod(method, facetHolder));
+        }
+
+        method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.UPDATED_PREFIX, void.class,
+                NO_PARAMETERS_TYPES);
+        if (method != null) {
+            methods.add(method);
+            facets.add(new UpdatedCallbackFacetViaMethod(method, facetHolder));
+        }
+
+        processClassContext.removeMethods(methods);
+        FacetUtil.addFacets(facets);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatedCallbackFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatedCallbackFacetAbstract.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatedCallbackFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatedCallbackFacetAbstract.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.callbacks.update;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
@@ -25,7 +24,6 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.callbacks.UpdatedCallbackFacet;
 import org.apache.isis.core.progmodel.facets.object.callbacks.CallbackFacetAbstract;
 
-
 public abstract class UpdatedCallbackFacetAbstract extends CallbackFacetAbstract implements UpdatedCallbackFacet {
 
     public static Class<? extends Facet> type() {
@@ -37,4 +35,3 @@ public abstract class UpdatedCallbackFac
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatedCallbackFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatedCallbackFacetViaMethod.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatedCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatedCallbackFacetViaMethod.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.callbacks.update;
 
 import java.lang.reflect.Method;
@@ -30,7 +29,6 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.ImperativeFacet;
 
-
 public class UpdatedCallbackFacetViaMethod extends UpdatedCallbackFacetAbstract implements ImperativeFacet {
 
     private final List<Method> methods = new ArrayList<Method>();
@@ -40,25 +38,29 @@ public class UpdatedCallbackFacetViaMeth
         addMethod(method);
     }
 
-	public void addMethod(Method method) {
-		methods.add(method);
-	}
+    @Override
+    public void addMethod(final Method method) {
+        methods.add(method);
+    }
 
+    @Override
     public List<Method> getMethods() {
-    	return Collections.unmodifiableList(methods);
+        return Collections.unmodifiableList(methods);
     }
 
-	public boolean impliesResolve() {
-		return false;
-	}
+    @Override
+    public boolean impliesResolve() {
+        return false;
+    }
 
-	public boolean impliesObjectChanged() {
-		return false;
-	}
+    @Override
+    public boolean impliesObjectChanged() {
+        return false;
+    }
 
     @Override
     public void invoke(final ObjectAdapter adapter) {
-    	AdapterInvokeUtils.invoke(methods, adapter);
+        AdapterInvokeUtils.invoke(methods, adapter);
     }
 
     @Override
@@ -67,4 +69,3 @@ public class UpdatedCallbackFacetViaMeth
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatingCallbackFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatingCallbackFacetAbstract.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatingCallbackFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatingCallbackFacetAbstract.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.callbacks.update;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
@@ -25,7 +24,6 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.callbacks.UpdatingCallbackFacet;
 import org.apache.isis.core.progmodel.facets.object.callbacks.CallbackFacetAbstract;
 
-
 public abstract class UpdatingCallbackFacetAbstract extends CallbackFacetAbstract implements UpdatingCallbackFacet {
 
     public static Class<? extends Facet> type() {
@@ -37,4 +35,3 @@ public abstract class UpdatingCallbackFa
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatingCallbackFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatingCallbackFacetViaMethod.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatingCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/update/UpdatingCallbackFacetViaMethod.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.callbacks.update;
 
 import java.lang.reflect.Method;
@@ -30,7 +29,6 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.ImperativeFacet;
 
-
 public class UpdatingCallbackFacetViaMethod extends UpdatingCallbackFacetAbstract implements ImperativeFacet {
 
     private final List<Method> methods = new ArrayList<Method>();
@@ -40,24 +38,29 @@ public class UpdatingCallbackFacetViaMet
         addMethod(method);
     }
 
-	public void addMethod(Method method) {
-		methods.add(method);
-	}
+    @Override
+    public void addMethod(final Method method) {
+        methods.add(method);
+    }
+
+    @Override
     public List<Method> getMethods() {
-    	return Collections.unmodifiableList(methods);
+        return Collections.unmodifiableList(methods);
     }
 
-	public boolean impliesResolve() {
-		return false;
-	}
+    @Override
+    public boolean impliesResolve() {
+        return false;
+    }
 
-	public boolean impliesObjectChanged() {
-		return false;
-	}
+    @Override
+    public boolean impliesObjectChanged() {
+        return false;
+    }
 
     @Override
     public void invoke(final ObjectAdapter adapter) {
-    	AdapterInvokeUtils.invoke(methods, adapter);
+        AdapterInvokeUtils.invoke(methods, adapter);
     }
 
     @Override
@@ -66,4 +69,3 @@ public class UpdatingCallbackFacetViaMet
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/ChoicesFacetEnum.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/ChoicesFacetEnum.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/ChoicesFacetEnum.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/ChoicesFacetEnum.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.choices.enums;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -26,14 +25,15 @@ import org.apache.isis.core.metamodel.fa
 
 public class ChoicesFacetEnum extends ChoicesFacetAbstract {
 
-    private Object[] choices;
+    private final Object[] choices;
 
     public ChoicesFacetEnum(final FacetHolder holder, final Object[] choices) {
         super(holder);
         this.choices = choices;
     }
 
-    public Object[] getChoices(ObjectAdapter adapter) {
+    @Override
+    public Object[] getChoices(final ObjectAdapter adapter) {
         return choices;
     }
 

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/EnumFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/EnumFacet.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/EnumFacet.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/EnumFacet.java Tue Apr 26 22:03:43 2011
@@ -17,12 +17,10 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.choices.enums;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
 
 public interface EnumFacet extends Facet {
 
-
 }

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/EnumFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/EnumFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/EnumFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/EnumFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -32,11 +32,10 @@ public class EnumFacetFactory<T extends 
     }
 
     @Override
-    public void process(ProcessClassContext processClassContext) {
+    public void process(final ProcessClassContext processClassContext) {
         final Class<?> cls = processClassContext.getCls();
         final FacetHolder holder = processClassContext.getFacetHolder();
 
-
         if (!cls.isEnum()) {
             return;
         }
@@ -45,7 +44,7 @@ public class EnumFacetFactory<T extends 
         FacetUtil.addFacet(new ChoicesFacetEnum(holder, cls.getEnumConstants()));
     }
 
-    protected Class<T> asT(Class<?> cls) {
+    protected Class<T> asT(final Class<?> cls) {
         return CastUtils.cast(cls);
     }
 

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/EnumValueSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/EnumValueSemanticsProvider.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/EnumValueSemanticsProvider.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/choices/enums/EnumValueSemanticsProvider.java Tue Apr 26 22:03:43 2011
@@ -19,8 +19,6 @@
 
 package org.apache.isis.core.progmodel.facets.object.choices.enums;
 
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
 import org.apache.isis.applib.adapters.EncoderDecoder;
 import org.apache.isis.applib.adapters.Localization;
 import org.apache.isis.applib.adapters.Parser;
@@ -31,7 +29,10 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
 
-public class EnumValueSemanticsProvider<T extends Enum<T>> extends ValueSemanticsProviderAndFacetAbstract<T> implements EnumFacet {
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
+public class EnumValueSemanticsProvider<T extends Enum<T>> extends ValueSemanticsProviderAndFacetAbstract<T> implements
+    EnumFacet {
 
     private static final boolean IMMUTABLE = true;
     private static final boolean EQUAL_BY_CONTENT = true;
@@ -49,56 +50,47 @@ public class EnumValueSemanticsProvider<
         this(null, null, null, null);
     }
 
-    public EnumValueSemanticsProvider(
-            FacetHolder holder, 
-            Class<T> adaptedClass, 
-            IsisConfiguration configuration,
-            ValueSemanticsProviderContext context) {
+    public EnumValueSemanticsProvider(final FacetHolder holder, final Class<T> adaptedClass,
+        final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
         this(type(), holder, adaptedClass, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT,
             adaptedClass.getEnumConstants()[0], configuration, context);
     }
 
-    private EnumValueSemanticsProvider(
-            Class<? extends Facet> adapterFacetType, 
-            FacetHolder holder,
-            Class<T> adaptedClass, 
-            int typicalLength, 
-            boolean immutable, 
-            boolean equalByContent, 
-            T defaultValue,
-            IsisConfiguration configuration, 
-            ValueSemanticsProviderContext context) {
+    private EnumValueSemanticsProvider(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, adaptedClass, typicalLength, immutable, equalByContent, defaultValue,
             configuration, context);
     }
 
     @Override
     protected T doParse(final Object context, final String entry) {
-        T[] enumConstants = getAdaptedClass().getEnumConstants();
-        for (T enumConstant : enumConstants) {
-            if (enumConstant.toString().equals(entry))
+        final T[] enumConstants = getAdaptedClass().getEnumConstants();
+        for (final T enumConstant : enumConstants) {
+            if (enumConstant.toString().equals(entry)) {
                 return enumConstant;
+            }
         }
         throw new TextEntryParseException("Unknown enum constant '" + entry + "'");
     }
 
     @Override
-    protected String doEncode(Object object) {
+    protected String doEncode(final Object object) {
         return titleString(object, null);
     }
 
     @Override
-    protected T doRestore(String data) {
+    protected T doRestore(final String data) {
         return doParse(null, data);
     }
 
     @Override
-    protected String titleString(Object object, Localization localization) {
+    protected String titleString(final Object object, final Localization localization) {
         return object.toString();
     }
 
     @Override
-    public String titleStringWithMask(Object value, String usingMask) {
+    public String titleStringWithMask(final Object value, final String usingMask) {
         return titleString(value, null);
     }
 

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultedFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultedFacet.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultedFacet.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultedFacet.java Tue Apr 26 22:03:43 2011
@@ -17,32 +17,30 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.defaults;
 
-package org.apache.isis.core.progmodel.facets.object.defaults;
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.SingleValueFacet;
 import org.apache.isis.core.metamodel.facets.actions.defaults.ActionDefaultsFacet;
 import org.apache.isis.core.metamodel.facets.properties.defaults.PropertyDefaultFacet;
-
-
-/**
- * Indicates that this class has a default.
- * 
- * <p>
- * The mechanism for providing a default will vary by the applib. In the Java applib, this is done by
- * implementing the DefaultProvider interface.
- * 
- * <p>
- * The rest of the framework does not used this directly, but instead we infer {@link PropertyDefaultFacet}
- * and {@link ActionDefaultsFacet} from the method's return type / parameter types, and copy over.
- */
-public interface DefaultedFacet extends SingleValueFacet {
-
-    /**
-     * The default (as a pojo, not a {@link ObjectAdapter}).
-     * 
-     * @return
-     */
-    Object getDefault();
-}
+
+/**
+ * Indicates that this class has a default.
+ * 
+ * <p>
+ * The mechanism for providing a default will vary by the applib. In the Java applib, this is done by implementing the
+ * DefaultProvider interface.
+ * 
+ * <p>
+ * The rest of the framework does not used this directly, but instead we infer {@link PropertyDefaultFacet} and
+ * {@link ActionDefaultsFacet} from the method's return type / parameter types, and copy over.
+ */
+public interface DefaultedFacet extends SingleValueFacet {
+
+    /**
+     * The default (as a pojo, not a {@link ObjectAdapter}).
+     * 
+     * @return
+     */
+    Object getDefault();
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultedFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultedFacetAbstract.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultedFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultedFacetAbstract.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.defaults;
 
 import org.apache.isis.applib.adapters.DefaultsProvider;
@@ -27,7 +26,6 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
 
-
 public abstract class DefaultedFacetAbstract extends FacetAbstract implements DefaultedFacet {
 
     private final Class<?> defaultsProviderClass;
@@ -37,25 +35,24 @@ public abstract class DefaultedFacetAbst
 
     private final DependencyInjector dependencyInjector;
 
-    public DefaultedFacetAbstract(
-            final String candidateEncoderDecoderName,
-            final Class<?> candidateEncoderDecoderClass,
-            final FacetHolder holder, 
-            final DependencyInjector dependencyInjector) {
+    public DefaultedFacetAbstract(final String candidateEncoderDecoderName,
+        final Class<?> candidateEncoderDecoderClass, final FacetHolder holder,
+        final DependencyInjector dependencyInjector) {
         super(DefaultedFacet.class, holder, false);
 
-        this.defaultsProviderClass = DefaultsProviderUtil.defaultsProviderOrNull(candidateEncoderDecoderClass,
-                candidateEncoderDecoderName);
+        this.defaultsProviderClass =
+            DefaultsProviderUtil.defaultsProviderOrNull(candidateEncoderDecoderClass, candidateEncoderDecoderName);
         this.dependencyInjector = dependencyInjector;
         if (isValid()) {
-            DefaultsProvider defaultsProvider = (DefaultsProvider) ClassUtil.newInstance(defaultsProviderClass, FacetHolder.class, holder);
-            this.defaultedFacetUsingDefaultsProvider = new DefaultedFacetUsingDefaultsProvider(defaultsProvider, holder, getDependencyInjector());
+            final DefaultsProvider defaultsProvider =
+                (DefaultsProvider) ClassUtil.newInstance(defaultsProviderClass, FacetHolder.class, holder);
+            this.defaultedFacetUsingDefaultsProvider =
+                new DefaultedFacetUsingDefaultsProvider(defaultsProvider, holder, getDependencyInjector());
         } else {
             this.defaultedFacetUsingDefaultsProvider = null;
         }
     }
 
-
     /**
      * Discover whether either of the candidate defaults provider name or class is valid.
      */
@@ -80,13 +77,12 @@ public abstract class DefaultedFacetAbst
         return defaultsProviderClass.getName();
     }
 
-    ////////////////////////////////////////////////////////
+    // //////////////////////////////////////////////////////
     // Dependencies (from constructor)
-    ////////////////////////////////////////////////////////
-    
+    // //////////////////////////////////////////////////////
+
     private DependencyInjector getDependencyInjector() {
         return dependencyInjector;
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultedFacetUsingDefaultsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultedFacetUsingDefaultsProvider.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultedFacetUsingDefaultsProvider.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultedFacetUsingDefaultsProvider.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.defaults;
 
 import org.apache.isis.applib.adapters.DefaultsProvider;
@@ -25,13 +24,13 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
 
-
 public class DefaultedFacetUsingDefaultsProvider extends FacetAbstract implements DefaultedFacet {
 
     private final DefaultsProvider<?> defaultsProvider;
-	private final DependencyInjector dependencyInjector;
+    private final DependencyInjector dependencyInjector;
 
-    public DefaultedFacetUsingDefaultsProvider(final DefaultsProvider<?> parser, final FacetHolder holder, final DependencyInjector dependencyInjector) {
+    public DefaultedFacetUsingDefaultsProvider(final DefaultsProvider<?> parser, final FacetHolder holder,
+        final DependencyInjector dependencyInjector) {
         super(DefaultedFacet.class, holder, false);
         this.defaultsProvider = parser;
         this.dependencyInjector = dependencyInjector;
@@ -39,25 +38,22 @@ public class DefaultedFacetUsingDefaults
 
     @Override
     protected String toStringValues() {
-    	getDependencyInjector().injectDependenciesInto(defaultsProvider);
+        getDependencyInjector().injectDependenciesInto(defaultsProvider);
         return defaultsProvider.toString();
     }
 
     @Override
     public Object getDefault() {
-    	getDependencyInjector().injectDependenciesInto(defaultsProvider);
+        getDependencyInjector().injectDependenciesInto(defaultsProvider);
         return defaultsProvider.getDefaultValue();
     }
 
-    
-    ////////////////////////////////////////////////////////
+    // //////////////////////////////////////////////////////
     // Dependencies (from constructor)
-    ////////////////////////////////////////////////////////
-    
+    // //////////////////////////////////////////////////////
+
     public DependencyInjector getDependencyInjector() {
         return dependencyInjector;
     }
-    
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultsProviderUtil.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultsProviderUtil.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultsProviderUtil.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/DefaultsProviderUtil.java Tue Apr 26 22:03:43 2011
@@ -17,34 +17,36 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.defaults;
 
-package org.apache.isis.core.progmodel.facets.object.defaults;
-
 import org.apache.isis.applib.adapters.DefaultsProvider;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.lang.JavaClassUtils;
 import org.apache.isis.core.commons.lang.StringUtils;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-
-
-public final class DefaultsProviderUtil {
-
-    private DefaultsProviderUtil() {}
-
-    public static final String DEFAULTS_PROVIDER_NAME_KEY_PREFIX = "isis.reflector.java.facets.defaulted.";
-    public static final String DEFAULTS_PROVIDER_NAME_KEY_SUFFIX = ".providerName";
-
-    public static String defaultsProviderNameFromConfiguration(final Class<?> type, final IsisConfiguration configuration) {
-        final String key = DEFAULTS_PROVIDER_NAME_KEY_PREFIX + type.getCanonicalName() + DEFAULTS_PROVIDER_NAME_KEY_SUFFIX;
-        final String defaultsProviderName = configuration.getString(key);
-        return !StringUtils.isNullOrEmpty(defaultsProviderName) ? defaultsProviderName : null;
-    }
-
-    public static Class<?> defaultsProviderOrNull(final Class<?> candidateClass, final String classCandidateName) {
-        final Class<?> type = candidateClass != null ? JavaClassUtils.implementingClassOrNull(candidateClass.getName(),
-                DefaultsProvider.class, FacetHolder.class) : null;
-        return type != null ? type : JavaClassUtils.implementingClassOrNull(classCandidateName, DefaultsProvider.class, FacetHolder.class);
-    }
-
-}
-
+
+public final class DefaultsProviderUtil {
+
+    private DefaultsProviderUtil() {
+    }
+
+    public static final String DEFAULTS_PROVIDER_NAME_KEY_PREFIX = "isis.reflector.java.facets.defaulted.";
+    public static final String DEFAULTS_PROVIDER_NAME_KEY_SUFFIX = ".providerName";
+
+    public static String defaultsProviderNameFromConfiguration(final Class<?> type,
+        final IsisConfiguration configuration) {
+        final String key =
+            DEFAULTS_PROVIDER_NAME_KEY_PREFIX + type.getCanonicalName() + DEFAULTS_PROVIDER_NAME_KEY_SUFFIX;
+        final String defaultsProviderName = configuration.getString(key);
+        return !StringUtils.isNullOrEmpty(defaultsProviderName) ? defaultsProviderName : null;
+    }
+
+    public static Class<?> defaultsProviderOrNull(final Class<?> candidateClass, final String classCandidateName) {
+        final Class<?> type =
+            candidateClass != null ? JavaClassUtils.implementingClassOrNull(candidateClass.getName(),
+                DefaultsProvider.class, FacetHolder.class) : null;
+        return type != null ? type : JavaClassUtils.implementingClassOrNull(classCandidateName, DefaultsProvider.class,
+            FacetHolder.class);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/annotation/DefaultedAnnotationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/annotation/DefaultedAnnotationFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/annotation/DefaultedAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/annotation/DefaultedAnnotationFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,7 @@
  *  under the License.
  */
 
-
-package org.apache.isis.core.progmodel.facets.object.defaults.annotation;
-
+package org.apache.isis.core.progmodel.facets.object.defaults.annotation;
 
 import org.apache.isis.applib.annotation.Defaulted;
 import org.apache.isis.core.commons.config.IsisConfiguration;
@@ -33,65 +31,68 @@ import org.apache.isis.core.metamodel.ru
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjectorAware;
 import org.apache.isis.core.progmodel.facets.object.defaults.DefaultedFacetAbstract;
 import org.apache.isis.core.progmodel.facets.object.defaults.DefaultsProviderUtil;
-
-
-public class DefaultedAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract implements IsisConfigurationAware, DependencyInjectorAware {
-
-    private IsisConfiguration configuration;
+
+public class DefaultedAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract implements
+    IsisConfigurationAware, DependencyInjectorAware {
+
+    private IsisConfiguration configuration;
     private DependencyInjector dependencyInjector;
-
-	public DefaultedAnnotationFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
-        FacetUtil.addFacet(create(processClassContext.getCls(), processClassContext.getFacetHolder()));
-    }
-
-    private DefaultedFacetAbstract create(final Class<?> cls, final FacetHolder holder) {
-        final Defaulted annotation = getAnnotation(cls, Defaulted.class);
-
-        // create from annotation, if present
-        if (annotation != null) {
-            final DefaultedFacetAbstract facet = new DefaultedFacetAnnotation(cls, getIsisConfiguration(), holder, getDependencyInjector());
-            if (facet.isValid()) {
-                return facet;
-            }
-        }
-
-        // otherwise, try to create from configuration, if present
-        final String providerName = DefaultsProviderUtil.defaultsProviderNameFromConfiguration(cls,
-                getIsisConfiguration());
-        if (!StringUtils.isNullOrEmpty(providerName)) {
-            final DefaultedFacetFromConfiguration facet = new DefaultedFacetFromConfiguration(providerName, holder, getDependencyInjector());
-            if (facet.isValid()) {
-                return facet;
-            }
-        }
-
-        return null;
-    }
-
-
-    // ////////////////////////////////////////////////////////////////////
-    // Injected
-    // ////////////////////////////////////////////////////////////////////
-
-    public IsisConfiguration getIsisConfiguration() {
-        return configuration;
-    }
+
+    public DefaultedAnnotationFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
+        FacetUtil.addFacet(create(processClassContext.getCls(), processClassContext.getFacetHolder()));
+    }
+
+    private DefaultedFacetAbstract create(final Class<?> cls, final FacetHolder holder) {
+        final Defaulted annotation = getAnnotation(cls, Defaulted.class);
+
+        // create from annotation, if present
+        if (annotation != null) {
+            final DefaultedFacetAbstract facet =
+                new DefaultedFacetAnnotation(cls, getIsisConfiguration(), holder, getDependencyInjector());
+            if (facet.isValid()) {
+                return facet;
+            }
+        }
+
+        // otherwise, try to create from configuration, if present
+        final String providerName =
+            DefaultsProviderUtil.defaultsProviderNameFromConfiguration(cls, getIsisConfiguration());
+        if (!StringUtils.isNullOrEmpty(providerName)) {
+            final DefaultedFacetFromConfiguration facet =
+                new DefaultedFacetFromConfiguration(providerName, holder, getDependencyInjector());
+            if (facet.isValid()) {
+                return facet;
+            }
+        }
+
+        return null;
+    }
+
+    // ////////////////////////////////////////////////////////////////////
+    // Injected
+    // ////////////////////////////////////////////////////////////////////
+
+    public IsisConfiguration getIsisConfiguration() {
+        return configuration;
+    }
+
     @Override
-    public void setIsisConfiguration(final IsisConfiguration configuration) {
-        this.configuration = configuration;
-    }
+    public void setIsisConfiguration(final IsisConfiguration configuration) {
+        this.configuration = configuration;
+    }
 
     private DependencyInjector getDependencyInjector() {
         return dependencyInjector;
     }
+
     @Override
-    public void setDependencyInjector(DependencyInjector dependencyInjector) {
+    public void setDependencyInjector(final DependencyInjector dependencyInjector) {
         this.dependencyInjector = dependencyInjector;
     }
-
-}
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/annotation/DefaultedFacetAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/annotation/DefaultedFacetAnnotation.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/annotation/DefaultedFacetAnnotation.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/annotation/DefaultedFacetAnnotation.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.defaults.annotation;
 
-package org.apache.isis.core.progmodel.facets.object.defaults.annotation;
-
 import org.apache.isis.applib.annotation.Defaulted;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.lang.StringUtils;
@@ -27,39 +26,31 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
 import org.apache.isis.core.progmodel.facets.object.defaults.DefaultedFacetAbstract;
 import org.apache.isis.core.progmodel.facets.object.defaults.DefaultsProviderUtil;
-
-
-public class DefaultedFacetAnnotation extends DefaultedFacetAbstract {
-
-    private static String providerName(final Class<?> annotatedClass, final IsisConfiguration configuration) {
-        final Defaulted annotation = annotatedClass.getAnnotation(Defaulted.class);
-        final String providerName = annotation.defaultsProviderName();
-        if (!StringUtils.isNullOrEmpty(providerName)) {
-            return providerName;
-        }
-        return DefaultsProviderUtil.defaultsProviderNameFromConfiguration(annotatedClass, configuration);
-    }
-
-    private static Class<?> providerClass(final Class<?> annotatedClass) {
-        final Defaulted annotation = annotatedClass.getAnnotation(Defaulted.class);
-        return annotation.defaultsProviderClass();
-    }
-
-    public DefaultedFacetAnnotation(
-            final Class<?> annotatedClass,
-            final IsisConfiguration configuration,
-            final FacetHolder holder, 
-            final DependencyInjector dependencyInjector) {
-        this(providerName(annotatedClass, configuration), providerClass(annotatedClass), holder, dependencyInjector);
-    }
-
-    private DefaultedFacetAnnotation(
-            final String candidateProviderName,
-            final Class<?> candidateProviderClass,
-            final FacetHolder holder, 
-            final DependencyInjector dependencyInjector) {
-        super(candidateProviderName, candidateProviderClass, holder, dependencyInjector);
-    }
-
-}
-
+
+public class DefaultedFacetAnnotation extends DefaultedFacetAbstract {
+
+    private static String providerName(final Class<?> annotatedClass, final IsisConfiguration configuration) {
+        final Defaulted annotation = annotatedClass.getAnnotation(Defaulted.class);
+        final String providerName = annotation.defaultsProviderName();
+        if (!StringUtils.isNullOrEmpty(providerName)) {
+            return providerName;
+        }
+        return DefaultsProviderUtil.defaultsProviderNameFromConfiguration(annotatedClass, configuration);
+    }
+
+    private static Class<?> providerClass(final Class<?> annotatedClass) {
+        final Defaulted annotation = annotatedClass.getAnnotation(Defaulted.class);
+        return annotation.defaultsProviderClass();
+    }
+
+    public DefaultedFacetAnnotation(final Class<?> annotatedClass, final IsisConfiguration configuration,
+        final FacetHolder holder, final DependencyInjector dependencyInjector) {
+        this(providerName(annotatedClass, configuration), providerClass(annotatedClass), holder, dependencyInjector);
+    }
+
+    private DefaultedFacetAnnotation(final String candidateProviderName, final Class<?> candidateProviderClass,
+        final FacetHolder holder, final DependencyInjector dependencyInjector) {
+        super(candidateProviderName, candidateProviderClass, holder, dependencyInjector);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/annotation/DefaultedFacetFromConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/annotation/DefaultedFacetFromConfiguration.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/annotation/DefaultedFacetFromConfiguration.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/defaults/annotation/DefaultedFacetFromConfiguration.java Tue Apr 26 22:03:43 2011
@@ -17,22 +17,17 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.defaults.annotation;
 
-package org.apache.isis.core.progmodel.facets.object.defaults.annotation;
-
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
 import org.apache.isis.core.progmodel.facets.object.defaults.DefaultedFacetAbstract;
-
-
-public class DefaultedFacetFromConfiguration extends DefaultedFacetAbstract {
-
-    public DefaultedFacetFromConfiguration(
-    		final String candidateProviderName, 
-    		final FacetHolder holder, 
-    		final DependencyInjector dependencyInjector) {
-        super(candidateProviderName, null, holder, dependencyInjector);
-
-    }
-}
-
+
+public class DefaultedFacetFromConfiguration extends DefaultedFacetAbstract {
+
+    public DefaultedFacetFromConfiguration(final String candidateProviderName, final FacetHolder holder,
+        final DependencyInjector dependencyInjector) {
+        super(candidateProviderName, null, holder, dependencyInjector);
+
+    }
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/describedas/annotation/DescribedAsAnnotationOnTypeFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/describedas/annotation/DescribedAsAnnotationOnTypeFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/describedas/annotation/DescribedAsAnnotationOnTypeFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/describedas/annotation/DescribedAsAnnotationOnTypeFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,32 +17,29 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.describedas.annotation;
 
-package org.apache.isis.core.progmodel.facets.object.describedas.annotation;
-
 import org.apache.isis.applib.annotation.DescribedAs;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetUtil;
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.AnnotationBasedFacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.describedas.DescribedAsFacet;
-
-
-public class DescribedAsAnnotationOnTypeFacetFactory extends AnnotationBasedFacetFactoryAbstract {
-
-    public DescribedAsAnnotationOnTypeFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContaxt) {
-        final DescribedAs annotation = getAnnotation(processClassContaxt.getCls(), DescribedAs.class);
-        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
-    }
-
-
-    private DescribedAsFacet create(final DescribedAs annotation, final FacetHolder holder) {
-        return annotation == null ? null : new DescribedAsFacetAnnotationOnType(annotation.value(), holder);
-    }
-
-}
+
+public class DescribedAsAnnotationOnTypeFacetFactory extends AnnotationBasedFacetFactoryAbstract {
+
+    public DescribedAsAnnotationOnTypeFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContaxt) {
+        final DescribedAs annotation = getAnnotation(processClassContaxt.getCls(), DescribedAs.class);
+        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
+    }
+
+    private DescribedAsFacet create(final DescribedAs annotation, final FacetHolder holder) {
+        return annotation == null ? null : new DescribedAsFacetAnnotationOnType(annotation.value(), holder);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/describedas/annotation/DescribedAsFacetAnnotationOnType.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/describedas/annotation/DescribedAsFacetAnnotationOnType.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/describedas/annotation/DescribedAsFacetAnnotationOnType.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/describedas/annotation/DescribedAsFacetAnnotationOnType.java Tue Apr 26 22:03:43 2011
@@ -17,18 +17,15 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.describedas.annotation;
 
-package org.apache.isis.core.progmodel.facets.object.describedas.annotation;
-
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.describedas.DescribedAsFacetAbstract;
-
-
-public class DescribedAsFacetAnnotationOnType extends DescribedAsFacetAbstract {
-
-    public DescribedAsFacetAnnotationOnType(final String value, final FacetHolder holder) {
-        super(value, holder);
-    }
-
-}
-
+
+public class DescribedAsFacetAnnotationOnType extends DescribedAsFacetAbstract {
+
+    public DescribedAsFacetAnnotationOnType(final String value, final FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/ClearDirtyObjectFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/ClearDirtyObjectFacetAbstract.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/ClearDirtyObjectFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/ClearDirtyObjectFacetAbstract.java Tue Apr 26 22:03:43 2011
@@ -17,22 +17,20 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.dirty;
 
-package org.apache.isis.core.progmodel.facets.object.dirty;
-
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.dirty.ClearDirtyObjectFacet;
-
-
-public abstract class ClearDirtyObjectFacetAbstract extends DirtyObjectFacetAbstract implements ClearDirtyObjectFacet {
-
-    public static Class<? extends Facet> type() {
-        return ClearDirtyObjectFacet.class;
-    }
-
-    public ClearDirtyObjectFacetAbstract(final FacetHolder holder) {
-        super(type(), holder);
-    }
-
-}
+
+public abstract class ClearDirtyObjectFacetAbstract extends DirtyObjectFacetAbstract implements ClearDirtyObjectFacet {
+
+    public static Class<? extends Facet> type() {
+        return ClearDirtyObjectFacet.class;
+    }
+
+    public ClearDirtyObjectFacetAbstract(final FacetHolder holder) {
+        super(type(), holder);
+    }
+
+}



Mime
View raw message