incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1396204 - in /incubator/isis/trunk/framework: core/commons/src/main/java/org/apache/isis/core/commons/lang/ core/commons/src/test/java/org/apache/isis/core/commons/lang/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/...
Date Tue, 09 Oct 2012 19:05:27 GMT
Author: danhaywood
Date: Tue Oct  9 19:05:25 2012
New Revision: 1396204

URL: http://svn.apache.org/viewvc?rev=1396204&view=rev
Log:
ISIS-274, ISIS-232

* allow AuthorizationManager, AuthenticationManager to be MetaModelRefiners
* in wicket, use "applicationName" in banner (overridable in IsisWicketModule)

Added:
    incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/Types.java
    incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest_getBuiltIn.java
      - copied, changed from r1395713, incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest.java
    incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/TypesTest_filteredList.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/ClassSubstitutorFactory.java
      - copied, changed from r1395713, incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/MetaModelRefiner.java
Removed:
    incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/authorization/AuthorizationFacetFactoryForDfltRuntime.java
Modified:
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/MetaModelRefiner.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModel.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModelAbstract.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorInstaller.java
    incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/AuthorizationManagerAbstract.java
    incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/AuthorizationManagerStandard.java
    incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/Authorizor.java
    incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/AuthorizorAbstract.java
    incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/JavaReflectorInstallerNoDecorators.java
    incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/DataNucleusPersistenceMechanismInstaller.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/PersistenceMechanismInstallerAbstract.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegate.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegating.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/IsisSystemFixturesHookAbstract.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/PersistenceSessionFactory.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemAbstract.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemUsingInstallers.java
    incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemDefault.java
    incubator/isis/trunk/framework/security/dflt/src/main/java/org/apache/isis/security/dflt/authorization/AuthorizorDefault.java
    incubator/isis/trunk/framework/security/file/src/main/java/org/apache/isis/security/file/authorization/FileAuthorizor.java
    incubator/isis/trunk/framework/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizor.java
    incubator/isis/trunk/framework/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizor.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanelFactory.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.html
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketModule.java

Added: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/Types.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/Types.java?rev=1396204&view=auto
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/Types.java (added)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/lang/Types.java Tue Oct  9 19:05:25 2012
@@ -0,0 +1,40 @@
+package org.apache.isis.core.commons.lang;
+
+import java.util.Collection;
+import java.util.List;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Collections2;
+
+public final class Types {
+    
+    private Types(){}
+
+    public static <T> Collection<T> filtered(final List<Object> candidates, final Class<T> type) {
+        return Collections2.transform(
+                    Collections2.filter(candidates, Types.isOfType(type)),
+                Types.castTo(type));
+    }
+
+    public static final <T> Predicate<Object> isOfType(final Class<T> type) {
+        return new Predicate<Object>() {
+            @Override
+            public boolean apply(Object input) {
+                return type.isAssignableFrom(input.getClass());
+            }
+        };
+    }
+
+    public static <T> Function<Object, T> castTo(final Class<T> type) {
+        return new Function<Object, T>() {
+            @SuppressWarnings("unchecked")
+            @Override
+            public T apply(final Object input) {
+                return (T) input;
+            }
+        };
+    }
+
+
+}

