incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1096837 [7/14] - in /incubator/isis/trunk: core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/map/ core/metamodel/src/main/java/org/apache/isis/core/meta...
Date Tue, 26 Apr 2011 18:24:13 GMT
Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/DisablingInteractionAdvisor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/DisablingInteractionAdvisor.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/DisablingInteractionAdvisor.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/DisablingInteractionAdvisor.java Tue Apr 26 18:24:05 2011
@@ -17,30 +17,28 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import org.apache.isis.applib.events.UsabilityEvent;
 import org.apache.isis.core.metamodel.facetapi.FacetAbstract.Disabling;
-
-
-/**
- * Mix-in interface for facets that can advise as to whether a member should be disabled.
- * 
- * @see ValidatingInteractionAdvisor
- * @see HidingInteractionAdvisor
- */
-public interface DisablingInteractionAdvisor extends InteractionAdvisorFacet, Disabling {
-
-    /**
-     * Whether the rule represented by this facet disables the member to which it applies.
-     * 
-     * <p>
-     * Implementations should use the provided {@link InteractionContext} to determine whether they disable
-     * the member from being modified or used. They must however guard against a <tt>null</tt>
-     * {@link InteractionContext#getTarget() target} and {@link InteractionContext#getSession() session} -
-     * neither are guaranteed to be populated.
-     */
-    String disables(final UsabilityContext<? extends UsabilityEvent> ic);
-
-}
+
+/**
+ * Mix-in interface for facets that can advise as to whether a member should be disabled.
+ * 
+ * @see ValidatingInteractionAdvisor
+ * @see HidingInteractionAdvisor
+ */
+public interface DisablingInteractionAdvisor extends InteractionAdvisorFacet, Disabling {
+
+    /**
+     * Whether the rule represented by this facet disables the member to which it applies.
+     * 
+     * <p>
+     * Implementations should use the provided {@link InteractionContext} to determine whether they disable the member
+     * from being modified or used. They must however guard against a <tt>null</tt>
+     * {@link InteractionContext#getTarget() target} and {@link InteractionContext#getSession() session} - neither are
+     * guaranteed to be populated.
+     */
+    String disables(final UsabilityContext<? extends UsabilityEvent> ic);
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/HidingInteractionAdvisor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/HidingInteractionAdvisor.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/HidingInteractionAdvisor.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/HidingInteractionAdvisor.java Tue Apr 26 18:24:05 2011
@@ -17,29 +17,26 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import org.apache.isis.applib.events.VisibilityEvent;
 import org.apache.isis.core.metamodel.facetapi.FacetAbstract.Hiding;
-
-
-/**
- * Mix-in interface for facets that can advise as to whether a member should be hidden.
- * 
- * @see DisablingInteractionAdvisor
- * @see ValidatingInteractionAdvisor
- */
-public interface HidingInteractionAdvisor extends InteractionAdvisorFacet, Hiding {
-
-    /**
-     * Whether the rule represented by this facet hides the member to which it applies.
-     * 
-     * <p>
-     * Implementations should use the provided {@link InteractionContext} to determine whether they declare
-     * the object/member is hidden. They must however guard against a <tt>null</tt>
-     * {@link InteractionContext#getTarget() target} and {@link InteractionContext#getSession() session} -
-     * neither are guaranteed to be populated.
-     */
-    String hides(final VisibilityContext<? extends VisibilityEvent> ic);
-}
+
+/**
+ * Mix-in interface for facets that can advise as to whether a member should be hidden.
+ * 
+ * @see DisablingInteractionAdvisor
+ * @see ValidatingInteractionAdvisor
+ */
+public interface HidingInteractionAdvisor extends InteractionAdvisorFacet, Hiding {
+
+    /**
+     * Whether the rule represented by this facet hides the member to which it applies.
+     * 
+     * <p>
+     * Implementations should use the provided {@link InteractionContext} to determine whether they declare the
+     * object/member is hidden. They must however guard against a <tt>null</tt> {@link InteractionContext#getTarget()
+     * target} and {@link InteractionContext#getSession() session} - neither are guaranteed to be populated.
+     */
+    String hides(final VisibilityContext<? extends VisibilityEvent> ic);
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionAdvisorFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionAdvisorFacet.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionAdvisorFacet.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionAdvisorFacet.java Tue Apr 26 18:24:05 2011
@@ -17,64 +17,72 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import org.apache.isis.core.metamodel.consent.Allow;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.consent.InteractionAdvisor;
 import org.apache.isis.core.metamodel.consent.Veto;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-
-
-/**
- * Used by {@link Consent} (specifically the main implementations {@link Allow} and {@link Veto}), with the
- * idea being that the only things that can create {@link Consent} objects are {@link Facet}s.
- * 
- * <p>
- * TODO: note, this is a work-in-progress, because the DnD viewer in particular creates its own {@link Allow}s
- * and {@link Veto}s. The constructors that it uses have been deprecated to flag that the DnD logic should
- * move into {@link Facet}s that implement this interface.
- * 
- * @author Dan Haywood
- * 
- */
-public interface InteractionAdvisorFacet extends InteractionAdvisor, Facet {
-
-    /**
-     * For testing purposes only.
-     */
-    public static InteractionAdvisorFacet NOOP = new InteractionAdvisorFacet() {
-        public boolean alwaysReplace() {
-            return false;
-        }
-
-        public Class<? extends Facet> facetType() {
-            return null;
-        }
-
-        public FacetHolder getFacetHolder() {
-            return null;
-        }
-
-        public boolean isNoop() {
-            return true;
-        }
-
-        public void setFacetHolder(final FacetHolder facetHolder) {}
-        
-    	public Facet getUnderlyingFacet() {
-    		return null;
-    	}
-    	public void setUnderlyingFacet(Facet underlyingFacet) {
-    		throw new UnsupportedOperationException();
-    	}
-
-        public boolean isDerived() {
-        	return false;
-        }
-
-    };
-
-}
+
+/**
+ * Used by {@link Consent} (specifically the main implementations {@link Allow} and {@link Veto}), with the idea being
+ * that the only things that can create {@link Consent} objects are {@link Facet}s.
+ * 
+ * <p>
+ * TODO: note, this is a work-in-progress, because the DnD viewer in particular creates its own {@link Allow}s and
+ * {@link Veto}s. The constructors that it uses have been deprecated to flag that the DnD logic should move into
+ * {@link Facet}s that implement this interface.
+ * 
+ * @author Dan Haywood
+ * 
+ */
+public interface InteractionAdvisorFacet extends InteractionAdvisor, Facet {
+
+    /**
+     * For testing purposes only.
+     */
+    public static InteractionAdvisorFacet NOOP = new InteractionAdvisorFacet() {
+        @Override
+        public boolean alwaysReplace() {
+            return false;
+        }
+
+        @Override
+        public Class<? extends Facet> facetType() {
+            return null;
+        }
+
+        @Override
+        public FacetHolder getFacetHolder() {
+            return null;
+        }
+
+        @Override
+        public boolean isNoop() {
+            return true;
+        }
+
+        @Override
+        public void setFacetHolder(final FacetHolder facetHolder) {
+        }
+
+        @Override
+        public Facet getUnderlyingFacet() {
+            return null;
+        }
+
+        @Override
+        public void setUnderlyingFacet(final Facet underlyingFacet) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public boolean isDerived() {
+            return false;
+        }
+
+    };
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionContext.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionContext.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionContext.java Tue Apr 26 18:24:05 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.events.InteractionEvent;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
@@ -27,113 +26,106 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.consent.InteractionContextType;
 import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
 import org.apache.isis.core.metamodel.facetapi.Facet;
-
-
-/**
- * Represents an interaction between the framework and (a {@link Facet} of) the domain object.
- * 
- * <p>
- * There are two main responsibilities:
- * <ul>
- * <li>Wraps up a target object, parameters and a {@link AuthenticationSession}. Defining this as a separate interface makes
- * for a more stable API</li>
- * <li>Acts as a factory for the corresponding {@link InteractionEvent} (more on this below).</li>
- * </ul>
- * 
- * <p>
- * The {@link InteractionContext} hierarchy is parallel to the {@link InteractionEvent} hierarchy. Having
- * parallel hierarchies is a bit of a code-smell. However, it is required because the
- * {@link InteractionContext context} hierarchy is internal to the framework (with references to
- * {@link ObjectAdapter}s, {@link AuthenticationSession}s and so forth), whereas the {@link InteractionEvent event} hierarchy
- * is part of the corelib, that is public API.
- * 
- * <p>
- * The class is genericized so that the {@link #createInteractionEvent() factory method} can return the
- * correct subclass without having to downcast.
- */
-public abstract class InteractionContext<T extends InteractionEvent> {
-
-    private final InteractionContextType interactionType;
-    private final Identifier identifier;
-    private final InteractionInvocationMethod invocation;
-    private final AuthenticationSession session;
-    private final ObjectAdapter target;
-
-    public InteractionContext(
-            final InteractionContextType interactionType,
-            final AuthenticationSession session,
-            final InteractionInvocationMethod invocationMethod,
-            final Identifier identifier,
-            final ObjectAdapter target) {
-        this.interactionType = interactionType;
-        this.invocation = invocationMethod;
-        this.identifier = identifier;
-        this.session = session;
-        this.target = target;
-    }
-
-    /**
-     * The type of interaction.
-     * 
-     * <p>
-     * Available for use by {@link Facet}s that apply only in certain conditions. For example, some facets for
-     * collections will care only when an object is being added to the collection, but won't care when an
-     * object is being removed from the collection.
-     * 
-     * <p>
-     * Alternatively, {@link Facet}s can use <tt>instanceof</tt>.
-     */
-    public InteractionContextType getInteractionType() {
-        return interactionType;
-    }
-
-    /**
-     * The identifier of the object or member that is being identified with.
-     * 
-     * <p>
-     * If the {@link #getInteractionType() type} is {@link InteractionContextType#OBJECT_VALIDATE}, will be the
-     * identifier of the {@link #getTarget() target} object's specification. Otherwise will be the identifier
-     * of the member.
-     */
-    public Identifier getIdentifier() {
-        return identifier;
-    }
-
-    /**
-     * The {@link AuthenticationSession user or role} that is performing this interaction.
-     */
-    public AuthenticationSession getSession() {
-        return session;
-    }
-
-    /**
-     * How the interaction was initiated.
-     */
-    public InteractionInvocationMethod getInvocationMethod() {
-        return invocation;
-    }
-
-    /**
-     * Convenience method that indicates whether the {@link #getInvocationMethod() interaction was invoked}
-     * programmatically.
-     */
-    public boolean isProgrammatic() {
-        return invocation == InteractionInvocationMethod.PROGRAMMATIC;
-    }
-
-    /**
-     * The target object that this interaction is with.
-     */
-    public ObjectAdapter getTarget() {
-        return target;
-    }
-
-    /**
-     * Factory method to create corresponding {@link InteractionEvent}.
-     * 
-     * @return
-     */
-    public abstract T createInteractionEvent();
-
-}
-
+
+/**
+ * Represents an interaction between the framework and (a {@link Facet} of) the domain object.
+ * 
+ * <p>
+ * There are two main responsibilities:
+ * <ul>
+ * <li>Wraps up a target object, parameters and a {@link AuthenticationSession}. Defining this as a separate interface
+ * makes for a more stable API</li>
+ * <li>Acts as a factory for the corresponding {@link InteractionEvent} (more on this below).</li>
+ * </ul>
+ * 
+ * <p>
+ * The {@link InteractionContext} hierarchy is parallel to the {@link InteractionEvent} hierarchy. Having parallel
+ * hierarchies is a bit of a code-smell. However, it is required because the {@link InteractionContext context}
+ * hierarchy is internal to the framework (with references to {@link ObjectAdapter}s, {@link AuthenticationSession}s and
+ * so forth), whereas the {@link InteractionEvent event} hierarchy is part of the corelib, that is public API.
+ * 
+ * <p>
+ * The class is genericized so that the {@link #createInteractionEvent() factory method} can return the correct subclass
+ * without having to downcast.
+ */
+public abstract class InteractionContext<T extends InteractionEvent> {
+
+    private final InteractionContextType interactionType;
+    private final Identifier identifier;
+    private final InteractionInvocationMethod invocation;
+    private final AuthenticationSession session;
+    private final ObjectAdapter target;
+
+    public InteractionContext(final InteractionContextType interactionType, final AuthenticationSession session,
+        final InteractionInvocationMethod invocationMethod, final Identifier identifier, final ObjectAdapter target) {
+        this.interactionType = interactionType;
+        this.invocation = invocationMethod;
+        this.identifier = identifier;
+        this.session = session;
+        this.target = target;
+    }
+
+    /**
+     * The type of interaction.
+     * 
+     * <p>
+     * Available for use by {@link Facet}s that apply only in certain conditions. For example, some facets for
+     * collections will care only when an object is being added to the collection, but won't care when an object is
+     * being removed from the collection.
+     * 
+     * <p>
+     * Alternatively, {@link Facet}s can use <tt>instanceof</tt>.
+     */
+    public InteractionContextType getInteractionType() {
+        return interactionType;
+    }
+
+    /**
+     * The identifier of the object or member that is being identified with.
+     * 
+     * <p>
+     * If the {@link #getInteractionType() type} is {@link InteractionContextType#OBJECT_VALIDATE}, will be the
+     * identifier of the {@link #getTarget() target} object's specification. Otherwise will be the identifier of the
+     * member.
+     */
+    public Identifier getIdentifier() {
+        return identifier;
+    }
+
+    /**
+     * The {@link AuthenticationSession user or role} that is performing this interaction.
+     */
+    public AuthenticationSession getSession() {
+        return session;
+    }
+
+    /**
+     * How the interaction was initiated.
+     */
+    public InteractionInvocationMethod getInvocationMethod() {
+        return invocation;
+    }
+
+    /**
+     * Convenience method that indicates whether the {@link #getInvocationMethod() interaction was invoked}
+     * programmatically.
+     */
+    public boolean isProgrammatic() {
+        return invocation == InteractionInvocationMethod.PROGRAMMATIC;
+    }
+
+    /**
+     * The target object that this interaction is with.
+     */
+    public ObjectAdapter getTarget() {
+        return target;
+    }
+
+    /**
+     * Factory method to create corresponding {@link InteractionEvent}.
+     * 
+     * @return
+     */
+    public abstract T createInteractionEvent();
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionUtils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionUtils.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionUtils.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionUtils.java Tue Apr 26 18:24:05 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import java.util.List;
 
 import org.apache.isis.core.metamodel.consent.InteractionResult;
@@ -27,63 +26,56 @@ import org.apache.isis.core.metamodel.co
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetFilters;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-
-
-public final class InteractionUtils {
-
-    private InteractionUtils() {}
-
-    public static InteractionResult isVisibleResult(final FacetHolder facetHolder, final VisibilityContext<?> context) {
-        final InteractionResult result = new InteractionResult(context.createInteractionEvent());
-        final List<Facet> facets = facetHolder.getFacets(FacetFilters.isA(HidingInteractionAdvisor.class));
-        for (final Facet facet: facets) {
-            final HidingInteractionAdvisor advisor = (HidingInteractionAdvisor) facet;
-            result.advise(advisor.hides(context), advisor);
-        }
-        return result;
-    }
-
-    public static InteractionResultSet isVisibleResultSet(
-            final FacetHolder facetHolder,
-            final VisibilityContext<?> context,
-            final InteractionResultSet resultSet) {
-        return resultSet.add(isVisibleResult(facetHolder, context));
-    }
-
-    public static InteractionResult isUsableResult(final FacetHolder facetHolder, final UsabilityContext<?> context) {
-        final InteractionResult result = new InteractionResult(context.createInteractionEvent());
-        final List<Facet> facets = facetHolder.getFacets(FacetFilters.isA(DisablingInteractionAdvisor.class));
-        for (final Facet facet: facets) {
-            final DisablingInteractionAdvisor advisor = (DisablingInteractionAdvisor) facet;
-            final String disables = advisor.disables(context);
-            result.advise(disables, advisor);
-        }
-        return result;
-    }
-
-    public static InteractionResultSet isUsableResultSet(
-            final FacetHolder facetHolder,
-            final UsabilityContext<?> context,
-            final InteractionResultSet resultSet) {
-        return resultSet.add(isUsableResult(facetHolder, context));
-    }
-
-    public static InteractionResult isValidResult(final FacetHolder facetHolder, final ValidityContext<?> context) {
-        final InteractionResult result = new InteractionResult(context.createInteractionEvent());
-        final List<Facet> facets = facetHolder.getFacets(FacetFilters.isA(ValidatingInteractionAdvisor.class));
-        for (final Facet facet: facets) {
-            final ValidatingInteractionAdvisor advisor = (ValidatingInteractionAdvisor) facet;
-            result.advise(advisor.invalidates(context), advisor);
-        }
-        return result;
-    }
-
-    public static InteractionResultSet isValidResultSet(
-            final FacetHolder facetHolder,
-            final ValidityContext<?> context,
-            final InteractionResultSet resultSet) {
-        return resultSet.add(isValidResult(facetHolder, context));
-    }
-
-}
-
+
+public final class InteractionUtils {
+
+    private InteractionUtils() {
+    }
+
+    public static InteractionResult isVisibleResult(final FacetHolder facetHolder, final VisibilityContext<?> context) {
+        final InteractionResult result = new InteractionResult(context.createInteractionEvent());
+        final List<Facet> facets = facetHolder.getFacets(FacetFilters.isA(HidingInteractionAdvisor.class));
+        for (final Facet facet : facets) {
+            final HidingInteractionAdvisor advisor = (HidingInteractionAdvisor) facet;
+            result.advise(advisor.hides(context), advisor);
+        }
+        return result;
+    }
+
+    public static InteractionResultSet isVisibleResultSet(final FacetHolder facetHolder,
+        final VisibilityContext<?> context, final InteractionResultSet resultSet) {
+        return resultSet.add(isVisibleResult(facetHolder, context));
+    }
+
+    public static InteractionResult isUsableResult(final FacetHolder facetHolder, final UsabilityContext<?> context) {
+        final InteractionResult result = new InteractionResult(context.createInteractionEvent());
+        final List<Facet> facets = facetHolder.getFacets(FacetFilters.isA(DisablingInteractionAdvisor.class));
+        for (final Facet facet : facets) {
+            final DisablingInteractionAdvisor advisor = (DisablingInteractionAdvisor) facet;
+            final String disables = advisor.disables(context);
+            result.advise(disables, advisor);
+        }
+        return result;
+    }
+
+    public static InteractionResultSet isUsableResultSet(final FacetHolder facetHolder,
+        final UsabilityContext<?> context, final InteractionResultSet resultSet) {
+        return resultSet.add(isUsableResult(facetHolder, context));
+    }
+
+    public static InteractionResult isValidResult(final FacetHolder facetHolder, final ValidityContext<?> context) {
+        final InteractionResult result = new InteractionResult(context.createInteractionEvent());
+        final List<Facet> facets = facetHolder.getFacets(FacetFilters.isA(ValidatingInteractionAdvisor.class));
+        for (final Facet facet : facets) {
+            final ValidatingInteractionAdvisor advisor = (ValidatingInteractionAdvisor) facet;
+            result.advise(advisor.invalidates(context), advisor);
+        }
+        return result;
+    }
+
+    public static InteractionResultSet isValidResultSet(final FacetHolder facetHolder,
+        final ValidityContext<?> context, final InteractionResultSet resultSet) {
+        return resultSet.add(isValidResult(facetHolder, context));
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ObjectTitleContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ObjectTitleContext.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ObjectTitleContext.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ObjectTitleContext.java Tue Apr 26 18:24:05 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import static org.apache.isis.core.metamodel.adapter.util.AdapterUtils.unwrap;
 
 import org.apache.isis.applib.Identifier;
@@ -28,32 +27,27 @@ import org.apache.isis.core.commons.auth
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionContextType;
 import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-
-
-/**
- * See {@link InteractionContext} for overview; analogous to {@link ObjectTitleEvent}.
- */
-public class ObjectTitleContext extends AccessContext<ObjectTitleEvent> {
-
-    private final String title;
-
-    public ObjectTitleContext(
-            final AuthenticationSession session,
-            final InteractionInvocationMethod invocationMethod,
-            final ObjectAdapter target,
-            final Identifier identifier,
-            final String title) {
-        super(InteractionContextType.OBJECT_TITLE, session, invocationMethod, identifier, target);
-        this.title = title;
-    }
-
-    @Override
-    public ObjectTitleEvent createInteractionEvent() {
-        return new ObjectTitleEvent(unwrap(getTarget()), getIdentifier(), getTitle());
-    }
-
-    private String getTitle() {
-        return title;
-    }
-
-}
+
+/**
+ * See {@link InteractionContext} for overview; analogous to {@link ObjectTitleEvent}.
+ */
+public class ObjectTitleContext extends AccessContext<ObjectTitleEvent> {
+
+    private final String title;
+
+    public ObjectTitleContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod,
+        final ObjectAdapter target, final Identifier identifier, final String title) {
+        super(InteractionContextType.OBJECT_TITLE, session, invocationMethod, identifier, target);
+        this.title = title;
+    }
+
+    @Override
+    public ObjectTitleEvent createInteractionEvent() {
+        return new ObjectTitleEvent(unwrap(getTarget()), getIdentifier(), getTitle());
+    }
+
+    private String getTitle() {
+        return title;
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ObjectValidityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ObjectValidityContext.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ObjectValidityContext.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ObjectValidityContext.java Tue Apr 26 18:24:05 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import static org.apache.isis.core.metamodel.adapter.util.AdapterUtils.unwrap;
 
 import org.apache.isis.applib.Identifier;
@@ -28,28 +27,25 @@ import org.apache.isis.core.commons.auth
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionContextType;
 import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-
-
-/**
- * See {@link InteractionContext} for overview; analogous to {@link ObjectValidityEvent}.
- */
-public class ObjectValidityContext extends ValidityContext<ObjectValidityEvent> implements ProposedHolder {
-
-    public ObjectValidityContext(
-            final AuthenticationSession session,
-            final InteractionInvocationMethod invocationMethod,
-            final ObjectAdapter target,
-            final Identifier identifier) {
-        super(InteractionContextType.OBJECT_VALIDATE, session, invocationMethod, identifier, target);
-    }
-
-    @Override
-    public ObjectValidityEvent createInteractionEvent() {
-        return new ObjectValidityEvent(unwrap(getTarget()), getIdentifier());
-    }
-
-	public ObjectAdapter getProposed() {
-		return getTarget();
-	}
-
-}
+
+/**
+ * See {@link InteractionContext} for overview; analogous to {@link ObjectValidityEvent}.
+ */
+public class ObjectValidityContext extends ValidityContext<ObjectValidityEvent> implements ProposedHolder {
+
+    public ObjectValidityContext(final AuthenticationSession session,
+        final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier identifier) {
+        super(InteractionContextType.OBJECT_VALIDATE, session, invocationMethod, identifier, target);
+    }
+
+    @Override
+    public ObjectValidityEvent createInteractionEvent() {
+        return new ObjectValidityEvent(unwrap(getTarget()), getIdentifier());
+    }
+
+    @Override
+    public ObjectAdapter getProposed() {
+        return getTarget();
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ParseValueContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ParseValueContext.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ParseValueContext.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ParseValueContext.java Tue Apr 26 18:24:05 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import static org.apache.isis.core.metamodel.adapter.util.AdapterUtils.unwrap;
 
 import org.apache.isis.applib.Identifier;
@@ -28,33 +27,29 @@ import org.apache.isis.core.commons.auth
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionContextType;
 import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-
-
-/**
- * See {@link InteractionContext} for overview; analogous to {@link ParseValueEvent}.
- */
-public class ParseValueContext extends ValidityContext<ParseValueEvent> implements ProposedHolder {
-
-    private final ObjectAdapter proposed;
-
-	public ParseValueContext(
-            final AuthenticationSession session,
-            final InteractionInvocationMethod invocationMethod,
-            final ObjectAdapter target,
-            final Identifier identifier,
-            final ObjectAdapter proposed) {
-        super(InteractionContextType.PARSE_VALUE, session, invocationMethod, identifier, target);
-        this.proposed = proposed;
-    }
-
-	public ObjectAdapter getProposed() {
-		return proposed;
-	}
-
-    @Override
-    public ParseValueEvent createInteractionEvent() {
-        String proposedPojo = (String)unwrap(getProposed());
-		return new ParseValueEvent(unwrap(getTarget()), getIdentifier(), proposedPojo);
-    }
-
-}
+
+/**
+ * See {@link InteractionContext} for overview; analogous to {@link ParseValueEvent}.
+ */
+public class ParseValueContext extends ValidityContext<ParseValueEvent> implements ProposedHolder {
+
+    private final ObjectAdapter proposed;
+
+    public ParseValueContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod,
+        final ObjectAdapter target, final Identifier identifier, final ObjectAdapter proposed) {
+        super(InteractionContextType.PARSE_VALUE, session, invocationMethod, identifier, target);
+        this.proposed = proposed;
+    }
+
+    @Override
+    public ObjectAdapter getProposed() {
+        return proposed;
+    }
+
+    @Override
+    public ParseValueEvent createInteractionEvent() {
+        final String proposedPojo = (String) unwrap(getProposed());
+        return new ParseValueEvent(unwrap(getTarget()), getIdentifier(), proposedPojo);
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyAccessContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyAccessContext.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyAccessContext.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyAccessContext.java Tue Apr 26 18:24:05 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import static org.apache.isis.core.metamodel.adapter.util.AdapterUtils.unwrap;
 
 import org.apache.isis.applib.Identifier;
@@ -28,36 +27,32 @@ import org.apache.isis.core.commons.auth
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionContextType;
 import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-
-
-/**
- * See {@link InteractionContext} for overview; analogous to {@link PropertyAccessEvent}.
- */
-public class PropertyAccessContext extends AccessContext<PropertyAccessEvent> {
-
-    private final ObjectAdapter value;
-
-    public PropertyAccessContext(
-            final AuthenticationSession session,
-            final InteractionInvocationMethod invocationMethod,
-            final ObjectAdapter target,
-            final Identifier id,
-            final ObjectAdapter value) {
-        super(InteractionContextType.PROPERTY_READ, session, invocationMethod, id, target);
-
-        this.value = value;
-    }
-
-    /**
-     * The current value for a property.
-     */
-    public ObjectAdapter getValue() {
-        return value;
-    }
-
-    @Override
-    public PropertyAccessEvent createInteractionEvent() {
-        return new PropertyAccessEvent(unwrap(getTarget()), getIdentifier(), unwrap(getValue()));
-    }
-
-}
+
+/**
+ * See {@link InteractionContext} for overview; analogous to {@link PropertyAccessEvent}.
+ */
+public class PropertyAccessContext extends AccessContext<PropertyAccessEvent> {
+
+    private final ObjectAdapter value;
+
+    public PropertyAccessContext(final AuthenticationSession session,
+        final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier id,
+        final ObjectAdapter value) {
+        super(InteractionContextType.PROPERTY_READ, session, invocationMethod, id, target);
+
+        this.value = value;
+    }
+
+    /**
+     * The current value for a property.
+     */
+    public ObjectAdapter getValue() {
+        return value;
+    }
+
+    @Override
+    public PropertyAccessEvent createInteractionEvent() {
+        return new PropertyAccessEvent(unwrap(getTarget()), getIdentifier(), unwrap(getValue()));
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyModifyContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyModifyContext.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyModifyContext.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyModifyContext.java Tue Apr 26 18:24:05 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import static org.apache.isis.core.metamodel.adapter.util.AdapterUtils.unwrap;
 
 import org.apache.isis.applib.Identifier;
@@ -28,36 +27,33 @@ import org.apache.isis.core.commons.auth
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionContextType;
 import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-
-
-/**
- * See {@link InteractionContext} for overview; analogous to {@link PropertyModifyEvent}.
- */
-public class PropertyModifyContext extends ValidityContext<PropertyModifyEvent> implements ProposedHolder {
-
-    private final ObjectAdapter proposed;
-
-    public PropertyModifyContext(
-            final AuthenticationSession session,
-            final InteractionInvocationMethod invocationMethod,
-            final ObjectAdapter target,
-            final Identifier id,
-            final ObjectAdapter proposed) {
-        super(InteractionContextType.PROPERTY_MODIFY, session, invocationMethod, id, target);
-
-        this.proposed = proposed;
-    }
-
-    /**
-     * The (proposed) new value for a property.
-     */
-    public ObjectAdapter getProposed() {
-        return proposed;
-    }
-
-    @Override
-    public PropertyModifyEvent createInteractionEvent() {
-        return new PropertyModifyEvent(unwrap(getTarget()), getIdentifier(), unwrap(getProposed()));
-    }
-
-}
+
+/**
+ * See {@link InteractionContext} for overview; analogous to {@link PropertyModifyEvent}.
+ */
+public class PropertyModifyContext extends ValidityContext<PropertyModifyEvent> implements ProposedHolder {
+
+    private final ObjectAdapter proposed;
+
+    public PropertyModifyContext(final AuthenticationSession session,
+        final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier id,
+        final ObjectAdapter proposed) {
+        super(InteractionContextType.PROPERTY_MODIFY, session, invocationMethod, id, target);
+
+        this.proposed = proposed;
+    }
+
+    /**
+     * The (proposed) new value for a property.
+     */
+    @Override
+    public ObjectAdapter getProposed() {
+        return proposed;
+    }
+
+    @Override
+    public PropertyModifyEvent createInteractionEvent() {
+        return new PropertyModifyEvent(unwrap(getTarget()), getIdentifier(), unwrap(getProposed()));
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyUsabilityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyUsabilityContext.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyUsabilityContext.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyUsabilityContext.java Tue Apr 26 18:24:05 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import static org.apache.isis.core.metamodel.adapter.util.AdapterUtils.unwrap;
 
 import org.apache.isis.applib.Identifier;
@@ -28,24 +27,20 @@ import org.apache.isis.core.commons.auth
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionContextType;
 import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-
-
-/**
- * See {@link InteractionContext} for overview; analogous to {@link PropertyUsabilityEvent}.
- */
-public class PropertyUsabilityContext extends UsabilityContext<PropertyUsabilityEvent> {
-
-    public PropertyUsabilityContext(
-            final AuthenticationSession session,
-            final InteractionInvocationMethod invocationMethod,
-            final ObjectAdapter target,
-            final Identifier identifier) {
-        super(InteractionContextType.PROPERTY_USABLE, session, invocationMethod, identifier, target);
-    }
-
-    @Override
-    public PropertyUsabilityEvent createInteractionEvent() {
-        return new PropertyUsabilityEvent(unwrap(getTarget()), getIdentifier());
-    }
-
-}
+
+/**
+ * See {@link InteractionContext} for overview; analogous to {@link PropertyUsabilityEvent}.
+ */
+public class PropertyUsabilityContext extends UsabilityContext<PropertyUsabilityEvent> {
+
+    public PropertyUsabilityContext(final AuthenticationSession session,
+        final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier identifier) {
+        super(InteractionContextType.PROPERTY_USABLE, session, invocationMethod, identifier, target);
+    }
+
+    @Override
+    public PropertyUsabilityEvent createInteractionEvent() {
+        return new PropertyUsabilityEvent(unwrap(getTarget()), getIdentifier());
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyVisibilityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyVisibilityContext.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyVisibilityContext.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyVisibilityContext.java Tue Apr 26 18:24:05 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import static org.apache.isis.core.metamodel.adapter.util.AdapterUtils.unwrap;
 
 import org.apache.isis.applib.Identifier;
@@ -28,24 +27,20 @@ import org.apache.isis.core.commons.auth
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionContextType;
 import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-
-
-/**
- * See {@link InteractionContext} for overview; analogous to {@link PropertyVisibilityEvent}.
- */
-public class PropertyVisibilityContext extends VisibilityContext<PropertyVisibilityEvent> {
-
-    public PropertyVisibilityContext(
-            final AuthenticationSession session,
-            final InteractionInvocationMethod invocationMethod,
-            final ObjectAdapter target,
-            final Identifier identifier) {
-        super(InteractionContextType.PROPERTY_VISIBLE, session, invocationMethod, identifier, target);
-    }
-
-    @Override
-    public PropertyVisibilityEvent createInteractionEvent() {
-        return new PropertyVisibilityEvent(unwrap(getTarget()), getIdentifier());
-    }
-
-}
+
+/**
+ * See {@link InteractionContext} for overview; analogous to {@link PropertyVisibilityEvent}.
+ */
+public class PropertyVisibilityContext extends VisibilityContext<PropertyVisibilityEvent> {
+
+    public PropertyVisibilityContext(final AuthenticationSession session,
+        final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier identifier) {
+        super(InteractionContextType.PROPERTY_VISIBLE, session, invocationMethod, identifier, target);
+    }
+
+    @Override
+    public PropertyVisibilityEvent createInteractionEvent() {
+        return new PropertyVisibilityEvent(unwrap(getTarget()), getIdentifier());
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ProposedHolder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ProposedHolder.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ProposedHolder.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ProposedHolder.java Tue Apr 26 18:24:05 2011
@@ -17,23 +17,21 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facetapi.Facet;
-
-
-/**
- * Implemented by some of the {@link InteractionContext} subclasses, making it easier for facets to process
- * multiple at the same time.
- * 
- * <p>
- * Where this is used most often is for {@link PropertyModifyContext} and {@link ActionArgumentContext}, where
- * a {@link Facet} (such as <tt>MandatoryFacet</tt> or <tt>MaxLengthFacet</tt>) would want to perform the same
- * checks on the {@link #getProposed() proposed} value/argument.
- */
-public interface ProposedHolder {
-
-    ObjectAdapter getProposed();
-}
+
+/**
+ * Implemented by some of the {@link InteractionContext} subclasses, making it easier for facets to process multiple at
+ * the same time.
+ * 
+ * <p>
+ * Where this is used most often is for {@link PropertyModifyContext} and {@link ActionArgumentContext}, where a
+ * {@link Facet} (such as <tt>MandatoryFacet</tt> or <tt>MaxLengthFacet</tt>) would want to perform the same checks on
+ * the {@link #getProposed() proposed} value/argument.
+ */
+public interface ProposedHolder {
+
+    ObjectAdapter getProposed();
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/UsabilityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/UsabilityContext.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/UsabilityContext.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/UsabilityContext.java Tue Apr 26 18:24:05 2011
@@ -17,30 +17,23 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.events.UsabilityEvent;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionContextType;
 import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-
-
-/**
- * See {@link InteractionContext} for overview; analogous to {@link UsabilityEvent}.
- */
-public abstract class UsabilityContext<T extends UsabilityEvent> extends InteractionContext<T> {
-
-    public UsabilityContext(
-            final InteractionContextType interactionType,
-            final AuthenticationSession session,
-            final InteractionInvocationMethod invocationMethod,
-            final Identifier identifier,
-            final ObjectAdapter target) {
-        super(interactionType, session, invocationMethod, identifier, target);
-    }
-
-}
-
+
+/**
+ * See {@link InteractionContext} for overview; analogous to {@link UsabilityEvent}.
+ */
+public abstract class UsabilityContext<T extends UsabilityEvent> extends InteractionContext<T> {
+
+    public UsabilityContext(final InteractionContextType interactionType, final AuthenticationSession session,
+        final InteractionInvocationMethod invocationMethod, final Identifier identifier, final ObjectAdapter target) {
+        super(interactionType, session, invocationMethod, identifier, target);
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ValidatingInteractionAdvisor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ValidatingInteractionAdvisor.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ValidatingInteractionAdvisor.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ValidatingInteractionAdvisor.java Tue Apr 26 18:24:05 2011
@@ -17,33 +17,31 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import org.apache.isis.applib.events.ValidityEvent;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetAbstract.Validating;
-
-/**
- * Mix-in interface for {@link Facet}s that can advise as to whether a proposed value is valid.
- * 
- * <p>
- * For example, <tt>MaxLengthFacet</tt> does constrain the length of candidate values, whereas
- * <tt>DebugFacet</tt> or <tt>MemberOrderFacet</tt> do not - they are basically just UI hints.
- * 
- * @see DisablingInteractionAdvisor
- * @see HidingInteractionAdvisor
- */
-public interface ValidatingInteractionAdvisor extends InteractionAdvisorFacet, Validating {
-
-    /**
-     * Whether the validation represented by this facet passes or fails.
-     * 
-     * <p>
-     * Implementations should use the provided {@link ValidityContext} to determine whether they declare the
-     * interaction invalid. They must however guard against a <tt>null</tt>
-     * {@link ValidityContext#getTarget() target} and {@link ValidityContext#getSession() session} - neither
-     * are guaranteed to be populated.
-     */
-    String invalidates(final ValidityContext<? extends ValidityEvent> ic);
-}
+
+/**
+ * Mix-in interface for {@link Facet}s that can advise as to whether a proposed value is valid.
+ * 
+ * <p>
+ * For example, <tt>MaxLengthFacet</tt> does constrain the length of candidate values, whereas <tt>DebugFacet</tt> or
+ * <tt>MemberOrderFacet</tt> do not - they are basically just UI hints.
+ * 
+ * @see DisablingInteractionAdvisor
+ * @see HidingInteractionAdvisor
+ */
+public interface ValidatingInteractionAdvisor extends InteractionAdvisorFacet, Validating {
+
+    /**
+     * Whether the validation represented by this facet passes or fails.
+     * 
+     * <p>
+     * Implementations should use the provided {@link ValidityContext} to determine whether they declare the interaction
+     * invalid. They must however guard against a <tt>null</tt> {@link ValidityContext#getTarget() target} and
+     * {@link ValidityContext#getSession() session} - neither are guaranteed to be populated.
+     */
+    String invalidates(final ValidityContext<? extends ValidityEvent> ic);
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ValidityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ValidityContext.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ValidityContext.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ValidityContext.java Tue Apr 26 18:24:05 2011
@@ -17,30 +17,23 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.events.ValidityEvent;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionContextType;
 import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-
-
-/**
- * See {@link InteractionContext} for overview; analogous to {@link ValidityEvent}
- */
-public abstract class ValidityContext<T extends ValidityEvent> extends InteractionContext<T> {
-
-    public ValidityContext(
-            final InteractionContextType interactionType,
-            final AuthenticationSession session,
-            final InteractionInvocationMethod invocationMethod,
-            final Identifier identifier,
-            final ObjectAdapter target) {
-        super(interactionType, session, invocationMethod, identifier, target);
-    }
-
-}
-
+
+/**
+ * See {@link InteractionContext} for overview; analogous to {@link ValidityEvent}
+ */
+public abstract class ValidityContext<T extends ValidityEvent> extends InteractionContext<T> {
+
+    public ValidityContext(final InteractionContextType interactionType, final AuthenticationSession session,
+        final InteractionInvocationMethod invocationMethod, final Identifier identifier, final ObjectAdapter target) {
+        super(interactionType, session, invocationMethod, identifier, target);
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/VisibilityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/VisibilityContext.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/VisibilityContext.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/VisibilityContext.java Tue Apr 26 18:24:05 2011
@@ -17,30 +17,23 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.interactions;
 
-package org.apache.isis.core.metamodel.interactions;
-
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.events.VisibilityEvent;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionContextType;
 import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-
-
-/**
- * See {@link InteractionContext} for overview; analogous to {@link VisibilityEvent}.
- */
-public abstract class VisibilityContext<T extends VisibilityEvent> extends InteractionContext<T> {
-
-    public VisibilityContext(
-            final InteractionContextType interactionType,
-            final AuthenticationSession session,
-            final InteractionInvocationMethod invocationMethod,
-            final Identifier identifier,
-            final ObjectAdapter target) {
-        super(interactionType, session, invocationMethod, identifier, target);
-    }
-
-}
-
+
+/**
+ * See {@link InteractionContext} for overview; analogous to {@link VisibilityEvent}.
+ */
+public abstract class VisibilityContext<T extends VisibilityEvent> extends InteractionContext<T> {
+
+    public VisibilityContext(final InteractionContextType interactionType, final AuthenticationSession session,
+        final InteractionInvocationMethod invocationMethod, final Identifier identifier, final ObjectAdapter target) {
+        super(interactionType, session, invocationMethod, identifier, target);
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/methodutils/MethodFinderUtils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/methodutils/MethodFinderUtils.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/methodutils/MethodFinderUtils.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/methodutils/MethodFinderUtils.java Tue Apr 26 18:24:05 2011
@@ -17,65 +17,60 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.methodutils;
 
-package org.apache.isis.core.metamodel.methodutils;
-
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
-import com.google.common.collect.Maps;
-
 import org.apache.isis.core.commons.lang.JavaClassUtils;
 import org.apache.isis.core.commons.lang.WrapperUtils;
-
-
-/**
- * TODO: remove duplication with {@link WrapperUtils} and {@link PrimitiveUtils}.
- */
-public final class MethodFinderUtils {
-    private static Map<Class<?>, Class<?>> boxedClasses = Maps.newHashMap();
-
-    static {
-        // TODO: there is a better way of doing this in 1.6 using TypeMirror
-        boxedClasses.put(boolean.class, Boolean.class);
-        boxedClasses.put(char.class, Character.class);
-        boxedClasses.put(byte.class, Byte.class);
-        boxedClasses.put(short.class, Short.class);
-        boxedClasses.put(int.class, Integer.class);
-        boxedClasses.put(long.class, Long.class);
-        boxedClasses.put(float.class, Float.class);
-        boxedClasses.put(double.class, Double.class);
-        boxedClasses.put(void.class, Void.class);
-    }
-
-    private MethodFinderUtils() {}
-
-    /**
-     * Searches the supplied array of methods for specific method and returns it, also removing it from
-     * supplied array if found (by setting to <tt>null</tt>).
-     * 
-     * <p>
-     * Any methods that do not meet the search criteria are left in the array of methods.
-     * 
-     * <p>
-     * The search algorithm is as specified in {@link #findMethodIndex(List, MethodScope, String, Class, Class[])}.
-     */
-    public static Method removeMethod(
-            final List<Method> methods,
-            final MethodScope methodScope,
-            final String name,
-            final Class<?> returnType,
-            final Class<?>[] paramTypes) {
-        int idx = findMethodIndex(methods, methodScope, name, returnType, paramTypes);
-        if(idx != -1) {
-            Method method = methods.get(idx);
+
+import com.google.common.collect.Maps;
+
+/**
+ * TODO: remove duplication with {@link WrapperUtils} and {@link PrimitiveUtils}.
+ */
+public final class MethodFinderUtils {
+    private static Map<Class<?>, Class<?>> boxedClasses = Maps.newHashMap();
+
+    static {
+        // TODO: there is a better way of doing this in 1.6 using TypeMirror
+        boxedClasses.put(boolean.class, Boolean.class);
+        boxedClasses.put(char.class, Character.class);
+        boxedClasses.put(byte.class, Byte.class);
+        boxedClasses.put(short.class, Short.class);
+        boxedClasses.put(int.class, Integer.class);
+        boxedClasses.put(long.class, Long.class);
+        boxedClasses.put(float.class, Float.class);
+        boxedClasses.put(double.class, Double.class);
+        boxedClasses.put(void.class, Void.class);
+    }
+
+    private MethodFinderUtils() {
+    }
+
+    /**
+     * Searches the supplied array of methods for specific method and returns it, also removing it from supplied array
+     * if found (by setting to <tt>null</tt>).
+     * 
+     * <p>
+     * Any methods that do not meet the search criteria are left in the array of methods.
+     * 
+     * <p>
+     * The search algorithm is as specified in {@link #findMethodIndex(List, MethodScope, String, Class, Class[])}.
+     */
+    public static Method removeMethod(final List<Method> methods, final MethodScope methodScope, final String name,
+        final Class<?> returnType, final Class<?>[] paramTypes) {
+        final int idx = findMethodIndex(methods, methodScope, name, returnType, paramTypes);
+        if (idx != -1) {
+            final Method method = methods.get(idx);
             methods.set(idx, null);
             return method;
-        }
-        return null;
+        }
+        return null;
     }
 
     /**
@@ -84,19 +79,14 @@ public final class MethodFinderUtils {
      * <p>
      * The search algorithm is as specified in {@link #findMethodIndex(List, MethodScope, String, Class, Class[])}.
      */
-    public static Method findMethod(
-            final List<Method> methods,
-            final MethodScope methodScope,
-            final String name,
-            final Class<?> returnType,
-            final Class<?>[] paramTypes) {
-        int idx = findMethodIndex(methods, methodScope, name, returnType, paramTypes);
+    public static Method findMethod(final List<Method> methods, final MethodScope methodScope, final String name,
+        final Class<?> returnType, final Class<?>[] paramTypes) {
+        final int idx = findMethodIndex(methods, methodScope, name, returnType, paramTypes);
         return idx != -1 ? methods.get(idx) : null;
     }
 
     /**
-     * Searches the supplied array of methods for specific method and returns 
-     * its index, otherwise returns <tt>-1</tt>.
+     * Searches the supplied array of methods for specific method and returns its index, otherwise returns <tt>-1</tt>.
      * 
      * <p>
      * The search algorithm is:
@@ -110,152 +100,147 @@ public final class MethodFinderUtils {
     public static int findMethodIndex(final List<Method> methods, final MethodScope methodScope, final String name,
         final Class<?> returnType, final Class<?>[] paramTypes) {
         int idx = -1;
-        method: for (int i = 0; i < methods.size(); i++) {
-            if (methods.get(i) == null) {
-                continue;
-            }
-
-            final Method method = methods.get(i);
-            final int modifiers = method.getModifiers();
-
-            // check for public modifier
-            if (!Modifier.isPublic(modifiers)) {
-                continue;
-            }
-
-            // check for static modifier
-            if (!inScope(methodScope, method)) {
-                continue;
-            }
-
-            // check for name
-            if (!method.getName().equals(name)) {
-                continue;
-            }
-
-            // check for return type
-            if (returnType != null && returnType != method.getReturnType()) {
-                continue;
-            }
-
-            // check params (if required)
-            if (paramTypes != null) {
-                final Class<?>[] parameterTypes = method.getParameterTypes();
-                if (paramTypes.length != parameterTypes.length) {
-                    continue;
-                }
-
-                for (int c = 0; c < paramTypes.length; c++) {
-                    if ((paramTypes[c] != null) && (paramTypes[c] != parameterTypes[c])) {
-                        continue method;
-                    }
-                }
+        method: for (int i = 0; i < methods.size(); i++) {
+            if (methods.get(i) == null) {
+                continue;
+            }
+
+            final Method method = methods.get(i);
+            final int modifiers = method.getModifiers();
+
+            // check for public modifier
+            if (!Modifier.isPublic(modifiers)) {
+                continue;
+            }
+
+            // check for static modifier
+            if (!inScope(methodScope, method)) {
+                continue;
+            }
+
+            // check for name
+            if (!method.getName().equals(name)) {
+                continue;
+            }
+
+            // check for return type
+            if (returnType != null && returnType != method.getReturnType()) {
+                continue;
+            }
+
+            // check params (if required)
+            if (paramTypes != null) {
+                final Class<?>[] parameterTypes = method.getParameterTypes();
+                if (paramTypes.length != parameterTypes.length) {
+                    continue;
+                }
+
+                for (int c = 0; c < paramTypes.length; c++) {
+                    if ((paramTypes[c] != null) && (paramTypes[c] != parameterTypes[c])) {
+                        continue method;
+                    }
+                }
             }
             idx = i;
-            break;
+            break;
         }
         return idx;
-    }
-
-    public static boolean inScope(final MethodScope methodScope, final Method method) {
-        final boolean isStatic = JavaClassUtils.isStatic(method);
-        return isStatic && methodScope == MethodScope.CLASS || !isStatic && methodScope == MethodScope.OBJECT;
-    }
-
-    /**
-     * Searches the supplied array of methods for all specific methods and returns them, also removing them
-     * from supplied array if found.
-     * 
-     * <p>
-     * Any methods that do not meet the search criteria are left in the array of methods.
-     * 
-     * <p>
-     * The search algorithm is:
-     * <ul>
-     * <li>has the specified prefix</li>
-     * <li>has the specified return type, or <tt>void</tt> if canBeVoid is <tt>true</tt> (but see below)</li>
-     * <li>has the specified number of parameters</li>
-     * </ul>
-     * If the returnType is specified as null then the return type is ignored.
-     * 
-     * @param forClass
-     * @param name
-     * @param returnType
-     * @param paramTypes
-     *            the set of parameters the method should have, if null then is ignored
-     * @return Method
-     */
-    public static List<Method> removeMethods(
-            final List<Method> methods,
-            final MethodScope forClass,
-            final String prefix,
-            final Class<?> returnType,
-            final boolean canBeVoid,
-            final int paramCount) {
-
-        final List<Method> validMethods = new ArrayList<Method>();
-
-        for (int i = 0; i < methods.size(); i++) {
-            if (methods.get(i) == null) {
-                continue;
-            }
-
-            final Method method = methods.get(i);
-
-            if (!inScope(forClass, method)) {
-                continue;
-            }
-
-            final boolean goodPrefix = method.getName().startsWith(prefix);
-
-            final boolean goodCount = method.getParameterTypes().length == paramCount;
-            final Class<?> type = method.getReturnType();
-            final boolean goodReturn = returnTypeCompatible(returnType, canBeVoid, type);
-
-            if (goodPrefix && goodCount && goodReturn) {
-                validMethods.add(method);
-                methods.set(i, null);
-            }
-        }
-        return validMethods;
-    }
-
-    private static boolean returnTypeCompatible(final Class<?> returnType, final boolean canBeVoid, final Class<?> type) {
-        if (returnType == null) {
-            return true;
-        }
-        if (canBeVoid && (type == void.class)) {
-            return true;
-        }
-
-        if (type.isPrimitive()) {
-            return returnType.isAssignableFrom(boxedClasses.get(type));
-        }
-
-        return (returnType.isAssignableFrom(type));
-    }
-
-    /**
-     * From the supplied method array, finds but <i>does not remove</i> methods that have the required prefix,
-     * and adds to the supplied candidates vector.
-     */
-    public static void findPrefixedInstanceMethods(final Method[] methods, final String prefix, final List<Method> candidates) {
-        for (int i = 0; i < methods.length; i++) {
-            if (methods[i] == null) {
-                continue;
-            }
-
-            final Method method = methods[i];
-            if (JavaClassUtils.isStatic(method)) {
-                continue;
-            }
-
-            final boolean goodPrefix = method.getName().startsWith(prefix);
-            final boolean goodCount = method.getParameterTypes().length == 0;
-
-            if (goodPrefix && goodCount) {
-                candidates.add(method);
-            }
-        }
-    }
+    }
+
+    public static boolean inScope(final MethodScope methodScope, final Method method) {
+        final boolean isStatic = JavaClassUtils.isStatic(method);
+        return isStatic && methodScope == MethodScope.CLASS || !isStatic && methodScope == MethodScope.OBJECT;
+    }
+
+    /**
+     * Searches the supplied array of methods for all specific methods and returns them, also removing them from
+     * supplied array if found.
+     * 
+     * <p>
+     * Any methods that do not meet the search criteria are left in the array of methods.
+     * 
+     * <p>
+     * The search algorithm is:
+     * <ul>
+     * <li>has the specified prefix</li>
+     * <li>has the specified return type, or <tt>void</tt> if canBeVoid is <tt>true</tt> (but see below)</li>
+     * <li>has the specified number of parameters</li>
+     * </ul>
+     * If the returnType is specified as null then the return type is ignored.
+     * 
+     * @param forClass
+     * @param name
+     * @param returnType
+     * @param paramTypes
+     *            the set of parameters the method should have, if null then is ignored
+     * @return Method
+     */
+    public static List<Method> removeMethods(final List<Method> methods, final MethodScope forClass,
+        final String prefix, final Class<?> returnType, final boolean canBeVoid, final int paramCount) {
+
+        final List<Method> validMethods = new ArrayList<Method>();
+
+        for (int i = 0; i < methods.size(); i++) {
+            if (methods.get(i) == null) {
+                continue;
+            }
+
+            final Method method = methods.get(i);
+
+            if (!inScope(forClass, method)) {
+                continue;
+            }
+
+            final boolean goodPrefix = method.getName().startsWith(prefix);
+
+            final boolean goodCount = method.getParameterTypes().length == paramCount;
+            final Class<?> type = method.getReturnType();
+            final boolean goodReturn = returnTypeCompatible(returnType, canBeVoid, type);
+
+            if (goodPrefix && goodCount && goodReturn) {
+                validMethods.add(method);
+                methods.set(i, null);
+            }
+        }
+        return validMethods;
+    }
+
+    private static boolean returnTypeCompatible(final Class<?> returnType, final boolean canBeVoid, final Class<?> type) {
+        if (returnType == null) {
+            return true;
+        }
+        if (canBeVoid && (type == void.class)) {
+            return true;
+        }
+
+        if (type.isPrimitive()) {
+            return returnType.isAssignableFrom(boxedClasses.get(type));
+        }
+
+        return (returnType.isAssignableFrom(type));
+    }
+
+    /**
+     * From the supplied method array, finds but <i>does not remove</i> methods that have the required prefix, and adds
+     * to the supplied candidates vector.
+     */
+    public static void findPrefixedInstanceMethods(final Method[] methods, final String prefix,
+        final List<Method> candidates) {
+        for (final Method method : methods) {
+            if (method == null) {
+                continue;
+            }
+
+            if (JavaClassUtils.isStatic(method)) {
+                continue;
+            }
+
+            final boolean goodPrefix = method.getName().startsWith(prefix);
+            final boolean goodCount = method.getParameterTypes().length == 0;
+
+            if (goodPrefix && goodCount) {
+                candidates.add(method);
+            }
+        }
+    }
 }
\ No newline at end of file

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/methodutils/MethodScope.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/methodutils/MethodScope.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/methodutils/MethodScope.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/methodutils/MethodScope.java Tue Apr 26 18:24:05 2011
@@ -17,43 +17,41 @@
  *  under the License.
  */
 
-
-package org.apache.isis.core.metamodel.methodutils;
+package org.apache.isis.core.metamodel.methodutils;
 
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
-
-/**
- * As used in the <tt>findAndRemove...</tt> methods.
- */
-public enum MethodScope {
+
+/**
+ * As used in the <tt>findAndRemove...</tt> methods.
+ */
+public enum MethodScope {
     CLASS, OBJECT;
-    
+
     public boolean isClass() {
-        return this==CLASS;
+        return this == CLASS;
     }
-    
+
     public boolean isObject() {
-        return this==OBJECT;
+        return this == OBJECT;
     }
 
-    public boolean doesNotMatchScope(Method method) {
+    public boolean doesNotMatchScope(final Method method) {
         return !matchesScopeOf(method);
     }
 
-    public boolean matchesScopeOf(Method method) {
+    public boolean matchesScopeOf(final Method method) {
         return isStatic(method) == this.isClass();
     }
 
-    public static MethodScope scopeFor(Method method) {
-        return isStatic(method)?CLASS:OBJECT;
+    public static MethodScope scopeFor(final Method method) {
+        return isStatic(method) ? CLASS : OBJECT;
     }
 
-    private static boolean isStatic(Method method) {
+    private static boolean isStatic(final Method method) {
         final int modifiers = method.getModifiers();
         final boolean isStatic = Modifier.isStatic(modifiers);
         return isStatic;
     }
 
-
-}
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModel.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModel.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModel.java Tue Apr 26 18:24:05 2011
@@ -17,21 +17,19 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.progmodel;
 
-package org.apache.isis.core.metamodel.progmodel;
-
 import java.util.List;
 
 import org.apache.isis.core.metamodel.facets.FacetFactory;
-
-
-public interface ProgrammingModel {
-
-    void init();
-
-    List<FacetFactory> getList();
-
-	void addFactory(Class<? extends FacetFactory> facetFactoryClass);
-	
-	void removeFactory(Class <? extends FacetFactory> facetFactoryClass);
-}
+
+public interface ProgrammingModel {
+
+    void init();
+
+    List<FacetFactory> getList();
+
+    void addFactory(Class<? extends FacetFactory> facetFactoryClass);
+
+    void removeFactory(Class<? extends FacetFactory> facetFactoryClass);
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModelAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModelAbstract.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModelAbstract.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModelAbstract.java Tue Apr 26 18:24:05 2011
@@ -17,41 +17,42 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.progmodel;
 
-package org.apache.isis.core.metamodel.progmodel;
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
 import org.apache.isis.core.commons.factory.InstanceUtil;
 import org.apache.isis.core.metamodel.facets.FacetFactory;
-
-
-public abstract class ProgrammingModelAbstract implements ProgrammingModel {
-
-    private final List<FacetFactory> facetFactories = new ArrayList<FacetFactory>();
-    private final List<Class<? extends FacetFactory>> facetFactoryClasses = new ArrayList<Class<? extends FacetFactory>>();
-
-    public final List<FacetFactory> getList() {
-        return Collections.unmodifiableList(facetFactories);
-    }
-
-    public final void addFactory(final Class<? extends FacetFactory> factoryClass) {
-        facetFactoryClasses.add(factoryClass);
-    }
-
-    public final void removeFactory(final Class<? extends FacetFactory> factoryClass) {
-        facetFactoryClasses.remove(factoryClass);
-    }
-
-
-    public void init() {
-    	for(Class<? extends FacetFactory> factoryClass: facetFactoryClasses) {
-    		FacetFactory facetFactory = 
-    			(FacetFactory) InstanceUtil.createInstance(factoryClass);
-    		facetFactories.add(facetFactory);
-    	}
-    }
-
-}
+
+public abstract class ProgrammingModelAbstract implements ProgrammingModel {
+
+    private final List<FacetFactory> facetFactories = new ArrayList<FacetFactory>();
+    private final List<Class<? extends FacetFactory>> facetFactoryClasses =
+        new ArrayList<Class<? extends FacetFactory>>();
+
+    @Override
+    public final List<FacetFactory> getList() {
+        return Collections.unmodifiableList(facetFactories);
+    }
+
+    @Override
+    public final void addFactory(final Class<? extends FacetFactory> factoryClass) {
+        facetFactoryClasses.add(factoryClass);
+    }
+
+    @Override
+    public final void removeFactory(final Class<? extends FacetFactory> factoryClass) {
+        facetFactoryClasses.remove(factoryClass);
+    }
+
+    @Override
+    public void init() {
+        for (final Class<? extends FacetFactory> factoryClass : facetFactoryClasses) {
+            final FacetFactory facetFactory = (FacetFactory) InstanceUtil.createInstance(factoryClass);
+            facetFactories.add(facetFactory);
+        }
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/DependencyInjector.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/DependencyInjector.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/DependencyInjector.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/DependencyInjector.java Tue Apr 26 18:24:05 2011
@@ -18,7 +18,6 @@ package org.apache.isis.core.metamodel.r
 
 import org.apache.isis.core.commons.components.Injectable;
 
-
 public interface DependencyInjector extends Injectable {
 
     /**

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/DependencyInjectorAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/DependencyInjectorAbstract.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/DependencyInjectorAbstract.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/DependencyInjectorAbstract.java Tue Apr 26 18:24:05 2011
@@ -16,13 +16,12 @@
  */
 package org.apache.isis.core.metamodel.runtimecontext;
 
-
 public abstract class DependencyInjectorAbstract implements DependencyInjector {
 
     @Override
-    public void injectInto(Object candidate) {
+    public void injectInto(final Object candidate) {
         if (DependencyInjectorAware.class.isAssignableFrom(candidate.getClass())) {
-            DependencyInjectorAware cast = DependencyInjectorAware.class.cast(candidate);
+            final DependencyInjectorAware cast = DependencyInjectorAware.class.cast(candidate);
             cast.setDependencyInjector(this);
         }
     }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/DependencyInjectorAware.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/DependencyInjectorAware.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/DependencyInjectorAware.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/DependencyInjectorAware.java Tue Apr 26 18:24:05 2011
@@ -17,11 +17,10 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.runtimecontext;
 
-package org.apache.isis.core.metamodel.runtimecontext;
-
-public interface DependencyInjectorAware {
-	
-	public void setDependencyInjector(DependencyInjector dependencyInjector);
-
-}
+public interface DependencyInjectorAware {
+
+    public void setDependencyInjector(DependencyInjector dependencyInjector);
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContext.java?rev=1096837&r1=1096836&r2=1096837&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContext.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContext.java Tue Apr 26 18:24:05 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.runtimecontext;
 
-package org.apache.isis.core.metamodel.runtimecontext;
-
 import org.apache.isis.applib.DomainObjectContainer;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
@@ -32,48 +31,44 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.adapter.map.AdapterMap;
 import org.apache.isis.core.metamodel.spec.ObjectInstantiator;
 import org.apache.isis.core.metamodel.spec.SpecificationLookup;
-
-/**
- * Decouples the metamodel from a runtime.
- * 
- */
-public interface RuntimeContext extends Injectable {
 
-    
+/**
+ * Decouples the metamodel from a runtime.
+ * 
+ */
+public interface RuntimeContext extends Injectable {
+
     /**
      * A mechanism for returning the <tt>current</tt> {@link AuthenticationSession}.
      * 
      * <p>
-     * Note that the scope of {@link RuntimeContext} is global,
-     * whereas {@link AuthenticationSession} may change over time.
+     * Note that the scope of {@link RuntimeContext} is global, whereas {@link AuthenticationSession} may change over
+     * time.
      */
-	public AuthenticationSessionProvider getAuthenticationSessionProvider();
+    public AuthenticationSessionProvider getAuthenticationSessionProvider();
+
+    public QuerySubmitter getQuerySubmitter();
 
-	public QuerySubmitter getQuerySubmitter();
-
-	public AdapterMap getAdapterMap();
+    public AdapterMap getAdapterMap();
 
-	public ObjectInstantiator getObjectInstantiator();
+    public ObjectInstantiator getObjectInstantiator();
 
-	public SpecificationLookup getSpecificationLookup();
+    public SpecificationLookup getSpecificationLookup();
 
     public ServicesProvider getServicesProvider();
 
     public DependencyInjector getDependencyInjector();
 
-	
-	
-	public ObjectDirtier getObjectDirtier();
+    public ObjectDirtier getObjectDirtier();
+
+    public ObjectPersistor getObjectPersistor();
 
-	public ObjectPersistor getObjectPersistor();
-	
     public DomainObjectServices getDomainObjectServices();
 
-	
-	/////////////////////////////////////////////
-	// container
-	/////////////////////////////////////////////
-
-	public void setContainer(DomainObjectContainer container);
-    
-}
+    // ///////////////////////////////////////////
+    // container
+    // ///////////////////////////////////////////
+
+    public void setContainer(DomainObjectContainer container);
+
+}



Mime
View raw message