isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1387969 [1/2] - in /incubator/isis/trunk/framework: applib/src/main/java/org/apache/isis/applib/bookmarks/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/ada...
Date Thu, 20 Sep 2012 11:05:47 GMT
Author: danhaywood
Date: Thu Sep 20 11:05:45 2012
New Revision: 1387969

URL: http://svn.apache.org/viewvc?rev=1387969&view=rev
Log:
ISIS-232: autocomplete, some CSS tidy-up for tables.

Removed:
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adaptermanager/AdapterManagerProxy.java
Modified:
    incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/bookmarks/Bookmark.java
    incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/bookmarks/BookmarkService.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/DomainObjectServices.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/RootOid.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/RootOidDefault.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/FacetFactoryAbstract.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacet.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacetAbstract.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/ServicesInjector.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/ServicesInjectorAware.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/noruntime/RuntimeContextNoRuntime.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ServicesInjectorDefault.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/bookmarks/BookmarkServiceDefault.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/invoke/ActionInvocationFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfAnnotationForActionsFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/CollectionFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddRemoveAndValidateFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/typeof/TypeOfAnnotationForCollectionsFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/describedas/annotation/DescribedAsAnnotationOnMemberFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteAnnotationFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteFacetAnnotation.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/disabled/method/DisabledObjectViaDisabledMethodFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/method/HiddenObjectViaHiddenMethodFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/immutable/annotation/ImmutableAnnotationFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueUsingValueSemanticsProviderFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/annotation/ValueFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/enums/ParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/method/ActionChoicesFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/methodnum/ActionParameterChoicesFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ParameterDefaultDerivedFromTypeFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/describedas/annotation/DescribedAsAnnotationOnParameterFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/typicallen/fromtype/TypicalLengthFacetForParameterDerivedFromTypeFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/validate/maskannot/MaskAnnotationForParameterFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/enums/PropertyChoicesFacetDerivedFromChoicesFacetFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/method/PropertyChoicesFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/fromtype/PropertyDefaultDerivedFromTypeFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/method/PropertyDefaultFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/disabled/fromimmutable/DisabledFacetForPropertyDerivedFromImmutableTypeFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/typicallen/fromtype/TypicalLengthFacetForPropertyDerivedFromTypeFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/maskannot/MaskAnnotationForPropertyFacetFactory.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/container/DomainObjectContainerResolve.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/internal/RuntimeContextFromSession.java
    incubator/isis/trunk/framework/viewer/wicket/pom.xml
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/pom.xml
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTable.css
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLink.html
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/EntityLink.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css

Modified: incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/bookmarks/Bookmark.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/bookmarks/Bookmark.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/bookmarks/Bookmark.java (original)
+++ incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/bookmarks/Bookmark.java Thu Sep 20 11:05:45 2012
@@ -1,16 +1,36 @@
 package org.apache.isis.applib.bookmarks;
 
+import java.io.Serializable;
+import java.util.Iterator;
+
+import com.google.common.base.Splitter;
+
 /**
  * String representation of any persistent object managed by the framework.
  * 
  * <p>
  * Analogous to the <tt>RootOid</tt>.
  */
