isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1094811 [1/3] - in /incubator/isis/trunk: applib/src/main/java/org/apache/isis/applib/adapters/ core/metamodel/org.apache.isis.core.metamodel.vpdm/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ core/metamodel/src/mai...
Date Mon, 18 Apr 2011 23:06:41 GMT
Author: danhaywood
Date: Mon Apr 18 23:06:40 2011
New Revision: 1094811

URL: http://svn.apache.org/viewvc?rev=1094811&view=rev
Log:
updates to core docbook guide; changed FacetHolder#getFacets() to return List<Facet>
instead of Facet[]; minor tidy-up/removal of dead code

Added:
    incubator/isis/trunk/core/metamodel/org.apache.isis.core.metamodel.vpdm/
    incubator/isis/trunk/core/src/docbkx/guide/images/metamodel/ResolveState-stateChart.odp
  (with props)
    incubator/isis/trunk/core/src/docbkx/guide/images/metamodel/ResolveState-stateChart.png
  (with props)
    incubator/isis/trunk/core/src/docbkx/guide/images/metamodel/ResolveState-stateChart.pptx
  (with props)
Removed:
    incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/ignore/
    incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/ordering/
    incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/transaction/facetdecorator/TransactionFacetDecoratorInstaller.java
    incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/transaction/facetdecorator/TransactionFacetDecoratorInstallerAbstract.java
Modified:
    incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/adapters/AbstractValueSemanticsProvider.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/version/Version.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetHolder.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetHolderImpl.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetUtil.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/FacetFactory.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/ImperativeFacetUtils.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionUtils.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/facetprocessor/FacetProcessor.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstract.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
    incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/ImperativeFacetUtilsTest.java
    incubator/isis/trunk/core/src/docbkx/guide/isis-core.xml
    incubator/isis/trunk/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/JavaReflectorInstaller.java
    incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionAbstract.java
    incubator/isis/trunk/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/transaction/facetdecorator/standard/TransactionFacetDecoratorInstaller.java
    incubator/isis/trunk/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/testspec/FacetHolderNoop.java
    incubator/isis/trunk/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/testsystem/FacetHolderNoop.java
    incubator/isis/trunk/site-skin/src/main/resources/images/logos/banner-normal.pdn
    incubator/isis/trunk/site-skin/src/main/resources/images/logos/banner.png
    incubator/isis/trunk/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ObjectActionNoop.java
    incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/resources/ResourceAbstract.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Debug.java

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/adapters/AbstractValueSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/adapters/AbstractValueSemanticsProvider.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/adapters/AbstractValueSemanticsProvider.java
(original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/adapters/AbstractValueSemanticsProvider.java
Mon Apr 18 23:06:40 2011
@@ -36,17 +36,20 @@ public abstract class AbstractValueSeman
         this.equalByContent = equalByContent;
     }
 
+    @SuppressWarnings("unchecked")
     @Override
     public EncoderDecoder<T> getEncoderDecoder() {
         return (EncoderDecoder<T>) (this instanceof EncoderDecoder ? this : null);
     }
 
+    @SuppressWarnings("unchecked")
     @Override
     public Parser<T> getParser() {
         return (Parser<T>) (this instanceof Parser ? this : null);
     }
 
-    @Override
+    @SuppressWarnings("unchecked")
+	@Override
     public DefaultsProvider<T> getDefaultsProvider() {
         return (DefaultsProvider<T>) (this instanceof DefaultsProvider ? this : null);
     }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java
