incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1034285 - in /incubator/isis/trunk: alternatives/embedded/src/main/java/org/apache/isis/alternatives/embedded/ alternatives/progmodel/wrapper/metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/ alternatives/progmodel/wrapp...
Date Fri, 12 Nov 2010 08:02:33 GMT
Author: danhaywood
Date: Fri Nov 12 08:02:32 2010
New Revision: 1034285

URL: http://svn.apache.org/viewvc?rev=1034285&view=rev
Log:
fixes to APT for wrapper progmodel; changed name of DomainObjectContainerHeadlessWrapper ->
DomainObjectContainerWrapperFactory

Added:
    incubator/isis/trunk/alternatives/progmodel/wrapper/metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/DomainObjectContainerWrapperFactory.java
      - copied, changed from r1034020, incubator/isis/trunk/alternatives/progmodel/wrapper/metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/DomainObjectContainerHeadlessWrapper.java
Removed:
    incubator/isis/trunk/alternatives/progmodel/wrapper/metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/DomainObjectContainerHeadlessWrapper.java
Modified:
    incubator/isis/trunk/alternatives/embedded/src/main/java/org/apache/isis/alternatives/embedded/IsisMetaModel.java
    incubator/isis/trunk/alternatives/progmodel/wrapper/src/site/apt/index.apt
    incubator/isis/trunk/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/InMemoryPersistenceMechanismInstallerWithinJunit.java

Modified: incubator/isis/trunk/alternatives/embedded/src/main/java/org/apache/isis/alternatives/embedded/IsisMetaModel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/alternatives/embedded/src/main/java/org/apache/isis/alternatives/embedded/IsisMetaModel.java?rev=1034285&r1=1034284&r2=1034285&view=diff
==============================================================================
--- incubator/isis/trunk/alternatives/embedded/src/main/java/org/apache/isis/alternatives/embedded/IsisMetaModel.java
(original)
+++ incubator/isis/trunk/alternatives/embedded/src/main/java/org/apache/isis/alternatives/embedded/IsisMetaModel.java
Fri Nov 12 08:02:32 2010
@@ -56,7 +56,7 @@ import org.apache.isis.defaults.progmode
 import org.apache.isis.defaults.progmodel.ProgrammingModelFacetsJava5;
 import org.apache.isis.metamodel.specloader.classsubstitutor.ClassSubstitutorIdentity;
 import org.apache.isis.progmodel.wrapper.applib.WrapperFactory;
-import org.apache.isis.progmodel.wrapper.metamodel.DomainObjectContainerHeadlessWrapper;
+import org.apache.isis.progmodel.wrapper.metamodel.DomainObjectContainerWrapperFactory;
 import org.apache.isis.progmodel.wrapper.metamodel.internal.WrapperFactoryDefault;
 
 
@@ -128,7 +128,7 @@ public class IsisMetaModel implements Ap
 
 		services = createServices(serviceTypes);
 		runtimeContext = new RuntimeContextForEmbeddedMetaModel(context, services);
-		DomainObjectContainerDefault container = new DomainObjectContainerHeadlessWrapper();
+		DomainObjectContainerDefault container = new DomainObjectContainerWrapperFactory();
 
 		runtimeContext.injectInto(container);
 		runtimeContext.setContainer(container);