-public class Bookmark {
+public class Bookmark implements Serializable {
+
+    private static final char SEPARATOR = ':';
 
+    private static final long serialVersionUID = 1L;
+    
     private final String objectType;
     private final String identifier;
-    
+
+    /**
+     * Round-trip with {@link #toString()} representation.
+     */
+    public Bookmark(String toString) {
+        this(Splitter.on(SEPARATOR).split(toString).iterator());
+    }
+
+    private Bookmark(Iterator<String> split) {
+        this(split.next(), split.next());
+    }
+
     public Bookmark(String objectType, String identifier) {
         this.objectType = objectType;
         this.identifier = identifier;
@@ -59,6 +79,6 @@ public class Bookmark {
 
     @Override
     public String toString() {
-        return objectType + ":" + identifier;
+        return objectType + SEPARATOR + identifier;
     }
 }

Modified: incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/bookmarks/BookmarkService.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/bookmarks/BookmarkService.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/bookmarks/BookmarkService.java (original)
+++ incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/bookmarks/BookmarkService.java Thu Sep 20 11:05:45 2012
@@ -1,5 +1,6 @@
 package org.apache.isis.applib.bookmarks;
 
+import org.apache.isis.applib.annotation.Hidden;
 import org.apache.isis.applib.annotation.Named;
 import org.apache.isis.applib.annotation.NotInServiceMenu;
 
@@ -8,5 +9,8 @@ public interface BookmarkService {
 
     @NotInServiceMenu
     Object lookup(BookmarkHolder bookmarkHolder);
+
+    @Hidden
+    Bookmark bookmarkFor(Object domainObject);
     
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/DomainObjectServices.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/DomainObjectServices.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/DomainObjectServices.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/DomainObjectServices.java Thu Sep 20 11:05:45 2012
@@ -83,6 +83,8 @@ public interface DomainObjectServices ex
      */
     Object lookup(Bookmark bookmark);
 
+    Bookmark bookmarkFor(Object domainObject);
+
 
     // ///////////////////////////////////////////
     // flush, commit
@@ -154,4 +156,5 @@ public interface DomainObjectServices ex
      */
     List<String> getPropertyNames();
 
+
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/RootOid.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/RootOid.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/RootOid.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/RootOid.java Thu Sep 20 11:05:45 2012
@@ -19,6 +19,7 @@
 
 package org.apache.isis.core.metamodel.adapter.oid;
 
+import org.apache.isis.applib.bookmarks.Bookmark;
 import org.apache.isis.core.metamodel.adapter.version.Version;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
@@ -93,5 +94,7 @@ public interface RootOid extends TypedOi
     
     Comparison compareAgainst(RootOid oid2);
 
+    Bookmark asBookmark();
+
 
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/RootOidDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/RootOidDefault.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/RootOidDefault.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/oid/RootOidDefault.java Thu Sep 20 11:05:45 2012
@@ -30,6 +30,7 @@ import com.google.common.base.Objects;
 
 import org.apache.log4j.Logger;
 
+import org.apache.isis.applib.bookmarks.Bookmark;
 import org.apache.isis.core.commons.encoding.DataInputExtended;
 import org.apache.isis.core.commons.encoding.DataOutputExtended;
 import org.apache.isis.core.commons.ensure.Ensure;
@@ -64,6 +65,10 @@ public final class RootOidDefault implem
         return new RootOidDefault(objectSpecId, identifier, State.TRANSIENT);
     }
 
+    public static RootOid create(Bookmark bookmark) {
+        return create(ObjectSpecId.of(bookmark.getObjectType()), bookmark.getIdentifier());
+    }
+
     public static RootOidDefault create(ObjectSpecId objectSpecId, final String identifier) {
         return create(objectSpecId, identifier, null);
     }
@@ -243,8 +248,32 @@ public final class RootOidDefault implem
                 : Comparison.EQUIVALENT_BUT_CHANGED;
     }
 
+    @Override
+    public void checkLock(String currentUser, RootOid otherOid) {
+        Version otherVersion = otherOid.getVersion();
+        if(version == null || otherVersion == null) {
+            return;
+        }
+        if (version.different(otherVersion)) {
+            LOG.info("concurrency conflict on " + this + " (" + otherVersion + ")");
+            // reset this Oid to latest
+            throw new ConcurrencyException(currentUser, this, version, otherVersion);
+        }
+    }
+
     
     // ////////////////////////////////////////////
+    // bookmark
+    // ////////////////////////////////////////////
+
+    @Override
+    public Bookmark asBookmark() {
+        final String objectType = getObjectSpecId().asString();
+        final String identifier = getIdentifier();
+        return new Bookmark(objectType, identifier);
+    }
+
+    // ////////////////////////////////////////////
     // equals, hashCode
     // ////////////////////////////////////////////
 
@@ -283,19 +312,6 @@ public final class RootOidDefault implem
         return enString(new OidMarshaller());
     }
 
-    @Override
-    public void checkLock(String currentUser, RootOid otherOid) {
-        Version otherVersion = otherOid.getVersion();
-        if(version == null || otherVersion == null) {
-            return;
-        }
-        if (version.different(otherVersion)) {
-            LOG.info("concurrency conflict on " + this + " (" + otherVersion + ")");
-            // reset this Oid to latest
-            throw new ConcurrencyException(currentUser, this, version, otherVersion);
-        }
-    }
 
     
-    
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/FacetFactoryAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/FacetFactoryAbstract.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/FacetFactoryAbstract.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/FacetFactoryAbstract.java Thu Sep 20 11:05:45 2012
@@ -31,7 +31,7 @@ public abstract class FacetFactoryAbstra
 
     private final List<FeatureType> featureTypes;
 
-    private SpecificationLoader specificationLookup;
+    private SpecificationLoader specificationLoader;
 
     public FacetFactoryAbstract(final List<FeatureType> featureTypes) {
         this.featureTypes = ImmutableList.copyOf(featureTypes);
@@ -58,8 +58,8 @@ public abstract class FacetFactoryAbstra
     // Dependencies (injected)
     // ////////////////////////////////////////////////////////////////
 
-    protected SpecificationLoader getSpecificationLookup() {
-        return specificationLookup;
+    protected SpecificationLoader getSpecificationLoader() {
+        return specificationLoader;
     }
 
     /**
@@ -67,7 +67,7 @@ public abstract class FacetFactoryAbstra
      */
     @Override
     public void setSpecificationLookup(final SpecificationLoader specificationLookup) {
-        this.specificationLookup = specificationLookup;
+        this.specificationLoader = specificationLookup;
     }
 
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacet.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacet.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacet.java Thu Sep 20 11:05:45 2012
@@ -19,9 +19,15 @@
 
 package org.apache.isis.core.metamodel.facets.object.autocomplete;
 
+import java.util.List;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 
 public interface AutoCompleteFacet extends Facet {
-    public ObjectAction getRepositoryAction();
+
+    public List<ObjectAdapter> execute(String search);
+
+    public ObjectAdapter lookup(RootOid oid);
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacetAbstract.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacetAbstract.java Thu Sep 20 11:05:45 2012
@@ -19,10 +19,24 @@
 
 package org.apache.isis.core.metamodel.facets.object.autocomplete;
 
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetAbstract;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacetUtils;
+import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
+import org.apache.isis.core.metamodel.spec.ActionType;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.core.metamodel.spec.feature.ObjectActionFilters;
+import org.apache.isis.core.metamodel.spec.feature.ObjectActionContainer.Contributed;
 
 public abstract class AutoCompleteFacetAbstract extends FacetAbstract implements AutoCompleteFacet {
 
@@ -30,16 +44,77 @@ public abstract class AutoCompleteFacetA
         return AutoCompleteFacet.class;
     }
 
-    private final ObjectAction repositoryAction;
+    private final Class<?> repositoryClass;
+    private final String actionName;
 
-    public AutoCompleteFacetAbstract(final FacetHolder holder, ObjectAction repositoryAction) {
+    private final SpecificationLoader specificationLoader;
+    private final AdapterManager adapterManager;
+    private final ServicesInjector servicesInjector;
+
+    /**
+     * cached once searched for
+     */
+    private ObjectAction repositoryAction;
+    private boolean cachedRepositoryAction = false;
+    
+    private boolean cachedRepositoryObject = false;
+    private Object repository;
+
+    public AutoCompleteFacetAbstract(FacetHolder holder, Class<?> repositoryClass, String actionName, SpecificationLoader specificationLoader, AdapterManager adapterManager, ServicesInjector servicesInjector) {
         super(type(), holder, Derivation.NOT_DERIVED);
-        this.repositoryAction = repositoryAction;
+        this.repositoryClass = repositoryClass;
+        this.actionName = actionName;
+        this.specificationLoader = specificationLoader;
+        this.adapterManager = adapterManager;
+        this.servicesInjector = servicesInjector;
+    }
+
+    @Override
+    public List<ObjectAdapter> execute(final String search) {
+
+        cacheRepositoryAndRepositoryActionIfRequired();
+        if(repositoryAction == null || repository == null) {
+            return Collections.<ObjectAdapter>emptyList();
+        }
+        
+        final ObjectAdapter repositoryAdapter = adapterManager.getAdapterFor(repository);
+        final ObjectAdapter searchAdapter = adapterManager.adapterFor(search);
+        final ObjectAdapter resultAdapter = repositoryAction.execute(repositoryAdapter, new ObjectAdapter[] { searchAdapter} );
+        // check a collection was returned
+        if(CollectionFacetUtils.getCollectionFacetFromSpec(resultAdapter) == null) {
+            return Collections.<ObjectAdapter>emptyList();
+        }
+        return CollectionFacetUtils.convertToAdapterList(resultAdapter);
     }
 
     @Override
-    public ObjectAction getRepositoryAction() {
-        return repositoryAction;
+    public ObjectAdapter lookup(RootOid oid) {
+        return adapterManager.adapterFor(oid);
+    }
+
+    private void cacheRepositoryAndRepositoryActionIfRequired() {
+        if(!cachedRepositoryAction) {
+            cacheRepositoryAction();
+        }
+        if(!cachedRepositoryObject) {
+            cacheRepositoryObject();
+        }
+    }
+
+    private void cacheRepositoryAction() {
+        try {
+            final ObjectSpecification repositorySpec = specificationLoader.loadSpecification(repositoryClass);
+            final List<ObjectAction> objectActions = repositorySpec.getObjectActions(ActionType.USER, Contributed.EXCLUDED, ObjectActionFilters.withId(actionName));
+
+            repositoryAction = objectActions.size() == 1? objectActions.get(0): null;
+        } finally {
+            cachedRepositoryAction = true;
+        }
+    }
+
+    private void cacheRepositoryObject() {
+        repository = servicesInjector.lookupService(repositoryClass);
+        cachedRepositoryObject = true;
     }
 
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/ServicesInjector.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/ServicesInjector.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/ServicesInjector.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/ServicesInjector.java Thu Sep 20 11:05:45 2012
@@ -19,6 +19,8 @@ package org.apache.isis.core.metamodel.r
 import java.util.List;
 
 import org.apache.isis.core.commons.components.Injectable;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 
 public interface ServicesInjector extends Injectable {
 
@@ -36,4 +38,5 @@ public interface ServicesInjector extend
      */
     void injectServicesInto(List<Object> objects);
 
+    Object lookupService(Class<?> serviceClass);
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/ServicesInjectorAware.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/ServicesInjectorAware.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/ServicesInjectorAware.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/ServicesInjectorAware.java Thu Sep 20 11:05:45 2012
@@ -21,6 +21,6 @@ package org.apache.isis.core.metamodel.r
 
 public interface ServicesInjectorAware {
 
-    public void setServicesInjector(ServicesInjector dependencyInjector);
+    public void setServicesInjector(ServicesInjector servicesInjector);
 
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/noruntime/RuntimeContextNoRuntime.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/noruntime/RuntimeContextNoRuntime.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/noruntime/RuntimeContextNoRuntime.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/noruntime/RuntimeContextNoRuntime.java Thu Sep 20 11:05:45 2012
@@ -79,6 +79,11 @@ public class RuntimeContextNoRuntime ext
             }
 
             @Override
+            public Object lookupService(Class<?> serviceClass) {
+                return null;
+            }
+
+            @Override
             public void injectInto(Object candidate) {
             }
         };
@@ -176,6 +181,11 @@ public class RuntimeContextNoRuntime ext
             }
 
             @Override
+            public Bookmark bookmarkFor(Object domainObject) {
+                throw new UnsupportedOperationException("Not supported by this implementation of RuntimeContext");
+            }
+
+            @Override
             public void resolve(final Object parent, final Object field) {
                 throw new UnsupportedOperationException("Not supported by this implementation of RuntimeContext");
             }
@@ -219,6 +229,7 @@ public class RuntimeContextNoRuntime ext
             public String getProperty(final String name) {
                 throw new UnsupportedOperationException("Not supported by this implementation of RuntimeContext");
             }
+
         };
         localizationProvider = new LocalizationProviderAbstract() {
 

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ServicesInjectorDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ServicesInjectorDefault.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ServicesInjectorDefault.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ServicesInjectorDefault.java Thu Sep 20 11:05:45 2012
@@ -37,8 +37,11 @@ import org.apache.isis.applib.DomainObje
 import org.apache.isis.core.commons.ensure.Assert;
 import org.apache.isis.core.commons.lang.CastUtils;
 import org.apache.isis.core.commons.lang.ToString;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.exceptions.MetaModelException;
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjectorAware;
+import org.apache.isis.core.metamodel.spec.ObjectAdapterUtils;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 
 public class ServicesInjectorDefault implements ServicesInjectorSpi {
 
@@ -199,4 +202,14 @@ public class ServicesInjectorDefault imp
         injectServicesInto(this.container);
     }
 
+    @Override
+    public Object lookupService(Class<?> serviceClass) {
+        for(final Object service: this.services) {
+            if(serviceClass.isAssignableFrom(service.getClass())) {
+                return service;
+            }
+        }
+        return null;
+    }
+
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/bookmarks/BookmarkServiceDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/bookmarks/BookmarkServiceDefault.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/bookmarks/BookmarkServiceDefault.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/bookmarks/BookmarkServiceDefault.java Thu Sep 20 11:05:45 2012
@@ -1,5 +1,6 @@
 package org.apache.isis.core.metamodel.services.bookmarks;
 
+import org.apache.isis.applib.annotation.Hidden;
 import org.apache.isis.applib.annotation.NotInServiceMenu;
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.bookmarks.Bookmark;
@@ -26,4 +27,10 @@ public class BookmarkServiceDefault impl
         this.domainObjectServices = domainObjectServices;
     }
 
+    @Override
+    @Hidden
+    public Bookmark bookmarkFor(Object domainObject) {
+        return domainObjectServices.bookmarkFor(domainObject);
+    }
+
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/invoke/ActionInvocationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/invoke/ActionInvocationFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/invoke/ActionInvocationFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/invoke/ActionInvocationFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -88,13 +88,13 @@ public class ActionInvocationFacetFactor
 
         try {
             final Class<?> returnType = actionMethod.getReturnType();
-            final ObjectSpecification returnSpec = getSpecificationLookup().loadSpecification(returnType);
+            final ObjectSpecification returnSpec = getSpecificationLoader().loadSpecification(returnType);
             if (returnSpec == null) {
                 return;
             }
 
             final Class<?> cls = processMethodContext.getCls();
-            final ObjectSpecification typeSpec = getSpecificationLookup().loadSpecification(cls);
+            final ObjectSpecification typeSpec = getSpecificationLoader().loadSpecification(cls);
             final FacetHolder holder = processMethodContext.getFacetHolder();
 
             FacetUtil.addFacet(new ActionInvocationFacetViaMethod(actionMethod, typeSpec, returnSpec, holder, getAdapterManager()));

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfAnnotationForActionsFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfAnnotationForActionsFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfAnnotationForActionsFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfAnnotationForActionsFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -53,12 +53,12 @@ public class TypeOfAnnotationForActionsF
         final Class<?> returnType = processMethodContext.getMethod().getReturnType();
         if (returnType.isArray()) {
             final Class<?> componentType = returnType.getComponentType();
-            FacetUtil.addFacet(new TypeOfFacetInferredFromArray(componentType, processMethodContext.getFacetHolder(), getSpecificationLookup()));
+            FacetUtil.addFacet(new TypeOfFacetInferredFromArray(componentType, processMethodContext.getFacetHolder(), getSpecificationLoader()));
             return;
         }
 
         if (annotation != null) {
-            FacetUtil.addFacet(new TypeOfFacetAnnotationForAction(annotation.value(), processMethodContext.getFacetHolder(), getSpecificationLookup()));
+            FacetUtil.addFacet(new TypeOfFacetAnnotationForAction(annotation.value(), processMethodContext.getFacetHolder(), getSpecificationLoader()));
             return;
         }
 
@@ -76,7 +76,7 @@ public class TypeOfAnnotationForActionsF
         final Object actualTypeArgument = actualTypeArguments[0];
         if (actualTypeArgument instanceof Class) {
             final Class<?> actualType = (Class<?>) actualTypeArgument;
-            FacetUtil.addFacet(new TypeOfFacetInferredFromGenerics(actualType, processMethodContext.getFacetHolder(), getSpecificationLookup()));
+            FacetUtil.addFacet(new TypeOfFacetInferredFromGenerics(actualType, processMethodContext.getFacetHolder(), getSpecificationLoader()));
             return;
         }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/CollectionFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/CollectionFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/CollectionFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/CollectionFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -56,7 +56,7 @@ public class CollectionFacetFactory exte
         final TypeOfFacet typeOfFacet = facetHolder.getFacet(TypeOfFacet.class);
         if (typeOfFacet == null) {
             final Class<?> collectionElementType = collectionElementType(processClassContaxt.getCls());
-            facetHolder.addFacet(collectionElementType != Object.class ? new TypeOfFacetInferredFromGenerics(collectionElementType, facetHolder, getSpecificationLookup()) : new TypeOfFacetDefaultToObject(facetHolder, getSpecificationLookup()));
+            facetHolder.addFacet(collectionElementType != Object.class ? new TypeOfFacetInferredFromGenerics(collectionElementType, facetHolder, getSpecificationLoader()) : new TypeOfFacetDefaultToObject(facetHolder, getSpecificationLoader()));
         } else {
             // nothing
         }
@@ -67,7 +67,7 @@ public class CollectionFacetFactory exte
     private void processAsArrayType(final ProcessClassContext processClassContaxt) {
         final FacetHolder facetHolder = processClassContaxt.getFacetHolder();
         facetHolder.addFacet(new JavaArrayFacet(facetHolder, getAdapterManager()));
-        facetHolder.addFacet(new TypeOfFacetInferredFromArray(processClassContaxt.getCls().getComponentType(), facetHolder, getSpecificationLookup()));
+        facetHolder.addFacet(new TypeOfFacetInferredFromArray(processClassContaxt.getCls().getComponentType(), facetHolder, getSpecificationLoader()));
     }
 
     private Class<?> collectionElementType(final Class<?> cls) {

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -40,7 +40,7 @@ public class DisabledFacetForCollectionD
 
     @Override
     public void process(final ProcessMethodContext processMethodContext) {
-        final ObjectSpecification spec = getSpecificationLookup().loadSpecification(processMethodContext.getMethod().getDeclaringClass());
+        final ObjectSpecification spec = getSpecificationLoader().loadSpecification(processMethodContext.getMethod().getDeclaringClass());
         if (spec.containsDoOpFacet(ImmutableFacet.class)) {
             final ImmutableFacet immutableFacet = spec.getFacet(ImmutableFacet.class);
             final FacetedMethod facetHolder = processMethodContext.getFacetHolder();

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddRemoveAndValidateFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddRemoveAndValidateFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddRemoveAndValidateFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddRemoveAndValidateFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -119,7 +119,7 @@ public class CollectionAddRemoveAndValid
 
         final Class<?> type = addType != null ? addType : removeType;
         if (type != null) {
-            FacetUtil.addFacet(new TypeOfFacetInferredFromSupportingMethods(type, collection, getSpecificationLookup()));
+            FacetUtil.addFacet(new TypeOfFacetInferredFromSupportingMethods(type, collection, getSpecificationLoader()));
         }
         return type;
     }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/typeof/TypeOfAnnotationForCollectionsFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/typeof/TypeOfAnnotationForCollectionsFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/typeof/TypeOfAnnotationForCollectionsFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/typeof/TypeOfAnnotationForCollectionsFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -53,12 +53,12 @@ public class TypeOfAnnotationForCollecti
         final Class<?> returnType = processMethodContext.getMethod().getReturnType();
         if (returnType.isArray()) {
             final Class<?> componentType = returnType.getComponentType();
-            FacetUtil.addFacet(new TypeOfFacetInferredFromArray(componentType, processMethodContext.getFacetHolder(), getSpecificationLookup()));
+            FacetUtil.addFacet(new TypeOfFacetInferredFromArray(componentType, processMethodContext.getFacetHolder(), getSpecificationLoader()));
             return;
         }
 
         if (annotation != null) {
-            FacetUtil.addFacet(new TypeOfFacetAnnotationForCollection(annotation.value(), processMethodContext.getFacetHolder(), getSpecificationLookup()));
+            FacetUtil.addFacet(new TypeOfFacetAnnotationForCollection(annotation.value(), processMethodContext.getFacetHolder(), getSpecificationLoader()));
             return;
         }
 
@@ -76,7 +76,7 @@ public class TypeOfAnnotationForCollecti
         final Object actualTypeArgument = actualTypeArguments[0];
         if (actualTypeArgument instanceof Class) {
             final Class<?> actualType = (Class<?>) actualTypeArgument;
-            FacetUtil.addFacet(new TypeOfFacetInferredFromGenerics(actualType, processMethodContext.getFacetHolder(), getSpecificationLookup()));
+            FacetUtil.addFacet(new TypeOfFacetInferredFromGenerics(actualType, processMethodContext.getFacetHolder(), getSpecificationLoader()));
             return;
         }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/describedas/annotation/DescribedAsAnnotationOnMemberFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/describedas/annotation/DescribedAsAnnotationOnMemberFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/describedas/annotation/DescribedAsAnnotationOnMemberFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/describedas/annotation/DescribedAsAnnotationOnMemberFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -59,7 +59,7 @@ public class DescribedAsAnnotationOnMemb
     }
 
     private DescribedAsFacet getDescribedAsFacet(final Class<?> type) {
-        final ObjectSpecification paramTypeSpec = getSpecificationLookup().loadSpecification(type);
+        final ObjectSpecification paramTypeSpec = getSpecificationLoader().loadSpecification(type);
         return paramTypeSpec.getFacet(DescribedAsFacet.class);
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteAnnotationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteAnnotationFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteAnnotationFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -19,22 +19,23 @@
 
 package org.apache.isis.core.progmodel.facets.object.autocomplete.annotation;
 
-import java.util.List;
-
 import org.apache.isis.applib.annotation.AutoComplete;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManagerAware;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetUtil;
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.Annotations;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.object.autocomplete.AutoCompleteFacet;
-import org.apache.isis.core.metamodel.spec.ActionType;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
-import org.apache.isis.core.metamodel.spec.feature.ObjectActionContainer.Contributed;
-import org.apache.isis.core.metamodel.spec.feature.ObjectActionFilters;
+import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
+import org.apache.isis.core.metamodel.runtimecontext.ServicesInjectorAware;
+import org.apache.isis.core.metamodel.spec.SpecificationLoaderAware;
+
+public class AutoCompleteAnnotationFacetFactory extends FacetFactoryAbstract implements AdapterManagerAware, ServicesInjectorAware, SpecificationLoaderAware {
 
-public class AutoCompleteAnnotationFacetFactory extends FacetFactoryAbstract {
+    private AdapterManager adapterManager;
+    private ServicesInjector servicesInjector;
 
     public AutoCompleteAnnotationFacetFactory() {
         super(FeatureType.OBJECTS_POST_PROCESSING_ONLY);
@@ -52,13 +53,17 @@ public class AutoCompleteAnnotationFacet
         Class<?> repositoryClass = annotation.repository();
         String actionName = annotation.action();
         
-        final ObjectSpecification repositorySpec = getSpecificationLookup().loadSpecification(repositoryClass);
-        getSpecificationLookup().introspectIfRequired(repositorySpec);
-         
-        
-        final List<ObjectAction> objectActions = repositorySpec.getObjectActions(ActionType.USER, Contributed.EXCLUDED, ObjectActionFilters.withId(actionName));
-        
-        return objectActions.size() != 1 ? null : new AutoCompleteFacetAnnotation(holder, objectActions.get(0));
+        return new AutoCompleteFacetAnnotation(holder, repositoryClass, actionName, getSpecificationLoader(), adapterManager, servicesInjector);
+    }
+
+    @Override
+    public void setAdapterManager(AdapterManager adapterManager) {
+        this.adapterManager = adapterManager;
+    }
+
+    @Override
+    public void setServicesInjector(ServicesInjector servicesInjector) {
+        this.servicesInjector = servicesInjector;
     }
 
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteFacetAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteFacetAnnotation.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteFacetAnnotation.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteFacetAnnotation.java Thu Sep 20 11:05:45 2012
@@ -19,16 +19,21 @@
 
 package org.apache.isis.core.progmodel.facets.object.autocomplete.annotation;
 
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.autocomplete.AutoCompleteFacetAbstract;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
+import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 
 public class AutoCompleteFacetAnnotation extends AutoCompleteFacetAbstract {
 
-    public AutoCompleteFacetAnnotation(FacetHolder holder, ObjectAction repositoryAction) {
-        super(holder, repositoryAction);
+    public AutoCompleteFacetAnnotation(FacetHolder holder, Class<?> repositoryClass, String actionName, SpecificationLoader specificationLoader, AdapterManager adapterManager, ServicesInjector servicesInjector) {
+        super(holder, repositoryClass, actionName, specificationLoader, adapterManager, servicesInjector);
     }
 
 
+
+
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/disabled/method/DisabledObjectViaDisabledMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/disabled/method/DisabledObjectViaDisabledMethodFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/disabled/method/DisabledObjectViaDisabledMethodFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/disabled/method/DisabledObjectViaDisabledMethodFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -73,7 +73,7 @@ public class DisabledObjectViaDisabledMe
     public void process(final ProcessMethodContext processMethodContext) {
         final FacetedMethod member = processMethodContext.getFacetHolder();
         final Class<?> owningClass = processMethodContext.getCls();
-        final ObjectSpecification owningSpec = getSpecificationLookup().loadSpecification(owningClass);
+        final ObjectSpecification owningSpec = getSpecificationLoader().loadSpecification(owningClass);
         final DisabledObjectFacet facet = owningSpec.getFacet(DisabledObjectFacet.class);
         if (facet != null) {
             facet.copyOnto(member);

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/method/HiddenObjectViaHiddenMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/method/HiddenObjectViaHiddenMethodFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/method/HiddenObjectViaHiddenMethodFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/method/HiddenObjectViaHiddenMethodFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -67,7 +67,7 @@ public class HiddenObjectViaHiddenMethod
     public void process(final ProcessMethodContext processMethodContext) {
         final FacetedMethod member = processMethodContext.getFacetHolder();
         final Class<?> owningClass = processMethodContext.getCls();
-        final ObjectSpecification owningSpec = getSpecificationLookup().loadSpecification(owningClass);
+        final ObjectSpecification owningSpec = getSpecificationLoader().loadSpecification(owningClass);
         final HiddenObjectFacet facet = owningSpec.getFacet(HiddenObjectFacet.class);
         if (facet != null) {
             facet.copyOnto(member);

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/immutable/annotation/ImmutableAnnotationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/immutable/annotation/ImmutableAnnotationFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/immutable/annotation/ImmutableAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/immutable/annotation/ImmutableAnnotationFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -45,7 +45,7 @@ public class ImmutableAnnotationFacetFac
     public void process(final ProcessMethodContext processMethodContext) {
         final FacetedMethod member = processMethodContext.getFacetHolder();
         final Class<?> owningClass = processMethodContext.getCls();
-        final ObjectSpecification owningSpec = getSpecificationLookup().loadSpecification(owningClass);
+        final ObjectSpecification owningSpec = getSpecificationLoader().loadSpecification(owningClass);
         final ImmutableFacet facet = owningSpec.getFacet(ImmutableFacet.class);
         if (facet != null) {
             facet.copyOnto(member);

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueUsingValueSemanticsProviderFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueUsingValueSemanticsProviderFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueUsingValueSemanticsProviderFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueUsingValueSemanticsProviderFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -62,7 +62,7 @@ public abstract class ValueUsingValueSem
 
     public ValueSemanticsProviderContext getContext() {
         if (context == null) {
-            context = new ValueSemanticsProviderContext(authenticationSessionProvider, getSpecificationLookup(), adapterManager, servicesInjector);
+            context = new ValueSemanticsProviderContext(authenticationSessionProvider, getSpecificationLoader(), adapterManager, servicesInjector);
         }
         return context;
     }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/annotation/ValueFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/annotation/ValueFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/annotation/ValueFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/annotation/ValueFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -118,7 +118,7 @@ public class ValueFacetFactory extends F
     }
 
     protected ValueSemanticsProviderContext createValueSemanticsProviderContext() {
-        return new ValueSemanticsProviderContext(getAuthenticationSessionProvider(), getSpecificationLookup(), getAdapterManager(), getServicesInjector());
+        return new ValueSemanticsProviderContext(getAuthenticationSessionProvider(), getSpecificationLoader(), getAdapterManager(), getServicesInjector());
     }
 
     // ////////////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/enums/ParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/enums/ParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/enums/ParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/enums/ParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -41,7 +41,7 @@ public class ParameterChoicesFacetDerive
             return;
         }
 
-        FacetUtil.addFacet(new ActionParameterChoicesFacetDerivedFromChoicesFacet(processParameterContext.getFacetHolder(), getSpecificationLookup(), getAdapterManager()));
+        FacetUtil.addFacet(new ActionParameterChoicesFacetDerivedFromChoicesFacet(processParameterContext.getFacetHolder(), getSpecificationLoader(), getAdapterManager()));
     }
 
     // /////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/method/ActionChoicesFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/method/ActionChoicesFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/method/ActionChoicesFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/method/ActionChoicesFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -83,7 +83,7 @@ public class ActionChoicesFacetFactory e
 
         final Class<?> returnType = actionMethod.getReturnType();
         final FacetHolder action = processMethodContext.getFacetHolder();
-        final ActionChoicesFacetViaMethod facet = new ActionChoicesFacetViaMethod(choicesMethod, returnType, action, getSpecificationLookup(), getAdapterManager());
+        final ActionChoicesFacetViaMethod facet = new ActionChoicesFacetViaMethod(choicesMethod, returnType, action, getSpecificationLoader(), getAdapterManager());
         FacetUtil.addFacet(facet);
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/methodnum/ActionParameterChoicesFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/methodnum/ActionParameterChoicesFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/methodnum/ActionParameterChoicesFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/methodnum/ActionParameterChoicesFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -99,7 +99,7 @@ public class ActionParameterChoicesFacet
 
             // add facets directly to parameters, not to actions
             final FacetedMethodParameter paramAsHolder = parameters.get(i);
-            FacetUtil.addFacet(new ActionParameterChoicesFacetViaMethod(choicesMethod, arrayOfParamType, paramAsHolder, getSpecificationLookup(), getAdapterManager()));
+            FacetUtil.addFacet(new ActionParameterChoicesFacetViaMethod(choicesMethod, arrayOfParamType, paramAsHolder, getSpecificationLoader(), getAdapterManager()));
         }
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ParameterDefaultDerivedFromTypeFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ParameterDefaultDerivedFromTypeFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ParameterDefaultDerivedFromTypeFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ParameterDefaultDerivedFromTypeFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -58,7 +58,7 @@ public class ParameterDefaultDerivedFrom
     }
 
     private DefaultedFacet getDefaultedFacet(final Class<?> paramType) {
-        final ObjectSpecification paramTypeSpec = getSpecificationLookup().loadSpecification(paramType);
+        final ObjectSpecification paramTypeSpec = getSpecificationLoader().loadSpecification(paramType);
         return paramTypeSpec.getFacet(DefaultedFacet.class);
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/describedas/annotation/DescribedAsAnnotationOnParameterFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/describedas/annotation/DescribedAsAnnotationOnParameterFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/describedas/annotation/DescribedAsAnnotationOnParameterFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/describedas/annotation/DescribedAsAnnotationOnParameterFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -64,7 +64,7 @@ public class DescribedAsAnnotationOnPara
     }
 
     private DescribedAsFacet getDescribedAsFacet(final Class<?> type) {
-        final ObjectSpecification paramTypeSpec = getSpecificationLookup().loadSpecification(type);
+        final ObjectSpecification paramTypeSpec = getSpecificationLoader().loadSpecification(type);
         return paramTypeSpec.getFacet(DescribedAsFacet.class);
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/typicallen/fromtype/TypicalLengthFacetForParameterDerivedFromTypeFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/typicallen/fromtype/TypicalLengthFacetForParameterDerivedFromTypeFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/typicallen/fromtype/TypicalLengthFacetForParameterDerivedFromTypeFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/typicallen/fromtype/TypicalLengthFacetForParameterDerivedFromTypeFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -48,7 +48,7 @@ public class TypicalLengthFacetForParame
     }
 
     private TypicalLengthFacet getTypicalLengthFacet(final Class<?> type) {
-        final ObjectSpecification paramTypeSpec = getSpecificationLookup().loadSpecification(type);
+        final ObjectSpecification paramTypeSpec = getSpecificationLoader().loadSpecification(type);
         return paramTypeSpec.getFacet(TypicalLengthFacet.class);
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/validate/maskannot/MaskAnnotationForParameterFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/validate/maskannot/MaskAnnotationForParameterFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/validate/maskannot/MaskAnnotationForParameterFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/validate/maskannot/MaskAnnotationForParameterFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -61,7 +61,7 @@ public class MaskAnnotationForParameterF
         }
         FacetUtil.addFacet(maskFacet);
 
-        final ObjectSpecification type = getSpecificationLookup().loadSpecification(cls);
+        final ObjectSpecification type = getSpecificationLoader().loadSpecification(cls);
         final TitleFacet underlyingTitleFacet = type.getFacet(TitleFacet.class);
         if (underlyingTitleFacet != null) {
             final TitleFacet titleFacet = new TitleFacetBasedOnMask(maskFacet, underlyingTitleFacet);

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/enums/PropertyChoicesFacetDerivedFromChoicesFacetFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/enums/PropertyChoicesFacetDerivedFromChoicesFacetFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/enums/PropertyChoicesFacetDerivedFromChoicesFacetFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/enums/PropertyChoicesFacetDerivedFromChoicesFacetFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -42,7 +42,7 @@ public class PropertyChoicesFacetDerived
             return;
         }
 
-        FacetUtil.addFacet(new PropertyChoicesFacetDerivedFromChoicesFacet(processMethodContext.getFacetHolder(), getSpecificationLookup()));
+        FacetUtil.addFacet(new PropertyChoicesFacetDerivedFromChoicesFacet(processMethodContext.getFacetHolder(), getSpecificationLoader()));
     }
 
     // /////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/method/PropertyChoicesFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/method/PropertyChoicesFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/method/PropertyChoicesFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/method/PropertyChoicesFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -62,7 +62,7 @@ public class PropertyChoicesFacetFactory
         processMethodContext.removeMethod(choicesMethod);
 
         final FacetHolder property = processMethodContext.getFacetHolder();
-        FacetUtil.addFacet(new PropertyChoicesFacetViaMethod(choicesMethod, returnType, property, getSpecificationLookup(), getAdapterManager()));
+        FacetUtil.addFacet(new PropertyChoicesFacetViaMethod(choicesMethod, returnType, property, getSpecificationLoader(), getAdapterManager()));
     }
 
     // ///////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/fromtype/PropertyDefaultDerivedFromTypeFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/fromtype/PropertyDefaultDerivedFromTypeFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/fromtype/PropertyDefaultDerivedFromTypeFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/fromtype/PropertyDefaultDerivedFromTypeFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -59,7 +59,7 @@ public class PropertyDefaultDerivedFromT
     }
 
     private DefaultedFacet getDefaultedFacet(final Class<?> paramType) {
-        final ObjectSpecification paramTypeSpec = getSpecificationLookup().loadSpecification(paramType);
+        final ObjectSpecification paramTypeSpec = getSpecificationLoader().loadSpecification(paramType);
         return paramTypeSpec.getFacet(DefaultedFacet.class);
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/method/PropertyDefaultFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/method/PropertyDefaultFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/method/PropertyDefaultFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/method/PropertyDefaultFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -62,7 +62,7 @@ public class PropertyDefaultFacetFactory
         processMethodContext.removeMethod(method);
 
         final FacetHolder property = processMethodContext.getFacetHolder();
-        FacetUtil.addFacet(new PropertyDefaultFacetViaMethod(method, property, getSpecificationLookup(), getAdapterManager()));
+        FacetUtil.addFacet(new PropertyDefaultFacetViaMethod(method, property, getSpecificationLoader(), getAdapterManager()));
     }
 
     // ///////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/disabled/fromimmutable/DisabledFacetForPropertyDerivedFromImmutableTypeFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/disabled/fromimmutable/DisabledFacetForPropertyDerivedFromImmutableTypeFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/disabled/fromimmutable/DisabledFacetForPropertyDerivedFromImmutableTypeFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/disabled/fromimmutable/DisabledFacetForPropertyDerivedFromImmutableTypeFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -40,7 +40,7 @@ public class DisabledFacetForPropertyDer
 
     @Override
     public void process(final ProcessMethodContext processMethodContext) {
-        final ObjectSpecification spec = getSpecificationLookup().loadSpecification(processMethodContext.getMethod().getDeclaringClass());
+        final ObjectSpecification spec = getSpecificationLoader().loadSpecification(processMethodContext.getMethod().getDeclaringClass());
         if (spec.containsDoOpFacet(ImmutableFacet.class)) {
             final ImmutableFacet immutableFacet = spec.getFacet(ImmutableFacet.class);
             final FacetedMethod facetHolder = processMethodContext.getFacetHolder();

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/typicallen/fromtype/TypicalLengthFacetForPropertyDerivedFromTypeFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/typicallen/fromtype/TypicalLengthFacetForPropertyDerivedFromTypeFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/typicallen/fromtype/TypicalLengthFacetForPropertyDerivedFromTypeFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/typicallen/fromtype/TypicalLengthFacetForPropertyDerivedFromTypeFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -48,7 +48,7 @@ public class TypicalLengthFacetForProper
     }
 
     private TypicalLengthFacet getTypicalLengthFacet(final Class<?> type) {
-        final ObjectSpecification paramTypeSpec = getSpecificationLookup().loadSpecification(type);
+        final ObjectSpecification paramTypeSpec = getSpecificationLoader().loadSpecification(type);
         return paramTypeSpec.getFacet(TypicalLengthFacet.class);
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/maskannot/MaskAnnotationForPropertyFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/maskannot/MaskAnnotationForPropertyFacetFactory.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/maskannot/MaskAnnotationForPropertyFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/maskannot/MaskAnnotationForPropertyFacetFactory.java Thu Sep 20 11:05:45 2012
@@ -84,7 +84,7 @@ public class MaskAnnotationForPropertyFa
         }
         FacetUtil.addFacet(maskFacet);
 
-        final ObjectSpecification type = getSpecificationLookup().loadSpecification(cls);
+        final ObjectSpecification type = getSpecificationLoader().loadSpecification(cls);
         final TitleFacet underlyingTitleFacet = type.getFacet(TitleFacet.class);
         if (underlyingTitleFacet != null) {
             final TitleFacet titleFacet = new TitleFacetBasedOnMask(maskFacet, underlyingTitleFacet);

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/container/DomainObjectContainerResolve.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/container/DomainObjectContainerResolve.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/container/DomainObjectContainerResolve.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/container/DomainObjectContainerResolve.java Thu Sep 20 11:05:45 2012
@@ -22,8 +22,10 @@ package org.apache.isis.runtimes.dflt.ru
 import org.apache.isis.applib.bookmarks.Bookmark;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
+import org.apache.isis.core.metamodel.adapter.oid.TypedOid;
 import org.apache.isis.core.metamodel.services.ServicesInjectorSpi;
 import org.apache.isis.core.metamodel.spec.ObjectSpecId;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
@@ -50,7 +52,7 @@ public class DomainObjectContainerResolv
     }
 
     public Object lookup(final Bookmark bookmark) {
-        RootOid oid = RootOidDefault.create(ObjectSpecId.of(bookmark.getObjectType()), bookmark.getIdentifier());
+        RootOid oid = RootOidDefault.create(bookmark);
         final ObjectAdapter adapter = adapterFor(oid);
         if(adapter == null) {
             return null;
@@ -61,6 +63,21 @@ public class DomainObjectContainerResolv
         return adapter.getObject();
     }
 
+    public Bookmark bookmarkFor(Object domainObject) {
+        final ObjectAdapter adapter = adapterFor(domainObject);
+        final Oid oid = adapter.getOid();
+        if(oid == null) {
+            // values cannot be bookmarked
+            return null;
+        }
+        if(!(oid instanceof RootOid)) {
+            // must be root
+            return null;
+        }
+        final RootOid rootOid = (RootOid) oid;
+        return rootOid.asBookmark();
+    }
+
     public void resolve(final Object parent) {
         final ObjectAdapter adapter = adapterFor(parent);
         if (adapter.canTransitionToResolving()) {
@@ -94,4 +111,5 @@ public class DomainObjectContainerResolv
         return getPersistenceSession().getAdapterManager();
     }
 
+
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/internal/RuntimeContextFromSession.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/internal/RuntimeContextFromSession.java?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/internal/RuntimeContextFromSession.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/internal/RuntimeContextFromSession.java Thu Sep 20 11:05:45 2012
@@ -76,7 +76,7 @@ public class RuntimeContextFromSession e
     private final ObjectInstantiator objectInstantiator;
     private final ObjectPersistor objectPersistor;
     private final ServicesProvider servicesProvider;
-    private final ServicesInjector dependencyInjector;
+    private final ServicesInjector servicesInjector;
     private final QuerySubmitter querySubmitter;
     private final DomainObjectServices domainObjectServices;
     private final LocalizationProviderAbstract localizationProvider;
@@ -195,6 +195,12 @@ public class RuntimeContextFromSession e
                 return new DomainObjectContainerResolve().lookup(bookmark);
             }
 
+
+            @Override
+            public Bookmark bookmarkFor(Object domainObject) {
+                return new DomainObjectContainerResolve().bookmarkFor(domainObject);
+            }
+
             @Override
             public void resolve(final Object parent) {
                 new DomainObjectContainerResolve().resolve(parent);
@@ -240,7 +246,6 @@ public class RuntimeContextFromSession e
                 return RuntimeContextFromSession.this.getPropertyNames();
             }
 
-
         };
         this.querySubmitter = new QuerySubmitterAbstract() {
 
@@ -257,7 +262,7 @@ public class RuntimeContextFromSession e
                 return list.size() > 0 ? list.get(0) : null;
             }
         };
-        this.dependencyInjector = new ServicesInjector() {
+        this.servicesInjector = new ServicesInjector() {
 
             @Override
             public void injectServicesInto(final Object object) {
@@ -268,7 +273,12 @@ public class RuntimeContextFromSession e
             public void injectServicesInto(List<Object> objects) {
                 getPersistenceSession().getServicesInjector().injectServicesInto(objects);
             }
-            
+
+            @Override
+            public Object lookupService(Class<?> serviceClass) {
+                return getPersistenceSession().getServicesInjector().lookupService(serviceClass);
+            }
+
             @Override
             public void injectInto(Object candidate) {
                 if (ServicesInjectorAware.class.isAssignableFrom(candidate.getClass())) {
@@ -332,7 +342,7 @@ public class RuntimeContextFromSession e
 
     @Override
     public ServicesInjector getDependencyInjector() {
-        return dependencyInjector;
+        return servicesInjector;
     }
 
     @Override

Modified: incubator/isis/trunk/framework/viewer/wicket/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/pom.xml?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/pom.xml (original)
+++ incubator/isis/trunk/framework/viewer/wicket/pom.xml Thu Sep 20 11:05:45 2012
@@ -41,10 +41,7 @@
 		<wicket.version>6.0.0</wicket.version>
 		<wicketstuff.version>6.0.0</wicketstuff.version>
 
-<!-- 
-		<wicket.version>1.4.12</wicket.version>
-		<wicketstuff.version>1.4.12</wicketstuff.version>
--->
+		<wicket-select2.version>wicket6-SNAPSHOT</wicket-select2.version>
 
         <docbkxGuideTitle>Apache Isis Wicket Viewer</docbkxGuideTitle>
         <docbkxGuideSubTitle>Customization, Configuration and Deployment Guide</docbkxGuideSubTitle>
@@ -221,27 +218,14 @@
 				<version>${wicket.version}</version>
 			</dependency>
 
-            <!-- WicketStuff -->
-            <!-- 
-			<dependency>
-				<groupId>org.wicketstuff</groupId>
-				<artifactId>scriptaculous</artifactId>
-				<version>${wicketstuff.version}</version>
-			</dependency>
-            -->
-			<dependency>
-				<groupId>org.wicketstuff</groupId>
-				<artifactId>objectautocomplete</artifactId>
-				<version>${wicketstuff.version}</version>
-			</dependency>
 
+            <!-- Wicket-Select2 -->
 			<dependency>
-				<groupId>org.wicketstuff</groupId>
-				<artifactId>calendarviews</artifactId>
-				<version>${wicketstuff.version}</version>
+			    <groupId>com.vaynberg.wicket.select2</groupId>
+			    <artifactId>wicket-select2</artifactId>
+			    <version>${wicket-select2.version}</version>
 			</dependency>
 
-
 			<!-- Other -->
 			<dependency>
 				<groupId>org.slf4j</groupId>

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/pom.xml?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/pom.xml (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/pom.xml Thu Sep 20 11:05:45 2012
@@ -76,6 +76,11 @@
 
 		<dependency>
 			<groupId>org.apache.wicket</groupId>
+			<artifactId>wicket-core</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.wicket</groupId>
 			<artifactId>wicket-extensions</artifactId>
 		</dependency>
 
@@ -89,18 +94,10 @@
 			<artifactId>wicket-auth-roles</artifactId>
 		</dependency>
 
-<!-- 
 		<dependency>
-			<groupId>org.wicketstuff</groupId>
-			<artifactId>scriptaculous</artifactId>
+		    <groupId>com.vaynberg.wicket.select2</groupId>
+		    <artifactId>wicket-select2</artifactId>
 		</dependency>
--->
-<!-- 
-		<dependency>
-			<groupId>org.wicketstuff</groupId>
-			<artifactId>objectautocomplete</artifactId>
-		</dependency>
- -->
 
 		<dependency>
 			<groupId>org.apache.wicket</groupId>
@@ -126,7 +123,6 @@
 			<artifactId>jmock-legacy</artifactId>
 			<scope>test</scope>
 		</dependency>
-
 	</dependencies>
 
 </project>

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTable.css
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTable.css?rev=1387969&r1=1387968&r2=1387969&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTable.css (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTable.css Thu Sep 20 11:05:45 2012
@@ -79,6 +79,41 @@ table.collectionContentsAsAjaxTable capt
 }
 
 table.collectionContentsAsAjaxTable input:disabled {
-	background-color: white;
+	background-color: transparent;
 	border: none;
-}
\ No newline at end of file
+}
+
+table.collectionContentsAsAjaxTable tbody td,table.collectionContentsAsAjaxTable thead th {
+	border-left: 1px #DDD solid;
+	border-right: 1px #DDD solid;
+}
+
+table.collectionContentsAsAjaxTable tr.navigation div.navigatorLabel {
+	display: inline;
+}
+
+table.collectionContentsAsAjaxTable tr.navigation div.navigatorLabel > div {
+	display: inline;
+}
+
+table.collectionContentsAsAjaxTable tr.navigation div.navigator {
+	display: inline;
+}
+
+table.collectionContentsAsAjaxTable tr.navigation div.navigator > div {
+	display: inline;
+	float: right;
+}
+
+table.collectionContentsAsAjaxTable .navigator .first,
+table.collectionContentsAsAjaxTable .navigator .prev,
+table.collectionContentsAsAjaxTable .navigator .next, 
+table.collectionContentsAsAjaxTable .navigator .last,
+table.collectionContentsAsAjaxTable .navigator .goto
+{
+	margin-left: 0.5em;
+}
+
+table.collectionContentsAsAjaxTable .navigator .goto em {
+	background-color: #DDD;
+}



Mime
View raw message