You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2012/12/06 12:09:58 UTC
[39/51] [partial] ISIS-188: moving components into correct
directories.
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/progmodels/wrapper/wrapper-metamodel/src/test/java/org/apache/isis/progmodel/wrapper/WrappedFactoryDefaultTest_wrappedObject.java
----------------------------------------------------------------------
diff --git a/framework/progmodels/wrapper/wrapper-metamodel/src/test/java/org/apache/isis/progmodel/wrapper/WrappedFactoryDefaultTest_wrappedObject.java b/framework/progmodels/wrapper/wrapper-metamodel/src/test/java/org/apache/isis/progmodel/wrapper/WrappedFactoryDefaultTest_wrappedObject.java
deleted file mode 100644
index ba2c219..0000000
--- a/framework/progmodels/wrapper/wrapper-metamodel/src/test/java/org/apache/isis/progmodel/wrapper/WrappedFactoryDefaultTest_wrappedObject.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * 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.progmodel.wrapper;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
-import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
-import org.apache.isis.progmodel.wrapper.applib.DisabledException;
-import org.apache.isis.progmodel.wrapper.applib.HiddenException;
-import org.apache.isis.progmodel.wrapper.applib.InvalidException;
-import org.apache.isis.progmodel.wrapper.applib.WrapperFactory;
-import org.apache.isis.progmodel.wrapper.metamodel.internal.WrapperFactoryDefault;
-import org.apache.isis.tck.dom.claimapp.employees.Employee;
-import org.apache.isis.tck.dom.claimapp.employees.EmployeeRepository;
-import org.apache.isis.tck.dom.claimapp.employees.EmployeeRepositoryImpl;
-
-public class WrappedFactoryDefaultTest_wrappedObject {
-
- @Rule
- public JUnitRuleMockery2 mockery = JUnitRuleMockery2.createFor(Mode.INTERFACES_ONLY);
-
- private EmployeeRepository employeeRepository;
- // private ClaimRepository claimRepository;
-
- private Employee employeeDO;
- private Employee employeeWO;
-
- private WrapperFactory wrapperFactory;
-
- @Before
- public void setUp() {
-
- employeeRepository = new EmployeeRepositoryImpl();
- // claimRepository = new ClaimRepositoryImpl();
-
- employeeDO = new Employee();
- employeeDO.setName("Smith");
- employeeDO.setEmployeeRepository(employeeRepository); // would be done
- // by the
- // EmbeddedContext
- // impl
-
- wrapperFactory = new WrapperFactoryDefault();
- employeeWO = wrapperFactory.wrap(employeeDO);
- }
-
- @Ignore("TODO - moved from embedded runtime, need to re-enable")
- @Test
- public void shouldWrapDomainObject() {
- // then
- assertThat(employeeWO, is(notNullValue()));
- }
-
- @Ignore("TODO - moved from embedded runtime, need to re-enable")
- @Test
- public void shouldBeAbleToInjectIntoDomainObjects() {
-
- // given
- assertThat(employeeDO.getEmployeeRepository(), is(notNullValue()));
-
- // then
- assertThat(employeeWO.getEmployeeRepository(), is(notNullValue()));
- }
-
- @Ignore("TODO - moved from embedded runtime, need to re-enable")
- @Test
- public void shouldBeAbleToReadVisibleProperty() {
- // then
- assertThat(employeeWO.getName(), is(employeeDO.getName()));
- }
-
- @Ignore("TODO - moved from embedded runtime, need to re-enable")
- @Test(expected = HiddenException.class)
- public void shouldNotBeAbleToViewHiddenProperty() {
- // given
- employeeDO.whetherHideName = true;
- // when
- employeeWO.getName();
- // then should throw exception
- }
-
- @Ignore("TODO - moved from embedded runtime, need to re-enable")
- @Test
- public void shouldBeAbleToModifyEnabledPropertyUsingSetter() {
- // when
- employeeWO.setName("Jones");
- // then
- assertThat(employeeDO.getName(), is("Jones"));
- assertThat(employeeWO.getName(), is(employeeDO.getName()));
- }
-
- @Ignore("TODO - moved from embedded runtime, need to re-enable")
- @Test(expected = DisabledException.class)
- public void shouldNotBeAbleToModifyDisabledProperty() {
- // given
- employeeDO.reasonDisableName = "sorry, no change allowed";
- // when
- employeeWO.setName("Jones");
- // then should throw exception
- }
-
- @Ignore("TODO - moved from embedded runtime, need to re-enable")
- @Test(expected = UnsupportedOperationException.class)
- public void shouldNotBeAbleToModifyPropertyUsingModify() {
- // when
- employeeWO.modifyName("Jones");
- // then should throw exception
- }
-
- @Ignore("TODO - moved from embedded runtime, need to re-enable")
- @Test(expected = UnsupportedOperationException.class)
- public void shouldNotBeAbleToModifyPropertyUsingClear() {
- // when
- employeeWO.clearName();
- // then should throw exception
- }
-
- @Ignore("TODO - moved from embedded runtime, need to re-enable")
- @Test(expected = InvalidException.class)
- public void shouldNotBeAbleToModifyPropertyIfInvalid() {
- // given
- employeeDO.reasonValidateName = "sorry, invalid data";
- // when
- employeeWO.setName("Jones");
- // then should throw exception
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/progmodels/wrapper/wrapper-metamodel/src/test/java/org/apache/isis/progmodel/wrapper/WrappedFactoryDefaultTest_wrappedObject_transient.java
----------------------------------------------------------------------
diff --git a/framework/progmodels/wrapper/wrapper-metamodel/src/test/java/org/apache/isis/progmodel/wrapper/WrappedFactoryDefaultTest_wrappedObject_transient.java b/framework/progmodels/wrapper/wrapper-metamodel/src/test/java/org/apache/isis/progmodel/wrapper/WrappedFactoryDefaultTest_wrappedObject_transient.java
deleted file mode 100644
index 3d1a1e4..0000000
--- a/framework/progmodels/wrapper/wrapper-metamodel/src/test/java/org/apache/isis/progmodel/wrapper/WrappedFactoryDefaultTest_wrappedObject_transient.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * 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.progmodel.wrapper;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.jmock.Expectations;
-import org.jmock.auto.Mock;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.events.PropertyModifyEvent;
-import org.apache.isis.applib.events.PropertyUsabilityEvent;
-import org.apache.isis.applib.events.PropertyVisibilityEvent;
-import org.apache.isis.applib.filter.Filter;
-import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.ObjectPersistor;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.consent.Allow;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.consent.InteractionResult;
-import org.apache.isis.core.metamodel.consent.Veto;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.spec.SpecificationLoader;
-import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
-import org.apache.isis.core.metamodel.specloader.specimpl.dflt.ObjectSpecificationDefault;
-import org.apache.isis.core.progmodel.facets.members.disabled.DisabledFacet;
-import org.apache.isis.core.progmodel.facets.members.disabled.staticmethod.DisabledFacetAlwaysEverywhere;
-import org.apache.isis.core.progmodel.facets.properties.accessor.PropertyAccessorFacetViaAccessor;
-import org.apache.isis.core.progmodel.facets.properties.modify.PropertySetterFacetViaSetterMethod;
-import org.apache.isis.core.runtime.authentication.standard.SimpleSession;
-import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
-import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
-import org.apache.isis.progmodel.wrapper.applib.DisabledException;
-import org.apache.isis.progmodel.wrapper.metamodel.internal.WrapperFactoryDefault;
-import org.apache.isis.tck.dom.claimapp.employees.Employee;
-
-public class WrappedFactoryDefaultTest_wrappedObject_transient {
-
- @Rule
- public final JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
-
- @Mock
- private AdapterManager mockAdapterManager;
- @Mock
- private AuthenticationSessionProvider mockAuthenticationSessionProvider;
- @Mock
- private ObjectPersistor mockObjectPersistor;
- @Mock
- private SpecificationLoader mockSpecificationLookup;
-
- private Employee employeeDO;
- @Mock
- private ObjectAdapter mockEmployeeAdapter;
- @Mock
- private ObjectSpecificationDefault mockEmployeeSpec;
- @Mock
- private OneToOneAssociation mockPasswordMember;
- @Mock
- private Identifier mockPasswordIdentifier;
-
- @Mock
- protected ObjectAdapter mockPasswordAdapter;
-
- private final String passwordValue = "12345678";
-
- private final SimpleSession session = new SimpleSession("tester", Collections.<String>emptyList());
-
- private List<Facet> facets;
- private Method getPasswordMethod;
- private Method setPasswordMethod;
-
-
- private WrapperFactoryDefault wrapperFactory;
- private Employee employeeWO;
-
-
- @Before
- public void setUp() throws Exception {
-
- // employeeRepository = new EmployeeRepositoryImpl();
- // claimRepository = new ClaimRepositoryImpl();
-
- employeeDO = new Employee();
- employeeDO.setName("Smith");
-
- getPasswordMethod = Employee.class.getMethod("getPassword");
- setPasswordMethod = Employee.class.getMethod("setPassword", String.class);
-
- wrapperFactory = new WrapperFactoryDefault();
- wrapperFactory.setAdapterManager(mockAdapterManager);
- wrapperFactory.setAuthenticationSessionProvider(mockAuthenticationSessionProvider);
- wrapperFactory.setObjectPersistor(mockObjectPersistor);
- wrapperFactory.setSpecificationLookup(mockSpecificationLookup);
-
- context.checking(new Expectations() {
- {
- allowing(mockAdapterManager).getAdapterFor(employeeDO);
- will(returnValue(mockEmployeeAdapter));
-
- allowing(mockAdapterManager).adapterFor(passwordValue);
- will(returnValue(mockPasswordAdapter));
-
- allowing(mockEmployeeAdapter).getSpecification();
- will(returnValue(mockEmployeeSpec));
-
- allowing(mockEmployeeAdapter).getObject();
- will(returnValue(employeeDO));
-
- allowing(mockPasswordAdapter).getObject();
- will(returnValue(passwordValue));
-
- allowing(mockPasswordMember).getIdentifier();
- will(returnValue(mockPasswordIdentifier));
-
- allowing(mockSpecificationLookup).loadSpecification(Employee.class);
- will(returnValue(mockEmployeeSpec));
-
- allowing(mockEmployeeSpec).getMember(with(setPasswordMethod));
- will(returnValue(mockPasswordMember));
-
- allowing(mockEmployeeSpec).getMember(with(getPasswordMethod));
- will(returnValue(mockPasswordMember));
-
- allowing(mockPasswordMember).getName();
- will(returnValue("password"));
-
- allowing(mockAuthenticationSessionProvider).getAuthenticationSession();
- will(returnValue(session));
-
- allowing(mockPasswordMember).isOneToOneAssociation();
- will(returnValue(true));
-
- allowing(mockPasswordMember).isOneToManyAssociation();
- will(returnValue(false));
- }
- });
-
- employeeWO = wrapperFactory.wrap(employeeDO);
- }
-
- @Test(expected = DisabledException.class)
- public void shouldNotBeAbleToModifyProperty() {
-
- // given
- final DisabledFacet disabledFacet = new DisabledFacetAlwaysEverywhere(mockPasswordMember);
- facets = Arrays.asList((Facet)disabledFacet, new PropertySetterFacetViaSetterMethod(setPasswordMethod, mockPasswordMember));
-
- final Consent visibilityConsent = new Allow(new InteractionResult(new PropertyVisibilityEvent(employeeDO, null)));
-
- final InteractionResult usabilityInteractionResult = new InteractionResult(new PropertyUsabilityEvent(employeeDO, null));
- usabilityInteractionResult.advise("disabled", disabledFacet);
- final Consent usabilityConsent = new Veto(usabilityInteractionResult);
-
- context.checking(new Expectations() {
- {
- allowing(mockPasswordMember).getFacets(with(any(Filter.class)));
- will(returnValue(facets));
-
- allowing(mockPasswordMember).isVisible(session, mockEmployeeAdapter, Where.ANYWHERE);
- will(returnValue(visibilityConsent));
-
- allowing(mockPasswordMember).isUsable(session, mockEmployeeAdapter, Where.ANYWHERE);
- will(returnValue(usabilityConsent));
- }
- });
-
- // when
- employeeWO.setPassword(passwordValue);
-
- // then should throw exception
- }
-
- @Test
- public void canModifyProperty() {
- // given
-
- final Consent visibilityConsent = new Allow(new InteractionResult(new PropertyVisibilityEvent(employeeDO, mockPasswordIdentifier)));
- final Consent usabilityConsent = new Allow(new InteractionResult(new PropertyUsabilityEvent(employeeDO, mockPasswordIdentifier)));
- final Consent validityConsent = new Allow(new InteractionResult(new PropertyModifyEvent(employeeDO, mockPasswordIdentifier, passwordValue)));
-
- context.checking(new Expectations() {
- {
- allowing(mockPasswordMember).isVisible(session, mockEmployeeAdapter, Where.ANYWHERE);
- will(returnValue(visibilityConsent));
-
- allowing(mockPasswordMember).isUsable(session, mockEmployeeAdapter, Where.ANYWHERE);
- will(returnValue(usabilityConsent));
-
- allowing(mockPasswordMember).isAssociationValid(mockEmployeeAdapter, mockPasswordAdapter);
- will(returnValue(validityConsent));
- }
- });
-
- facets = Arrays.asList((Facet)new PropertySetterFacetViaSetterMethod(setPasswordMethod, mockPasswordMember));
- context.checking(new Expectations() {
- {
- one(mockPasswordMember).getFacets(with(any(Filter.class)));
- will(returnValue(facets));
-
- one(mockPasswordMember).set(mockEmployeeAdapter, mockPasswordAdapter);
- }
- });
-
- // when
- employeeWO.setPassword(passwordValue);
-
-
- // and given
- facets = Arrays.asList((Facet)new PropertyAccessorFacetViaAccessor(getPasswordMethod, mockPasswordMember));
- context.checking(new Expectations() {
- {
- one(mockPasswordMember).getFacets(with(any(Filter.class)));
- will(returnValue(facets));
-
- one(mockPasswordMember).get(mockEmployeeAdapter);
- will(returnValue(mockPasswordAdapter));
- }
- });
-
- // then be allowed
- assertThat(employeeWO.getPassword(), is(passwordValue));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/pom.xml
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/pom.xml b/framework/quickstart-archetype/pom.xml
deleted file mode 100644
index ee1be92..0000000
--- a/framework/quickstart-archetype/pom.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.isis</groupId>
- <artifactId>isis</artifactId>
- <version>0.3.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>quickstart-archetype</artifactId>
- <packaging>maven-archetype</packaging>
-
- <name>Apache Isis Quickstart Archetype</name>
-
- <build>
- <extensions>
- <extension>
- <groupId>org.apache.maven.archetype</groupId>
- <artifactId>archetype-packaging</artifactId>
- <version>2.1</version>
- </extension>
- </extensions>
-
- <pluginManagement>
- <plugins>
- <plugin>
- <artifactId>maven-archetype-plugin</artifactId>
- <version>2.1</version>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
-
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/appended-resources/supplemental-models.xml
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/appended-resources/supplemental-models.xml b/framework/quickstart-archetype/src/main/appended-resources/supplemental-models.xml
deleted file mode 100644
index 837b4e9..0000000
--- a/framework/quickstart-archetype/src/main/appended-resources/supplemental-models.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<supplementalDataModels
- xmlns="http://maven.apache.org/supplemental-model/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/supplemental-model/1.0.0
- http://maven.apache.org/xsd/supplemental-model-1.0.0.xsd">
-
-</supplementalDataModels>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/framework/quickstart-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
deleted file mode 100644
index be2b8a4..0000000
--- a/framework/quickstart-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ /dev/null
@@ -1,339 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" name="quickstart" xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modules>
- <module id="${rootArtifactId}-dom" dir="dom" name="${rootArtifactId}-dom">
- <fileSets>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/java</directory>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.png</include>
- <include>**/*.gif</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory/>
- <includes>
- <include>log4j.properties</include>
- </includes>
- </fileSet>
- </fileSets>
- </module>
- <module id="${rootArtifactId}-fixture" dir="fixture" name="${rootArtifactId}-fixture">
- <fileSets>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/java</directory>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </module>
- <module id="${rootArtifactId}-objstore-jdo" dir="objstore-jdo" name="${rootArtifactId}-objstore-jdo">
- <fileSets>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/java</directory>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>lib</directory>
- <includes>
- <include>**/*.gitignore</include>
- </includes>
- </fileSet>
- </fileSets>
- </module>
- <module id="${rootArtifactId}-viewer-dnd" dir="viewer-dnd" name="${rootArtifactId}-viewer-dnd">
- <fileSets>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>config</directory>
- <includes>
- <include>**/*.properties</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>ide/eclipse</directory>
- <includes>
- <include>**/*.launch</include>
- </includes>
- </fileSet>
- </fileSets>
- </module>
- <module id="${rootArtifactId}-viewer-html" dir="viewer-html" name="${rootArtifactId}-viewer-html">
- <fileSets>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/webapp</directory>
- <includes>
- <include>**/*.xml</include>
- <include>**/*.properties</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/jettyconsole</directory>
- <includes>
- <include>**/*.png</include>
- <include>**/*.pdn</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/webapp</directory>
- <includes>
- <include>**/*.passwords</include>
- <include>**/*.allow</include>
- <include>**/*.png</include>
- <include>**/*.css</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.png</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>hsql-db</directory>
- <includes>
- <include>**/*.properties</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>lib</directory>
- <includes>
- <include>**/*.gitignore</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>ide/eclipse</directory>
- <includes>
- <include>**/*.launch</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>hsql-db</directory>
- <includes>
- <include>**/*.lck</include>
- <include>**/*.script</include>
- <include>**/*.log</include>
- </includes>
- </fileSet>
- </fileSets>
- </module>
- <module id="${rootArtifactId}-viewer-restfulobjects" dir="viewer-restfulobjects" name="${rootArtifactId}-viewer-restfulobjects">
- <fileSets>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/webapp</directory>
- <includes>
- <include>**/*.xml</include>
- <include>**/*.html</include>
- <include>**/*.properties</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/jettyconsole</directory>
- <includes>
- <include>**/*.png</include>
- <include>**/*.pdn</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/webapp</directory>
- <includes>
- <include>**/*.passwords</include>
- <include>**/*.allow</include>
- <include>**/*.png</include>
- <include>**/*.js</include>
- <include>**/*.css</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.png</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>lib</directory>
- <includes>
- <include>**/*.gitignore</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>ide/eclipse</directory>
- <includes>
- <include>**/*.launch</include>
- </includes>
- </fileSet>
- </fileSets>
- </module>
- <module id="${rootArtifactId}-viewer-scimpi" dir="viewer-scimpi" name="${rootArtifactId}-viewer-scimpi">
- <fileSets>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/webapp</directory>
- <includes>
- <include>**/*.xml</include>
- <include>**/*.properties</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/jettyconsole</directory>
- <includes>
- <include>**/*.png</include>
- <include>**/*.pdn</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/webapp</directory>
- <includes>
- <include>**/*.passwords</include>
- <include>**/*.allow</include>
- <include>**/*.png</include>
- <include>**/*.shtml</include>
- <include>**/*.css</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.png</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>lib</directory>
- <includes>
- <include>**/*.gitignore</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>ide/eclipse</directory>
- <includes>
- <include>**/*.launch</include>
- </includes>
- </fileSet>
- </fileSets>
- </module>
- <module id="${rootArtifactId}-viewer-wicket" dir="viewer-wicket" name="${rootArtifactId}-viewer-wicket">
- <fileSets>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/java</directory>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/webapp</directory>
- <includes>
- <include>**/*.xml</include>
- <include>**/*.properties</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.html</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/jettyconsole</directory>
- <includes>
- <include>**/*.png</include>
- <include>**/*.pdn</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/webapp</directory>
- <includes>
- <include>**/*.passwords</include>
- <include>**/*.allow</include>
- <include>**/*.png</include>
- <include>**/*.js</include>
- <include>**/*.pdn</include>
- <include>**/*.css</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.png</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>lib</directory>
- <includes>
- <include>**/*.gitignore</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>ide/eclipse</directory>
- <includes>
- <include>**/*.launch</include>
- </includes>
- </fileSet>
- </fileSets>
- </module>
- <module id="${rootArtifactId}-tests-junit" dir="tests-junit" name="${rootArtifactId}-tests-junit">
- <fileSets>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/test/java</directory>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory/>
- <includes>
- <include>isis.properties</include>
- </includes>
- </fileSet>
- </fileSets>
- </module>
- <module id="${rootArtifactId}-tests-bdd" dir="tests-bdd" name="${rootArtifactId}-tests-bdd">
- <fileSets>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/test/java</directory>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/test/resources</directory>
- <includes>
- <include>**/*.html</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/test/resources</directory>
- <includes>
- <include>**/*.dtd</include>
- <include>**/*.ent</include>
- <include>**/*.css</include>
- </includes>
- </fileSet>
- </fileSets>
- </module>
- </modules>
-</archetype-descriptor>
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/log4j.properties
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/log4j.properties b/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/log4j.properties
deleted file mode 100644
index 43ee48c..0000000
--- a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/log4j.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-${symbol_pound} LOG4J Configuration
-${symbol_pound} ===================
-
-${symbol_pound} Basic logging goes to "datanucleus.log"
-log4j.appender.A1=org.apache.log4j.FileAppender
-log4j.appender.A1.File=datanucleus.log
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) %-5p [%c] - %m%n
-${symbol_pound}log4j.appender.A1.Threshold=INFO
-
-${symbol_pound} Categories
-${symbol_pound} Each category can be set to a "level", and to direct to an appender
-
-${symbol_pound} Default to DEBUG level for all DataNucleus categories
-log4j.logger.DataNucleus = DEBUG, A1
-
-log4j.category.com.mchange.v2.c3p0=INFO, A1
-log4j.category.com.mchange.v2.resourcepool=INFO, A1
-log4j.category.org.logicalcobwebs.proxool=INFO,A1
-
-
-${symbol_pound} Hbase libs logging
-log4j.category.org.apache.hadoop=INFO,A1
-log4j.category.org.apache.zookeeper=INFO,A1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/pom.xml
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/pom.xml b/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/pom.xml
deleted file mode 100644
index 6fe6115..0000000
--- a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/pom.xml
+++ /dev/null
@@ -1,156 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>${groupId}</groupId>
- <artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
- </parent>
-
- <artifactId>${artifactId}</artifactId>
- <name>Quickstart DOM</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.datanucleus</groupId>
- <artifactId>maven-datanucleus-plugin</artifactId>
- <version>3.1.1</version>
- <configuration>
- <fork>false</fork>
- <log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
- <verbose>true</verbose>
- <props>${basedir}/datanucleus.properties</props>
- </configuration>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>enhance</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.datanucleus</groupId>
- <artifactId>maven-datanucleus-plugin</artifactId>
- <versionRange>[3.0.2,)</versionRange>
- <goals>
- <goal>enhance</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore></ignore>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
-
- <dependencyManagement>
- <dependencies>
- <!-- for DataNucleus, see below -->
- <dependency>
- <groupId>org.apache.isis.runtimes.dflt.objectstores</groupId>
- <artifactId>jdo</artifactId>
- <version>0.3.1-SNAPSHOT</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
-
- <dependencies>
- <dependency>
- <groupId>org.apache.isis</groupId>
- <artifactId>applib</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.runtimes.dflt.objectstores</groupId>
- <artifactId>jdo-applib</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.viewer</groupId>
- <artifactId>wicket-applib</artifactId>
- </dependency>
-
-
- <!-- DataNucleus (horrid, but needed to run the enhancer)-->
- <dependency>
- <groupId>javax.jdo</groupId>
- <artifactId>jdo-api</artifactId>
- <exclusions>
- <exclusion>
- <!-- use geronimo-jta_1.1_spec instead -->
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-enhancer</artifactId>
- <!--
- <exclusions>
- <exclusion>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm</artifactId>
- </exclusion>
- </exclusions>
- -->
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-api-jdo</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jta_1.1_spec</artifactId>
- </dependency>
-
-
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/audit/AuditEntry.java
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/audit/AuditEntry.java b/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/audit/AuditEntry.java
deleted file mode 100644
index dae5b00..0000000
--- a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/audit/AuditEntry.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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.
- */
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package dom.audit;
-
-import javax.jdo.annotations.IdGeneratorStrategy;
-import javax.jdo.annotations.IdentityType;
-
-import org.apache.isis.applib.annotation.Hidden;
-import org.apache.isis.applib.annotation.Immutable;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.annotation.Title;
-import org.apache.isis.applib.bookmarks.Bookmark;
-import org.apache.isis.applib.bookmarks.BookmarkHolder;
-import org.apache.isis.applib.value.DateTime;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.DatastoreIdentity(strategy=IdGeneratorStrategy.UUIDHEX)
-@Immutable
-public class AuditEntry implements BookmarkHolder {
-
- // {{ TimestampUtc (property)
- private Long timestampEpoch;
-
- @Hidden
- public Long getTimestampEpoch() {
- return timestampEpoch;
- }
-
- public void setTimestampEpoch(final Long timestampEpoch) {
- this.timestampEpoch = timestampEpoch;
- }
- // }}
-
- // {{ Timestamp (property)
- @Title(sequence="1")
- @MemberOrder(sequence = "1")
- public DateTime getTimestamp() {
- return timestampEpoch != null? new DateTime(timestampEpoch): null;
- }
-
- // }}
-
- // {{ User (property)
- private String user;
-
- @MemberOrder(sequence = "2")
- public String getUser() {
- return user;
- }
-
- public void setUser(final String user) {
- this.user = user;
- }
- // }}
-
- // {{ ObjectType (property)
- private String objectType;
-
- @Title(sequence="3", prepend=":")
- @MemberOrder(sequence = "3")
- public String getObjectType() {
- return objectType;
- }
-
- public void setObjectType(final String objectType) {
- this.objectType = objectType;
- }
- // }}
-
- // {{ Identifier (property)
- private String identifier;
-
- @MemberOrder(sequence = "4")
- public String getIdentifier() {
- return identifier;
- }
-
- public void setIdentifier(final String identifier) {
- this.identifier = identifier;
- }
- // }}
-
- // {{ PreValue (property)
- private String preValue;
-
- @MemberOrder(sequence = "5")
- public String getPreValue() {
- return preValue;
- }
-
- public void setPreValue(final String preValue) {
- this.preValue = preValue;
- }
- // }}
-
- // {{ PostValue (property)
- private String postValue;
-
- @MemberOrder(sequence = "6")
- public String getPostValue() {
- return postValue;
- }
-
- public void setPostValue(final String postValue) {
- this.postValue = postValue;
- }
- // }}
-
- // {{ bookmark (action)
- @Override
- @Programmatic
- public Bookmark bookmark() {
- return new Bookmark(getObjectType(), getIdentifier());
- }
- // }}
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/audit/AuditServiceDemo.java
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/audit/AuditServiceDemo.java b/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/audit/AuditServiceDemo.java
deleted file mode 100644
index e51d517..0000000
--- a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/audit/AuditServiceDemo.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.
- */
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package dom.audit;
-
-import java.util.List;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.applib.annotation.Hidden;
-import org.apache.isis.runtimes.dflt.objectstores.jdo.applib.AuditService;
-
-public class AuditServiceDemo extends AbstractFactoryAndRepository implements AuditService {
-
- public List<AuditEntry> list() {
- return allInstances(AuditEntry.class);
- }
-
- @Hidden
- public void audit(String user, long currentTimestampEpoch, String objectType, String identifier, String preValue, String postValue) {
- AuditEntry auditEntry = newTransientInstance(AuditEntry.class);
- auditEntry.setTimestampEpoch(currentTimestampEpoch);
- auditEntry.setUser(user);
- auditEntry.setObjectType(objectType);
- auditEntry.setIdentifier(identifier);
- auditEntry.setPreValue(preValue);
- auditEntry.setPostValue(postValue);
- persist(auditEntry);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/todo/ToDoItem.java
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/todo/ToDoItem.java b/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/todo/ToDoItem.java
deleted file mode 100644
index 4307008..0000000
--- a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/todo/ToDoItem.java
+++ /dev/null
@@ -1,273 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * 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 dom.todo;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jdo.JDOHelper;
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Persistent;
-import javax.jdo.annotations.VersionStrategy;
-import javax.jdo.spi.PersistenceCapable;
-
-import org.joda.time.LocalDate;
-
-import org.apache.isis.applib.DomainObjectContainer;
-import org.apache.isis.applib.annotation.AutoComplete;
-import org.apache.isis.applib.annotation.Disabled;
-import org.apache.isis.applib.annotation.Hidden;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.MultiLine;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.runtimes.dflt.objectstores.jdo.applib.annotations.Auditable;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@javax.jdo.annotations.Queries( {
- @javax.jdo.annotations.Query(
- name="todo_notYetDone", language="JDOQL",
- value="SELECT FROM dom.todo.ToDoItem WHERE ownedBy == :ownedBy && done == false"),
- @javax.jdo.annotations.Query(
- name="todo_done", language="JDOQL",
- value="SELECT FROM dom.todo.ToDoItem WHERE ownedBy == :ownedBy && done == true"),
- @javax.jdo.annotations.Query(
- name="todo_similarTo", language="JDOQL",
- value="SELECT FROM dom.todo.ToDoItem WHERE ownedBy == :ownedBy && category == :category"),
- @javax.jdo.annotations.Query(
- name="todo_autoComplete", language="JDOQL",
- value="SELECT FROM dom.todo.ToDoItem WHERE ownedBy == :ownedBy && description.matches(:description)")
-})
-@javax.jdo.annotations.Version(strategy=VersionStrategy.VERSION_NUMBER, column="VERSION")
-@ObjectType("TODO")
-@Auditable
-@AutoComplete(repository=ToDoItems.class, action="autoComplete")
-public class ToDoItem {
-
- public static enum Category {
- Professional, Domestic, Other;
- }
-
- // {{ Description
- private String description;
-
- @Title
- @MemberOrder(sequence = "1")
- public String getDescription() {
- return description;
- }
-
- public void setDescription(final String description) {
- this.description = description;
- }
- // }}
-
- // {{ Category
- private Category category;
-
- @MemberOrder(sequence = "2")
- public Category getCategory() {
- return category;
- }
-
- public void setCategory(final Category category) {
- this.category = category;
- }
- // }}
-
- // {{ DueBy (property)
- private LocalDate dueBy;
-
- @javax.jdo.annotations.Persistent
- @MemberOrder(name="Detail", sequence = "3")
- @Optional
- public LocalDate getDueBy() {
- return dueBy;
- }
-
- public void setDueBy(final LocalDate dueBy) {
- this.dueBy = dueBy;
- }
- // }}
-
- // {{ Done
- private boolean done;
-
- @Disabled
- @MemberOrder(sequence = "4")
- public boolean getDone() {
- return done;
- }
-
- public void setDone(final boolean done) {
- this.done = done;
- }
- // }}
-
- // {{ Notes (property)
- private String notes;
-
- @Hidden(where=Where.ALL_TABLES)
- @Optional
- @MultiLine(numberOfLines=5)
- @MemberOrder(name="Detail", sequence = "6")
- public String getNotes() {
- return notes;
- }
-
- public void setNotes(final String notes) {
- this.notes = notes;
- }
- // }}
-
- // {{ OwnedBy (property, hidden)
- private String ownedBy;
-
- @Hidden
- public String getOwnedBy() {
- return ownedBy;
- }
-
- public void setOwnedBy(final String ownedBy) {
- this.ownedBy = ownedBy;
- }
- // }}
-
- // {{ Version (derived property)
- @Hidden(where=Where.ALL_TABLES)
- @Disabled
- @MemberOrder(name="Detail", sequence = "99")
- @Named("Version")
- public Long getVersionSequence() {
- if(!(this instanceof PersistenceCapable)) {
- return null;
- }
- PersistenceCapable persistenceCapable = (PersistenceCapable) this;
- final Long version = (Long) JDOHelper.getVersion(persistenceCapable);
- return version;
- }
- public boolean hideVersionSequence() {
- return !(this instanceof PersistenceCapable);
- }
- // }}
-
- // {{ markAsDone (action)
- @MemberOrder(sequence = "1")
- public ToDoItem markAsDone() {
- setDone(true);
- return this;
- }
-
- public String disableMarkAsDone() {
- return done ? "Already done" : null;
- }
- // }}
-
- // {{ markAsNotDone (action)
- @MemberOrder(sequence = "2")
- public ToDoItem markAsNotDone() {
- setDone(false);
- return this;
- }
-
- public String disableMarkAsNotDone() {
- return !done ? "Not yet done" : null;
- }
- // }}
-
- // {{ Dependencies (Collection)
- private List<ToDoItem> dependencies = new ArrayList<ToDoItem>();
-
- @Disabled
- @MemberOrder(sequence = "1")
- public List<ToDoItem> getDependencies() {
- return dependencies;
- }
-
- public void setDependencies(final List<ToDoItem> dependencies) {
- this.dependencies = dependencies;
- }
- // }}
-
- // {{ add (action)
- @MemberOrder(name="dependencies", sequence = "3")
- public ToDoItem add(final ToDoItem toDoItem) {
- getDependencies().add(toDoItem);
- return this;
- }
- public String validateAdd(final ToDoItem toDoItem) {
- if(getDependencies().contains(toDoItem)) {
- return "Already a dependency";
- }
- if(toDoItem == this) {
- return "Can't set up a dependency to self";
- }
- return null;
- }
- // }}
-
- // {{ remove (action)
- @MemberOrder(name="dependencies", sequence = "4")
- public ToDoItem remove(final ToDoItem toDoItem) {
- getDependencies().remove(toDoItem);
- return this;
- }
- public String disableRemove() {
- return getDependencies().isEmpty()? "No dependencies to remove": null;
- }
- public String validateRemove(final ToDoItem toDoItem) {
- if(!getDependencies().contains(toDoItem)) {
- return "Not a dependency";
- }
- return null;
- }
- public List<ToDoItem> choices0Remove() {
- return getDependencies();
- }
- // }}
-
-
- // {{ injected: DomainObjectContainer
- @SuppressWarnings("unused")
- private DomainObjectContainer container;
-
- public void setDomainObjectContainer(final DomainObjectContainer container) {
- this.container = container;
- }
- // }}
-
-
- // {{ injected: ToDoItems
- @SuppressWarnings("unused")
- private ToDoItems toDoItems;
-
- public void setToDoItems(final ToDoItems toDoItems) {
- this.toDoItems = toDoItems;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/todo/ToDoItems.java
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/todo/ToDoItems.java b/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/todo/ToDoItems.java
deleted file mode 100644
index c3add45..0000000
--- a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/java/dom/todo/ToDoItems.java
+++ /dev/null
@@ -1,143 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * 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 dom.todo;
-
-import java.util.List;
-
-import com.google.common.base.Objects;
-
-import dom.todo.ToDoItem.Category;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.applib.annotation.ActionSemantics;
-import org.apache.isis.applib.annotation.ActionSemantics.Of;
-import org.apache.isis.applib.annotation.Hidden;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.NotInServiceMenu;
-import org.apache.isis.applib.filter.Filter;
-
-@Named("ToDos")
-public class ToDoItems extends AbstractFactoryAndRepository {
-
- // {{ Id, iconName
- @Override
- public String getId() {
- return "toDoItems";
- }
-
- public String iconName() {
- return "ToDoItem";
- }
- // }}
-
- // {{ NotYetDone (action)
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public List<ToDoItem> notYetDone() {
- return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
- @Override
- public boolean accept(final ToDoItem t) {
- return ownedByCurrentUser(t) && !t.getDone();
- }
- });
- }
- // }}
-
- // {{ Done (action)
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "2")
- public List<ToDoItem> done() {
- return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
- @Override
- public boolean accept(final ToDoItem t) {
- return ownedByCurrentUser(t) && t.getDone();
- }
- });
- }
- // }}
-
-
- // {{ newToDo (action)
- @MemberOrder(sequence = "2")
- public ToDoItem newToDo(
- @Named("Description") String description,
- Category category) {
- final String ownedBy = getContainer().getUser().getName();
- return newToDo(description, category, ownedBy);
- }
- // }}
-
- // {{ newToDo (hidden)
- @Hidden // for use by fixtures
- public ToDoItem newToDo(
- String description,
- Category category,
- String ownedBy) {
- final ToDoItem toDoItem = newTransientInstance(ToDoItem.class);
- toDoItem.setDescription(description);
- toDoItem.setCategory(category);
- toDoItem.setOwnedBy(ownedBy);
- persist(toDoItem);
- return toDoItem;
- }
- // }}
-
- // {{ similarTo (action)
- @NotInServiceMenu
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "3")
- public List<ToDoItem> similarTo(final ToDoItem toDoItem) {
- return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
- @Override
- public boolean accept(ToDoItem t) {
- return t != toDoItem && Objects.equal(toDoItem.getCategory(), t.getCategory()) && Objects.equal(toDoItem.getOwnedBy(), t.getOwnedBy());
- }
- });
- }
- // }}
-
- // {{ autoComplete (hidden)
- @Hidden
- @MemberOrder(sequence = "1")
- public List<ToDoItem> autoComplete(final String description) {
- return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
- @Override
- public boolean accept(final ToDoItem t) {
- return ownedByCurrentUser(t) && t.getDescription().contains(description);
- }
-
- });
- }
- // }}
-
- // {{ helpers
- protected boolean ownedByCurrentUser(final ToDoItem t) {
- return Objects.equal(t.getOwnedBy(), currentUserName());
- }
- protected String currentUserName() {
- return getContainer().getUser().getName();
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/resources/images/AuditEntry.png
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/resources/images/AuditEntry.png b/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/resources/images/AuditEntry.png
deleted file mode 100644
index 950d792..0000000
Binary files a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/resources/images/AuditEntry.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/resources/images/ToDoItem.gif
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/resources/images/ToDoItem.gif b/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/resources/images/ToDoItem.gif
deleted file mode 100644
index cc536e1..0000000
Binary files a/framework/quickstart-archetype/src/main/resources/archetype-resources/dom/src/main/resources/images/ToDoItem.gif and /dev/null differ
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/pom.xml
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/pom.xml b/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/pom.xml
deleted file mode 100644
index 2e612e9..0000000
--- a/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/pom.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>${groupId}</groupId>
- <artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
- </parent>
-
- <artifactId>${artifactId}</artifactId>
- <name>Quickstart Fixtures</name>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${rootArtifactId}-dom</artifactId>
- </dependency>
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/src/main/java/fixture/LogonAsSvenFixture.java
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/src/main/java/fixture/LogonAsSvenFixture.java b/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/src/main/java/fixture/LogonAsSvenFixture.java
deleted file mode 100644
index 86f60ee..0000000
--- a/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/src/main/java/fixture/LogonAsSvenFixture.java
+++ /dev/null
@@ -1,33 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * 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 fixture;
-
-import org.apache.isis.applib.fixtures.LogonFixture;
-
-public class LogonAsSvenFixture extends LogonFixture {
-
- public LogonAsSvenFixture() {
- super("sven");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java b/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
deleted file mode 100644
index cf27b1b..0000000
--- a/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
+++ /dev/null
@@ -1,77 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * 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 fixture.todo;
-
-import dom.todo.ToDoItem;
-import dom.todo.ToDoItem.Category;
-import dom.todo.ToDoItems;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-
-public class ToDoItemsFixture extends AbstractFixture {
-
- @Override
- public void install() {
- createFiveFor("sven");
- createThreeFor("dick");
- createTwoFor("bob");
- createOneFor("joe");
-
- // for exploration user
- createFiveFor("exploration");
- }
-
- private void createFiveFor(String ownedBy) {
- createToDoItem("Buy milk", Category.Domestic, ownedBy);
- createToDoItem("Pick up laundry", Category.Domestic, ownedBy);
- createToDoItem("Buy stamps", Category.Domestic, ownedBy);
- createToDoItem("Write blog post", Category.Professional, ownedBy);
- createToDoItem("Organize brown bag", Category.Professional, ownedBy);
- }
-
- private void createThreeFor(String ownedBy) {
- createToDoItem("Book car in for service", Category.Domestic, ownedBy);
- createToDoItem("Buy birthday present for sven", Category.Domestic, ownedBy);
- createToDoItem("Write presentation for conference", Category.Professional, ownedBy);
- }
-
- private void createTwoFor(String ownedBy) {
- createToDoItem("Write thank you notes", Category.Domestic, ownedBy);
- createToDoItem("Look into solar panels", Category.Domestic, ownedBy);
- }
-
- private void createOneFor(String ownedBy) {
- createToDoItem("Pitch book idea to publisher", Category.Professional, ownedBy);
- }
-
- private ToDoItem createToDoItem(final String description, Category category, String ownedBy) {
- return toDoItems.newToDo(description, category, ownedBy);
- }
-
- private ToDoItems toDoItems;
-
- public void setToDoItems(final ToDoItems toDoItems) {
- this.toDoItems = toDoItems;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java b/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java
deleted file mode 100644
index 0ee27e3..0000000
--- a/framework/quickstart-archetype/src/main/resources/archetype-resources/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java
+++ /dev/null
@@ -1,49 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * 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 fixture.todo;
-
-import dom.todo.ToDoItems;
-
-import org.apache.isis.applib.AbstractService;
-import org.apache.isis.applib.annotation.Named;
-
-/**
- * Enables fixtures to be installed from the application.
- */
-@Named("Fixtures")
-public class ToDoItemsFixturesService extends AbstractService {
-
- public void install() {
- final ToDoItemsFixture fixture = new ToDoItemsFixture();
- fixture.setContainer(getContainer());
- fixture.setToDoItems(toDoItems);
- fixture.install();
- }
-
- private ToDoItems toDoItems;
-
- public void setToDoItems(final ToDoItems toDoItems) {
- this.toDoItems = toDoItems;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/objstore-jdo/lib/.gitignore
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/objstore-jdo/lib/.gitignore b/framework/quickstart-archetype/src/main/resources/archetype-resources/objstore-jdo/lib/.gitignore
deleted file mode 100644
index 70eee7e..0000000
--- a/framework/quickstart-archetype/src/main/resources/archetype-resources/objstore-jdo/lib/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# explicitly ignoring Microsoft JDBC4 jar
-# (cannot redistribute, licensing)
-#
-sqljdbc4.jar
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/objstore-jdo/pom.xml
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/objstore-jdo/pom.xml b/framework/quickstart-archetype/src/main/resources/archetype-resources/objstore-jdo/pom.xml
deleted file mode 100644
index a802f92..0000000
--- a/framework/quickstart-archetype/src/main/resources/archetype-resources/objstore-jdo/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>${groupId}</groupId>
- <artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
- </parent>
-
- <artifactId>${artifactId}</artifactId>
- <name>Quickstart Repositories (for JDO)</name>
-
- <dependencies>
-
- <!-- other modules in this project -->
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${rootArtifactId}-dom</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.runtimes.dflt.objectstores</groupId>
- <artifactId>jdo-datanucleus</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.7.2</version>
- </dependency>
-
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/cd9f2e4a/framework/quickstart-archetype/src/main/resources/archetype-resources/objstore-jdo/src/main/java/objstore/jdo/todo/ToDoItemsJdo.java
----------------------------------------------------------------------
diff --git a/framework/quickstart-archetype/src/main/resources/archetype-resources/objstore-jdo/src/main/java/objstore/jdo/todo/ToDoItemsJdo.java b/framework/quickstart-archetype/src/main/resources/archetype-resources/objstore-jdo/src/main/java/objstore/jdo/todo/ToDoItemsJdo.java
deleted file mode 100644
index 399e150..0000000
--- a/framework/quickstart-archetype/src/main/resources/archetype-resources/objstore-jdo/src/main/java/objstore/jdo/todo/ToDoItemsJdo.java
+++ /dev/null
@@ -1,91 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * 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 objstore.jdo.todo;
-
-import java.util.List;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-
-import dom.todo.ToDoItem;
-import dom.todo.ToDoItems;
-
-import org.apache.isis.applib.query.QueryDefault;
-
-public class ToDoItemsJdo extends ToDoItems {
-
- // {{ notYetDone (action)
- @Override
- public List<ToDoItem> notYetDone() {
- return allMatches(
- new QueryDefault<ToDoItem>(ToDoItem.class,
- "todo_notYetDone",
- "ownedBy", currentUserName()));
- }
- // }}
-
- // {{ done (action)
- @Override
- public List<ToDoItem> done() {
- return allMatches(
- new QueryDefault<ToDoItem>(ToDoItem.class,
- "todo_done",
- "ownedBy", currentUserName()));
- }
- // }}
-
- // {{ similarTo (action)
- @Override
- public List<ToDoItem> similarTo(final ToDoItem thisToDoItem) {
- final List<ToDoItem> similarToDoItems = allMatches(
- new QueryDefault<ToDoItem>(ToDoItem.class,
- "todo_similarTo",
- "ownedBy", thisToDoItem.getOwnedBy(),
- "category", thisToDoItem.getCategory()));
- return Lists.newArrayList(Iterables.filter(similarToDoItems, excluding(thisToDoItem)));
- }
-
- private static Predicate<ToDoItem> excluding(final ToDoItem toDoItem) {
- return new Predicate<ToDoItem>() {
- @Override
- public boolean apply(ToDoItem input) {
- return input != toDoItem;
- }
- };
- }
- // }}
-
- // {{ autoComplete (action)
- @Override
- public List<ToDoItem> autoComplete(String description) {
-
- return allMatches(
- new QueryDefault<ToDoItem>(ToDoItem.class,
- "todo_autoComplete",
- "ownedBy", currentUserName(),
- "description", description));
- }
- // }}
-
-}