Copied: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest_getBuiltIn.java (from r1395713, incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest_getBuiltIn.java?p2=incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest_getBuiltIn.java&p1=incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest.java&r1=1395713&r2=1396204&rev=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/JavaClassUtilsTest_getBuiltIn.java Tue Oct  9 19:05:25 2012
@@ -21,27 +21,9 @@ package org.apache.isis.core.commons.lan
 
 import static org.junit.Assert.assertEquals;
 
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 
-@RunWith(JMock.class)
-public class JavaClassUtilsTest {
-
-    @SuppressWarnings("unused")
-    private final Mockery context = new JUnit4Mockery();
-
-    @Before
-    public void setUp() throws Exception {
-    }
-
-    @After
-    public void tearDown() throws Exception {
-    }
+public class JavaClassUtilsTest_getBuiltIn {
 
     @Test
     public void voidBuiltIns() throws ClassNotFoundException {

Added: incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/TypesTest_filteredList.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/TypesTest_filteredList.java?rev=1396204&view=auto
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/TypesTest_filteredList.java (added)
+++ incubator/isis/trunk/framework/core/commons/src/test/java/org/apache/isis/core/commons/lang/TypesTest_filteredList.java Tue Oct  9 19:05:25 2012
@@ -0,0 +1,72 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.commons.lang;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class TypesTest_filteredList {
+
+    private List<Object> shapes;
+
+    abstract static class Shape {}
+    static class Square extends Shape {}
+    static class Circle extends Shape {}
+    static class Rectangle extends Shape {}
+
+    @Before
+    public void setUp() throws Exception {
+        shapes = Arrays.<Object>asList(new Square(), new Circle(), new Square());
+    }
+    
+    @Test
+    public void empty() throws ClassNotFoundException {
+        final Collection<Object> filtered = Types.filtered(Collections.emptyList(), Object.class);
+        assertThat(filtered.isEmpty(), is(true));
+    }
+
+    @Test
+    public void subtype() throws ClassNotFoundException {
+        final Collection<Square> filtered = Types.filtered(shapes, Square.class);
+        assertThat(filtered.size(), is(2));
+    }
+
+    @Test
+    public void supertype() throws ClassNotFoundException {
+        final Collection<Shape> filtered = Types.filtered(shapes, Shape.class);
+        assertThat(filtered.size(), is(3));
+    }
+
+    @Test
+    public void subtype_whenNonMatching() throws ClassNotFoundException {
+        final Collection<Rectangle> filtered = Types.filtered(shapes, Rectangle.class);
+        assertThat(filtered.size(), is(0));
+    }
+
+}

Copied: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/ClassSubstitutorFactory.java (from r1395713, incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/MetaModelRefiner.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/ClassSubstitutorFactory.java?p2=incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/ClassSubstitutorFactory.java&p1=incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/MetaModelRefiner.java&r1=1395713&r2=1396204&rev=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/MetaModelRefiner.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/ClassSubstitutorFactory.java Tue Oct  9 19:05:25 2012
@@ -29,12 +29,7 @@ import org.apache.isis.core.metamodel.sp
 /**
  * Provides the ability for components to inform/alter/adjust/refine the metamodel.
  */
-public interface MetaModelRefiner {
+public interface ClassSubstitutorFactory {
 
     ClassSubstitutor createClassSubstitutor(IsisConfiguration configuration);
-    
-    MetaModelValidator refineMetaModelValidator(MetaModelValidatorComposite baseMetaModelValidator, IsisConfiguration configuration);
-    
-    ProgrammingModel refineProgrammingModel(ProgrammingModel baseProgrammingModel, IsisConfiguration configuration);
-    
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/MetaModelRefiner.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/MetaModelRefiner.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/MetaModelRefiner.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/MetaModelRefiner.java Tue Oct  9 19:05:25 2012
@@ -21,8 +21,6 @@ package org.apache.isis.core.metamodel.f
 
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.progmodel.ProgrammingModel;
-import org.apache.isis.core.metamodel.specloader.classsubstitutor.ClassSubstitutor;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidator;
 import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorComposite;
 
 
@@ -30,11 +28,8 @@ import org.apache.isis.core.metamodel.sp
  * Provides the ability for components to inform/alter/adjust/refine the metamodel.
  */
 public interface MetaModelRefiner {
-
-    ClassSubstitutor createClassSubstitutor(IsisConfiguration configuration);
-    
-    MetaModelValidator refineMetaModelValidator(MetaModelValidatorComposite baseMetaModelValidator, IsisConfiguration configuration);
     
-    ProgrammingModel refineProgrammingModel(ProgrammingModel baseProgrammingModel, IsisConfiguration configuration);
+    void refineMetaModelValidator(MetaModelValidatorComposite metaModelValidator, IsisConfiguration configuration);
+    void refineProgrammingModel(ProgrammingModel programmingModel, IsisConfiguration configuration);
     
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModel.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModel.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModel.java Tue Oct  9 19:05:25 2012
@@ -32,4 +32,6 @@ public interface ProgrammingModel {
     void addFactory(Class<? extends FacetFactory> facetFactoryClass);
 
     void removeFactory(Class<? extends FacetFactory> facetFactoryClass);
+
+    void addFactory(FacetFactory facetFactory);
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModelAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModelAbstract.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModelAbstract.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModelAbstract.java Tue Oct  9 19:05:25 2012
@@ -23,13 +23,15 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
+import com.google.common.collect.Lists;
+
 import org.apache.isis.core.commons.factory.InstanceUtil;
 import org.apache.isis.core.metamodel.facets.FacetFactory;
 
 public abstract class ProgrammingModelAbstract implements ProgrammingModel {
 
-    private final List<FacetFactory> facetFactories = new ArrayList<FacetFactory>();
-    private final List<Class<? extends FacetFactory>> facetFactoryClasses = new ArrayList<Class<? extends FacetFactory>>();
+    private final List<FacetFactory> facetFactories = Lists.newArrayList();
+    private final List<Object> facetFactoryInstancesOrClasses = Lists.newArrayList();
 
     @Override
     public final List<FacetFactory> getList() {
@@ -38,20 +40,35 @@ public abstract class ProgrammingModelAb
 
     @Override
     public final void addFactory(final Class<? extends FacetFactory> factoryClass) {
-        facetFactoryClasses.add(factoryClass);
+        facetFactoryInstancesOrClasses.add(factoryClass);
     }
 
     @Override
     public final void removeFactory(final Class<? extends FacetFactory> factoryClass) {
-        facetFactoryClasses.remove(factoryClass);
+        facetFactoryInstancesOrClasses.remove(factoryClass);
     }
 
     @Override
     public void init() {
-        for (final Class<? extends FacetFactory> factoryClass : facetFactoryClasses) {
-            final FacetFactory facetFactory = (FacetFactory) InstanceUtil.createInstance(factoryClass);
+        for (final Object factoryInstanceOrClass : facetFactoryInstancesOrClasses) {
+            final FacetFactory facetFactory = asFacetFactory(factoryInstanceOrClass);
             facetFactories.add(facetFactory);
         }
     }
 
+    private static FacetFactory asFacetFactory(final Object factoryInstanceOrClass) {
+        if(factoryInstanceOrClass instanceof FacetFactory) {
+            return (FacetFactory) factoryInstanceOrClass;
+        } else {
+            @SuppressWarnings("unchecked")
+            Class<? extends FacetFactory> factoryClass = (Class<? extends FacetFactory>) factoryInstanceOrClass;
+            return (FacetFactory) InstanceUtil.createInstance(factoryClass);
+        }
+    }
+
+    @Override
+    public void addFactory(FacetFactory facetFactory) {
+        facetFactoryInstancesOrClasses.add(facetFactory);
+    }
+
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorInstaller.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorInstaller.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorInstaller.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorInstaller.java Tue Oct  9 19:05:25 2012
@@ -19,7 +19,10 @@
 
 package org.apache.isis.core.metamodel.specloader;
 
+import java.util.Collection;
+
 import org.apache.isis.core.commons.components.Installer;
+import org.apache.isis.core.metamodel.facetapi.ClassSubstitutorFactory;
 import org.apache.isis.core.metamodel.facetapi.MetaModelRefiner;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 
@@ -30,7 +33,7 @@ public interface ObjectReflectorInstalle
 
     static String TYPE = "reflector";
 
-    SpecificationLoaderSpi createReflector(MetaModelRefiner programmingModelAdjuster);
+    SpecificationLoaderSpi createReflector(ClassSubstitutorFactory classSubstitutorFactory, Collection<MetaModelRefiner> metaModelRefiners);
 
     void addFacetDecoratorInstaller(final FacetDecoratorInstaller decoratorInstaller);
 

Modified: incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/AuthorizationManagerAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/AuthorizationManagerAbstract.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/AuthorizationManagerAbstract.java (original)
+++ incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/AuthorizationManagerAbstract.java Tue Oct  9 19:05:25 2012
@@ -20,8 +20,9 @@
 package org.apache.isis.core.runtime.authorization;
 
 import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.metamodel.facetapi.MetaModelRefiner;
 
-public abstract class AuthorizationManagerAbstract implements AuthorizationManager {
+public abstract class AuthorizationManagerAbstract implements AuthorizationManager, MetaModelRefiner {
 
     private final IsisConfiguration configuration;
 

Modified: incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/AuthorizationManagerStandard.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/AuthorizationManagerStandard.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/AuthorizationManagerStandard.java (original)
+++ incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/AuthorizationManagerStandard.java Tue Oct  9 19:05:25 2012
@@ -23,6 +23,8 @@ import org.apache.isis.applib.Identifier
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.progmodel.ProgrammingModel;
+import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorComposite;
 import org.apache.isis.core.runtime.authorization.AuthorizationManagerAbstract;
 
 public class AuthorizationManagerStandard extends AuthorizationManagerAbstract {
@@ -55,6 +57,16 @@ public class AuthorizationManagerStandar
             public boolean isUsableInRole(final String role, final Identifier identifier) {
                 return true;
             }
+
+            @Override
+            public boolean isVisibleInAnyRole(Identifier identifier) {
+                return true;
+            }
+
+            @Override
+            public boolean isUsableInAnyRole(Identifier identifier) {
+                return true;
+            }
         };
     }
 
@@ -81,6 +93,9 @@ public class AuthorizationManagerStandar
         if (isPerspectiveMember(identifier)) {
             return true;
         }
+        if (authorizor.isUsableInAnyRole(identifier)) {
+            return true;
+        }
         for (final String roleName : session.getRoles()) {
             if (authorizor.isUsableInRole(roleName, identifier)) {
                 return true;
@@ -94,6 +109,9 @@ public class AuthorizationManagerStandar
         if (isPerspectiveMember(identifier)) {
             return true;
         }
+        if (authorizor.isVisibleInAnyRole(identifier)) {
+            return true;
+        }
         for (final String roleName : session.getRoles()) {
             if (authorizor.isVisibleInRole(roleName, identifier)) {
                 return true;
@@ -106,6 +124,22 @@ public class AuthorizationManagerStandar
         return (identifier.getClassName().equals(""));
     }
 
+
+    // //////////////////////////////////////////////////
+    // MetaModelRefiner impl
+    // //////////////////////////////////////////////////
+
+    @Override
+    public void refineMetaModelValidator(MetaModelValidatorComposite baseMetaModelValidator, IsisConfiguration configuration) {
+        // no-op
+    }
+
+    @Override
+    public void refineProgrammingModel(ProgrammingModel baseProgrammingModel, IsisConfiguration configuration) {
+        final AuthorizationFacetFactory facetFactory = new AuthorizationFacetFactory(this);
+        baseProgrammingModel.addFactory(facetFactory);
+    }
+
     // //////////////////////////////////////////////////
     // Dependencies (injected)
     // //////////////////////////////////////////////////
@@ -113,4 +147,5 @@ public class AuthorizationManagerStandar
     protected void setAuthorizor(final Authorizor authorisor) {
         this.authorizor = authorisor;
     }
+
 }

Modified: incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/Authorizor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/Authorizor.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/Authorizor.java (original)
+++ incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/Authorizor.java Tue Oct  9 19:05:25 2012
@@ -24,14 +24,18 @@ import org.apache.isis.core.commons.comp
 
 public interface Authorizor extends ApplicationScopedComponent {
 
+    public boolean isVisibleInAnyRole(final Identifier identifier);
+    public boolean isUsableInAnyRole(final Identifier identifier);
+
     /**
      * Checked for each of the user's roles.
      */
-    public boolean isVisibleInRole(final String user, final Identifier identifier);
+    public boolean isVisibleInRole(final String role, final Identifier identifier);
 
     /**
      * Checked for each of the user's roles.
      */
     public boolean isUsableInRole(final String role, final Identifier identifier);
 
+
 }

Modified: incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/AuthorizorAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/AuthorizorAbstract.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/AuthorizorAbstract.java (original)
+++ incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authorization/standard/AuthorizorAbstract.java Tue Oct  9 19:05:25 2012
@@ -19,6 +19,7 @@
 
 package org.apache.isis.core.runtime.authorization.standard;
 
+import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 
 public abstract class AuthorizorAbstract implements Authorizor {
@@ -33,4 +34,14 @@ public abstract class AuthorizorAbstract
         return configuration;
     }
 
+    @Override
+    public boolean isVisibleInAnyRole(Identifier identifier) {
+        return false;
+    }
+
+    @Override
+    public boolean isUsableInAnyRole(Identifier identifier) {
+        return false;
+    }
+
 }

Modified: incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/JavaReflectorInstallerNoDecorators.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/JavaReflectorInstallerNoDecorators.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/JavaReflectorInstallerNoDecorators.java (original)
+++ incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/JavaReflectorInstallerNoDecorators.java Tue Oct  9 19:05:25 2012
@@ -19,6 +19,7 @@
 
 package org.apache.isis.progmodels.dflt;
 
+import java.util.Collection;
 import java.util.Collections;
 import java.util.LinkedHashSet;
 import java.util.List;
@@ -33,6 +34,7 @@ import org.apache.isis.core.commons.conf
 import org.apache.isis.core.commons.config.InstallerAbstract;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.factory.InstanceUtil;
+import org.apache.isis.core.metamodel.facetapi.ClassSubstitutorFactory;
 import org.apache.isis.core.metamodel.facetapi.MetaModelRefiner;
 import org.apache.isis.core.metamodel.facetdecorator.FacetDecorator;
 import org.apache.isis.core.metamodel.facets.FacetFactory;
@@ -86,19 +88,21 @@ public class JavaReflectorInstallerNoDec
      * calling this.
      */
     @Override
-    public SpecificationLoaderSpi createReflector(final MetaModelRefiner metaModelRefiner) {
+    public SpecificationLoaderSpi createReflector(final ClassSubstitutorFactory classSubstitutorFactory, final Collection<MetaModelRefiner> metaModelRefiners) {
 
         final CollectionTypeRegistry collectionTypeRegistry = createCollectionTypeRegistry(getConfiguration());
         final SpecificationTraverser specificationTraverser = createSpecificationTraverser(getConfiguration());
         final MemberLayoutArranger memberLayoutArranger = createMemberLayoutArranger(getConfiguration());
         final Set<FacetDecorator> facetDecorators = createFacetDecorators(getConfiguration());
 
-        final ClassSubstitutor classSubstitutor = metaModelRefiner.createClassSubstitutor(getConfiguration());
+        final ClassSubstitutor classSubstitutor = classSubstitutorFactory.createClassSubstitutor(getConfiguration());
         
-        final ProgrammingModel baseProgrammingModel = createProgrammingModel(getConfiguration());
-        final ProgrammingModel programmingModel = metaModelRefiner.refineProgrammingModel(baseProgrammingModel, getConfiguration());
-        final MetaModelValidatorComposite baseMetaModelValidator = wrapped(createMetaModelValidator(getConfiguration()));
-        final MetaModelValidator metaModelValidator = metaModelRefiner.refineMetaModelValidator(baseMetaModelValidator, getConfiguration());
+        ProgrammingModel programmingModel = createProgrammingModel(getConfiguration());
+        MetaModelValidatorComposite metaModelValidator = asComposite(createMetaModelValidator(getConfiguration()));
+        for (MetaModelRefiner metaModelRefiner : metaModelRefiners) {
+            metaModelRefiner.refineProgrammingModel(programmingModel, getConfiguration());
+            metaModelRefiner.refineMetaModelValidator(metaModelValidator, getConfiguration());
+        }
 
         final ObjectReflectorDefault reflector = doCreateReflector(getConfiguration(), classSubstitutor, collectionTypeRegistry, specificationTraverser, memberLayoutArranger, programmingModel, facetDecorators, metaModelValidator);
         return reflector;
@@ -223,7 +227,7 @@ public class JavaReflectorInstallerNoDec
         return InstanceUtil.createInstance(metaModelValidatorClassName, MetaModelValidator.class);
     }
 
-    private MetaModelValidatorComposite wrapped(MetaModelValidator baseMetaModelValidator) {
+    private MetaModelValidatorComposite asComposite(MetaModelValidator baseMetaModelValidator) {
         final MetaModelValidatorComposite metaModelValidatorComposite = new MetaModelValidatorComposite();
         metaModelValidatorComposite.add(baseMetaModelValidator);
         return metaModelValidatorComposite;

Modified: incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java (original)
+++ incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java Tue Oct  9 19:05:25 2012
@@ -19,6 +19,7 @@
 
 package org.apache.isis.progmodels.dflt;
 
+import org.apache.isis.core.metamodel.facets.FacetFactory;
 import org.apache.isis.core.metamodel.progmodel.ProgrammingModelAbstract;
 import org.apache.isis.core.progmodel.facets.actions.debug.annotation.DebugAnnotationFacetFactory;
 import org.apache.isis.core.progmodel.facets.actions.defaults.method.ActionDefaultsFacetFactory;
@@ -429,4 +430,5 @@ public class ProgrammingModelFacetsJava5
         addFactory(FacetsAnnotationFacetFactory.class);
     }
 
+
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/DataNucleusPersistenceMechanismInstaller.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/DataNucleusPersistenceMechanismInstaller.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/DataNucleusPersistenceMechanismInstaller.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/DataNucleusPersistenceMechanismInstaller.java Tue Oct  9 19:05:25 2012
@@ -156,15 +156,12 @@ public class DataNucleusPersistenceMecha
     }
 
     @Override
-    public ProgrammingModel refineProgrammingModel(ProgrammingModel baseProgrammingModel, IsisConfiguration configuration) {
-
-        addJdoFacetFactories(baseProgrammingModel);
-        addDataNucleusFacetFactories(baseProgrammingModel);
-
-        return baseProgrammingModel;
+    public void refineProgrammingModel(ProgrammingModel programmingModel, IsisConfiguration configuration) {
+        addJdoFacetFactoriesTo(programmingModel);
+        addDataNucleusFacetFactoriesTo(programmingModel);
     }
 
-    private void addJdoFacetFactories(ProgrammingModel baseProgrammingModel) {
+    private void addJdoFacetFactoriesTo(ProgrammingModel baseProgrammingModel) {
         baseProgrammingModel.addFactory(JdoPersistenceCapableAnnotationFacetFactory.class);
         baseProgrammingModel.addFactory(JdoDatastoreIdentityAnnotationFacetFactory.class);
         baseProgrammingModel.addFactory(JdoEmbeddedOnlyAnnotationFacetFactory.class);
@@ -178,14 +175,14 @@ public class DataNucleusPersistenceMecha
         baseProgrammingModel.addFactory(AuditableMarkerInterfaceFacetFactory.class);
     }
 
-    private void addDataNucleusFacetFactories(ProgrammingModel baseProgrammingModel) {
+    private void addDataNucleusFacetFactoriesTo(ProgrammingModel baseProgrammingModel) {
         baseProgrammingModel.addFactory(RemoveJdoEnhancementTypesFacetFactory.class);
         baseProgrammingModel.addFactory(RemoveJdoPrefixedMethodsFacetFactory.class);
     }
 
     @Override
-    public MetaModelValidator refineMetaModelValidator(MetaModelValidatorComposite baseMetaModelValidator, IsisConfiguration configuration) {
-        return baseMetaModelValidator.add(new JdoMetaModelValidatorLeaf());
+    public void refineMetaModelValidator(MetaModelValidatorComposite metaModelValidator, IsisConfiguration configuration) {
+        metaModelValidator.add(new JdoMetaModelValidatorLeaf());
     }
 
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/PersistenceMechanismInstallerAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/PersistenceMechanismInstallerAbstract.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/PersistenceMechanismInstallerAbstract.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/PersistenceMechanismInstallerAbstract.java Tue Oct  9 19:05:25 2012
@@ -200,20 +200,22 @@ public abstract class PersistenceMechani
      * By default, just returns the provided {@link ProgrammingModel}.
      */
     @Override
-    public ProgrammingModel refineProgrammingModel(ProgrammingModel baseProgrammingModel, IsisConfiguration configuration) {
-        return baseProgrammingModel;
+    public void refineProgrammingModel(ProgrammingModel baseProgrammingModel, IsisConfiguration configuration) {
+        // no-op
     }
     
     /**
      * Hook method to refine the {@link MetaModelValidator}.
      * 
      * <p>
-     * By default, just returns the provided {@link MetaModelValidator}.  Note that this is of type {@link MetaModelValidatorComposite} in order to
-     * allow new {@link MetaModelValidator}s to be easily {@link MetaModelValidatorComposite#add(MetaModelValidator) added}. 
+     * By default, just returns the provided {@link MetaModelValidatorComposite}.
+     * 
+     * <p>Note that this methods deals in terms of {@link MetaModelValidatorComposite} (rather than plain {@link MetaModelValidator}}s) 
+     * in order to allow new {@link MetaModelValidator}s to be easily {@link MetaModelValidatorComposite#add(MetaModelValidator) added}.
      */
     @Override
-    public MetaModelValidator refineMetaModelValidator(MetaModelValidatorComposite baseMetaModelValidator, IsisConfiguration configuration) {
-        return baseMetaModelValidator;
+    public void refineMetaModelValidator(MetaModelValidatorComposite baseMetaModelValidator, IsisConfiguration configuration) {
+        // no-op
     }
 
     /**

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegate.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegate.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegate.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegate.java Tue Oct  9 19:05:25 2012
@@ -23,6 +23,7 @@ import org.apache.isis.applib.DomainObje
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.config.IsisConfigurationBuilderAware;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapterFactory;
+import org.apache.isis.core.metamodel.facetapi.ClassSubstitutorFactory;
 import org.apache.isis.core.metamodel.facetapi.MetaModelRefiner;
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 import org.apache.isis.core.metamodel.services.ServicesInjectorSpi;
@@ -36,7 +37,7 @@ import org.apache.isis.runtimes.dflt.run
  * Creates a {@link PersistenceSession} on behalf of a
  * {@link PersistenceSessionFactory}.
  */
-public interface PersistenceSessionFactoryDelegate extends IsisConfigurationBuilderAware, MetaModelRefiner {
+public interface PersistenceSessionFactoryDelegate extends IsisConfigurationBuilderAware, ClassSubstitutorFactory, MetaModelRefiner {
 
 
     ///////////////////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegating.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegating.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegating.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegating.java Tue Oct  9 19:05:25 2012
@@ -200,13 +200,13 @@ public class PersistenceSessionFactoryDe
     }
 
     @Override
-    public MetaModelValidator refineMetaModelValidator(MetaModelValidatorComposite metaModelValidator, IsisConfiguration configuration) {
-        return persistenceSessionFactoryDelegate.refineMetaModelValidator(metaModelValidator, configuration);
+    public void refineMetaModelValidator(MetaModelValidatorComposite metaModelValidator, IsisConfiguration configuration) {
+        persistenceSessionFactoryDelegate.refineMetaModelValidator(metaModelValidator, configuration);
     }
 
     @Override
-    public ProgrammingModel refineProgrammingModel(ProgrammingModel baseProgrammingModel, IsisConfiguration configuration) {
-        return persistenceSessionFactoryDelegate.refineProgrammingModel(baseProgrammingModel, configuration);
+    public void refineProgrammingModel(ProgrammingModel baseProgrammingModel, IsisConfiguration configuration) {
+        persistenceSessionFactoryDelegate.refineProgrammingModel(baseProgrammingModel, configuration);
     }
 
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/IsisSystemFixturesHookAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/IsisSystemFixturesHookAbstract.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/IsisSystemFixturesHookAbstract.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/IsisSystemFixturesHookAbstract.java Tue Oct  9 19:05:25 2012
@@ -20,6 +20,7 @@
 package org.apache.isis.runtimes.dflt.runtime.system;
 
 import java.io.File;
+import java.util.Collection;
 import java.util.List;
 
 import org.apache.log4j.Logger;
@@ -29,6 +30,7 @@ import org.apache.isis.core.commons.conf
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.commons.debug.DebuggableWithTitle;
 import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
+import org.apache.isis.core.metamodel.facetapi.ClassSubstitutorFactory;
 import org.apache.isis.core.metamodel.facetapi.MetaModelRefiner;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.core.runtime.about.AboutIsis;
@@ -210,7 +212,7 @@ public abstract class IsisSystemFixtures
     // Reflector
     // ///////////////////////////////////////////
 
-    protected abstract SpecificationLoaderSpi obtainSpecificationLoaderSpi(DeploymentType deploymentType, MetaModelRefiner facetFactoriesProvider) throws IsisSystemException;
+    protected abstract SpecificationLoaderSpi obtainSpecificationLoaderSpi(DeploymentType deploymentType, ClassSubstitutorFactory classSubstitutorFactory, Collection<MetaModelRefiner> metaModelRefiners) throws IsisSystemException;
 
     // ///////////////////////////////////////////
     // PersistenceSessionFactory

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/PersistenceSessionFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/PersistenceSessionFactory.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/PersistenceSessionFactory.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/system/persistence/PersistenceSessionFactory.java Tue Oct  9 19:05:25 2012
@@ -23,6 +23,7 @@ import java.util.List;
 
 import org.apache.isis.core.commons.components.ApplicationScopedComponent;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapterFactory;
+import org.apache.isis.core.metamodel.facetapi.ClassSubstitutorFactory;
 import org.apache.isis.core.metamodel.facetapi.MetaModelRefiner;
 import org.apache.isis.core.metamodel.services.ServicesInjectorSpi;
 import org.apache.isis.runtimes.dflt.runtime.persistence.PersistenceSessionFactoryDelegate;
@@ -32,7 +33,7 @@ import org.apache.isis.runtimes.dflt.run
 /**
  * @see PersistenceSessionFactoryDelegate
  */
-public interface PersistenceSessionFactory extends MetaModelRefiner, ApplicationScopedComponent {
+public interface PersistenceSessionFactory extends ClassSubstitutorFactory, MetaModelRefiner, ApplicationScopedComponent {
 
     DeploymentType getDeploymentType();
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemAbstract.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemAbstract.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemAbstract.java Tue Oct  9 19:05:25 2012
@@ -19,8 +19,16 @@
 
 package org.apache.isis.runtimes.dflt.runtime.systemusinginstallers;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.List;
 
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Collections2;
+import com.google.common.collect.Lists;
+
 import org.apache.log4j.Logger;
 
 import org.apache.isis.applib.fixtures.LogonFixture;
@@ -28,8 +36,11 @@ import org.apache.isis.core.commons.comp
 import org.apache.isis.core.commons.components.Noop;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.commons.lang.Types;
 import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
+import org.apache.isis.core.metamodel.facetapi.MetaModelRefiner;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
+import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidator;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.authorization.AuthorizationManager;
 import org.apache.isis.core.runtime.imageloader.TemplateImageLoader;
@@ -175,8 +186,10 @@ public abstract class IsisSystemAbstract
         final AuthenticationManager authenticationManager = obtainAuthenticationManager(deploymentType);
         final AuthorizationManager authorizationManager = obtainAuthorizationManager(deploymentType);
         final TemplateImageLoader templateImageLoader = obtainTemplateImageLoader();
-        final SpecificationLoaderSpi reflector = obtainSpecificationLoaderSpi(deploymentType, persistenceSessionFactory);
         final OidMarshaller oidMarshaller = obtainOidMarshaller();
+        
+        final Collection<MetaModelRefiner> metaModelRefiners = refiners(authenticationManager, authorizationManager, templateImageLoader, persistenceSessionFactory);
+        final SpecificationLoaderSpi reflector = obtainSpecificationLoaderSpi(deploymentType, persistenceSessionFactory, metaModelRefiners);
 
         final List<Object> servicesList = obtainServices();
 
@@ -186,5 +199,10 @@ public abstract class IsisSystemAbstract
 
 		return new IsisSessionFactoryDefault(deploymentType, configuration, templateImageLoader, reflector, authenticationManager, authorizationManager, userProfileLoader, persistenceSessionFactory, servicesList, oidMarshaller);
     }
+
+    private static Collection<MetaModelRefiner> refiners(Object... possibleRefiners ) {
+        return Types.filtered(Arrays.asList(possibleRefiners), MetaModelRefiner.class);
+    }
+
     
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemUsingInstallers.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemUsingInstallers.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemUsingInstallers.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/systemusinginstallers/IsisSystemUsingInstallers.java Tue Oct  9 19:05:25 2012
@@ -25,11 +25,13 @@ import static org.hamcrest.CoreMatchers.
 import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.CoreMatchers.nullValue;
 
+import java.util.Collection;
 import java.util.List;
 
 import org.apache.log4j.Logger;
 
 import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.metamodel.facetapi.ClassSubstitutorFactory;
 import org.apache.isis.core.metamodel.facetapi.MetaModelRefiner;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.core.metamodel.specloader.ObjectReflectorInstaller;
@@ -201,7 +203,7 @@ public class IsisSystemUsingInstallers e
     }
 
     @Override
-    protected SpecificationLoaderSpi obtainSpecificationLoaderSpi(final DeploymentType deploymentType, final MetaModelRefiner programmingModelAdjuster) throws IsisSystemException {
+    protected SpecificationLoaderSpi obtainSpecificationLoaderSpi(final DeploymentType deploymentType, final ClassSubstitutorFactory classSubstitutorFactory, final Collection<MetaModelRefiner> metaModelRefiners) throws IsisSystemException {
         if (reflectorInstaller == null) {
             final String fromCmdLine = getConfiguration().getString(SystemConstants.REFLECTOR_KEY);
             reflectorInstaller = installerLookup.reflectorInstaller(fromCmdLine);
@@ -211,7 +213,7 @@ public class IsisSystemUsingInstallers e
         // add in transaction support (if already in set then will be ignored)
         reflectorInstaller.addFacetDecoratorInstaller(installerLookup.getInstaller(TransactionFacetDecoratorInstaller.class));
 
-        final SpecificationLoaderSpi reflector = reflectorInstaller.createReflector(programmingModelAdjuster);
+        final SpecificationLoaderSpi reflector = reflectorInstaller.createReflector(classSubstitutorFactory, metaModelRefiners);
         return reflector;
     }
 
@@ -274,8 +276,6 @@ public class IsisSystemUsingInstallers e
         }
 
         ensureThatState(persistenceMechanismInstaller, is(not(nullValue())), "persistor installer has not been injected and could not be looked up");
-
         return persistenceMechanismInstaller.createPersistenceSessionFactory(deploymentType);
     }
-
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemDefault.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemDefault.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemDefault.java Tue Oct  9 19:05:25 2012
@@ -1,5 +1,6 @@
 package org.apache.isis.runtimes.dflt.testsupport;
 
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
@@ -11,6 +12,7 @@ import com.google.common.collect.Sets;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.config.IsisConfigurationDefault;
 import org.apache.isis.core.commons.resource.ResourceStreamSourceContextLoaderClassPath;
+import org.apache.isis.core.metamodel.facetapi.ClassSubstitutorFactory;
 import org.apache.isis.core.metamodel.facetapi.MetaModelRefiner;
 import org.apache.isis.core.metamodel.facetdecorator.FacetDecorator;
 import org.apache.isis.core.metamodel.layout.MemberLayoutArranger;
@@ -120,19 +122,19 @@ public class IsisSystemDefault extends I
      * @see #obtainReflectorSpecificationTraverser()
      */
     @Override
-    protected SpecificationLoaderSpi obtainSpecificationLoaderSpi(DeploymentType deploymentType, MetaModelRefiner facetFactoriesProvider) throws IsisSystemException {
-        ClassSubstitutor classSubstitutor = obtainReflectorClassSubstitutor();
-        CollectionTypeRegistry collectionTypeRegistry = obtainReflectorCollectionTypeRegistry();
-        SpecificationTraverser specificationTraverser = obtainReflectorSpecificationTraverser();
-        MemberLayoutArranger memberLayoutArranger = new MemberLayoutArrangerDefault();
-        ProgrammingModel programmingModel = obtainReflectorProgrammingModel();
-        Set<FacetDecorator> facetDecorators = obtainReflectorFacetDecoratorSet();
-        MetaModelValidator metaModelValidator = obtainReflectorMetaModelValidator();
+    protected SpecificationLoaderSpi obtainSpecificationLoaderSpi(DeploymentType deploymentType, ClassSubstitutorFactory classSubstitutorFactory, Collection<MetaModelRefiner> metaModelRefiners) throws IsisSystemException {
+        final ClassSubstitutor classSubstitutor = obtainReflectorClassSubstitutor();
+        final CollectionTypeRegistry collectionTypeRegistry = obtainReflectorCollectionTypeRegistry();
+        final SpecificationTraverser specificationTraverser = obtainReflectorSpecificationTraverser();
+        final MemberLayoutArranger memberLayoutArranger = new MemberLayoutArrangerDefault();
+        final ProgrammingModel programmingModel = obtainReflectorProgrammingModel();
+        final Set<FacetDecorator> facetDecorators = obtainReflectorFacetDecoratorSet();
+        final MetaModelValidator metaModelValidator = obtainReflectorMetaModelValidator();
         return new ObjectReflectorDefault(getConfiguration(), classSubstitutor, collectionTypeRegistry, specificationTraverser, memberLayoutArranger, programmingModel, facetDecorators, metaModelValidator);
     }
 
     /**
-     * Optional hook method, called from {@link #obtainSpecificationLoaderSpi(DeploymentType, MetaModelRefiner)}.
+     * Optional hook method, called from {@link #obtainSpecificationLoaderSpi(DeploymentType, ClassSubstitutorFactory, MetaModelRefiner)}.
      * @return
      */
     protected ClassSubstitutor obtainReflectorClassSubstitutor() {
@@ -140,7 +142,7 @@ public class IsisSystemDefault extends I
     }
 
     /**
-     * Optional hook method, called from {@link #obtainSpecificationLoaderSpi(DeploymentType, MetaModelRefiner)}.
+     * Optional hook method, called from {@link #obtainSpecificationLoaderSpi(DeploymentType, ClassSubstitutorFactory, MetaModelRefiner)}.
      * @return
      */
     protected CollectionTypeRegistry obtainReflectorCollectionTypeRegistry() {
@@ -148,7 +150,7 @@ public class IsisSystemDefault extends I
     }
 
     /**
-     * Optional hook method, called from {@link #obtainSpecificationLoaderSpi(DeploymentType, MetaModelRefiner)}.
+     * Optional hook method, called from {@link #obtainSpecificationLoaderSpi(DeploymentType, ClassSubstitutorFactory, MetaModelRefiner)}.
      * @return
      */
     protected SpecificationTraverser obtainReflectorSpecificationTraverser() {
@@ -156,7 +158,7 @@ public class IsisSystemDefault extends I
     }
 
     /**
-     * Optional hook method, called from {@link #obtainSpecificationLoaderSpi(DeploymentType, MetaModelRefiner)}.
+     * Optional hook method, called from {@link #obtainSpecificationLoaderSpi(DeploymentType, ClassSubstitutorFactory, MetaModelRefiner)}.
      * @return
      */
     protected ProgrammingModel obtainReflectorProgrammingModel() {
@@ -164,7 +166,7 @@ public class IsisSystemDefault extends I
     }
 
     /**
-     * Optional hook method, called from {@link #obtainSpecificationLoaderSpi(DeploymentType, MetaModelRefiner)}.
+     * Optional hook method, called from {@link #obtainSpecificationLoaderSpi(DeploymentType, ClassSubstitutorFactory, MetaModelRefiner)}.
      * @return
      */
     protected Set<FacetDecorator> obtainReflectorFacetDecoratorSet() {
@@ -172,7 +174,7 @@ public class IsisSystemDefault extends I
     }
 
     /**
-     * Optional hook method, called from {@link #obtainSpecificationLoaderSpi(DeploymentType, MetaModelRefiner)}.
+     * Optional hook method, called from {@link #obtainSpecificationLoaderSpi(DeploymentType, ClassSubstitutorFactory, MetaModelRefiner)}.
      * @return
      */
     protected MetaModelValidator obtainReflectorMetaModelValidator() {

Modified: incubator/isis/trunk/framework/security/dflt/src/main/java/org/apache/isis/security/dflt/authorization/AuthorizorDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/security/dflt/src/main/java/org/apache/isis/security/dflt/authorization/AuthorizorDefault.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/security/dflt/src/main/java/org/apache/isis/security/dflt/authorization/AuthorizorDefault.java (original)
+++ incubator/isis/trunk/framework/security/dflt/src/main/java/org/apache/isis/security/dflt/authorization/AuthorizorDefault.java Tue Oct  9 19:05:25 2012
@@ -44,4 +44,14 @@ public class AuthorizorDefault implement
         return true;
     }
 
+    @Override
+    public boolean isVisibleInAnyRole(Identifier identifier) {
+        return true;
+    }
+
+    @Override
+    public boolean isUsableInAnyRole(Identifier identifier) {
+        return true;
+    }
+
 }

Modified: incubator/isis/trunk/framework/security/file/src/main/java/org/apache/isis/security/file/authorization/FileAuthorizor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/security/file/src/main/java/org/apache/isis/security/file/authorization/FileAuthorizor.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/security/file/src/main/java/org/apache/isis/security/file/authorization/FileAuthorizor.java (original)
+++ incubator/isis/trunk/framework/security/file/src/main/java/org/apache/isis/security/file/authorization/FileAuthorizor.java Tue Oct  9 19:05:25 2012
@@ -224,11 +224,17 @@ public class FileAuthorizor extends Auth
 
     @Override
     public boolean isUsableInRole(final String role, final Identifier member) {
+        if(role == null) {
+            return false;
+        }
         return isAuthorized(role, member, Arrays.asList(NONE, ACCESS_QUALIFIER_RW));
     }
 
     @Override
     public boolean isVisibleInRole(final String role, final Identifier member) {
+        if(role == null) {
+            return false;
+        }
         return isAuthorized(role, member, Arrays.asList(NONE, ACCESS_QUALIFIER_RO, ACCESS_QUALIFIER_RW));
     }
 

Modified: incubator/isis/trunk/framework/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizor.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizor.java (original)
+++ incubator/isis/trunk/framework/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizor.java Tue Oct  9 19:05:25 2012
@@ -84,11 +84,17 @@ public class LdapAuthorizor extends Auth
 
     @Override
     public boolean isUsableInRole(final String role, final Identifier member) {
+        if(role == null) {
+            return false;
+        }
         return isAuthorised(role, member, ACCESS_QUALIFIER_RW);
     }
 
     @Override
     public boolean isVisibleInRole(final String role, final Identifier member) {
+        if(role == null) {
+            return false;
+        }
         return isAuthorised(role, member, null);
     }
 

Modified: incubator/isis/trunk/framework/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizor.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizor.java (original)
+++ incubator/isis/trunk/framework/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizor.java Tue Oct  9 19:05:25 2012
@@ -60,4 +60,14 @@ public class SqlAuthorizor extends Autho
     public boolean isVisibleInRole(final String user, final Identifier identifier) {
         return true;
     }
+
+    @Override
+    public boolean isVisibleInAnyRole(Identifier identifier) {
+        return true;
+    }
+
+    @Override
+    public boolean isUsableInAnyRole(Identifier identifier) {
+        return true;
+    }
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java Tue Oct  9 19:05:25 2012
@@ -137,7 +137,7 @@ public enum ComponentType {
     /**
      * A list of {@link IsisModel}s, rendered as a list of links.
      */
-    RECENT_PAGES, 
+    BOOKMARKED_PAGES, 
     /**
      * Place holder for a component used to represent an unknown model;
      * not used for matching, since the {@link ComponentFactory} implementation

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanelFactory.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanelFactory.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanelFactory.java Tue Oct  9 19:05:25 2012
@@ -31,7 +31,7 @@ public class BookmarkedPagesPanelFactory
     private static final long serialVersionUID = 1L;
 
     public BookmarkedPagesPanelFactory() {
-        super(ComponentType.RECENT_PAGES);
+        super(ComponentType.BOOKMARKED_PAGES);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css Tue Oct  9 19:05:25 2012
@@ -20,7 +20,7 @@
 
 #header {
 	width: 80%;
-	height: 20px;
+	height: 40px;
 	float: left;
 }
 #secondaryMenu {
@@ -29,12 +29,14 @@
 	float: right;
 	text-align: right;
 }
+#header h1 {
+	margin: 10px 10px 10px 0px;
+	font-size: xx-large;
+}
+
 .clear {
 	clear: both; 
 }
-#header h1 {
-	display: none;
-}
 
 #footer {
 	padding-top: 4px;

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.html
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.html?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.html (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.html Tue Oct  9 19:05:25 2012
@@ -34,7 +34,7 @@
 		<div id="container" class="page">
 
 			<div id="header">
-				<h1>Apache Isis Wicket Viewer</h1>
+				<h1><span wicket:id="applicationName">[application name]</span></h1>
 			</div>
 			<div id="secondaryMenu">
 				<span>logged in as: </span><span wicket:id="userName">[username]</span>
@@ -49,7 +49,7 @@
 			</div>
 
 			<div id="footer">
-				<a href="#" wicket:id="logoutLink">logout</a>&nbsp;|&nbsp;<a href="#" wicket:id="aboutLink">about</a>
+				<a href="#" wicket:id="logoutLink">logout</a>&nbsp;|&nbsp;<a href="#" wicket:id="aboutLink">about</a>&nbsp;|&nbsp;powered by <a href="http://isis.apache.org">Apache Isis</a>
 			</div>
 		</div>
 	</body>

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java Tue Oct  9 19:05:25 2012
@@ -59,13 +59,14 @@ import org.apache.isis.viewer.wicket.ui.
  */
 public abstract class PageAbstract extends WebPage {
 
-    private static final String ID_USER_NAME = "userName";
-
-    private static final String ID_PAGE_TITLE = "pageTitle";
+    private static final String ID_BOOKMARKED_PAGES = "breadcrumbs";
 
     private static final long serialVersionUID = 1L;
     
-    private static final String DEFAULT_TITLE = "Apache Isis Wicket Viewer";
+    private static final String ID_APPLICATION_NAME = "applicationName";
+    private static final String ID_USER_NAME = "userName";
+    
+    private static final String ID_PAGE_TITLE = "pageTitle";
     
     public static final String ID_MENU_LINK = "menuLink";
     public static final String ID_LOGOUT_LINK = "logoutLink";
@@ -78,6 +79,13 @@ public abstract class PageAbstract exten
      * {@link Inject}ed when {@link #init() initialized}.
      */
     @Inject
+    @Named("applicationName")
+    private String applicationName;
+    
+    /**
+     * {@link Inject}ed when {@link #init() initialized}.
+     */
+    @Inject
     @Named("applicationCss")
     private String applicationCss;
     
@@ -92,10 +100,11 @@ public abstract class PageAbstract exten
         addApplicationActionsComponent();
         this.childComponentIds = Collections.unmodifiableList(Arrays.asList(childComponentIds));
         this.pageParameters = pageParameters;
+        addApplicationName();
         addUserName();
         addLogoutLink();
         addAboutLink();
-        add(new Label(ID_PAGE_TITLE, PageParameterNames.PAGE_TITLE.getStringFrom(pageParameters, DEFAULT_TITLE)));
+        add(new Label(ID_PAGE_TITLE, PageParameterNames.PAGE_TITLE.getStringFrom(pageParameters, applicationName)));
     }
 
     @Override
@@ -107,27 +116,16 @@ public abstract class PageAbstract exten
         if(applicationJs != null) {
             response.render(JavaScriptReferenceHeaderItem.forUrl(applicationJs));
         }
-
+    }
+    
+    private void addApplicationName() {
+        add(new Label(ID_APPLICATION_NAME, applicationName));
     }
     
     private void addUserName() {
         add(new Label(ID_USER_NAME, getAuthenticationSession().getUserName()));
     }
 
-
-    protected void addBreadcrumbs() {
-        getComponentFactoryRegistry().addOrReplaceComponent(this, "breadcrumbs", ComponentType.RECENT_PAGES, getBookmarkedPagesModel());
-    }
-
-    protected void bookmarkPage(BookmarkableModel<?> model) {
-        getBookmarkedPagesModel().bookmarkPage(model);
-    }
-
-    private BookmarkedPagesModel getBookmarkedPagesModel() {
-        BookmarkedPagesModelProvider application = (BookmarkedPagesModelProvider) getApplication();
-        return application.getBookmarkedPagesModel();
-    }
-
     private void addLogoutLink() {
         add(new Link<Object>(ID_LOGOUT_LINK) {
             private static final long serialVersionUID = 1L;
@@ -151,6 +149,7 @@ public abstract class PageAbstract exten
         });
     }
 
+
     /**
      * As provided in the {@link #PageAbstract(ComponentType) constructor}.
      * 
@@ -194,6 +193,28 @@ public abstract class PageAbstract exten
     }
 
 
+    ////////////////////////////////////////////////////////////////
+    // bookmarked pages
+    ////////////////////////////////////////////////////////////////
+
+    /**
+     * Convenience for subclasses
+     */
+    protected void addBookmarkedPages() {
+        getComponentFactoryRegistry().addOrReplaceComponent(this, ID_BOOKMARKED_PAGES, ComponentType.BOOKMARKED_PAGES, getBookmarkedPagesModel());
+    }
+
+    protected void bookmarkPage(BookmarkableModel<?> model) {
+        getBookmarkedPagesModel().bookmarkPage(model);
+    }
+
+    private BookmarkedPagesModel getBookmarkedPagesModel() {
+        BookmarkedPagesModelProvider application = (BookmarkedPagesModelProvider) getApplication();
+        return application.getBookmarkedPagesModel();
+    }
+
+
+
     // ///////////////////////////////////////////////////////////////////
     // Convenience
     // ///////////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java Tue Oct  9 19:05:25 2012
@@ -47,7 +47,7 @@ public class ActionPage extends PageAbst
         if(model.hasSafeActionSemantics()) {
             bookmarkPage(model);
         }
-        addBreadcrumbs();
+        addBookmarkedPages();
     }
 
     public ActionPage(final PageParameters pageParameters) {
@@ -56,7 +56,7 @@ public class ActionPage extends PageAbst
         addChildComponents(model);
         
         // no need to bookmark because the ActionPanel will have done so for us
-        addBreadcrumbs();
+        addBookmarkedPages();
     }
 
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java Tue Oct  9 19:05:25 2012
@@ -50,7 +50,7 @@ public class EntityPage extends PageAbst
         addChildComponents(model);
         
         bookmarkPage(model);
-        addBreadcrumbs();
+        addBookmarkedPages();
     }
 
     public EntityPage(final ObjectAdapter adapter) {
@@ -68,7 +68,7 @@ public class EntityPage extends PageAbst
         addChildComponents(model);
         
         bookmarkPage(model);
-        addBreadcrumbs();
+        addBookmarkedPages();
     }
 
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketModule.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketModule.java?rev=1396204&r1=1396203&r2=1396204&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketModule.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketModule.java Tue Oct  9 19:05:25 2012
@@ -47,6 +47,7 @@ import org.apache.isis.viewer.wicket.vie
  *              
  *         bind(String.class).annotatedWith(Names.named("applicationCss")).toInstance("application.css");
  *         bind(String.class).annotatedWith(Names.named("applicationJs")).toInstance("application.js");
+ *         bind(String.class).annotatedWith(Names.named("applicationName")).toInstance("My App");
  *         bind(String.class).annotatedWith(Names.named("welcomeMessage")).toInstance("Hello, welcome to my app");
  *         bind(String.class).annotatedWith(Names.named("aboutMessage")).toInstance("MyApp v1.0.0");
  *      }
@@ -64,6 +65,7 @@ public class IsisWicketModule extends Ab
         bind(ComponentFactoryRegistrar.class).to(ComponentFactoryRegistrarDefault.class);
         bind(ImageResourceCache.class).to(ImageCacheClassPath.class);
         
+        bind(String.class).annotatedWith(Names.named("applicationName")).toInstance("Apache Isis Wicket Viewer");
         bind(String.class).annotatedWith(Names.named("applicationCss")).toProvider(Providers.of((String)null));
         bind(String.class).annotatedWith(Names.named("applicationJs")).toProvider(Providers.of((String)null));
         bind(String.class).annotatedWith(Names.named("welcomeMessage")).toProvider(Providers.of((String)null));



Mime
View raw message