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 2015/11/25 14:47:07 UTC

[1/2] isis git commit: ISIS-1258: minor updates to docs

Repository: isis
Updated Branches:
  refs/heads/master d4083e8b2 -> 06bbb1e42


ISIS-1258: minor updates to docs


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/92117327
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/92117327
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/92117327

Branch: refs/heads/master
Commit: 921173276b4a263355aad59673cf763de95a75cf
Parents: d4083e8
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Nov 25 13:40:12 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Nov 25 13:40:12 2015 +0000

----------------------------------------------------------------------
 .../asciidoc/guides/_cg_isis-maven-plugin_xsd.adoc   | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/92117327/adocs/documentation/src/main/asciidoc/guides/_cg_isis-maven-plugin_xsd.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_cg_isis-maven-plugin_xsd.adoc b/adocs/documentation/src/main/asciidoc/guides/_cg_isis-maven-plugin_xsd.adoc
index 8b1b5b6..e8a51ef 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_cg_isis-maven-plugin_xsd.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_cg_isis-maven-plugin_xsd.adoc
@@ -33,11 +33,10 @@ into DTOs.  The original view models and these DTOs are similar but not identica
 within the Isis application (they may reference underlying domain entities) whereas the DTO classes generated from the
 XSDs can be used standalone, eg by a Java subscriber running on an ESB such as Apache Camel.
 
-The diagram below shows how these different plugins fit together:
+The rest of this section explains how to configure a new `xsd` submodule that uses the `isis-maven-plugin` along with
+other standard plugins in order to generate both XSDs and DTOs.  The `pom.xml` described below uses Maven profiles
+to separate out these two responsibilities.
 
-image::{_imagesdir}maven-plugin/xsd-goal.png[width="800px",link="{_imagesdir}maven-plugin/xsd-goal.png"]
-
-The sections below explain in more detail how to configure the `xsd` plugin (and other plugins).
 
 [[_cg_isis-maven-plugin_xsd]]
 == `xsd` submodule
@@ -54,6 +53,11 @@ We recommend creating a new submodule that will perform the following build step
 These are _not_ the same as the original view models; they are provided as a convenience for subscribers to marshall XML documents into Java classes, but running as a standalone process (not part of the Isis app)
 
 
+These two main responsibilities can then be placed into separate Maven profiles, for better modularity.  The diagram
+below shows the overall design:
+
+image::{_imagesdir}maven-plugin/xsd-goal.png[width="800px",link="{_imagesdir}maven-plugin/xsd-goal.png"]
+
 For example, here is the `pom.xml` file for the (non-ASF)
 http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp] example app's `todoapp-xsd` submodule.
 
@@ -99,6 +103,9 @@ First, the usual boilerplate:
 
 
 
+
+
+
 === XSD profile
 
 The `isis-xsd` profile runs the `xsd` goal of the `isis-maven-plugin`; these are then zipped up by the assembly plugin:


[2/2] isis git commit: ISIS-1117: remove the requirement for an entity to have any properties when rendered by the Wicket viewer ...

Posted by da...@apache.org.
ISIS-1117: remove the requirement for an entity to have any properties when rendered by the Wicket viewer ...

... because there might be a custom component to render said object


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/06bbb1e4
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/06bbb1e4
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/06bbb1e4

Branch: refs/heads/master
Commit: 06bbb1e4289bd5fb1520612ea5f9512e72182175
Parents: 9211732
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Nov 25 13:46:40 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Nov 25 13:46:40 2015 +0000

----------------------------------------------------------------------
 .../wicket/ui/pages/entity/EntityPage.java      | 21 --------------------
 1 file changed, 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/06bbb1e4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
index 9716a19..dbc1f7d 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
@@ -19,7 +19,6 @@
 
 package org.apache.isis.viewer.wicket.ui.pages.entity;
 
-import java.util.List;
 import org.apache.wicket.Application;
 import org.apache.wicket.RestartResponseException;
 import org.apache.wicket.authroles.authorization.strategies.role.annotations.AuthorizeInstantiation;
@@ -31,9 +30,7 @@ import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.wicket.util.string.Strings;
 
 import org.apache.isis.applib.Identifier;
-import org.apache.isis.applib.NonRecoverableException;
 import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChecking;
 import org.apache.isis.core.metamodel.adapter.version.ConcurrencyException;
@@ -43,9 +40,6 @@ import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
 import org.apache.isis.core.metamodel.interactions.InteractionUtils;
 import org.apache.isis.core.metamodel.interactions.ObjectVisibilityContext;
 import org.apache.isis.core.metamodel.interactions.VisibilityContext;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.Contributed;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.metamodel.spec.feature.ObjectMember;
 import org.apache.isis.core.runtime.system.DeploymentType;
 import org.apache.isis.core.runtime.system.context.IsisContext;
@@ -140,21 +134,6 @@ public class EntityPage extends PageAbstract {
             throw new ObjectMember.AuthorizationException();
         }
 
-        // belt-n-braces: check that at least one property of the entity can be viewed.
-        final AuthenticationSession session = getAuthenticationSession();
-        final ObjectSpecification specification = objectAdapter.getSpecification();
-        final List<ObjectAssociation> visibleAssociation = specification.getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.dynamicallyVisible(
-                objectAdapter, InteractionInitiatedBy.USER, Where.NOWHERE));
-
-        if(visibleAssociation.isEmpty()) {
-            final List<ObjectAssociation> anyAssociations = specification.getAssociations(Contributed.INCLUDED);
-            if(anyAssociations.isEmpty()) {
-                throw new NonRecoverableException(String.format(
-                        "No properties are defined for this entity type (%s); this is probably a programming error", specification.getFullIdentifier()));
-            }
-            throw new ObjectMember.AuthorizationException();
-        }
-
 
         // the next bit is a work-around for JRebel integration...
         // ... even though the IsisJRebelPlugin calls invalidateCache, it seems that there is