Copied: incubator/isis/trunk/alternatives/progmodel/wrapper/metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/DomainObjectContainerWrapperFactory.java
(from r1034020, incubator/isis/trunk/alternatives/progmodel/wrapper/metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/DomainObjectContainerHeadlessWrapper.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/alternatives/progmodel/wrapper/metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/DomainObjectContainerWrapperFactory.java?p2=incubator/isis/trunk/alternatives/progmodel/wrapper/metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/DomainObjectContainerWrapperFactory.java&p1=incubator/isis/trunk/alternatives/progmodel/wrapper/metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/DomainObjectContainerHeadlessWrapper.java&r1=1034020&r2=1034285&rev=1034285&view=diff
==============================================================================
--- incubator/isis/trunk/alternatives/progmodel/wrapper/metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/DomainObjectContainerHeadlessWrapper.java
(original)
+++ incubator/isis/trunk/alternatives/progmodel/wrapper/metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/DomainObjectContainerWrapperFactory.java
Fri Nov 12 08:02:32 2010
@@ -17,78 +17,79 @@
  *  under the License.
  */
 
+package org.apache.isis.progmodel.wrapper.metamodel;
 
-package org.apache.isis.progmodel.wrapper.metamodel;
-
-import java.util.List;
-
-import org.apache.isis.applib.DomainObjectContainer;
-import org.apache.isis.applib.events.InteractionEvent;
+import java.util.List;
+
+import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.applib.events.InteractionEvent;
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 import org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault;
 import org.apache.isis.progmodel.wrapper.applib.WrapperFactory;
 import org.apache.isis.progmodel.wrapper.applib.listeners.InteractionListener;
 import org.apache.isis.progmodel.wrapper.metamodel.internal.WrapperFactoryDefault;
-
-
-/**
- * A combined {@link DomainObjectContainer} and {@link WrapperFactory}.
- */
-public class DomainObjectContainerHeadlessWrapper extends DomainObjectContainerDefault implements
WrapperFactory {
-
-    private WrapperFactory wrapperFactoryDelegate;
-
-
-    // /////////////////////////////////////////////////////////////
-    // Views
-    // /////////////////////////////////////////////////////////////
-
-    public <T> T wrap(final T domainObject) {
-    	return wrapperFactoryDelegate.wrap(domainObject);
-    }
-
-    public <T> T wrap(final T domainObject, ExecutionMode mode) {
-    	return wrapperFactoryDelegate.wrap(domainObject, mode);
-    }
-
-    public boolean isWrapper(final Object possibleView) {
-    	return wrapperFactoryDelegate.isWrapper(possibleView);
-    }
-
-    // /////////////////////////////////////////////////////////////
-    // Listeners
-    // /////////////////////////////////////////////////////////////
-
-    public List<InteractionListener> getListeners() {
-        return wrapperFactoryDelegate.getListeners();
-    }
-
-    public boolean addInteractionListener(final InteractionListener listener) {
-        return wrapperFactoryDelegate.addInteractionListener(listener);
-    }
-
-    public boolean removeInteractionListener(final InteractionListener listener) {
-        return wrapperFactoryDelegate.removeInteractionListener(listener);
-    }
-
-    public void notifyListeners(final InteractionEvent interactionEvent) {
-    	wrapperFactoryDelegate.notifyListeners(interactionEvent);
-    }
-
-
-
-    // /////////////////////////////////////////////////////////////
-    // Dependencies (due to *Aware)
-    // /////////////////////////////////////////////////////////////
-
-    /**
-     * As per superclass, but also initializes the delegate {@link WrapperFactory}.
-     */
-    @Override
-    public void setRuntimeContext(RuntimeContext runtimeContext) {
-    	super.setRuntimeContext(runtimeContext);
-    	wrapperFactoryDelegate = new WrapperFactoryDefault(runtimeContext);
-    }
-
-
-}
+
+/**
+ * A combined {@link DomainObjectContainer} and {@link WrapperFactory}.
+ */
+public class DomainObjectContainerWrapperFactory extends DomainObjectContainerDefault implements
WrapperFactory {
+
+    private WrapperFactory wrapperFactoryDelegate;
+
+    // /////////////////////////////////////////////////////////////
+    // Views
+    // /////////////////////////////////////////////////////////////
+
+    @Override
+    public <T> T wrap(final T domainObject) {
+        return wrapperFactoryDelegate.wrap(domainObject);
+    }
+
+    @Override
+    public <T> T wrap(final T domainObject, ExecutionMode mode) {
+        return wrapperFactoryDelegate.wrap(domainObject, mode);
+    }
+
+    @Override
+    public boolean isWrapper(final Object possibleView) {
+        return wrapperFactoryDelegate.isWrapper(possibleView);
+    }
+
+    // /////////////////////////////////////////////////////////////
+    // Listeners
+    // /////////////////////////////////////////////////////////////
+
+    @Override
+    public List<InteractionListener> getListeners() {
+        return wrapperFactoryDelegate.getListeners();
+    }
+
+    @Override
+    public boolean addInteractionListener(final InteractionListener listener) {
+        return wrapperFactoryDelegate.addInteractionListener(listener);
+    }
+
+    @Override
+    public boolean removeInteractionListener(final InteractionListener listener) {
+        return wrapperFactoryDelegate.removeInteractionListener(listener);
+    }
+
+    @Override
+    public void notifyListeners(final InteractionEvent interactionEvent) {
+        wrapperFactoryDelegate.notifyListeners(interactionEvent);
+    }
+
+    // /////////////////////////////////////////////////////////////
+    // Dependencies (due to *Aware)
+    // /////////////////////////////////////////////////////////////
+
+    /**
+     * As per superclass, but also initializes the delegate {@link WrapperFactory}.
+     */
+    @Override
+    public void setRuntimeContext(RuntimeContext runtimeContext) {
+        super.setRuntimeContext(runtimeContext);
+        wrapperFactoryDelegate = new WrapperFactoryDefault(runtimeContext);
+    }
+
+}

Modified: incubator/isis/trunk/alternatives/progmodel/wrapper/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/alternatives/progmodel/wrapper/src/site/apt/index.apt?rev=1034285&r1=1034284&r2=1034285&view=diff
==============================================================================
--- incubator/isis/trunk/alternatives/progmodel/wrapper/src/site/apt/index.apt (original)
+++ incubator/isis/trunk/alternatives/progmodel/wrapper/src/site/apt/index.apt Fri Nov 12
08:02:32 2010
@@ -17,11 +17,14 @@
 
 
 
-Headless Programming Model
+Wrapper Programming Model
  
- The <headless> programming model allows one domain object to interact with another
<as if> through a viewer.  That is, 
- if a property or action is unusable, then the calling domain object will be receive an exception
indicating the fact.
+ The <wrapper> programming model allows a domain object to be "wrapped" so that when
another domain object interact with it,
+ it is <as if> through a viewer.  That is, if a property or action is unusable on the
wrapped domain object, then the 
+ calling domain object will be receive an exception indicating the fact.
  
- The headless programming model is provided as an implementation of [[NAME]]' <<<DomainObjectContainer>>>
interface.
- This can be downcast into <<<HeadlessViewer>>>, from which the domain
object is wrapped in cglib proxy.  This proxy
- implements the "see it, use it, do it" business rules.
+ The wrapper programming model is provided as an implementation of Isis' <<<DomainObjectContainer>>>
interface (in the
+ {{{../../../applib/index.html}applib}}.  
+ This can be downcast into a <<<WrapperFactory>>>, from which the domain
object is wrapped using a {{{http://cglib.sourceforge.net/}CgLib}} proxy.  
+ This proxy implements the checks to ensure that the wrapped object is visible, is not disabled,
and the interactoin is
+ valid ("see it, use it, do it").

Modified: incubator/isis/trunk/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/InMemoryPersistenceMechanismInstallerWithinJunit.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/InMemoryPersistenceMechanismInstallerWithinJunit.java?rev=1034285&r1=1034284&r2=1034285&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/InMemoryPersistenceMechanismInstallerWithinJunit.java
(original)
+++ incubator/isis/trunk/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/InMemoryPersistenceMechanismInstallerWithinJunit.java
Fri Nov 12 08:02:32 2010
@@ -22,7 +22,7 @@ package org.apache.isis.viewer.junit.int
 
 import org.apache.isis.applib.DomainObjectContainer;
 import org.apache.isis.core.metamodel.config.IsisConfiguration;
-import org.apache.isis.progmodel.wrapper.metamodel.DomainObjectContainerHeadlessWrapper;
+import org.apache.isis.progmodel.wrapper.metamodel.DomainObjectContainerWrapperFactory;
 import org.apache.isis.runtime.objectstore.inmemory.InMemoryPersistenceMechanismInstaller;
 
 public class InMemoryPersistenceMechanismInstallerWithinJunit extends InMemoryPersistenceMechanismInstaller
{
@@ -33,7 +33,7 @@ public class InMemoryPersistenceMechanis
     @Override
     protected DomainObjectContainer createContainer(
     		final IsisConfiguration configuration) {
-        return new DomainObjectContainerHeadlessWrapper();
+        return new DomainObjectContainerWrapperFactory();
     }
 
 }



Mime
View raw message