incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1234519 [2/3] - in /incubator/isis/trunk/examples: claims/dom/src/main/java/org/apache/isis/example/claims/dom/claim/ claims/dom/src/main/java/org/apache/isis/example/claims/dom/employee/ claims/fixture/src/main/java/org/apache/isis/exampl...
Date Sun, 22 Jan 2012 14:43:55 GMT
Modified: incubator/isis/trunk/examples/metamodel-examples/namefile/src/main/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/metamodel-examples/namefile/src/main/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactory.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/metamodel-examples/namefile/src/main/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactory.java (original)
+++ incubator/isis/trunk/examples/metamodel-examples/namefile/src/main/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactory.java Sun Jan 22 14:43:52 2012
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.metamodel.examples.facets.namefile;
 
-package org.apache.isis.metamodel.examples.facets.namefile;
-
 import java.io.IOException;
 import java.util.List;
 
@@ -28,64 +27,60 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facetapi.IdentifiedHolder;
 import org.apache.isis.core.metamodel.facets.FacetFactory;
-
-
-public class NameFileFacetFactory implements FacetFactory {
-
-    private final NameFileParser nameFileParser;
-    
-    public NameFileFacetFactory() {
-        nameFileParser = new NameFileParser();
-        try {
-            nameFileParser.parse();
-        } catch (IOException ex) {
-            throw new RuntimeException(ex);
-        }
-    }
-
+
+public class NameFileFacetFactory implements FacetFactory {
+
+    private final NameFileParser nameFileParser;
+
+    public NameFileFacetFactory() {
+        nameFileParser = new NameFileParser();
+        try {
+            nameFileParser.parse();
+        } catch (final IOException ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
     @Override
-    public List<FeatureType> getFeatureTypes() {
-        return FeatureType.EVERYTHING_BUT_PARAMETERS;
-    }
-
-    
-    /**
-     * Simply attaches a {@link NameFileFacet}.
-     */
+    public List<FeatureType> getFeatureTypes() {
+        return FeatureType.EVERYTHING_BUT_PARAMETERS;
+    }
+
+    /**
+     * Simply attaches a {@link NameFileFacet}.
+     */
     @Override
-    public void process(ProcessClassContext processClassContaxt) {
-        FacetUtil.addFacet(create(processClassContaxt.getCls(), processClassContaxt.getFacetHolder()));
-    }
-
-    private NameFileFacet create(final Class<?> cls, FacetHolder holder) {
-        String memberNameInFile = nameFileParser.getName(cls);
-        return memberNameInFile!=null?new NameFileFacet(holder, memberNameInFile): null;
-    }
-    
-    /**
-     * Simply attaches a {@link NameFileFacet}.
-     */
+    public void process(final ProcessClassContext processClassContaxt) {
+        FacetUtil.addFacet(create(processClassContaxt.getCls(), processClassContaxt.getFacetHolder()));
+    }
+
+    private NameFileFacet create(final Class<?> cls, final FacetHolder holder) {
+        final String memberNameInFile = nameFileParser.getName(cls);
+        return memberNameInFile != null ? new NameFileFacet(holder, memberNameInFile) : null;
+    }
+
+    /**
+     * Simply attaches a {@link NameFileFacet}.
+     */
     @Override
-    public void process(ProcessMethodContext processMethodContext) {
-    	if (!(processMethodContext.getFacetHolder() instanceof IdentifiedHolder)) {
-    		return;
-    	}
-		IdentifiedHolder identifiedHolder = processMethodContext.getFacetHolder();
-        Class<?> declaringClass = processMethodContext.getMethod().getDeclaringClass();
-        String memberName = identifiedHolder.getIdentifier().getMemberName();
-        FacetUtil.addFacet(create(declaringClass, memberName, processMethodContext.getFacetHolder()));
-    }
-
-    private NameFileFacet create(final Class<?> declaringClass, final String memberName, FacetHolder holder) {
-        String memberNameInFile = nameFileParser.getMemberName(declaringClass, memberName);
-        return memberNameInFile!=null?new NameFileFacet(holder, memberNameInFile): null;
-    }
-
-
+    public void process(final ProcessMethodContext processMethodContext) {
+        if (!(processMethodContext.getFacetHolder() instanceof IdentifiedHolder)) {
+            return;
+        }
+        final IdentifiedHolder identifiedHolder = processMethodContext.getFacetHolder();
+        final Class<?> declaringClass = processMethodContext.getMethod().getDeclaringClass();
+        final String memberName = identifiedHolder.getIdentifier().getMemberName();
+        FacetUtil.addFacet(create(declaringClass, memberName, processMethodContext.getFacetHolder()));
+    }
+
+    private NameFileFacet create(final Class<?> declaringClass, final String memberName, final FacetHolder holder) {
+        final String memberNameInFile = nameFileParser.getMemberName(declaringClass, memberName);
+        return memberNameInFile != null ? new NameFileFacet(holder, memberNameInFile) : null;
+    }
+
     @Override
-    public void processParams(ProcessParameterContext processParameterContext) {
-        // nothing to do
-    }
-
-
-}
+    public void processParams(final ProcessParameterContext processParameterContext) {
+        // nothing to do
+    }
+
+}

Modified: incubator/isis/trunk/examples/metamodel-examples/namefile/src/main/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileParser.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/metamodel-examples/namefile/src/main/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileParser.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/metamodel-examples/namefile/src/main/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileParser.java (original)
+++ incubator/isis/trunk/examples/metamodel-examples/namefile/src/main/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileParser.java Sun Jan 22 14:43:52 2012
@@ -17,37 +17,35 @@
  *  under the License.
  */
 
+package org.apache.isis.metamodel.examples.facets.namefile;
 
-package org.apache.isis.metamodel.examples.facets.namefile;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-public class NameFileParser {
-
-    private static final String CONFIG_NAMEFILE_PROPERTIES = "config/namefile.properties";
-    private Properties properties;
-
-    public void parse() throws IOException {
-        InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(CONFIG_NAMEFILE_PROPERTIES);
-        if (in == null) {
-            in = getClass().getClassLoader().getResourceAsStream(CONFIG_NAMEFILE_PROPERTIES); 
-        }
-        if (in == null) {
-            throw new NullPointerException("Cannot locate resource '" + CONFIG_NAMEFILE_PROPERTIES + "'");
-        }
-        properties = new Properties();
-        properties.load(in);
-    }
-
-    public String getName(final Class<?> cls) {
-        return properties.getProperty(cls.getCanonicalName());
-    }
-
-    public String getMemberName(final Class<?> cls, final String memberName) {
-        return properties.getProperty(cls.getCanonicalName()+"#"+memberName);
-    }
-    
-    
-}
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+public class NameFileParser {
+
+    private static final String CONFIG_NAMEFILE_PROPERTIES = "config/namefile.properties";
+    private Properties properties;
+
+    public void parse() throws IOException {
+        InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(CONFIG_NAMEFILE_PROPERTIES);
+        if (in == null) {
+            in = getClass().getClassLoader().getResourceAsStream(CONFIG_NAMEFILE_PROPERTIES);
+        }
+        if (in == null) {
+            throw new NullPointerException("Cannot locate resource '" + CONFIG_NAMEFILE_PROPERTIES + "'");
+        }
+        properties = new Properties();
+        properties.load(in);
+    }
+
+    public String getName(final Class<?> cls) {
+        return properties.getProperty(cls.getCanonicalName());
+    }
+
+    public String getMemberName(final Class<?> cls, final String memberName) {
+        return properties.getProperty(cls.getCanonicalName() + "#" + memberName);
+    }
+
+}

Modified: incubator/isis/trunk/examples/metamodel-examples/namefile/src/main/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileProgModelFacets.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/metamodel-examples/namefile/src/main/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileProgModelFacets.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/metamodel-examples/namefile/src/main/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileProgModelFacets.java (original)
+++ incubator/isis/trunk/examples/metamodel-examples/namefile/src/main/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileProgModelFacets.java Sun Jan 22 14:43:52 2012
@@ -17,27 +17,26 @@
  *  under the License.
  */
 
+package org.apache.isis.metamodel.examples.facets.namefile;
 
-package org.apache.isis.metamodel.examples.facets.namefile;
-
 import org.apache.isis.core.metamodel.facets.FacetFactory;
 import org.apache.isis.core.metamodel.progmodel.ProgrammingModel;
 import org.apache.isis.progmodels.dflt.ProgrammingModelFacetsJava5;
-
-
-/**
- * Implementation of {@link ProgrammingModel} that additionally just installs support for
- * {@link NameFileFacet name files}.
- * 
- * <p>
- * This implementation is really provided only as an example. Typically you would provide your own
- * {@link ProgrammingModel} implementation that installs other additional {@link FacetFactory facet
- * factories} ass required for your programming model.
- */
-public class NameFileProgModelFacets extends ProgrammingModelFacetsJava5 {
-
-	public NameFileProgModelFacets() {
-		addFactory(NameFileFacetFactory.class);
-	}
-
-}
+
+/**
+ * Implementation of {@link ProgrammingModel} that additionally just installs
+ * support for {@link NameFileFacet name files}.
+ * 
+ * <p>
+ * This implementation is really provided only as an example. Typically you
+ * would provide your own {@link ProgrammingModel} implementation that installs
+ * other additional {@link FacetFactory facet factories} ass required for your
+ * programming model.
+ */
+public class NameFileProgModelFacets extends ProgrammingModelFacetsJava5 {
+
+    public NameFileProgModelFacets() {
+        addFactory(NameFileFacetFactory.class);
+    }
+
+}

Modified: incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/DomainObjectWithNameFileEntry.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/DomainObjectWithNameFileEntry.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/DomainObjectWithNameFileEntry.java (original)
+++ incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/DomainObjectWithNameFileEntry.java Sun Jan 22 14:43:52 2012
@@ -17,23 +17,22 @@
  *  under the License.
  */
 
+package org.apache.isis.metamodel.examples.facets.namefile;
 
-package org.apache.isis.metamodel.examples.facets.namefile;
-
-import org.apache.isis.applib.AbstractDomainObject;
-
-public class DomainObjectWithNameFileEntry extends AbstractDomainObject {
-
-    private String lastName;
-
-    public String getLastName() {
-        resolve(lastName);
-        return lastName;
-    }
-
-    public void setLastName(String lastName) {
-        this.lastName = lastName;
-        objectChanged();
-    }
-    
-}
+import org.apache.isis.applib.AbstractDomainObject;
+
+public class DomainObjectWithNameFileEntry extends AbstractDomainObject {
+
+    private String lastName;
+
+    public String getLastName() {
+        resolve(lastName);
+        return lastName;
+    }
+
+    public void setLastName(final String lastName) {
+        this.lastName = lastName;
+        objectChanged();
+    }
+
+}

Modified: incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/DomainObjectWithoutNameFileEntry.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/DomainObjectWithoutNameFileEntry.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/DomainObjectWithoutNameFileEntry.java (original)
+++ incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/DomainObjectWithoutNameFileEntry.java Sun Jan 22 14:43:52 2012
@@ -17,23 +17,22 @@
  *  under the License.
  */
 
+package org.apache.isis.metamodel.examples.facets.namefile;
 
-package org.apache.isis.metamodel.examples.facets.namefile;
-
-import org.apache.isis.applib.AbstractDomainObject;
-
-public class DomainObjectWithoutNameFileEntry extends AbstractDomainObject {
-
-    private String lastName;
-
-    public String getLastName() {
-        resolve(lastName);
-        return lastName;
-    }
-
-    public void setLastName(String lastName) {
-        this.lastName = lastName;
-        objectChanged();
-    }
-    
-}
+import org.apache.isis.applib.AbstractDomainObject;
+
+public class DomainObjectWithoutNameFileEntry extends AbstractDomainObject {
+
+    private String lastName;
+
+    public String getLastName() {
+        resolve(lastName);
+        return lastName;
+    }
+
+    public void setLastName(final String lastName) {
+        this.lastName = lastName;
+        objectChanged();
+    }
+
+}

Modified: incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFacetHolderTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFacetHolderTest.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFacetHolderTest.java (original)
+++ incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFacetHolderTest.java Sun Jan 22 14:43:52 2012
@@ -17,56 +17,48 @@
  *  under the License.
  */
 
+package org.apache.isis.metamodel.examples.facets.namefile;
 
-package org.apache.isis.metamodel.examples.facets.namefile;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.jmock.lib.legacy.ClassImposteriser;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
 
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.metamodel.examples.facets.namefile.NameFileFacet;
-
-
-
-
-@RunWith(JMock.class)
-public class NameFileFacetFacetHolderTest {
-
-    private final Mockery mockery = new JUnit4Mockery() {
-        {
-            setImposteriser(ClassImposteriser.INSTANCE);
-        }
-    };
-
-    private NameFileFacet facet;
-    private FacetHolder mockHolder;
-
-    
-    @Before
-    public void setUp() throws Exception {
-        mockHolder = mockery.mock(FacetHolder.class);
-        facet = new NameFileFacet(mockHolder, "Foobar");
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        mockHolder = null;
-        facet = null;
-    }
-
-
-    @Test
-    public void facetHolder() {
-        assertThat(facet.getFacetHolder(), is(mockHolder));
-    }
-
-}
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.jmock.lib.legacy.ClassImposteriser;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(JMock.class)
+public class NameFileFacetFacetHolderTest {
+
+    private final Mockery mockery = new JUnit4Mockery() {
+        {
+            setImposteriser(ClassImposteriser.INSTANCE);
+        }
+    };
+
+    private NameFileFacet facet;
+    private FacetHolder mockHolder;
+
+    @Before
+    public void setUp() throws Exception {
+        mockHolder = mockery.mock(FacetHolder.class);
+        facet = new NameFileFacet(mockHolder, "Foobar");
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        mockHolder = null;
+        facet = null;
+    }
+
+    @Test
+    public void facetHolder() {
+        assertThat(facet.getFacetHolder(), is(mockHolder));
+    }
+
+}

Modified: incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactoryFeatureTypesTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactoryFeatureTypesTest.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactoryFeatureTypesTest.java (original)
+++ incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactoryFeatureTypesTest.java Sun Jan 22 14:43:52 2012
@@ -17,65 +17,61 @@
  *  under the License.
  */
 
+package org.apache.isis.metamodel.examples.facets.namefile;
 
-package org.apache.isis.metamodel.examples.facets.namefile;
-
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.Matchers.hasItem;
 import static org.junit.Assert.assertThat;
 
 import java.util.List;
 
+import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-
-
-
-public class NameFileFacetFactoryFeatureTypesTest {
-
-    private NameFileFacetFactory facetFactory;
-
-    @Before
-    public void setUp() throws Exception {
-        facetFactory = new NameFileFacetFactory();
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        facetFactory = null;
-    }
-
-    @Test
-    public void featureTypesLength() {
-        List<FeatureType> featureTypes = facetFactory.getFeatureTypes();
-        assertThat(featureTypes.size(), is(4));
-    }
-
-    @Test
-    public void featureTypesContainsTypeRepresentingObject() {
-        List<FeatureType> featureTypes = facetFactory.getFeatureTypes();
-        assertThat(featureTypes, hasItem(FeatureType.OBJECT));
-    }
-
-    @Test
-    public void featureTypesContainsTypeRepresentingProperty() {
-        List<FeatureType> featureTypes = facetFactory.getFeatureTypes();
-        assertThat(featureTypes, hasItem(FeatureType.PROPERTY));
-    }
-
-    @Test
-    public void featureTypesContainsTypeRepresentingCollection() {
-        List<FeatureType> featureTypes = facetFactory.getFeatureTypes();
-        assertThat(featureTypes, hasItem(FeatureType.COLLECTION));
-    }
-
-    @Test
-    public void featureTypesContainsTypeRepresentingAction() {
-        List<FeatureType> featureTypes = facetFactory.getFeatureTypes();
-        assertThat(featureTypes, hasItem(FeatureType.ACTION));
-    }
-
-}
+public class NameFileFacetFactoryFeatureTypesTest {
+
+    private NameFileFacetFactory facetFactory;
+
+    @Before
+    public void setUp() throws Exception {
+        facetFactory = new NameFileFacetFactory();
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        facetFactory = null;
+    }
+
+    @Test
+    public void featureTypesLength() {
+        final List<FeatureType> featureTypes = facetFactory.getFeatureTypes();
+        assertThat(featureTypes.size(), is(4));
+    }
+
+    @Test
+    public void featureTypesContainsTypeRepresentingObject() {
+        final List<FeatureType> featureTypes = facetFactory.getFeatureTypes();
+        assertThat(featureTypes, hasItem(FeatureType.OBJECT));
+    }
+
+    @Test
+    public void featureTypesContainsTypeRepresentingProperty() {
+        final List<FeatureType> featureTypes = facetFactory.getFeatureTypes();
+        assertThat(featureTypes, hasItem(FeatureType.PROPERTY));
+    }
+
+    @Test
+    public void featureTypesContainsTypeRepresentingCollection() {
+        final List<FeatureType> featureTypes = facetFactory.getFeatureTypes();
+        assertThat(featureTypes, hasItem(FeatureType.COLLECTION));
+    }
+
+    @Test
+    public void featureTypesContainsTypeRepresentingAction() {
+        final List<FeatureType> featureTypes = facetFactory.getFeatureTypes();
+        assertThat(featureTypes, hasItem(FeatureType.ACTION));
+    }
+
+}

Modified: incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactoryInstantiationTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactoryInstantiationTest.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactoryInstantiationTest.java (original)
+++ incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactoryInstantiationTest.java Sun Jan 22 14:43:52 2012
@@ -17,19 +17,15 @@
  *  under the License.
  */
 
+package org.apache.isis.metamodel.examples.facets.namefile;
 
-package org.apache.isis.metamodel.examples.facets.namefile;
-
-import org.junit.Test;
-import org.apache.isis.metamodel.examples.facets.namefile.NameFileFacetFactory;
-
-
-public class NameFileFacetFactoryInstantiationTest {
-
-
-    @Test
-    public void canInstantiate() {
-        new NameFileFacetFactory();
-    }
-
-}
+import org.junit.Test;
+
+public class NameFileFacetFactoryInstantiationTest {
+
+    @Test
+    public void canInstantiate() {
+        new NameFileFacetFactory();
+    }
+
+}

Modified: incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactoryProcessTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactoryProcessTest.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactoryProcessTest.java (original)
+++ incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetFactoryProcessTest.java Sun Jan 22 14:43:52 2012
@@ -17,13 +17,18 @@
  *  under the License.
  */
 
-
-package org.apache.isis.metamodel.examples.facets.namefile;
+package org.apache.isis.metamodel.examples.facets.namefile;
 
 import static org.apache.isis.core.commons.matchers.IsisMatchers.anInstanceOf;
 
 import java.lang.reflect.Method;
 
+import org.apache.isis.applib.Identifier;
+import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.core.metamodel.facetapi.MethodRemover;
+import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessClassContext;
+import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessMethodContext;
+import org.apache.isis.core.metamodel.facets.FacetedMethod;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;
@@ -34,94 +39,93 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facetapi.MethodRemover;
-import org.apache.isis.core.metamodel.facets.FacetedMethod;
-import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessClassContext;
-import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessMethodContext;
+@RunWith(JMock.class)
+public class NameFileFacetFactoryProcessTest {
+
+    private final Mockery mockery = new JUnit4Mockery() {
+        {
+            setImposteriser(ClassImposteriser.INSTANCE);
+        }
+    };
+
+    private NameFileFacetFactory facetFactory;
+    private MethodRemover mockMethodRemover;
+    private FacetedMethod mockFacetHolder;
+
+    private Class<DomainObjectWithNameFileEntry> domainObjectWithNameFileEntryClass;
+    private Method domainObjectWithNameFileEntryMethod;
+
+    private Class<DomainObjectWithoutNameFileEntry> domainObjectWithoutNameFileEntryClass;
+    private Method domainObjectWithoutNameFileEntryMethod;
+
+    @Before
+    public void setUp() throws Exception {
+        facetFactory = new NameFileFacetFactory();
+        mockMethodRemover = mockery.mock(MethodRemover.class);
+        mockFacetHolder = mockery.mock(FacetedMethod.class);
+
+        domainObjectWithNameFileEntryClass = DomainObjectWithNameFileEntry.class;
+        domainObjectWithNameFileEntryMethod = domainObjectWithNameFileEntryClass.getMethod("getLastName");
+
+        domainObjectWithoutNameFileEntryClass = DomainObjectWithoutNameFileEntry.class;
+        domainObjectWithoutNameFileEntryMethod = domainObjectWithoutNameFileEntryClass.getMethod("getLastName");
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        facetFactory = null;
+        mockMethodRemover = null;
+        mockFacetHolder = null;
+    }
+
+    @Test
+    public void addsANameFileFacetForObjectIfEntryExists() {
+        mockery.checking(new Expectations() {
+            {
+                one(mockFacetHolder).addFacet(with(anInstanceOf(NameFileFacet.class)));
+            }
+        });
+
+        facetFactory.process(new ProcessClassContext(domainObjectWithNameFileEntryClass, mockMethodRemover, mockFacetHolder));
+    }
+
+    @Test
+    public void doesNotAddsANameFileFacetForObjectIfEntryDoesNotExists() {
+        mockery.checking(new Expectations() {
+            {
+                never(mockFacetHolder).addFacet(with(anInstanceOf(NameFileFacet.class)));
+            }
+        });
+
+        facetFactory.process(new ProcessClassContext(domainObjectWithoutNameFileEntryClass, mockMethodRemover, mockFacetHolder));
+    }
+
+    @Test
+    public void addsANameFileFacetForPropertyIfEntryExists() {
+        mockery.checking(new Expectations() {
+            {
+                one(mockFacetHolder).getIdentifier();
+                will(returnValue(Identifier.propertyOrCollectionIdentifier(domainObjectWithNameFileEntryClass, "lastName")));
+
+                one(mockFacetHolder).addFacet(with(anInstanceOf(NameFileFacet.class)));
+            }
+        });
+
+        facetFactory.process(new ProcessMethodContext(domainObjectWithNameFileEntryClass, domainObjectWithNameFileEntryMethod, mockMethodRemover, mockFacetHolder));
+    }
+
+    @Test
+    public void doesNotAddsANameFileFacetForPropertyIfEntryDoesNotExists() {
+        mockery.checking(new Expectations() {
+            {
+                one(mockFacetHolder).getIdentifier();
+                will(returnValue(Identifier.propertyOrCollectionIdentifier(domainObjectWithoutNameFileEntryClass, "lastName")));
+
+                never(mockFacetHolder).addFacet(with(anInstanceOf(Facet.class)));
+            }
+        });
+
+        facetFactory.process(new ProcessMethodContext(domainObjectWithoutNameFileEntryClass, domainObjectWithoutNameFileEntryMethod, mockMethodRemover, mockFacetHolder));
+    }
 
-
-
-@RunWith(JMock.class)
-public class NameFileFacetFactoryProcessTest {
-
-    private Mockery mockery = new JUnit4Mockery() {
-        {
-            setImposteriser(ClassImposteriser.INSTANCE);
-        }
-    };
-    
-    private NameFileFacetFactory facetFactory;
-    private MethodRemover mockMethodRemover;
-    private FacetedMethod mockFacetHolder;
-
-    private Class<DomainObjectWithNameFileEntry> domainObjectWithNameFileEntryClass;
-    private Method domainObjectWithNameFileEntryMethod;
-
-    private Class<DomainObjectWithoutNameFileEntry> domainObjectWithoutNameFileEntryClass;
-    private Method domainObjectWithoutNameFileEntryMethod;
-
-    @Before
-    public void setUp() throws Exception {
-        facetFactory = new NameFileFacetFactory();
-        mockMethodRemover = mockery.mock(MethodRemover.class);
-        mockFacetHolder = mockery.mock(FacetedMethod.class);
-        
-        domainObjectWithNameFileEntryClass = DomainObjectWithNameFileEntry.class;
-        domainObjectWithNameFileEntryMethod = domainObjectWithNameFileEntryClass.getMethod("getLastName");
-
-        domainObjectWithoutNameFileEntryClass = DomainObjectWithoutNameFileEntry.class;
-        domainObjectWithoutNameFileEntryMethod = domainObjectWithoutNameFileEntryClass.getMethod("getLastName");
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        facetFactory = null;
-        mockMethodRemover = null;
-        mockFacetHolder = null;
-    }
-
-    @Test
-    public void addsANameFileFacetForObjectIfEntryExists() {
-        mockery.checking(new Expectations() {{
-            one(mockFacetHolder).addFacet(with(anInstanceOf(NameFileFacet.class)));
-        }});
-        
-        facetFactory.process(new ProcessClassContext(domainObjectWithNameFileEntryClass, mockMethodRemover, mockFacetHolder));
-    }
-
-    @Test
-    public void doesNotAddsANameFileFacetForObjectIfEntryDoesNotExists() {
-        mockery.checking(new Expectations() {{
-            never(mockFacetHolder).addFacet(with(anInstanceOf(NameFileFacet.class)));
-        }});
-        
-        facetFactory.process(new ProcessClassContext(domainObjectWithoutNameFileEntryClass, mockMethodRemover, mockFacetHolder));
-    }
-    
-    @Test
-    public void addsANameFileFacetForPropertyIfEntryExists() {
-        mockery.checking(new Expectations() {{
-            one(mockFacetHolder).getIdentifier();
-            will(returnValue(Identifier.propertyOrCollectionIdentifier(domainObjectWithNameFileEntryClass, "lastName")));
-            
-            one(mockFacetHolder).addFacet(with(anInstanceOf(NameFileFacet.class)));
-        }});
-        
-        facetFactory.process(new ProcessMethodContext(domainObjectWithNameFileEntryClass, domainObjectWithNameFileEntryMethod, mockMethodRemover, mockFacetHolder));
-    }
-    
-    @Test
-    public void doesNotAddsANameFileFacetForPropertyIfEntryDoesNotExists() {
-        mockery.checking(new Expectations() {{
-            one(mockFacetHolder).getIdentifier();
-            will(returnValue(Identifier.propertyOrCollectionIdentifier(domainObjectWithoutNameFileEntryClass, "lastName")));
-            
-            never(mockFacetHolder).addFacet(with(anInstanceOf(Facet.class)));
-        }});
-        
-        facetFactory.process(new ProcessMethodContext(domainObjectWithoutNameFileEntryClass, domainObjectWithoutNameFileEntryMethod, mockMethodRemover, mockFacetHolder));
-    }
-    
-}
+}

Modified: incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetInstantiationTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetInstantiationTest.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetInstantiationTest.java (original)
+++ incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetInstantiationTest.java Sun Jan 22 14:43:52 2012
@@ -17,34 +17,30 @@
  *  under the License.
  */
 
-
-package org.apache.isis.metamodel.examples.facets.namefile;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+package org.apache.isis.metamodel.examples.facets.namefile;
 
 import org.apache.isis.core.metamodel.facetapi.FacetHolderImpl;
-import org.apache.isis.metamodel.examples.facets.namefile.NameFileFacet;
-
-
-public class NameFileFacetInstantiationTest {
-
-    private FacetHolderImpl holder;
-
-    @Before
-    public void setUp() throws Exception {
-        holder = new FacetHolderImpl();
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        holder = null;
-    }
-
-    @Test
-    public void canInstantiate() {
-        new NameFileFacet(holder, "foobar");
-    }
-
-}
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class NameFileFacetInstantiationTest {
+
+    private FacetHolderImpl holder;
+
+    @Before
+    public void setUp() throws Exception {
+        holder = new FacetHolderImpl();
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        holder = null;
+    }
+
+    @Test
+    public void canInstantiate() {
+        new NameFileFacet(holder, "foobar");
+    }
+
+}

Modified: incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetValueTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetValueTest.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetValueTest.java (original)
+++ incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileFacetValueTest.java Sun Jan 22 14:43:52 2012
@@ -17,56 +17,48 @@
  *  under the License.
  */
 
+package org.apache.isis.metamodel.examples.facets.namefile;
 
-package org.apache.isis.metamodel.examples.facets.namefile;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.jmock.lib.legacy.ClassImposteriser;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
 
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.metamodel.examples.facets.namefile.NameFileFacet;
-
-
-
-
-@RunWith(JMock.class)
-public class NameFileFacetValueTest {
-
-    private final Mockery mockery = new JUnit4Mockery() {
-        {
-            setImposteriser(ClassImposteriser.INSTANCE);
-        }
-    };
-
-    private NameFileFacet facet;
-    private FacetHolder mockHolder;
-
-    
-    @Before
-    public void setUp() throws Exception {
-        mockHolder = mockery.mock(FacetHolder.class);
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        mockHolder = null;
-        facet = null;
-    }
-
-
-    @Test
-    public void value() {
-        facet = new NameFileFacet(mockHolder, "Foobar");
-        assertThat(facet.value(), is("Foobar"));
-    }
-
-}
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.jmock.lib.legacy.ClassImposteriser;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(JMock.class)
+public class NameFileFacetValueTest {
+
+    private final Mockery mockery = new JUnit4Mockery() {
+        {
+            setImposteriser(ClassImposteriser.INSTANCE);
+        }
+    };
+
+    private NameFileFacet facet;
+    private FacetHolder mockHolder;
+
+    @Before
+    public void setUp() throws Exception {
+        mockHolder = mockery.mock(FacetHolder.class);
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        mockHolder = null;
+        facet = null;
+    }
+
+    @Test
+    public void value() {
+        facet = new NameFileFacet(mockHolder, "Foobar");
+        assertThat(facet.value(), is("Foobar"));
+    }
+
+}

Modified: incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileParserInstantiationTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileParserInstantiationTest.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileParserInstantiationTest.java (original)
+++ incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileParserInstantiationTest.java Sun Jan 22 14:43:52 2012
@@ -17,18 +17,15 @@
  *  under the License.
  */
 
+package org.apache.isis.metamodel.examples.facets.namefile;
 
-package org.apache.isis.metamodel.examples.facets.namefile;
-
-import org.junit.Test;
-import org.apache.isis.metamodel.examples.facets.namefile.NameFileParser;
-
-
-public class NameFileParserInstantiationTest {
-
-    @Test
-    public void canInstantiate() {
-        new NameFileParser();
-    }
-
-}
+import org.junit.Test;
+
+public class NameFileParserInstantiationTest {
+
+    @Test
+    public void canInstantiate() {
+        new NameFileParser();
+    }
+
+}

Modified: incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileParserParsingTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileParserParsingTest.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileParserParsingTest.java (original)
+++ incubator/isis/trunk/examples/metamodel-examples/namefile/src/test/java/org/apache/isis/metamodel/examples/facets/namefile/NameFileParserParsingTest.java Sun Jan 22 14:43:52 2012
@@ -17,50 +17,44 @@
  *  under the License.
  */
 
+package org.apache.isis.metamodel.examples.facets.namefile;
 
-package org.apache.isis.metamodel.examples.facets.namefile;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.apache.isis.metamodel.examples.facets.namefile.NameFileParser;
-
-
-
-
-
-public class NameFileParserParsingTest {
-
-    private NameFileParser parser;
-
-    @Before
-    public void setUp() throws Exception {
-        parser = new NameFileParser();
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        parser = null;
-    }
-
-    @Test
-    public void canFindResourceWhenExists() throws Exception {
-        parser.parse();
-    }
-
-    @Test
-    public void getName() throws Exception {
-        parser.parse();
-        assertThat(parser.getName(DomainObjectWithNameFileEntry.class), is("Customer"));
-    }
-
-    @Test
-    public void getPropertyName() throws Exception {
-        parser.parse();
-        assertThat(parser.getMemberName(DomainObjectWithNameFileEntry.class, "lastName"), is("surname"));
-    }
-
-}
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class NameFileParserParsingTest {
+
+    private NameFileParser parser;
+
+    @Before
+    public void setUp() throws Exception {
+        parser = new NameFileParser();
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        parser = null;
+    }
+
+    @Test
+    public void canFindResourceWhenExists() throws Exception {
+        parser.parse();
+    }
+
+    @Test
+    public void getName() throws Exception {
+        parser.parse();
+        assertThat(parser.getName(DomainObjectWithNameFileEntry.class), is("Customer"));
+    }
+
+    @Test
+    public void getPropertyName() throws Exception {
+        parser.parse();
+        assertThat(parser.getMemberName(DomainObjectWithNameFileEntry.class, "lastName"), is("surname"));
+    }
+
+}

Modified: incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/demo/DemoFixtures.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/demo/DemoFixtures.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/demo/DemoFixtures.java (original)
+++ incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/demo/DemoFixtures.java Sun Jan 22 14:43:52 2012
@@ -31,16 +31,18 @@ import org.apache.isis.examples.onlinede
  * 
  * <p>
  * Typically fixtures are installed directly by the framework, using the
- * <tt>isis.fixtures</tt> key within the <tt>isis.properties</tt> configuration file.
- * In this case though, because the online demo is intended to be multi-user, we
- * have made this capability available directly in the UI.  (In production, this
- * service would be excluded from the final build)
+ * <tt>isis.fixtures</tt> key within the <tt>isis.properties</tt> configuration
+ * file. In this case though, because the online demo is intended to be
+ * multi-user, we have made this capability available directly in the UI. (In
+ * production, this service would be excluded from the final build)
  */
-@Named("Demo") // name to use in the UI
+@Named("Demo")
+// name to use in the UI
 public interface DemoFixtures {
 
-    @Idempotent // post-conditions are always same
-    @MemberOrder(sequence="1")
+    @Idempotent
+    // post-conditions are always same
+    @MemberOrder(sequence = "1")
     public List<ToDoItem> resetFixtures();
 
 }

Modified: incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Categories.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Categories.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Categories.java (original)
+++ incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Categories.java Sun Jan 22 14:43:52 2012
@@ -36,16 +36,17 @@ import org.apache.isis.applib.annotation
 @Named("Categories")
 public interface Categories {
 
-    @QueryOnly // no side-effects
-    @MemberOrder(sequence="1")
+    @QueryOnly
+    // no side-effects
+    @MemberOrder(sequence = "1")
     public List<Category> all();
 
     @QueryOnly
-    @MemberOrder(sequence="2")
-    public Category find(
-        @Named("Description") String description);
+    @MemberOrder(sequence = "2")
+    public Category find(@Named("Description") String description);
 
-    @Hidden // intended for fixtures only, so is hidden in the UI
+    @Hidden
+    // intended for fixtures only, so is hidden in the UI
     public Category newCategory(String description);
 
 }

Modified: incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Category.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Category.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Category.java (original)
+++ incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Category.java Sun Jan 22 14:43:52 2012
@@ -28,32 +28,37 @@ import org.apache.isis.applib.filter.Fil
 
 import com.google.common.base.Objects;
 
-@Immutable // cannot be modified through the UI
-@Bounded   // a bounded number of instances (viewers typically display all instances in a drop-down)
+@Immutable
+// cannot be modified through the UI
+@Bounded
+// a bounded number of instances (viewers typically display all instances in a
+// drop-down)
 public class Category extends AbstractDomainObject {
 
-
     // {{ Description
     private String description;
 
-    @Title // use as the title
+    @Title
+    // use as the title
     @MemberOrder(sequence = "1")
     public String getDescription() {
         return description;
     }
 
-    public void setDescription(String description) {
+    public void setDescription(final String description) {
         this.description = description;
     }
+
     // }}
 
     // {{ filters (programmatic)
     public static Filter<Category> matching(final String description) {
         return new Filter<Category>() {
             @Override
-            public boolean accept(Category category) {
+            public boolean accept(final Category category) {
                 return Objects.equal(category.getDescription(), description);
-            }};
+            }
+        };
     }
     // }}
 

Modified: incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItem.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItem.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItem.java (original)
+++ incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItem.java Sun Jan 22 14:43:52 2012
@@ -19,9 +19,7 @@
 
 package org.apache.isis.examples.onlinedemo.dom.items;
 
-import java.util.LinkedHashSet;
 import java.util.List;
-import java.util.Set;
 
 import org.apache.isis.applib.annotation.Disabled;
 import org.apache.isis.applib.annotation.Hidden;
@@ -37,11 +35,9 @@ import org.apache.isis.applib.util.Title
 import org.apache.isis.applib.value.Date;
 
 import com.google.common.base.Objects;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
 
 /**
- * A todo item (task) owned by a particular user. 
+ * A todo item (task) owned by a particular user.
  */
 public class ToDoItem implements Comparable<ToDoItem> {
 
@@ -51,35 +47,40 @@ public class ToDoItem implements Compara
     public String title() {
         final TitleBuffer buf = new TitleBuffer();
         buf.append(getDescription());
-        if(isComplete()) {
+        if (isComplete()) {
             buf.append(" - Completed!");
         } else {
-            if(getDueBy() != null) {
+            if (getDueBy() != null) {
                 buf.append(" due by ", getDueBy());
             }
         }
         return buf.toString();
     }
+
     // }}
 
     // {{ Description (property)
     private String description;
 
-    @RegEx(validation = "\\w[@&:\\-\\,\\.\\+ \\w]*") // words, spaces and selected punctuation
-    @MemberOrder(sequence = "1") // ordering within UI
+    @RegEx(validation = "\\w[@&:\\-\\,\\.\\+ \\w]*")
+    // words, spaces and selected punctuation
+    @MemberOrder(sequence = "1")
+    // ordering within UI
     public String getDescription() {
         return description;
     }
 
-    public void setDescription(String description) {
+    public void setDescription(final String description) {
         this.description = description;
     }
+
     // }}
 
     // {{ DueBy (property)
     private Date dueBy;
-    
-    @Optional // need not be set
+
+    @Optional
+    // need not be set
     @MemberOrder(sequence = "2")
     public Date getDueBy() {
         return dueBy;
@@ -88,14 +89,15 @@ public class ToDoItem implements Compara
     public void setDueBy(final Date dueBy) {
         this.dueBy = dueBy;
     }
+
     // proposed new value is validated before setting
     public String validateDueBy(final Date dueBy) {
-        if (dueBy == null)
+        if (dueBy == null) {
             return null;
-        return isMoreThanOneWeekInPast(dueBy) ? "Due by date cannot be more than one week old": null;
+        }
+        return isMoreThanOneWeekInPast(dueBy) ? "Due by date cannot be more than one week old" : null;
     }
 
-    
     // }}
 
     // {{ Category (property)
@@ -109,12 +111,14 @@ public class ToDoItem implements Compara
     public void setCategory(final Category category) {
         this.category = category;
     }
+
     // }}
 
     // {{ UserName (property)
     private String userName;
 
-    @Hidden // not shown in the UI 
+    @Hidden
+    // not shown in the UI
     public String getUserName() {
         return userName;
     }
@@ -122,20 +126,23 @@ public class ToDoItem implements Compara
     public void setUserName(final String userName) {
         this.userName = userName;
     }
+
     // }}
 
     // {{ Complete (property)
     private boolean complete;
 
-    @Disabled // cannot be edited as a property
+    @Disabled
+    // cannot be edited as a property
     @MemberOrder(sequence = "5")
     public boolean isComplete() {
         return complete;
     }
 
-    public void setComplete(boolean complete) {
+    public void setComplete(final boolean complete) {
         this.complete = complete;
     }
+
     // }}
 
     // {{ completed (action)
@@ -144,10 +151,12 @@ public class ToDoItem implements Compara
         setComplete(true);
         return this;
     }
+
     // disable action dependent on state of object
     public String disableCompleted() {
-        return complete?"Already completed":null;
+        return complete ? "Already completed" : null;
     }
+
     // }}
 
     // {{ notYetCompleted (action)
@@ -156,92 +165,96 @@ public class ToDoItem implements Compara
         setComplete(false);
         return this;
     }
+
     // disable action dependent on state of object
     public String disableNotYetCompleted() {
-        return !complete?"Not yet completed":null;
+        return !complete ? "Not yet completed" : null;
     }
+
     // }}
-    
+
     // {{ clone (action)
-    @Named("Clone") // the name of the action in the UI
+    @Named("Clone")
+    // the name of the action in the UI
     @MemberOrder(sequence = "3")
-    // nb: method is not called "clone()" is inherited by java.lang.Object and 
-    // (a) has different semantics and (b) is in any case automatically ignored by the framework
+    // nb: method is not called "clone()" is inherited by java.lang.Object and
+    // (a) has different semantics and (b) is in any case automatically ignored
+    // by the framework
     public ToDoItem duplicate() {
-        return toDoItems.newToDo(getDescription() + " - Copy", getCategory(), getDueBy()); 
+        return toDoItems.newToDo(getDescription() + " - Copy", getCategory(), getDueBy());
     }
+
     // }}
 
     // {{ isDue (programmatic)
-    @Ignore // excluded from the framework's metamodel
+    @Ignore
+    // excluded from the framework's metamodel
     public boolean isDue() {
-        if(getDueBy() == null) {
+        if (getDueBy() == null) {
             return false;
         }
         return !isMoreThanOneWeekInPast(getDueBy());
     }
+
     // }}
 
-    
     // {{ SimilarItems (collection)
     @MemberOrder(sequence = "5")
     public List<ToDoItem> getSimilarItems() {
         return toDoItems.similarTo(this);
     }
-    // }}
 
+    // }}
 
-    
     // {{ compareTo (programmatic)
     /**
      * by complete flag, then due by date, then description
      */
-    @Ignore // exclude from the framework's metamodel
+    @Ignore
+    // exclude from the framework's metamodel
     @Override
-    public int compareTo(ToDoItem other) {
-        if(isComplete() && !other.isComplete()) {
+    public int compareTo(final ToDoItem other) {
+        if (isComplete() && !other.isComplete()) {
             return +1;
         }
-        if(!isComplete() && other.isComplete()) {
+        if (!isComplete() && other.isComplete()) {
             return -1;
         }
-        if(getDueBy() == null && other.getDueBy() != null) {
+        if (getDueBy() == null && other.getDueBy() != null) {
             return +1;
         }
-        if(getDueBy() != null && other.getDueBy() == null) {
+        if (getDueBy() != null && other.getDueBy() == null) {
             return -1;
         }
-        if( getDueBy() == null && other.getDueBy() == null || 
-            getDueBy().equals(this.getDescription())) {
+        if (getDueBy() == null && other.getDueBy() == null || getDueBy().equals(this.getDescription())) {
             return getDescription().compareTo(other.getDescription());
         }
         return (int) (getDueBy().getMillisSinceEpoch() - other.getDueBy().getMillisSinceEpoch());
     }
-    // }}
 
+    // }}
 
     // {{ helpers
     private static boolean isMoreThanOneWeekInPast(final Date dueBy) {
-        return dueBy.getMillisSinceEpoch() < Clock.getTime() - ONE_WEEK_IN_MILLIS ;
+        return dueBy.getMillisSinceEpoch() < Clock.getTime() - ONE_WEEK_IN_MILLIS;
     }
+
     // }}
-    
+
     // {{ filters (programmatic)
     public static Filter<ToDoItem> thoseDue() {
-        return Filters.and(
-                Filters.not(thoseComplete()), 
-                new Filter<ToDoItem>() {
+        return Filters.and(Filters.not(thoseComplete()), new Filter<ToDoItem>() {
             @Override
-            public boolean accept(ToDoItem t) {
+            public boolean accept(final ToDoItem t) {
                 return t.isDue();
             }
         });
     }
-    
+
     public static Filter<ToDoItem> thoseComplete() {
         return new Filter<ToDoItem>() {
             @Override
-            public boolean accept(ToDoItem t) {
+            public boolean accept(final ToDoItem t) {
                 return t.isComplete();
             }
         };
@@ -250,32 +263,31 @@ public class ToDoItem implements Compara
     public static Filter<ToDoItem> thoseOwnedBy(final String currentUser) {
         return new Filter<ToDoItem>() {
             @Override
-            public boolean accept(ToDoItem toDoItem) {
+            public boolean accept(final ToDoItem toDoItem) {
                 return Objects.equal(toDoItem.getUserName(), currentUser);
             }
-            
+
         };
     }
 
     public static Filter<ToDoItem> thoseSimilarTo(final ToDoItem toDoItem) {
         return new Filter<ToDoItem>() {
             @Override
-            public boolean accept(ToDoItem eachToDoItem) {
+            public boolean accept(final ToDoItem eachToDoItem) {
                 return Objects.equal(toDoItem.getCategory(), eachToDoItem.getCategory()) && eachToDoItem != toDoItem;
             }
-            
+
         };
     }
 
     // }}
-    
+
     // {{ injected: ToDoItems
     private ToDoItems toDoItems;
+
     public void setToDoItems(final ToDoItems toDoItems) {
         this.toDoItems = toDoItems;
     }
     // }}
 
-
-
 }

Modified: incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItems.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItems.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItems.java (original)
+++ incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItems.java Sun Jan 22 14:43:52 2012
@@ -30,33 +30,33 @@ import org.apache.isis.applib.value.Date
 
 /**
  * A repository for {@link ToDoItem}s.
- *  
+ * 
  * <p>
  * The implementation depends on the configured object store.
  */
 @Named("ToDos")
 public interface ToDoItems {
 
-    @QueryOnly // no side-effects
-    @MemberOrder(sequence="1") // order in the UI
+    @QueryOnly
+    // no side-effects
+    @MemberOrder(sequence = "1")
+    // order in the UI
     public List<ToDoItem> toDosForToday();
-    
-    @MemberOrder(sequence="2")
-    public ToDoItem newToDo(
-        @Named("Description") String description, 
-        Category category, 
-        @Named("Due by") @Optional Date dueBy);
+
+    @MemberOrder(sequence = "2")
+    public ToDoItem newToDo(@Named("Description") String description, Category category, @Named("Due by") @Optional Date dueBy);
 
     @QueryOnly
-    @MemberOrder(sequence="3")
+    @MemberOrder(sequence = "3")
     public List<ToDoItem> allToDos();
 
     @QueryOnly
-    @MemberOrder(sequence="4")
+    @MemberOrder(sequence = "4")
     public List<ToDoItem> similarTo(ToDoItem toDoItem);
 
-    @Idempotent // same post-conditions
-    @MemberOrder(sequence="5")
+    @Idempotent
+    // same post-conditions
+    @MemberOrder(sequence = "5")
     public void removeCompleted();
 
 }

Modified: incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/DemoFixturesDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/DemoFixturesDefault.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/DemoFixturesDefault.java (original)
+++ incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/DemoFixturesDefault.java Sun Jan 22 14:43:52 2012
@@ -38,15 +38,16 @@ public class DemoFixturesDefault extends
     public String iconName() {
         return "demo";
     }
+
     // }}
 
     @Override
     public List<ToDoItem> resetFixtures() {
         final ToDoItemsFixture fixture = new ToDoItemsFixture();
         injectServicesInto(fixture);
-        
+
         fixture.install();
-        
+
         return toDoItems.allToDos();
     }
 
@@ -56,6 +57,7 @@ public class DemoFixturesDefault extends
         fixture.setContainer(getContainer());
         fixture.setToDoItems(toDoItems);
     }
+
     // }}
 
     // {{ injected: Categories
@@ -64,14 +66,15 @@ public class DemoFixturesDefault extends
     public void setCategories(final Categories categories) {
         this.categories = categories;
     }
+
     // }}
 
     // {{ injected: ToDoItems
     private ToDoItems toDoItems;
-    public void setToDoItems(ToDoItems toDoItems) {
+
+    public void setToDoItems(final ToDoItems toDoItems) {
         this.toDoItems = toDoItems;
     }
     // }}
-    
 
 }

Modified: incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/ToDoItemsFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/ToDoItemsFixture.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/ToDoItemsFixture.java (original)
+++ incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/ToDoItemsFixture.java Sun Jan 22 14:43:52 2012
@@ -17,10 +17,8 @@
  *  under the License.
  */
 
-
 package org.apache.isis.examples.onlinedemo.fixture.items;
 
-
 import java.util.List;
 
 import org.apache.isis.applib.clock.Clock;
@@ -31,29 +29,28 @@ import org.apache.isis.examples.onlinede
 import org.apache.isis.examples.onlinedemo.dom.items.ToDoItem;
 import org.apache.isis.examples.onlinedemo.dom.items.ToDoItems;
 
-
 public class ToDoItemsFixture extends AbstractFixture {
 
     @Override
     public void install() {
-        Category domesticCategory = findOrCreateCategory("Domestic");
-        Category professionalCategory = findOrCreateCategory("Professional");
-        
+        final Category domesticCategory = findOrCreateCategory("Domestic");
+        final Category professionalCategory = findOrCreateCategory("Professional");
+
         removeAllToDosForCurrentUser();
-        
+
         createToDoItemForCurrentUser("Buy milk", domesticCategory, daysFromToday(0));
         createToDoItemForCurrentUser("Buy stamps", domesticCategory, daysFromToday(0));
         createToDoItemForCurrentUser("Pick up laundry", domesticCategory, daysFromToday(6));
         createToDoItemForCurrentUser("Write blog post", professionalCategory, null);
         createToDoItemForCurrentUser("Organize brown bag", professionalCategory, daysFromToday(14));
-        
+
         getContainer().flush();
     }
 
     // {{ helpers
-    private Category findOrCreateCategory(String description) {
-        Category category = categories.find(description);
-        if(category != null) {
+    private Category findOrCreateCategory(final String description) {
+        final Category category = categories.find(description);
+        if (category != null) {
             return category;
         }
         return categories.newCategory(description);
@@ -61,20 +58,21 @@ public class ToDoItemsFixture extends Ab
 
     private void removeAllToDosForCurrentUser() {
         final List<ToDoItem> allToDos = toDoItems.allToDos();
-        for (ToDoItem toDoItem : allToDos) {
+        for (final ToDoItem toDoItem : allToDos) {
             getContainer().remove(toDoItem);
         }
     }
 
-    private ToDoItem createToDoItemForCurrentUser(String description, Category category, Date dueBy) {
+    private ToDoItem createToDoItemForCurrentUser(final String description, final Category category, final Date dueBy) {
         return toDoItems.newToDo(description, category, dueBy);
     }
 
-    private static Date daysFromToday(int i) {
+    private static Date daysFromToday(final int i) {
         final Date date = new Date(Clock.getTimeAsDateTime());
         date.add(0, 0, i);
         return date;
     }
+
     // }}
 
     // {{ injected: Categories
@@ -83,13 +81,15 @@ public class ToDoItemsFixture extends Ab
     public void setCategories(final Categories categories) {
         this.categories = categories;
     }
+
     // }}
 
     // {{ injected: ToDoItems
     private ToDoItems toDoItems;
-    public void setToDoItems(ToDoItems toDoItems) {
+
+    public void setToDoItems(final ToDoItems toDoItems) {
         this.toDoItems = toDoItems;
     }
     // }}
-    
+
 }

Modified: incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/CategoriesDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/CategoriesDefault.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/CategoriesDefault.java (original)
+++ incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/CategoriesDefault.java Sun Jan 22 14:43:52 2012
@@ -36,6 +36,7 @@ public class CategoriesDefault extends A
     public String iconName() {
         return "Category";
     }
+
     // }}
 
     @Override
@@ -44,9 +45,9 @@ public class CategoriesDefault extends A
     }
 
     @Override
-    public Category newCategory(String description) {
+    public Category newCategory(final String description) {
         Category category = find(description);
-        if(category != null) {
+        if (category != null) {
             return category;
         }
         category = newTransientInstance(Category.class);
@@ -56,7 +57,7 @@ public class CategoriesDefault extends A
     }
 
     @Override
-    public Category find(String description) {
+    public Category find(final String description) {
         return firstMatch(Category.class, Category.matching(description));
     }
 

Modified: incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/ToDoItemsDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/ToDoItemsDefault.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/ToDoItemsDefault.java (original)
+++ incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/ToDoItemsDefault.java Sun Jan 22 14:43:52 2012
@@ -29,7 +29,6 @@ import org.apache.isis.examples.onlinede
 import org.apache.isis.examples.onlinedemo.dom.items.ToDoItem;
 import org.apache.isis.examples.onlinedemo.dom.items.ToDoItems;
 
-
 public class ToDoItemsDefault extends AbstractFactoryAndRepository implements ToDoItems {
 
     // {{ Id, iconName
@@ -41,19 +40,21 @@ public class ToDoItemsDefault extends Ab
     public String iconName() {
         return "ToDoItem";
     }
+
     // }}
-    
+
     // {{ ToDosForToday (action)
     @Override
     public List<ToDoItem> toDosForToday() {
         return allMatches(ToDoItem.class, Filters.and(ToDoItem.thoseOwnedBy(currentUser()), ToDoItem.thoseDue()));
     }
+
     // }}
-    
+
     // {{ NewToDo (action)
     @Override
-    public ToDoItem newToDo(String description, Category category, Date dueBy) {
-        ToDoItem toDoItem = newTransientInstance(ToDoItem.class);
+    public ToDoItem newToDo(final String description, final Category category, final Date dueBy) {
+        final ToDoItem toDoItem = newTransientInstance(ToDoItem.class);
         toDoItem.setDescription(description);
         toDoItem.setCategory(category);
         toDoItem.setDueBy(dueBy);
@@ -61,6 +62,7 @@ public class ToDoItemsDefault extends Ab
         persist(toDoItem);
         return toDoItem;
     }
+
     // }}
 
     // {{ AllToDos (action)
@@ -71,30 +73,30 @@ public class ToDoItemsDefault extends Ab
         Collections.sort(items);
         return items;
     }
+
     // }}
 
     // {{ SimilarTo (action)
 
     @Override
-    public List<ToDoItem> similarTo(ToDoItem toDoItem) {
+    public List<ToDoItem> similarTo(final ToDoItem toDoItem) {
         return allMatches(ToDoItem.class, ToDoItem.thoseSimilarTo(toDoItem));
     }
-    // }}
 
+    // }}
 
     // {{ RemoveCompleted (action)
 
     @Override
     public void removeCompleted() {
-        final List<ToDoItem> complete= allMatches(ToDoItem.class, ToDoItem.thoseComplete());
-        for (ToDoItem toDoItem : complete) {
+        final List<ToDoItem> complete = allMatches(ToDoItem.class, ToDoItem.thoseComplete());
+        for (final ToDoItem toDoItem : complete) {
             getContainer().remove(toDoItem);
         }
         final int size = complete.size();
-        getContainer().informUser("" + size + " item" +
-        		(size != 1? "s": "") +
-        		" removed");
+        getContainer().informUser("" + size + " item" + (size != 1 ? "s" : "") + " removed");
     }
+
     // }}
 
     // {{ helpers
@@ -103,5 +105,4 @@ public class ToDoItemsDefault extends Ab
     }
     // }}
 
-
 }

Modified: incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/auth/AuthenticationManagerSupportingInMemoryRegistrationInstaller.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/auth/AuthenticationManagerSupportingInMemoryRegistrationInstaller.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/auth/AuthenticationManagerSupportingInMemoryRegistrationInstaller.java (original)
+++ incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/auth/AuthenticationManagerSupportingInMemoryRegistrationInstaller.java Sun Jan 22 14:43:52 2012
@@ -27,17 +27,16 @@ import org.apache.isis.runtimes.dflt.run
 
 import com.google.common.collect.Lists;
 
-public class AuthenticationManagerSupportingInMemoryRegistrationInstaller extends
-    AuthenticationManagerStandardInstallerAbstractForDfltRuntime {
+public class AuthenticationManagerSupportingInMemoryRegistrationInstaller extends AuthenticationManagerStandardInstallerAbstractForDfltRuntime {
 
     public AuthenticationManagerSupportingInMemoryRegistrationInstaller() {
         super("demo");
     }
 
     @Override
-    protected List<Authenticator> createAuthenticators(IsisConfiguration configuration) {
-        return Lists.<Authenticator>newArrayList(
-                //new FileAuthenticator(configuration), 
+    protected List<Authenticator> createAuthenticators(final IsisConfiguration configuration) {
+        return Lists.<Authenticator> newArrayList(
+        // new FileAuthenticator(configuration),
                 new AuthenticatorInMemory(configuration));
     }
 

Modified: incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/auth/AuthenticatorInMemory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/auth/AuthenticatorInMemory.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/auth/AuthenticatorInMemory.java (original)
+++ incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/auth/AuthenticatorInMemory.java Sun Jan 22 14:43:52 2012
@@ -35,6 +35,7 @@ import com.google.common.collect.Maps;
 public class AuthenticatorInMemory extends AuthenticatorAbstract implements Registrar {
 
     private static AuthenticatorInMemory instance;
+
     /**
      * Rather nasty, but is required to make available to the Users repository.
      */
@@ -42,8 +43,8 @@ public class AuthenticatorInMemory exten
         return instance;
     }
 
-    private Map<String, String> passwordsByUser = Maps.newHashMap();
-    
+    private final Map<String, String> passwordsByUser = Maps.newHashMap();
+
     public AuthenticatorInMemory(final IsisConfiguration configuration) {
         super(configuration);
         instance = this;
@@ -70,13 +71,11 @@ public class AuthenticatorInMemory exten
     public boolean register(final RegistrationDetails registrationDetails) {
         final RegistrationDetailsPassword registration = (RegistrationDetailsPassword) registrationDetails;
         final String userId = registration.getUser();
-        if(passwordsByUser.containsKey(userId)) {
+        if (passwordsByUser.containsKey(userId)) {
             return false;
         }
         passwordsByUser.put(userId, registration.getPassword());
         return true;
     }
-    
 
 }
-

Modified: incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/filters/RedirectToDocsFilter.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/filters/RedirectToDocsFilter.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/filters/RedirectToDocsFilter.java (original)
+++ incubator/isis/trunk/examples/onlinedemo/webapp/src/main/java/org/apache/isis/examples/onlinedemo/filters/RedirectToDocsFilter.java Sun Jan 22 14:43:52 2012
@@ -15,14 +15,14 @@ import org.apache.log4j.Logger;
 
 /**
  * This filter attempts to ensure that would-be users of the framework are
- * directed to the bundled documentation, rather than just hitting the
- * REST API (ie the json viewer).
+ * directed to the bundled documentation, rather than just hitting the REST API
+ * (ie the json viewer).
  * 
  * <p>
  * Specifically, if the request is to "/" but the Accept header is anything
- * other than "application/json" (eg is set to "text/html" and suggesting that 
- * the user is using a browser to access the webapp) then the filter 
- * redirects to /index.html (the documentation pages).
+ * other than "application/json" (eg is set to "text/html" and suggesting that
+ * the user is using a browser to access the webapp) then the filter redirects
+ * to /index.html (the documentation pages).
  * 
  * <p>
  * Only if the Accept header is set to application/json is the request allowed
@@ -31,19 +31,19 @@ import org.apache.log4j.Logger;
 public class RedirectToDocsFilter implements Filter {
 
     private static final Logger LOG = Logger.getLogger(RedirectToDocsFilter.class);
-    
+
     private static final String REDIRECT_TO_KEY = "redirectTo";
     private static final String REDIRECT_TO_DEFAULT = "/index.html";
-    
+
     private static final String ACCEPT_HEADER = "Accept";
     private static final String APPLICATION_JSON_MIME_TYPE = "application/json";
-    
+
     private String redirectTo;
 
     @Override
-    public void init(FilterConfig cfg) throws ServletException {
+    public void init(final FilterConfig cfg) throws ServletException {
         redirectTo = cfg.getInitParameter(REDIRECT_TO_KEY);
-        if(redirectTo == null) {
+        if (redirectTo == null) {
             redirectTo = REDIRECT_TO_DEFAULT;
         }
         System.out.println("redirectToDocsFilter: redirectTo=" + redirectTo);
@@ -54,45 +54,43 @@ public class RedirectToDocsFilter implem
     public void destroy() {
     }
 
-    
     @Override
-    public void doFilter(final ServletRequest request, final ServletResponse response, FilterChain chain) throws IOException, ServletException {
+    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException {
         final HttpServletRequest httpServletRequest = (HttpServletRequest) request;
         final HttpServletResponse httpServletResponse = (HttpServletResponse) response;
-        
+
         // do nothing if not requesting "/"
         final String servletPath = httpServletRequest.getServletPath();
         System.out.println("redirectToDocsFilter: servletPath: " + servletPath);
         LOG.info("redirectToDocsFilter: servletPath: " + servletPath);
-        
-        if(!"/".equals(servletPath)) {
+
+        if (!"/".equals(servletPath)) {
             chain.doFilter(request, response);
             return;
         }
-        
+
         final String acceptHeader = httpServletRequest.getHeader(ACCEPT_HEADER);
-        if(acceptHeader != null && acceptHeader.startsWith(APPLICATION_JSON_MIME_TYPE)) {
+        if (acceptHeader != null && acceptHeader.startsWith(APPLICATION_JSON_MIME_TYPE)) {
             // let request through
             chain.doFilter(request, response);
             return;
         }
-        
+
         // otherwise redirect
         final String redirect = combine(httpServletRequest.getContextPath(), redirectTo);
         System.out.println("redirectToDocsFilter: redirecting to: " + redirect);
         LOG.info("redirectToDocsFilter: redirecting to: " + redirect);
-        
+
         httpServletResponse.sendRedirect(redirect);
     }
 
-    private static String combine(String str1, String str2) {
+    private static String combine(final String str1, final String str2) {
         final StringBuilder buf = new StringBuilder(str1);
-        if(!str2.startsWith("/")) {
+        if (!str2.startsWith("/")) {
             buf.append("/");
         }
         buf.append(str2);
         return buf.toString();
     }
 
-    
 }

Modified: incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/mobile/app.css
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/mobile/app.css?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/mobile/app.css (original)
+++ incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/mobile/app.css Sun Jan 22 14:43:52 2012
@@ -1,31 +0,0 @@
-* {
-	font-family: Verdana;
-	font-size: 96%;
-}
-
-label {
-	width: 10em;
-	float: left;
-}
-
-label.error {
-	float: none;
-	color: red;
-	padding-left: .5em;
-	vertical-align: top;
-	display: none;
-}
-
-p {
-	clear: both;
-}
-
-.submit {
-	margin-left: 12em;
-}
-
-em {
-	font-weight: bold;
-	padding-right: 1em;
-	vertical-align: top;
-}
\ No newline at end of file

Modified: incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/mobile/index.html
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/mobile/index.html?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/mobile/index.html (original)
+++ incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/mobile/index.html Sun Jan 22 14:43:52 2012
@@ -45,7 +45,7 @@
         
         <script type="text/javascript">
             $("#home button").click(function(){
-                $.mobile.changePage("/services/toDoItems/actions/toDosForToday/invoke", "pop")
+                $.mobile.changePage("../services/toDoItems/actions/toDosForToday/invoke", "pop")
             });
         </script>
 	</div>

Modified: incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItem.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItem.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItem.java (original)
+++ incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItem.java Sun Jan 22 14:43:52 2012
@@ -29,8 +29,8 @@ public class ToDoItem extends AbstractDo
     public String title() {
         return getDescription();
     }
-    // }}
 
+    // }}
 
     // {{ Description
     private String description;
@@ -40,12 +40,12 @@ public class ToDoItem extends AbstractDo
         return description;
     }
 
-    public void setDescription(String description) {
+    public void setDescription(final String description) {
         this.description = description;
     }
+
     // }}
 
-    
     // {{ Done
     private boolean done;
 
@@ -55,21 +55,22 @@ public class ToDoItem extends AbstractDo
         return done;
     }
 
-    public void setDone(boolean done) {
+    public void setDone(final boolean done) {
         this.done = done;
     }
-    // }}
-
 
+    // }}
 
     // {{ markAsDone
     @MemberOrder(sequence = "1")
     public void markAsDone() {
         setDone(true);
     }
+
     public String disableMarkAsDone() {
-        return done?"Already done":null;
+        return done ? "Already done" : null;
     }
+
     // }}
 
     // {{ markAsNotDone
@@ -77,8 +78,9 @@ public class ToDoItem extends AbstractDo
     public void markAsNotDone() {
         setDone(false);
     }
+
     public String disableMarkAsNotDone() {
-        return !done?"Not yet done":null;
+        return !done ? "Not yet done" : null;
     }
     // }}
 

Modified: incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItems.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItems.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItems.java (original)
+++ incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItems.java Sun Jan 22 14:43:52 2012
@@ -27,11 +27,10 @@ import org.apache.isis.applib.annotation
 @Named("ToDos")
 public interface ToDoItems {
 
-    @MemberOrder(sequence="1")
+    @MemberOrder(sequence = "1")
     public List<ToDoItem> notYetDone();
 
-    @MemberOrder(sequence="2")
-    public ToDoItem newToDo(
-        @Named("Description") String description);
+    @MemberOrder(sequence = "2")
+    public ToDoItem newToDo(@Named("Description") String description);
 
 }

Modified: incubator/isis/trunk/examples/quickstart/fixture/src/main/java/fixture/LogonAsSvenFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/fixture/src/main/java/fixture/LogonAsSvenFixture.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/fixture/src/main/java/fixture/LogonAsSvenFixture.java (original)
+++ incubator/isis/trunk/examples/quickstart/fixture/src/main/java/fixture/LogonAsSvenFixture.java Sun Jan 22 14:43:52 2012
@@ -17,15 +17,14 @@
  *  under the License.
  */
 
-
 package fixture;
 
 import org.apache.isis.applib.fixtures.LogonFixture;
 
 public class LogonAsSvenFixture extends LogonFixture {
 
-	public LogonAsSvenFixture() {
-		super("sven");
-	}
+    public LogonAsSvenFixture() {
+        super("sven");
+    }
 
 }

Modified: incubator/isis/trunk/examples/quickstart/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java (original)
+++ incubator/isis/trunk/examples/quickstart/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java Sun Jan 22 14:43:52 2012
@@ -17,14 +17,12 @@
  *  under the License.
  */
 
-
 package fixture.todo;
 
-import dom.todo.ToDoItem;
-import dom.todo.ToDoItems;
-
 import org.apache.isis.applib.fixtures.AbstractFixture;
 
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
 
 public class ToDoItemsFixture extends AbstractFixture {
 
@@ -36,15 +34,15 @@ public class ToDoItemsFixture extends Ab
         createToDoItem("Write blog post");
         createToDoItem("Organize brown bag");
     }
-    
-    private ToDoItem createToDoItem(String description) {
+
+    private ToDoItem createToDoItem(final String description) {
         return toDoItems.newToDo(description);
     }
 
-    
     private ToDoItems toDoItems;
-    public void setToDoItemRepository(ToDoItems toDoItems) {
+
+    public void setToDoItemRepository(final ToDoItems toDoItems) {
         this.toDoItems = toDoItems;
     }
-    
+
 }

Modified: incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemsDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemsDefault.java?rev=1234519&r1=1234518&r2=1234519&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemsDefault.java (original)
+++ incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemsDefault.java Sun Jan 22 14:43:52 2012
@@ -21,12 +21,12 @@ package objstore.dflt.todo;
 
 import java.util.List;
 
-import dom.todo.ToDoItem;
-import dom.todo.ToDoItems;
-
 import org.apache.isis.applib.AbstractFactoryAndRepository;
 import org.apache.isis.applib.filter.Filter;
 
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+
 public class ToDoItemsDefault extends AbstractFactoryAndRepository implements ToDoItems {
 
     // {{ Id, iconName
@@ -38,29 +38,27 @@ public class ToDoItemsDefault extends Ab
     public String iconName() {
         return "ToDoItem";
     }
+
     // }}
 
-    
     @Override
     public List<ToDoItem> notYetDone() {
         return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
             @Override
-            public boolean accept(ToDoItem t) {
+            public boolean accept(final ToDoItem t) {
                 return !t.isComplete();
             }
         });
     }
 
-    
     // {{ NewToDo
     @Override
-    public ToDoItem newToDo(String description) {
-        ToDoItem toDoItem = newTransientInstance(ToDoItem.class);
+    public ToDoItem newToDo(final String description) {
+        final ToDoItem toDoItem = newTransientInstance(ToDoItem.class);
         toDoItem.setDescription(description);
         persist(toDoItem);
         return toDoItem;
     }
     // }}
 
-
 }



Mime
View raw message