Mon Apr 18 23:06:40 2011
@@ -44,12 +44,13 @@ import static org.apache.isis.core.metam
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
+
+import com.google.common.collect.Maps;
 
 public final class ResolveState {
-    private static final Hashtable<String,ResolveState> statesByName = new Hashtable<String,ResolveState>();
+    private static final Map<String,ResolveState> statesByName = Maps.newHashMap();
     
     static enum ResolvableFrom {
         RESOLVABLE_FROM,

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/version/Version.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/version/Version.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/version/Version.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/version/Version.java
Mon Apr 18 23:06:40 2011
@@ -22,10 +22,13 @@ package org.apache.isis.core.metamodel.a
 
 import java.io.Serializable;
 import java.util.Date;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 
 
 /**
- * Version marks a ObjectAdapter as being a particular variant of that object.
+ * An instance of this class is held by each {@link ObjectAdapter} and is used to represent
+ * a particular version (at a point in time) of domain object wrapped by that adapter.
  *
  * <p>
  * This is normally done using some form of incrementing number or timestamp, which would
be held within the

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetHolder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetHolder.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetHolder.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetHolder.java
Mon Apr 18 23:06:40 2011
@@ -20,6 +20,8 @@
 
 package org.apache.isis.core.metamodel.facetapi;
 
+import java.util.List;
+
 import org.apache.isis.applib.filter.Filter;
 
 
@@ -60,7 +62,7 @@ public interface FacetHolder {
      * @param filter
      * @return
      */
-    Facet[] getFacets(Filter<Facet> filter);
+    List<Facet> getFacets(Filter<Facet> filter);
 
     /**
      * Adds the facet, extracting its {@link Facet#facetType() type} as the key.

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetHolderImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetHolderImpl.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetHolderImpl.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetHolderImpl.java
Mon Apr 18 23:06:40 2011
@@ -21,6 +21,7 @@
 package org.apache.isis.core.metamodel.facetapi;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.isis.applib.filter.Filter;
@@ -95,7 +96,7 @@ public class FacetHolderImpl implements 
     }
 
     @Override
-    public Facet[] getFacets(final Filter<Facet> filter) {
+    public List<Facet> getFacets(final Filter<Facet> filter) {
         return FacetUtil.getFacets(facetsByClass, filter);
     }
 

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetUtil.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetUtil.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetUtil.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetUtil.java
Mon Apr 18 23:06:40 2011
@@ -26,6 +26,8 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.isis.applib.filter.Filter;
+
+import com.google.common.collect.Lists;
 
 
 public final class FacetUtil {
@@ -96,8 +98,8 @@ public final class FacetUtil {
      * @param facetsByClass
      * @return
      */
-    public static Facet[] getFacets(final Map<Class<? extends Facet>, Facet>
facetsByClass, final Filter<Facet> filter) {
-        final List<Facet> filteredFacets = new ArrayList<Facet>();
+    public static List<Facet> getFacets(final Map<Class<? extends Facet>,
Facet> facetsByClass, final Filter<Facet> filter) {
+        final List<Facet> filteredFacets = Lists.newArrayList();
         final List<Facet> allFacets = new ArrayList<Facet>(facetsByClass.values());
         for (int i = 0; i < allFacets.size(); i++) {
             final Facet facet = allFacets.get(i);
@@ -105,15 +107,7 @@ public final class FacetUtil {
                 filteredFacets.add(facet);
             }
         }
-        return filteredFacets.toArray(new Facet[] {});
-    }
-
-    public static Facet[] getFacets(final Facet facet, final Filter<Facet> filter)
{
-        if (filter.accept(facet)) {
-            return new Facet[] { facet };
-        } else {
-            return new Facet[] {};
-        }
+        return filteredFacets;
     }
 
     public static void removeFacet(final Map<Class<? extends Facet>, Facet> facetsByClass,
final Facet facet) {

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/FacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/FacetFactory.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/FacetFactory.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/FacetFactory.java
Mon Apr 18 23:06:40 2011
@@ -34,14 +34,14 @@ import org.apache.isis.core.metamodel.me
 public interface FacetFactory {
 
     static class AbstractProcessContext<T extends FacetHolder> {
-        private final T facetedMethod;
+        private final T facetHolder;
 
-        public AbstractProcessContext(T facetedMethod) {
-            this.facetedMethod = facetedMethod;
+        public AbstractProcessContext(T facetHolder) {
+            this.facetHolder = facetHolder;
         }
 
         public T getFacetHolder() {
-            return facetedMethod;
+            return facetHolder;
         }
     }
 

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/ImperativeFacetUtils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/ImperativeFacetUtils.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/ImperativeFacetUtils.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/ImperativeFacetUtils.java
Mon Apr 18 23:06:40 2011
@@ -83,7 +83,7 @@ public final class ImperativeFacetUtils 
         if (member == null) {
             return flags;
         }
-        Facet[] allFacets = member.getFacets(Filters.anyOfType(Facet.class));
+        List<Facet> allFacets = member.getFacets(Filters.anyOfType(Facet.class));
         for (Facet facet : allFacets) {
             ImperativeFacet imperativeFacet = ImperativeFacetUtils.getImperativeFacet(facet);
             if (imperativeFacet == null) {

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=1094811&r1=1094810&r2=1094811&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
Mon Apr 18 23:06:40 2011
@@ -20,6 +20,8 @@
 
 package org.apache.isis.core.metamodel.interactions;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.consent.InteractionResult;
 import org.apache.isis.core.metamodel.consent.InteractionResultSet;
 import org.apache.isis.core.metamodel.facetapi.Facet;
@@ -33,9 +35,9 @@ public final class InteractionUtils {
 
     public static InteractionResult isVisibleResult(final FacetHolder facetHolder, final
VisibilityContext<?> context) {
         final InteractionResult result = new InteractionResult(context.createInteractionEvent());
-        final Facet[] facets = facetHolder.getFacets(FacetFilters.isA(HidingInteractionAdvisor.class));
-        for (int i = 0; i < facets.length; i++) {
-            final HidingInteractionAdvisor advisor = (HidingInteractionAdvisor) facets[i];
+        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;
@@ -50,9 +52,9 @@ public final class InteractionUtils {
 
     public static InteractionResult isUsableResult(final FacetHolder facetHolder, final UsabilityContext<?>
context) {
         final InteractionResult result = new InteractionResult(context.createInteractionEvent());
-        final Facet[] facets = facetHolder.getFacets(FacetFilters.isA(DisablingInteractionAdvisor.class));
-        for (int i = 0; i < facets.length; i++) {
-            final DisablingInteractionAdvisor advisor = (DisablingInteractionAdvisor) facets[i];
+        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);
         }
@@ -68,9 +70,9 @@ public final class InteractionUtils {
 
     public static InteractionResult isValidResult(final FacetHolder facetHolder, final ValidityContext<?>
context) {
         final InteractionResult result = new InteractionResult(context.createInteractionEvent());
-        final Facet[] facets = facetHolder.getFacets(FacetFilters.isA(ValidatingInteractionAdvisor.class));
-        for (int i = 0; i < facets.length; i++) {
-            final ValidatingInteractionAdvisor advisor = (ValidatingInteractionAdvisor) facets[i];
+        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;

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java
Mon Apr 18 23:06:40 2011
@@ -39,6 +39,8 @@ import org.apache.isis.core.metamodel.in
 import org.apache.isis.core.metamodel.interactions.VisibilityContext;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
+
+import com.google.common.collect.Lists;
 
 
 public class ObjectActionSet implements ObjectAction {
@@ -175,8 +177,8 @@ public class ObjectActionSet implements 
      * Does nothing
      */
     @Override
-    public Facet[] getFacets(final Filter<Facet> filter) {
-        return new Facet[0];
+    public List<Facet> getFacets(final Filter<Facet> filter) {
+        return Lists.newArrayList();
     }
 
     /**

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
Mon Apr 18 23:06:40 2011
@@ -170,9 +170,6 @@ public class ObjectReflectorDefault impl
      */
     private List<Class<?>> serviceClasses = Lists.newArrayList();
 
-    /**
-     * Optionally {@link #setValidator(MetaModelValidator) injected}.
-     */
     private MetaModelValidator metaModelValidator;
 
     /**
@@ -218,8 +215,8 @@ public class ObjectReflectorDefault impl
 
         this.metaModelValidator = metaModelValidator;
         
-        this.facetProcessor = new FacetProcessor(configuration, this,
-                collectionTypeRegistry, programmingModel);
+        this.facetProcessor = new FacetProcessor(configuration, collectionTypeRegistry,
+                programmingModel);
         
         this.cache = new SpecificationCacheDefault();
     }
@@ -474,12 +471,7 @@ public class ObjectReflectorDefault impl
     }
 
     
-    // added to try to track down a race condition
-    // TODO: should probably remove 
-    private ObjectSpecification introspectSpecificationIfRequired(
-            ObjectSpecification spec) {
-        if (spec instanceof ObjectSpecificationAbstract) {
-        }
+    private ObjectSpecification introspectSpecificationIfRequired(ObjectSpecification spec)
{
         if(!spec.isIntrospected()) {
             spec.introspectTypeHierarchyAndMembers();
             facetDecoratorSet.decorate(spec);

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/facetprocessor/FacetProcessor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/facetprocessor/FacetProcessor.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/facetprocessor/FacetProcessor.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/facetprocessor/FacetProcessor.java
Mon Apr 18 23:06:40 2011
@@ -53,7 +53,6 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.progmodel.ProgrammingModel;
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContextAware;
-import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistry;
 
 
@@ -63,7 +62,6 @@ public class FacetProcessor implements R
     private final CollectionTypeRegistry collectionTypeRegistry;
     private final ProgrammingModel programmingModel;
     
-    private final SpecificationLoader specificationLoader;
 	private RuntimeContext runtimeContext;
 
 
@@ -124,16 +122,13 @@ public class FacetProcessor implements R
     
     public FacetProcessor(
     		final IsisConfiguration configuration, 
-    		final SpecificationLoader specificationLoader, 
     		final CollectionTypeRegistry collectionTypeRegistry, 
     		final ProgrammingModel programmingModel) {
         ensureThatState(configuration, is(notNullValue()));
         ensureThatState(collectionTypeRegistry, is(notNullValue()));
         ensureThatState(programmingModel, is(notNullValue()));
-        ensureThatState(specificationLoader, is(notNullValue()));
     	
     	this.configuration = configuration;
-    	this.specificationLoader = specificationLoader;
     	this.programmingModel = programmingModel;
     	this.collectionTypeRegistry = collectionTypeRegistry;
     }
@@ -214,7 +209,8 @@ public class FacetProcessor implements R
      * @see PropertyOrCollectionIdentifyingFacetFactory#findAndRemoveValuePropertyAccessors(MethodRemover,
      *      List)
      */
-    public void findAndRemovePropertyAccessors(final MethodRemover methodRemover, final List<Method>
methodListToAppendTo) {
+    public void findAndRemovePropertyAccessors(final MethodRemover methodRemover, final List<Method>
methodListToAppendTo) {
+    	cachePropertyOrCollectionIdentifyingFacetFactoriesIfRequired();
         for (final PropertyOrCollectionIdentifyingFacetFactory facetFactory : cachedPropertyOrCollectionIdentifyingFactories)
{
             facetFactory.findAndRemovePropertyAccessors(methodRemover, methodListToAppendTo);
         }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstract.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstract.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstract.java
Mon Apr 18 23:06:40 2011
@@ -50,6 +50,8 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.SpecificationLookup;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
+
+import com.google.common.collect.Lists;
 
 
 public abstract class ObjectActionParameterAbstract implements ObjectActionParameter {
@@ -156,8 +158,8 @@ public abstract class ObjectActionParame
     }
 
     @Override
-    public Facet[] getFacets(final Filter<Facet> filter) {
-        return peer != null ? peer.getFacets(filter) : new Facet[] {};
+    public List<Facet> getFacets(final Filter<Facet> filter) {
+        return peer != null ? peer.getFacets(filter) : Lists.<Facet>newArrayList();
     }
 
     @Override

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
Mon Apr 18 23:06:40 2011
@@ -20,6 +20,8 @@
 
 package org.apache.isis.core.metamodel.specloader.specimpl;
 
+import java.util.List;
+
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.filter.Filter;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
@@ -138,7 +140,7 @@ public abstract class ObjectMemberAbstra
     }
 
     @Override
-    public Facet[] getFacets(final Filter<Facet> filter) {
+    public List<Facet> getFacets(final Filter<Facet> filter) {
         return getFacetedMethod().getFacets(filter);
     }
 

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
Mon Apr 18 23:06:40 2011
@@ -493,10 +493,10 @@ public class ObjectSpecificationDefault 
         final List<ObjectAssociation> fields = getAssociations(noop);
         for (int i = 0; i < fields.size(); i++) {
             final ObjectAssociation field = fields.get(i);
-            final Facet[] facets = field.getFacets(ImperativeFacet.FILTER);
-            for (int j = 0; j < facets.length; j++) {
-                final ImperativeFacet facet = ImperativeFacetUtils.getImperativeFacet(facets[j]);
-                for (Method imperativeFacetMethod : facet.getMethods()) {
+            final List<Facet> facets = field.getFacets(ImperativeFacet.FILTER);
+            for (final Facet facet: facets) {
+                final ImperativeFacet imperativeFacet = ImperativeFacetUtils.getImperativeFacet(facet);
+                for (Method imperativeFacetMethod : imperativeFacet.getMethods()) {
                     membersByMethod.put(imperativeFacetMethod, field);
                 }
             }
@@ -507,10 +507,10 @@ public class ObjectSpecificationDefault 
         final List<ObjectAction> userActions = getObjectActions(ActionType.USER);
         for (int i = 0; i < userActions.size(); i++) {
             final ObjectAction userAction = userActions.get(i);
-            final Facet[] facets = userAction.getFacets(ImperativeFacet.FILTER);
-            for (int j = 0; j < facets.length; j++) {
-                final ImperativeFacet facet = ImperativeFacetUtils.getImperativeFacet(facets[j]);
-                for (Method imperativeFacetMethod : facet.getMethods()) {
+            final List<Facet> facets = userAction.getFacets(ImperativeFacet.FILTER);
+            for (final Facet facet: facets) {
+                final ImperativeFacet imperativeFacet = ImperativeFacetUtils.getImperativeFacet(facet);
+                for (Method imperativeFacetMethod : imperativeFacet.getMethods()) {
                     membersByMethod.put(imperativeFacetMethod, userAction);
                 }
             }

Modified: incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/ImperativeFacetUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/ImperativeFacetUtilsTest.java?rev=1094811&r1=1094810&r2=1094811&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/ImperativeFacetUtilsTest.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/ImperativeFacetUtilsTest.java
Mon Apr 18 23:06:40 2011
@@ -26,6 +26,7 @@ import static org.hamcrest.CoreMatchers.
 import static org.junit.Assert.assertThat;
 
 import java.lang.reflect.Method;
+import java.util.List;
 
 import org.jmock.Expectations;
 import org.jmock.Mockery;
@@ -41,6 +42,8 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.ImperativeFacetUtils.ImperativeFacetFlags;
 import org.apache.isis.core.metamodel.spec.feature.ObjectMember;
 
+import com.google.common.collect.Lists;
+
 @RunWith(JMock.class)
 public class ImperativeFacetUtilsTest {
 
@@ -78,7 +81,7 @@ public class ImperativeFacetUtilsTest {
     	context.checking(new Expectations() {
 			{
 				one(mockObjectMember).getFacets(with(any(Filter.class)));
-				will(returnValue(new Facet[0]));
+				will(returnValue(Lists.newArrayList()));
 			}
 		});
     	ImperativeFacetFlags flags = ImperativeFacetUtils.getImperativeFacetFlags(mockObjectMember,
method);
@@ -94,7 +97,7 @@ public class ImperativeFacetUtilsTest {
     	context.checking(new Expectations() {
 			{
 				one(mockObjectMember).getFacets(with(any(Filter.class)));
-				will(returnValue(new Facet[]{(Facet) imperativeFacet}));
+				will(returnValue(Lists.newArrayList((Facet)imperativeFacet)));
 			}
 		});
     	ImperativeFacetFlags flags = ImperativeFacetUtils.getImperativeFacetFlags(mockObjectMember,
method);

Added: incubator/isis/trunk/core/src/docbkx/guide/images/metamodel/ResolveState-stateChart.odp
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/src/docbkx/guide/images/metamodel/ResolveState-stateChart.odp?rev=1094811&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/core/src/docbkx/guide/images/metamodel/ResolveState-stateChart.odp
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/isis/trunk/core/src/docbkx/guide/images/metamodel/ResolveState-stateChart.png
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/src/docbkx/guide/images/metamodel/ResolveState-stateChart.png?rev=1094811&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/core/src/docbkx/guide/images/metamodel/ResolveState-stateChart.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/isis/trunk/core/src/docbkx/guide/images/metamodel/ResolveState-stateChart.pptx
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/src/docbkx/guide/images/metamodel/ResolveState-stateChart.pptx?rev=1094811&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/core/src/docbkx/guide/images/metamodel/ResolveState-stateChart.pptx
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message