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/02/17 12:57:53 UTC
[08/20] isis git commit: ISIS-1039: adding missing build() method to
XmlSnapshot.Builder interface.
ISIS-1039: adding missing build() method to XmlSnapshot.Builder interface.
In addition, include contributed properties/collections in the snapshot, rather than exclude them.
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/418b10f9
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/418b10f9
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/418b10f9
Branch: refs/heads/ISIS-903
Commit: 418b10f9baeb4212889bb36e0da20c6949c19c26
Parents: fe75adf
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Feb 16 21:00:55 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Feb 16 21:09:54 2015 +0000
----------------------------------------------------------------------
.../isis/applib/services/xmlsnapshot/XmlSnapshotService.java | 1 +
.../java/org/apache/isis/core/runtime/snapshot/XmlSnapshot.java | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/418b10f9/core/applib/src/main/java/org/apache/isis/applib/services/xmlsnapshot/XmlSnapshotService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/xmlsnapshot/XmlSnapshotService.java b/core/applib/src/main/java/org/apache/isis/applib/services/xmlsnapshot/XmlSnapshotService.java
index 2b02d12..a9c3680 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/xmlsnapshot/XmlSnapshotService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/xmlsnapshot/XmlSnapshotService.java
@@ -43,6 +43,7 @@ public interface XmlSnapshotService {
public interface Builder {
public void includePath(final String path);
public void includePathAndAnnotation(final String path, final String annotation);
+ public XmlSnapshotService.Snapshot build();
}
public static class Exception extends RuntimeException {
http://git-wip-us.apache.org/repos/asf/isis/blob/418b10f9/core/metamodel/src/main/java/org/apache/isis/core/runtime/snapshot/XmlSnapshot.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/runtime/snapshot/XmlSnapshot.java b/core/metamodel/src/main/java/org/apache/isis/core/runtime/snapshot/XmlSnapshot.java
index d71b53e..d17fa93 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/runtime/snapshot/XmlSnapshot.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/runtime/snapshot/XmlSnapshot.java
@@ -484,7 +484,7 @@ public class XmlSnapshot implements Snapshot {
final Place fieldPlace = new Place(object, xmlFieldElement);
if (field instanceof OneToOneAssociation) {
- if (field.getSpecification().getAssociations(Contributed.EXCLUDED).size() == 0) {
+ if (field.getSpecification().getAssociations(Contributed.INCLUDED).size() == 0) {
if (LOG.isDebugEnabled()) {
LOG.debug("includeField(Pl, Vec, Str): field is value; done");
}
@@ -638,7 +638,7 @@ public class XmlSnapshot implements Snapshot {
isisMetaModel.setAttributesForClass(element, oidAsString(adapter).toString());
- final List<ObjectAssociation> fields = nos.getAssociations(Contributed.EXCLUDED);
+ final List<ObjectAssociation> fields = nos.getAssociations(Contributed.INCLUDED);
if (LOG.isDebugEnabled()) {
LOG.debug("objectToElement(NO): processing fields");
}