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 2021/01/18 12:34:03 UTC
[isis] branch ISIS-2476 updated (da2035b -> 430e636)
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a change to branch ISIS-2476
in repository https://gitbox.apache.org/repos/asf/isis.git.
discard da2035b ISIS-2476: improves docs for property mementoSerialization
discard 26120bb ISIS-2476: removes some redundant .gitkeep files
discard 4832bf9 ISIS-439: removes @Collection#editing and makes all collections disabled always
add d9c3c55 ISIS-2033: consolidate IsisJdoSupport* into JdoSupportService
add 067de0d ISIS-2445: Allow up to 10 open pull requests for maven dependencies
add 9248071 Bump camel.version from 3.6.0 to 3.7.0
add 713f8c5 Merge pull request #310 from apache/dependabot/maven/camel.version-3.7.0
add 23dda7d Bump lombok-maven-plugin from 1.18.12.0 to 1.18.16.0
add b6e61c6 Merge pull request #311 from apache/dependabot/maven/org.projectlombok-lombok-maven-plugin-1.18.16.0
add 912f6ef Bump joda-time from 2.10.8 to 2.10.9
add 611585f Merge pull request #316 from apache/dependabot/maven/joda-time-joda-time-2.10.9
add 07221b9 Bump maven-scm-provider-svn-commons from 1.10.0 to 1.11.2
add 637f75f Merge pull request #315 from apache/dependabot/maven/org.apache.maven.scm-maven-scm-provider-svn-commons-1.11.2
add 3adc5e3 Bump structurizr.version from 1.5.0 to 1.6.0
add 2506d27 Merge pull request #318 from apache/dependabot/maven/structurizr.version-1.6.0
add 3f58857 Bump checksum-maven-plugin from 1.7 to 1.9
add 51016e5 Merge pull request #319 from apache/dependabot/maven/net.nicoulaj.maven.plugins-checksum-maven-plugin-1.9
add c7e844e Bump jib-maven-plugin from 2.7.0 to 2.7.1
add 4640c36 Merge pull request #314 from apache/dependabot/maven/com.google.cloud.tools-jib-maven-plugin-2.7.1
add 28f31dd Bump jnr-posix from 3.1.3 to 3.1.4
add 5276e19 Merge pull request #312 from apache/dependabot/maven/com.github.jnr-jnr-posix-3.1.4
add c91bf43 ISIS-2445: fixes post structurizr version upgrade issues
add 15fabd1 Bump error_prone_annotations from 2.4.0 to 2.5.0
add b5c90df Merge pull request #317 from apache/dependabot/maven/com.google.errorprone-error_prone_annotations-2.5.0
add 0596128 ISIS-2445: remove redundant org.eclipse.persistence.moxy pom entry
add 8e7d4a5 ISIS-2445: bump org.eclipse.persistence.* 2.7.7 -> 3.0.0
add 1ff16d5 Revert "ISIS-2445: bump org.eclipse.persistence.* 2.7.7 -> 3.0.0"
add 6bf8167 ISIS-2445: fixes Spring complaining about circular dependency
add ae27856 ISIS-2445: bump vaadin 14.3.1 -> 14.4.5
add 9434bf9 ISIS-2033: Spring Data JPA: adds repository bootstrapping tests
add 1ca4600 ISIS-2033: some cleanup of prev. commit
add a2512de ISIS-2033: supposed fixes for JPA Tests (after having introduced Spring Data JPA repository)
add d8b010b Bump wagon-ftp from 3.4.0 to 3.4.2
add d8bbd10 Merge pull request #320 from apache/dependabot/maven/org.apache.maven.wagon-wagon-ftp-3.4.2
add 2082d78 Bump pdfbox from 2.0.21 to 2.0.22
add ea2b157 Merge pull request #321 from apache/dependabot/maven/org.apache.pdfbox-pdfbox-2.0.22
add 25c30a3 Bump togglz.version from 2.9.0 to 2.9.2
add 8dfa962 Merge pull request #323 from apache/dependabot/maven/togglz.version-2.9.2
add 3963ed6 Bump dependency-check-maven from 6.0.3 to 6.0.5
add 889eab3 Merge pull request #324 from apache/dependabot/maven/org.owasp-dependency-check-maven-6.0.5
add 58fc0a4 Bump jnr-constants from 0.10.0 to 0.10.1
add dda0dcf Merge pull request #325 from apache/dependabot/maven/com.github.jnr-jnr-constants-0.10.1
add d90a3c2 Bump gradle-tooling-api from 6.7.1 to 6.8
add 693ef81 Merge pull request #326 from apache/dependabot/maven/org.gradle-gradle-tooling-api-6.8
add 9c82cf2 Bump maven-scm-publish-plugin from 3.0.0 to 3.1.0
add 15c315c Merge pull request #328 from apache/dependabot/maven/org.apache.maven.plugins-maven-scm-publish-plugin-3.1.0
add 8af087f Bump guava from 30.0-jre to 30.1-jre
add 8fb7563 Merge pull request #329 from apache/dependabot/maven/com.google.guava-guava-30.1-jre
add 25d312b Bump archetype-packaging from 2.2 to 3.2.0
add 266857b Merge pull request #327 from apache/dependabot/maven/org.apache.maven.archetype-archetype-packaging-3.2.0
add 32121b8 ISIS-2479: TransactionService: let currentTransactionId() return an Optional<TransactionId>
add c72df9a ISIS-2479: runtime-services: rename packages (house keeping)
add 6181ff4 ISIS-2479: implements transaction sequence tracking (not tested yet)
add 5c91e27 ISIS-2479: java-doc fix
add cb86196 ISIS-2479: makes TransactionId an immutable value type
add 6cae937 ISIS-2297: fixes potential denial of service attack vectors (sonar)
add 36db701 Bump jnr-enxio from 0.32.1 to 0.32.3
add 738e287 Merge pull request #332 from apache/dependabot/maven/com.github.jnr-jnr-enxio-0.32.3
add 1a94097 Bump ognl from 3.2.17 to 3.2.18
add db57a3f Merge pull request #330 from apache/dependabot/maven/ognl-ognl-3.2.18
add 4a2d1e6 Bump maven-ear-plugin from 3.1.0 to 3.2.0
add c3e761d Merge pull request #334 from apache/dependabot/maven/org.apache.maven.plugins-maven-ear-plugin-3.2.0
add fd3bb9e Bump error_prone_annotations from 2.5.0 to 2.5.1
add f9d3bbf Merge pull request #337 from apache/dependabot/maven/com.google.errorprone-error_prone_annotations-2.5.1
add 72836a0 Bump spring-boot-starter-parent from 2.4.1 to 2.4.2
add 011857a Merge pull request #333 from apache/dependabot/maven/org.springframework.boot-spring-boot-starter-parent-2.4.2
add 7539855 Bump spring-boot-starter-quartz from 2.4.1 to 2.4.2
add 04277a1 Merge pull request #336 from apache/dependabot/maven/org.springframework.boot-spring-boot-starter-quartz-2.4.2
add 11b34f6 Bump picocli from 4.5.2 to 4.6.1
add aecb410 Merge pull request #338 from apache/dependabot/maven/info.picocli-picocli-4.6.1
add 4c34a5a ISIS-2445: bump SpringBoot for Starter Apps 2.4.1 -> 2.4.2
add ed122d4 ISIS-2445: remove debug code
add b311abc ISIS-2481: Consolidate BeanSort ENTITY_JDO, ENTITY_JPA -> ENTITY
add 117ca9d ISIS-2480: initial clone of SecMan entities (to be converted to JPA)
add c934b93 ISIS-2480: update sys overview (adoc)
add d321d0e ISIS-2480: convert cloned entities to JPA (no named queries yet)
add bc54412 ISIS-2480: adds metamodel refiner for JPA (just stubs yet)
add 3adb6c3 ISIS-2480: adds some metamodel facets for JPA
add 4ab5e74 ISIS-2480: fixes regression in prev. commit
add 8c9e009 ISIS-2480: fixes provisioning issues
add 59829b8 ISIS-2480: jpa-metamodel: support 'mandatory' from @JoinColumn
add d42d83d ISIS-2480: SecMan/JPA: convert trivial named queries
add 09998ef ISIS-2481: simplify bean-type registry to collect all entity types (JDO+JPA) in a single set
add f9d3109 ISIS-2480: SecMan/JPA: converts named query Permission.findByUser
add 6c27f9c ISIS-2480: SecMan/JPA: converts remaining named queries
add 8af4a44 ISIS-2033: remove JDO applib from integtestsupport's applib
add 67d2c74 ISIS-2480: SecMan/JPA: workaround named query PERMISSION_BY_USER not working
add 1ab9285 ISIS-2480: SecMan/JPA: activates separate schema for SecMan entities
add 790ec7a ISIS-2445: fixes potential NPE in module lookup
add 720bc06 ISIS-2033: fixes classpath for fixture applib and excel fixtures
add 68621e8 ISIS-2486: moves jdo classes from datanucleus to integration.
add 9f6f666 ISIS-2486: moves additional DN classes from integration down to datanucleus.
add 8a98c26 ISIS-2486: sorts out packages for moved classes
add 8af3ed4 ISIS-2486: sorts out packages for moved classes
add 9f30b5e ISIS-2486: fixes up @Import's and @Name's of moved services etc.
add 1e19516 ISIS-2486: deletes commented out code
add 01675a8 ISIS-2486: fixes configuration (class literal)
add 918aff9 ISIS-2486: fixes module config for JDO refactoring
add 9cb67fd ISIS-2486: fixes regression test dependencies
add 08cb5bd ISIS-2486: fixes regression test dependencies (2)
add f985389 Merge pull request #341 from apache/2486
add c167463 ISIS-2445: update sys-overview (adoc)
add f37239f ISIS-2486: rename module classes (for symmetry), also fixes regr. t.
add 0a78908 ISIS-2486: fixes up some missing licenses in prep for M5
add 72e966a ISIS-2486: fixes regression test run
add 10df6b1 Merge remote-tracking branch 'origin/master' into ISIS-2486-jdo-jpa-module-rationalize
add e81d4f0 merging 2486 (from diverging changes)
add b838bc1 ISIS-2486: post merge fix
add 8a44645 ISIS-2486: remove redundant dep. (pom): fix DemoJavaFx tests
new 91b03f8 ISIS-439: removes @Collection#editing and makes all collections disabled always
new 545ca28 ISIS-2476: removes some redundant .gitkeep files
new f94549f ISIS-2476: improves docs for property mementoSerialization
new 94e4add ISIS-439: completely removes the DisabledFacetForCollection
new b1fbd06 ISIS-439: fully remove installing DisabledFacet for collections.
new 430e636 ISSI-439: renames mementoSerialization to snapshot
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (da2035b)
\
N -- N -- N refs/heads/ISIS-2476 (430e636)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/dependabot.yml | 2 +
.../modules/ROOT/pages/cutting-a-release.adoc | 27 +-
.../2.0.0-M1/mignotes/removed-annotations.adoc | 4 +-
.../2.0.0-M1/mignotes/updated-annotations.adoc | 7 +-
.../modules/ROOT/pages/2020/2.0.0-M5/mignotes.adoc | 43 +-
.../pages/index/applib/annotation/Nature.adoc | 17 +-
.../pages/index/applib/annotation/Property.adoc | 4 +-
.../index/applib/services/metamodel/BeanSort.adoc | 12 +-
.../applib/services/xactn/TransactionService.adoc | 18 +-
.../pages/index/commons/having/HasUniqueId.adoc | 2 +-
.../transaction/TransactionServiceSpring.adoc | 37 ++
.../jdo/applib/integration/JdoSupportService.adoc | 116 ++++++
.../schema/JdoSchemaService.adoc | 0
.../modules/generated/pages/system-overview.adoc | 165 ++++----
antora/pom.xml | 20 +-
.../userguide/modules/fun/pages/view-models.adoc | 3 +-
.../adoc/modules/applib-ant/pages/Property.adoc | 4 +-
.../{mementoSerialization.adoc => snapshot.adoc} | 11 +-
.../adoc/modules/applib-ant/pages/view-models.adoc | 6 +-
.../org/apache/isis/applib/annotation/Nature.java | 33 +-
.../apache/isis/applib/annotation/Property.java | 10 +-
.../{MementoSerialization.java => Snapshot.java} | 19 +-
.../isis/applib/services/metamodel/BeanSort.java | 13 +-
.../isis/applib/services/xactn/TransactionId.java | 24 +-
.../applib/services/xactn/TransactionService.java | 28 +-
.../apache/isis/commons/having/HasUniqueId.java | 2 +-
.../apache/isis/core/config/IsisConfiguration.java | 73 ++--
.../config/beans/IsisBeanTypeClassifierImpl.java | 12 +-
.../core/config/beans/IsisBeanTypeRegistry.java | 3 +-
.../config/beans/IsisBeanTypeRegistryDefault.java | 10 +-
.../additional-spring-configuration-metadata.json | 3 -
.../interaction/IsisModuleCoreInteraction.java | 22 +-
.../core/interaction/scope/InteractionScope.java | 5 +-
.../interaction/session/InteractionTracker.java | 5 +-
.../core/metamodel/adapter/oid/Oid_Marshaller.java | 2 +-
.../CollectionAnnotationFacetFactory.java | 11 +-
.../disabled/DisabledFacetForCollection.java | 37 --
...atableObjectFacetForDomainObjectAnnotation.java | 3 +-
...ExcludeFacet.java => SnapshotExcludeFacet.java} | 2 +-
...ract.java => SnapshotExcludeFacetAbstract.java} | 6 +-
.../property/PropertyAnnotationFacetFactory.java | 4 +-
...SnapshotExcludeFacetForPropertyAnnotation.java} | 18 +-
.../update/PropertySetAndClearFacetFactory.java | 2 +-
...rred.java => SnapshotExcludeFacetInferred.java} | 6 +-
.../spec/feature/OneToOneAssociation.java | 4 +-
.../specloader/SpecificationLoaderDefault.java | 9 +-
.../specimpl/OneToManyAssociationMixedIn.java | 8 +-
.../core/metamodel/util/snapshot/XmlSnapshot.java | 3 +
.../CollectionAnnotationFacetFactoryTest.java | 40 --
...bledAnnotationOnCollectionFacetFactoryTest.java | 82 ----
.../ViewModelSemanticCheckingFacetFactoryTest.java | 5 +-
.../DomainObjectAnnotationFacetFactoryTest.java | 2 +-
.../PropertyMethodsFacetFactoryTest.java | 12 +-
...sistedAnnotationOnPropertyFacetFactoryTest.java | 12 +-
.../PropertyAnnotationFacetFactoryTest.java | 14 +-
.../specimpl/OneToOneAssociationAbstractTest.java | 6 +-
core/pom.xml | 29 +-
.../IsisModuleCoreRuntimeServices.java | 4 +-
.../executor/MemberExecutorServiceDefault.java | 62 ++-
.../InteractionDtoServiceInternalDefault.java | 2 +-
.../EntityPropertyChangePublisherDefault.java | 4 +-
.../session/InteractionFactoryDefault.java | 5 +-
.../TransactionServiceSpring.java | 56 ++-
examples/demo/domain/pom.xml | 18 +-
.../main/java/demoapp/dom/AppConfiguration.java | 18 +
.../src/main/java/demoapp/dom/DemoModule.java | 12 +-
.../HasAsciiDocDescription_description.java | 4 +-
.../HasAsciiDocDescription_sources.java | 4 +-
.../child/ActionAssociateWithVm-description.adoc | 2 +-
.../ActionCommandPublishingJdo.java | 2 +-
.../ActionExecutionPublishingJdo.java | 2 +-
...ainObjectEntityChangePublishingDisabledJdo.java | 2 +-
...mainObjectEntityChangePublishingEnabledJdo.java | 2 +-
...ityChangePublishingEnabledMetaAnnotatedJdo.java | 2 +-
...ngePublishingEnabledMetaAnnotOverriddenJdo.java | 2 +-
.../dom/annotDomain/Property/PropertyMenu.java | 22 +-
.../PropertyCommandPublishingJdo.java | 2 +-
.../PropertyExecutionPublishingJdo.java | 2 +-
.../projecting/jdo/PropertyProjectingChildJdo.java | 2 +-
.../PropertySnapshotVm-description.adoc} | 10 +-
.../PropertySnapshotVm.java} | 51 ++-
.../PropertySnapshotVm.layout.xml} | 3 +-
.../PropertySnapshotVm_takeXmlSnapshot.java} | 35 +-
.../SnapshotExcludedMetaAnnotation.java} | 8 +-
.../SnapshotIncludedMetaAnnotation.java} | 8 +-
.../PropertySnapshotChildVm-description.adoc} | 4 +-
.../snapshot/child/PropertySnapshotChildVm.java} | 81 ++--
.../child/PropertySnapshotChildVm.layout.xml} | 15 +-
.../src/main/java/demoapp/dom/menubars.layout.xml | 18 +-
.../core/wrapperFactory/WrapperFactoryJdo.java | 2 +-
.../xmlSnapshotService/XmlSnapshotParentVm.java | 4 +-
.../child/XmlSnapshotChildVm-description.adoc | 2 +-
.../peer/XmlSnapshotPeerVm-description.adoc | 2 +-
.../dom/ui/custom/geocoding/GeoapifyClient.java | 18 +
.../java/demoapp/dom/ui/custom/latlng/LatLng.java | 18 +
.../demoapp/dom/ui/custom/latlng/LatLngUtils.java | 18 +
.../demoapp/dom/ui/custom/latlng/Latitude.java | 18 +
.../demoapp/dom/ui/custom/latlng/Longitude.java | 18 +
.../java/demoapp/dom/ui/custom/latlng/Zoom.java | 18 +
.../java/demoapp/dom/ui/custom/vm/BoundingBox.java | 18 +
.../geocoding/GeoapifyClientTest_geocode.java | 18 +
examples/demo/pom.xml | 30 +-
examples/demo/vaadin/pom.xml | 2 +-
.../src/main/java/demoapp/web/DemoAppManifest.java | 2 +-
.../java/demoapp/webapp/wicket/DemoAppWicket.java | 7 +-
.../ui/custom/WhereInTheWorldPanelFactory.java | 18 +
extensions/core/command-log/impl/pom.xml | 20 +-
.../impl/IsisModuleExtCommandLogImpl.java | 4 +-
.../commandlog/impl/jdo/CommandJdoRepository.java | 44 +-
extensions/pom.xml | 5 +
.../secman/api/SecurityModuleConfig.java | 3 +-
.../api/permission/ApplicationPermission.java | 28 ++
.../jdo/dom/permission/ApplicationPermission.java | 34 --
.../secman/jdo/seed/SeedSecurityModuleService.java | 2 +-
extensions/security/secman/persistence-jpa/pom.xml | 81 ++++
.../jpa/IsisModuleExtSecmanPersistenceJpa.java | 62 +++
.../secman/jpa/dom/constants/NamedQueryNames.java | 41 ++
.../jpa}/dom/permission/ApplicationPermission.java | 171 ++++----
.../permission/ApplicationPermission.layout.xml | 0
.../ApplicationPermissionRepository.java | 406 ++++++++++++++++++
.../secman/jpa/dom/role/ApplicationRole.java | 239 +++++++++++
.../jpa}/dom/role/ApplicationRole.layout.xml | 0
.../jpa/dom/role/ApplicationRoleRepository.java | 168 ++++++++
.../secman/jpa/dom/tenancy/ApplicationTenancy.java | 204 +++++++++
.../jpa}/dom/tenancy/ApplicationTenancy.layout.xml | 0
.../dom/tenancy/ApplicationTenancyRepository.java | 207 ++++++++++
.../secman/jpa/dom/user/ApplicationUser.java | 457 +++++++++++++++++++++
.../jpa}/dom/user/ApplicationUser.layout.xml | 0
.../jpa/dom/user/ApplicationUserRepository.java | 242 +++++++++++
.../jpa}/seed/SeedSecurityModuleService.java | 4 +-
.../jpa/seed/SeedUsersAndRolesFixtureScript.java | 63 +++
.../AbstractRoleAndPermissionsFixtureScript.java | 152 +++++++
.../seed/scripts/AbstractTenancyFixtureScript.java | 53 +++
.../scripts/AbstractUserAndRolesFixtureScript.java | 126 ++++++
.../secman/jpa/seed/scripts/GlobalTenancy.java | 14 +-
...xtFixturesFixtureResultsRoleAndPermissions.java | 40 ++
.../IsisModuleSecurityAdminRoleAndPermissions.java | 44 ++
.../seed/scripts/IsisModuleSecurityAdminUser.java | 20 +-
...sisModuleSecurityFixtureRoleAndPermissions.java | 41 ++
...oduleSecurityRegularUserRoleAndPermissions.java | 92 +++++
...tyModuleAppUserRegistrationServiceAbstract.java | 103 +++++
extensions/security/secman/pom.xml | 6 +
.../kroviz/partials/design/dev-mindmap.adoc | 5 +-
incubator/pom.xml | 1 -
isis-parent/pom.xml | 24 +-
.../isis/legacy/applib/DomainObjectContainer.java | 8 +-
mavendeps/jdo/pom.xml | 22 +-
mavendeps/jpa/pom.xml | 26 +-
.../jdo/applib/integration/JdoSupportService.java | 146 +++++++
.../jdo/applib/services/IsisJdoSupport.java | 93 -----
.../jdo/applib/services/IsisJdoSupport_v3_2.java | 129 ------
persistence/jdo/datanucleus/pom.xml | 29 +-
.../jdo/datanucleus/IsisModuleJdoDatanucleus.java} | 104 ++---
.../IsisModuleJdoProviderDatanucleus.java | 70 ----
.../changetracking/JdoLifecycleListener.java | 32 +-
.../jdo/datanucleus}/changetracking/_Utils.java | 30 +-
.../CreateSchemaObjectFromClassMetadata.java | 10 +-
.../config/DataNucleusPropertiesAware.java | 2 +-
.../datanucleus}/config/JdoEntityTypeRegistry.java | 50 +--
.../jdosupport/JdoSupportServiceDefault.java} | 43 +-
.../metamodel/JdoDataNucleusProgrammingModel.java} | 6 +-
.../datanucleus}/metamodel/JdoMetamodelUtil.java | 10 +-
.../metamodel/facets/entity/JdoEntityFacet.java | 152 +++----
.../facets/entity/JdoEntityFacetFactory.java | 20 +-
.../mixins/Persistable_downloadJdoMetadata.java | 4 +-
.../jdo/datanucleus}/schema/JdoSchemaService.java | 16 +-
.../jdo/datanucleus}/schema/_DnApplication.java | 30 +-
.../schema/_DnApplicationComponents.java | 20 +-
.../datanucleus}/schema/_DnStoreManagerType.java | 18 +-
...e.isis.core.config.beans.IsisBeanTypeClassifier | 2 +-
...LIntegrityConstraintViolationExceptionTest.java | 2 +-
persistence/jdo/integration/pom.xml | 33 +-
.../jdo/integration/IsisModuleJdoIntegration.java | 111 +----
.../integration/config/JdoBeanTypeClassifier.java} | 20 +-
...xceptionRecognizerForJDODataStoreException.java | 6 +-
...RecognizerForJDODataStoreExceptionAbstract.java | 8 +-
...traintViolationForeignKeyNoActionException.java | 4 +-
...ionRecognizerForJDOObjectNotFoundException.java | 6 +-
...yConstraintViolationUniqueOrIndexException.java | 4 +-
.../recognizers/_JdoNestedExceptionResolver.java | 10 +-
.../jdo/metamodel/beans/JdoBeanTypeClassifier.java | 9 +-
.../JdoPersistenceCapableFacetAnnotation.java | 2 +-
.../column/MandatoryFacetDerivedFromJdoColumn.java | 2 +-
.../JdoNotPersistentFacetAnnotation.java | 2 +-
.../jdo/metamodel/menu/JdoMetamodelMenu.java | 8 +-
.../prop/notpersistent/JdoNotPersistentFacet.java | 6 +-
...sactionAwarePersistenceManagerFactoryProxy.java | 8 +-
...ipseLink.java => IsisModuleJpaEclipselink.java} | 4 +-
persistence/jpa/integration/pom.xml | 5 +
.../metamodel/JpaEntityFacetFactory.java | 10 +-
.../integration/metamodel/JpaProgrammingModel.java | 5 +-
.../{jdo/datanucleus => jpa/metamodel}/pom.xml | 40 +-
.../jpa/metamodel/IsisModuleJpaMetamodel.java} | 27 +-
.../jpa/metamodel/JpaProgrammingModel.java | 128 ++++++
.../MandatoryFacetDerivedFromJpaColumn.java} | 7 +-
...ndatoryFromJpaColumnAnnotationFacetFactory.java | 64 +++
.../transients/JpaTransientAnnotationFacet.java} | 11 +-
.../JpaTransientAnnotationFacetFactory.java | 52 +++
.../facets/prop/transients/JpaTransientFacet.java | 9 +-
persistence/jpa/pom.xml | 1 +
pom.xml | 48 +--
regressiontests/pom.xml | 70 ++--
regressiontests/stable/pom.xml | 19 +-
.../testdomain/conf/Configuration_usingJdo.java | 4 +-
.../conf/Configuration_usingJdoAndShiro.java | 8 +-
.../testdomain/conf/Configuration_usingJpa.java | 14 +-
....java => Configuration_usingSpringDataJpa.java} | 20 +-
.../isis/testdomain/jpa/JpaTestDomainModule.java | 19 +-
.../isis/testdomain/jpa/entities/JpaBook.java | 2 -
.../isis/testdomain/jpa/entities/JpaInventory.java | 2 -
.../isis/testdomain/jpa/entities/JpaProduct.java | 5 +-
.../testdomain/jpa/entities/JpaProductComment.java | 4 +-
.../Employee.java} | 35 +-
.../testdomain/jpa/springdata/EmployeeManager.java | 31 +-
.../springdata/EmployeeManager_deleteEmployee.java | 23 +-
.../springdata/EmployeeManager_newEmployee.java | 24 +-
.../jpa/springdata/EmployeeRepository.java | 14 +-
.../jpa/springdata/SpringDataJpaTestModule.java | 48 +++
.../springdata/SpringDataJpaBootstrappingTest.java | 137 ++++++
scripts/checkmissinglicenses.groovy | 20 +-
starters/pom.xml | 8 +-
.../fixturescripts/ExcelDemoToDoItem_tearDown.java | 4 +-
.../ExcelDemoToDoItem_tearDown2.java | 8 +-
subdomains/excel/testing/pom.xml | 11 +-
.../src/main/resources/supplemental-models.xml | 32 +-
.../FakeDataDemoObjectWithAll_tearDown.java | 4 +-
testing/fixtures/applib/pom.xml | 19 +-
.../applib/modules/ModuleWithFixturesService.java | 40 +-
.../applib/services/FixturesLifecycleService.java | 11 +-
.../TeardownFixtureJdoAbstract.java} | 21 +-
testing/integtestsupport/applib/pom.xml | 38 +-
.../main/java/org/apache/isis/tooling/c4/C4.java | 4 +-
.../org/apache/isis/tooling/c4/test/C4Test.java | 4 +-
tooling/pom.xml | 6 +-
valuetypes/asciidoc/ui/pom.xml | 6 +-
235 files changed, 5348 insertions(+), 2051 deletions(-)
create mode 100644 antora/components/system/modules/generated/pages/index/core/runtimeservices/transaction/TransactionServiceSpring.adoc
create mode 100644 antora/components/system/modules/generated/pages/index/persistence/jdo/applib/integration/JdoSupportService.adoc
rename antora/components/system/modules/generated/pages/index/persistence/jdo/{integration => datanucleus}/schema/JdoSchemaService.adoc (100%)
rename api/applib/src/main/adoc/modules/applib-ant/pages/Property/{mementoSerialization.adoc => snapshot.adoc} (73%)
rename api/applib/src/main/java/org/apache/isis/applib/annotation/{MementoSerialization.java => Snapshot.java} (67%)
delete mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/disabled/DisabledFacetForCollection.java
copy core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/{MementoSerializationExcludeFacet.java => SnapshotExcludeFacet.java} (94%)
rename core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/{MementoSerializationExcludeFacetAbstract.java => SnapshotExcludeFacetAbstract.java} (81%)
rename core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/notpersisted/{MementoSerializationExcludeFacetForPropertyAnnotation.java => SnapshotExcludeFacetForPropertyAnnotation.java} (66%)
copy core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/{NotPersistableFacetInferred.java => SnapshotExcludeFacetInferred.java} (83%)
delete mode 100644 core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/DisabledAnnotationOnCollectionFacetFactoryTest.java
rename core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/{ixn => interaction}/InteractionDtoServiceInternalDefault.java (99%)
rename core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/{xactn => transaction}/TransactionServiceSpring.java (76%)
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/{mementoSerialization/PropertyMementoSerializationVm-description.adoc => snapshot/PropertySnapshotVm-description.adoc} (92%)
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/{mementoSerialization/PropertyMementoSerializationVm.java => snapshot/PropertySnapshotVm.java} (72%)
copy examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/{mementoSerialization/PropertyMementoSerializationVm.layout.xml => snapshot/PropertySnapshotVm.layout.xml} (97%)
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/{mementoSerialization/PropertyMementoSerializationVm_takeSnapshot.java => snapshot/PropertySnapshotVm_takeXmlSnapshot.java} (65%)
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/{mementoSerialization/MementoSerializationExcludedMetaAnnotation.java => snapshot/SnapshotExcludedMetaAnnotation.java} (82%)
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/{mementoSerialization/MementoSerializationIncludedMetaAnnotation.java => snapshot/SnapshotIncludedMetaAnnotation.java} (82%)
copy examples/demo/domain/src/main/java/demoapp/dom/{services/core/xmlSnapshotService/peer/XmlSnapshotPeerVm-description.adoc => annotDomain/Property/snapshot/child/PropertySnapshotChildVm-description.adoc} (89%)
copy examples/demo/domain/src/main/java/demoapp/dom/{services/core/xmlSnapshotService/XmlSnapshotParentVm.java => annotDomain/Property/snapshot/child/PropertySnapshotChildVm.java} (52%)
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/{mementoSerialization/PropertyMementoSerializationVm.layout.xml => snapshot/child/PropertySnapshotChildVm.layout.xml} (83%)
create mode 100644 extensions/security/secman/persistence-jpa/pom.xml
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/IsisModuleExtSecmanPersistenceJpa.java
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/dom/constants/NamedQueryNames.java
copy extensions/security/secman/{persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo => persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa}/dom/permission/ApplicationPermission.java (62%)
copy extensions/security/secman/{persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo => persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa}/dom/permission/ApplicationPermission.layout.xml (100%)
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/dom/permission/ApplicationPermissionRepository.java
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/dom/role/ApplicationRole.java
copy extensions/security/secman/{persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo => persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa}/dom/role/ApplicationRole.layout.xml (100%)
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/dom/role/ApplicationRoleRepository.java
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/dom/tenancy/ApplicationTenancy.java
copy extensions/security/secman/{persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo => persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa}/dom/tenancy/ApplicationTenancy.layout.xml (100%)
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/dom/tenancy/ApplicationTenancyRepository.java
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/dom/user/ApplicationUser.java
copy extensions/security/secman/{persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo => persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa}/dom/user/ApplicationUser.layout.xml (100%)
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/dom/user/ApplicationUserRepository.java
copy extensions/security/secman/{persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo => persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa}/seed/SeedSecurityModuleService.java (95%)
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/seed/SeedUsersAndRolesFixtureScript.java
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/seed/scripts/AbstractRoleAndPermissionsFixtureScript.java
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/seed/scripts/AbstractTenancyFixtureScript.java
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/seed/scripts/AbstractUserAndRolesFixtureScript.java
copy subdomains/excel/fixture/src/main/java/org/apache/isis/subdomains/excel/fixtures/demoapp/todomodule/fixturescripts/ExcelDemoToDoItem_tearDown.java => extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/seed/scripts/GlobalTenancy.java (65%)
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/seed/scripts/IsisExtFixturesFixtureResultsRoleAndPermissions.java
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/seed/scripts/IsisModuleSecurityAdminRoleAndPermissions.java
copy core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/NotPersistableFacetInferred.java => extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/seed/scripts/IsisModuleSecurityAdminUser.java (56%)
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/seed/scripts/IsisModuleSecurityFixtureRoleAndPermissions.java
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/seed/scripts/IsisModuleSecurityRegularUserRoleAndPermissions.java
create mode 100644 extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/userreg/SecurityModuleAppUserRegistrationServiceAbstract.java
delete mode 100644 persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/services/IsisJdoSupport.java
delete mode 100644 persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/services/IsisJdoSupport_v3_2.java
copy persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration/IsisModuleJdoIntegration.java => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus/IsisModuleJdoDatanucleus.java} (69%)
delete mode 100644 persistence/jdo/datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus/IsisModuleJdoProviderDatanucleus.java
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus}/changetracking/JdoLifecycleListener.java (96%)
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus}/changetracking/_Utils.java (95%)
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus}/config/CreateSchemaObjectFromClassMetadata.java (97%)
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus}/config/DataNucleusPropertiesAware.java (94%)
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus}/config/JdoEntityTypeRegistry.java (62%)
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration/jdosupport/IsisJdoSupportDN5.java => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus/jdosupport/JdoSupportServiceDefault.java} (87%)
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/JdoIntegrationProgrammingModel.java => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus/metamodel/JdoDataNucleusProgrammingModel.java} (88%)
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus}/metamodel/JdoMetamodelUtil.java (93%)
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus}/metamodel/facets/entity/JdoEntityFacet.java (92%)
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus}/metamodel/facets/entity/JdoEntityFacetFactory.java (91%)
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus}/schema/JdoSchemaService.java (91%)
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus}/schema/_DnApplication.java (91%)
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus}/schema/_DnApplicationComponents.java (96%)
rename persistence/jdo/{integration/src/main/java/org/apache/isis/persistence/jdo/integration => datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus}/schema/_DnStoreManagerType.java (94%)
rename persistence/jdo/{datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus/config/DnBeanTypeClassifier.java => integration/src/main/java/org/apache/isis/persistence/jdo/integration/config/JdoBeanTypeClassifier.java} (90%)
rename persistence/jdo/{datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus => integration/src/main/java/org/apache/isis/persistence/jdo/integration}/exceptions/recognizers/ExceptionRecognizerForJDODataStoreException.java (89%)
rename persistence/jdo/{datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus => integration/src/main/java/org/apache/isis/persistence/jdo/integration}/exceptions/recognizers/ExceptionRecognizerForJDODataStoreExceptionAbstract.java (96%)
rename persistence/jdo/{datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus => integration/src/main/java/org/apache/isis/persistence/jdo/integration}/exceptions/recognizers/ExceptionRecognizerForJDODataStoreExceptionIntegrityConstraintViolationForeignKeyNoActionException.java (90%)
rename persistence/jdo/{datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus => integration/src/main/java/org/apache/isis/persistence/jdo/integration}/exceptions/recognizers/ExceptionRecognizerForJDOObjectNotFoundException.java (88%)
rename persistence/jdo/{datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus => integration/src/main/java/org/apache/isis/persistence/jdo/integration}/exceptions/recognizers/ExceptionRecognizerForSQLIntegrityConstraintViolationUniqueOrIndexException.java (91%)
rename persistence/jdo/{datanucleus/src/main/java/org/apache/isis/persistence/jdo/datanucleus => integration/src/main/java/org/apache/isis/persistence/jdo/integration}/exceptions/recognizers/_JdoNestedExceptionResolver.java (93%)
rename persistence/jpa/eclipselink/src/main/java/org/apache/isis/persistence/jpa/eclipselink/{IsisModuleJpaEclipseLink.java => IsisModuleJpaEclipselink.java} (96%)
copy persistence/{jdo/datanucleus => jpa/metamodel}/pom.xml (57%)
copy persistence/{jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/integration/JdoSupportService.java => jpa/metamodel/src/main/java/org/apache/isis/persistence/jpa/metamodel/IsisModuleJpaMetamodel.java} (63%)
create mode 100644 persistence/jpa/metamodel/src/main/java/org/apache/isis/persistence/jpa/metamodel/JpaProgrammingModel.java
copy persistence/{jdo/metamodel/src/main/java/org/apache/isis/persistence/jdo/metamodel/facets/prop/column/MandatoryFacetDerivedFromJdoColumn.java => jpa/metamodel/src/main/java/org/apache/isis/persistence/jpa/metamodel/facets/prop/column/MandatoryFacetDerivedFromJpaColumn.java} (83%)
create mode 100644 persistence/jpa/metamodel/src/main/java/org/apache/isis/persistence/jpa/metamodel/facets/prop/column/MandatoryFromJpaColumnAnnotationFacetFactory.java
rename persistence/{jdo/metamodel/src/main/java/org/apache/isis/persistence/jdo/metamodel/facets/prop/notpersistent/JdoNotPersistentFacetImpl.java => jpa/metamodel/src/main/java/org/apache/isis/persistence/jpa/metamodel/facets/prop/transients/JpaTransientAnnotationFacet.java} (74%)
create mode 100644 persistence/jpa/metamodel/src/main/java/org/apache/isis/persistence/jpa/metamodel/facets/prop/transients/JpaTransientAnnotationFacetFactory.java
rename regressiontests/stable/src/main/java/org/apache/isis/testdomain/jpa/JpaTestApplication.java => persistence/jpa/metamodel/src/main/java/org/apache/isis/persistence/jpa/metamodel/facets/prop/transients/JpaTransientFacet.java (78%)
copy regressiontests/stable/src/main/java/org/apache/isis/testdomain/conf/{Configuration_usingJpa.java => Configuration_usingSpringDataJpa.java} (79%)
copy regressiontests/stable/src/main/java/org/apache/isis/testdomain/jpa/{JpaTestDomainModule.java => springdata/Employee.java} (54%)
rename persistence/jdo/metamodel/src/main/java/org/apache/isis/persistence/jdo/metamodel/facets/object/persistencecapable/JdoPersistenceCapableFacetImpl.java => regressiontests/stable/src/main/java/org/apache/isis/testdomain/jpa/springdata/EmployeeManager.java (57%)
rename core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/NotPersistableFacetInferred.java => regressiontests/stable/src/main/java/org/apache/isis/testdomain/jpa/springdata/EmployeeManager_deleteEmployee.java (60%)
copy persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/integration/JdoSupportService.java => regressiontests/stable/src/main/java/org/apache/isis/testdomain/jpa/springdata/EmployeeManager_newEmployee.java (59%)
rename core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/MementoSerializationExcludeFacet.java => regressiontests/stable/src/main/java/org/apache/isis/testdomain/jpa/springdata/EmployeeRepository.java (70%)
create mode 100644 regressiontests/stable/src/main/java/org/apache/isis/testdomain/jpa/springdata/SpringDataJpaTestModule.java
create mode 100644 regressiontests/stable/src/test/java/org/apache/isis/testdomain/persistence/jpa/springdata/SpringDataJpaBootstrappingTest.java
rename testing/fixtures/applib/src/main/java/org/apache/isis/testing/fixtures/applib/teardown/{TeardownFixtureAbstract.java => jdo/TeardownFixtureJdoAbstract.java} (89%)
[isis] 01/06: ISIS-439: removes @Collection#editing and makes all
collections disabled always
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-2476
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 91b03f80a80b8471430ac3981ec489b84f57d27f
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Jan 12 08:47:04 2021 +0000
ISIS-439: removes @Collection#editing and makes all collections disabled always
---
.../pages/2020/2.0.0-M3/migrating-to-2.0.0.adoc | 6 ++
.../pages/index/applib/annotation/Collection.adoc | 16 -----
.../applib-ant/examples/annotation/Collection.java | 21 -------
.../adoc/modules/applib-ant/pages/Collection.adoc | 9 ---
.../applib-ant/pages/Collection/editing.adoc | 63 --------------------
.../modules/applib-ant/pages/Property/editing.adoc | 1 -
.../apache/isis/applib/annotation/Collection.java | 10 +---
.../isis/applib/domain/DomainObjectList.java | 3 +-
.../CollectionAnnotationFacetFactory.java | 10 ++--
.../disabled/DisabledFacetForCollection.java | 37 ++++++++++++
.../DisabledFacetForCollectionAnnotation.java | 69 ----------------------
.../CollectionAnnotationFacetFactoryTest.java | 29 ++++-----
...bledAnnotationOnCollectionFacetFactoryTest.java | 8 +--
.../dom/annotDomain/Collection/editing/.gitkeep | 0
.../secman/jdo/dom/role/ApplicationRole.java | 7 +--
.../secman/jdo/dom/tenancy/ApplicationTenancy.java | 3 +-
.../secman/jdo/dom/user/ApplicationUser.java | 7 +--
17 files changed, 72 insertions(+), 227 deletions(-)
diff --git a/antora/components/relnotes/modules/ROOT/pages/2020/2.0.0-M3/migrating-to-2.0.0.adoc b/antora/components/relnotes/modules/ROOT/pages/2020/2.0.0-M3/migrating-to-2.0.0.adoc
index a902707..9c18943 100644
--- a/antora/components/relnotes/modules/ROOT/pages/2020/2.0.0-M3/migrating-to-2.0.0.adoc
+++ b/antora/components/relnotes/modules/ROOT/pages/2020/2.0.0-M3/migrating-to-2.0.0.adoc
@@ -724,6 +724,12 @@ isis.value-types. +
+=== Annotations
+
+Collections are no longer editable.
+The `@Collection#editing()` and `@Collection#editingDisabledReason()` members have been removed.
+
+
=== No longer any archetypes
The archetypes have been replaced by starter apps.
diff --git a/antora/components/system/modules/generated/pages/index/applib/annotation/Collection.adoc b/antora/components/system/modules/generated/pages/index/applib/annotation/Collection.adoc
index 3fa05c7..352b425 100644
--- a/antora/components/system/modules/generated/pages/index/applib/annotation/Collection.adoc
+++ b/antora/components/system/modules/generated/pages/index/applib/annotation/Collection.adoc
@@ -10,10 +10,6 @@ Domain semantics for domain object collection.
Class<? extends CollectionDomainEvent<?, ?>> domainEvent() default CollectionDomainEvent.Default.class; // <.>
- Editing editing() default Editing.NOT_SPECIFIED; // <.>
-
- String editingDisabledReason() default ""; // <.>
-
Where hidden() default Where.NOT_SPECIFIED; // <.>
Class<?> typeOf() default Object.class; // <.>
@@ -39,18 +35,6 @@ public class Order {
This subclass must provide a no-arg constructor; the fields are set reflectively.
--
-<.> `[teal]#*_editing_*#` : `xref:system:generated:index/applib/annotation/Editing.adoc[Editing]`
-+
---
-Whether the properties of this domain object can be edited, or collections of this object be added to/removed from.
-
-Note that non-editable objects can nevertheless have actions invoked upon them.
---
-<.> `[teal]#*_editingDisabledReason_*#` : `String`
-+
---
-If _#editing()_ is set to _Editing#DISABLED_ , then the reason to provide to the user as to why this property cannot be edited.
---
<.> `[teal]#*_hidden_*#` : `xref:system:generated:index/applib/annotation/Where.adoc[Where]`
+
--
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Collection.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Collection.java
index 33aeaf3..30e790e 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Collection.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Collection.java
@@ -69,27 +69,6 @@ public @interface Collection {
// end::refguide[]
/**
- * Whether the properties of this domain object can be edited, or collections of this object be added to/removed from.
- *
- * <p>
- * Note that non-editable objects can nevertheless have actions invoked upon them.
- * </p>
- */
- // tag::refguide[]
- Editing editing() // <.>
- default Editing.NOT_SPECIFIED;
-
- // end::refguide[]
- /**
- * If {@link #editing()} is set to {@link Editing#DISABLED},
- * then the reason to provide to the user as to why this property cannot be edited.
- */
- // tag::refguide[]
- String editingDisabledReason() // <.>
- default "";
-
- // end::refguide[]
- /**
* Indicates when the collection is not visible to the user.
*/
// tag::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Collection.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Collection.adoc
index 0fc7006..3bbd45f 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Collection.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Collection.adoc
@@ -14,14 +14,6 @@ include::refguide:applib-ant:example$annotation/Collection.java[tags="refguide"]
+
The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to broadcast the collection's business rule checking (hide, disable, validate) and its modification (before and after).
-<.> xref:refguide:applib-ant:Collection.adoc#editing[`editing()`]
-+
-Whether a collection can be added to or removed from within the UI
-
-<.> `editingDisabledReason()`
-+
-If `editing()` is `DISABLED`, provides a reason as to why.
-
<.> xref:refguide:applib-ant:Collection.adoc#hidden[`hidden()`]
+
Indicates where (in the UI) the collection should be hidden from the user.
@@ -70,6 +62,5 @@ so that boilerplate-busting tools such as link:https://projectlombok.org/[Projec
include::Collection/domainEvent.adoc[leveloffset=+1]
-include::Collection/editing.adoc[leveloffset=+1]
include::Collection/hidden.adoc[leveloffset=+1]
include::Collection/typeOf.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Collection/editing.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Collection/editing.adoc
deleted file mode 100644
index 4b30d3e..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Collection/editing.adoc
+++ /dev/null
@@ -1,63 +0,0 @@
-[#editing]
-= `editing()`
-
-:Notice: 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 ag [...]
-:page-partial:
-
-
-
-The `editing()` annotation indicates whether a collection can be added to or removed from within the UI.
-
-The related `editingDisabledReason` attribute specifies the a hard-coded reason why the collection cannot be modified directly.
-
-[WARNING]
-====
-The xref:vw:ROOT:about.adoc[Wicket viewer] does *not* currently support the modification of collections; they are rendered read-only.
-
-The workaround is to create add/remove actions and use xref:refguide:applib-ant:MemberOrder.adoc[UI hints] to render them close to the collection.
-====
-
-Whether a collection is enabled or disabled depends upon these factors:
-
-* whether the domain object has been configured as immutable through the xref:refguide:applib-ant:DomainObject.adoc#editing[`@DomainObject#editing()`] attribute
-
-* else (that is, if the domain object's editability is specified as being `AS_CONFIGURED`), then the value of the
-xref:refguide:config:sections/isis.applib.adoc#isis.applib.annotation.domain-object.editing['isis.applib.annotation.domain-object.editing'] configuration property.
-If set to `false`, then the object's collections (and properties) are *not* editable
-
-* else, then the value of the `@Collection(editing=...)` attribute itself.
-
-* else, the result of invoking any supporting xref:refguide:applib-methods:prefixes.adoc#disable[`disable...()`] supporting methods
-
-
-Thus, to make a collection read-only even if the object would otherwise be editable, use:
-
-[source,java]
-----
-import lombok.Getter;
-import lombok.Setter;
-
-public class ToDoItem {
-
- @Collection(
- editing=Editing.DISABLED,
- editingDisabledReason="Use the add and remove actions to modify"
- )
- @Getter @Setter
- private SortedSet<ToDoItem> dependencies = ...
-
-}
-----
-
-[NOTE]
-====
-To reiterate, it is _not_ possible to enable editing for a collection if editing has been disabled at the object-level.
-====
-
-== See also
-
-This attribute can also be specified for:
-
-* xref:refguide:applib-ant:Property.adoc#editing[properties]
-* xref:refguide:applib-ant:DomainObject.adoc#editing[domain object]
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Property/editing.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Property/editing.adoc
index 97a865b..b949914 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Property/editing.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Property/editing.adoc
@@ -44,5 +44,4 @@ public class Customer {
This attribute can also be specified for:
-* xref:refguide:applib-ant:Collection.adoc#editing[collections]
* xref:refguide:applib-ant:DomainObject.adoc#editing[domain object].
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/Collection.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/Collection.java
index eeec4a6..86cdc89 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/Collection.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/Collection.java
@@ -29,7 +29,7 @@ import org.apache.isis.applib.events.domain.CollectionDomainEvent;
/**
* Domain semantics for domain object collection.
- *
+ *
* @since 1.x {@index}
*/
@Inherited
@@ -75,14 +75,6 @@ public @interface Collection {
*/
Editing editing()
default Editing.NOT_SPECIFIED;
-
- /**
- * If {@link #editing()} is set to {@link Editing#DISABLED},
- * then the reason to provide to the user as to why this property cannot be edited.
- */
- String editingDisabledReason()
- default "";
-
/**
* Indicates when the collection is not visible to the user.
*/
diff --git a/api/applib/src/main/java/org/apache/isis/applib/domain/DomainObjectList.java b/api/applib/src/main/java/org/apache/isis/applib/domain/DomainObjectList.java
index 7dfe76a..97072ae 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/domain/DomainObjectList.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/domain/DomainObjectList.java
@@ -164,8 +164,7 @@ public class DomainObjectList {
private List<Object> objects = new ArrayList<>();
@Collection(
- domainEvent = ObjectsDomainEvent.class,
- editing = Editing.DISABLED
+ domainEvent = ObjectsDomainEvent.class
)
public List<Object> getObjects() {
return objects;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
index ee2bfea..84fdca4 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
@@ -37,7 +37,7 @@ import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacetInferredF
import org.apache.isis.core.metamodel.facets.actions.contributing.ContributingFacetAbstract;
import org.apache.isis.core.metamodel.facets.actions.contributing.ContributingFacet.Contributing;
import org.apache.isis.core.metamodel.facets.actions.semantics.ActionSemanticsFacetAbstract;
-import org.apache.isis.core.metamodel.facets.collections.collection.disabled.DisabledFacetForCollectionAnnotation;
+import org.apache.isis.core.metamodel.facets.collections.collection.disabled.DisabledFacetForCollection;
import org.apache.isis.core.metamodel.facets.collections.collection.hidden.HiddenFacetForCollectionAnnotation;
import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForDomainEventFromAbstract;
import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForDomainEventFromCollectionAnnotation;
@@ -73,7 +73,7 @@ public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract {
processModify(processMethodContext, collectionIfAny);
processHidden(processMethodContext, collectionIfAny);
- processEditing(processMethodContext, collectionIfAny);
+ processEditing(processMethodContext);
processTypeOf(processMethodContext, collectionIfAny);
}
@@ -208,11 +208,9 @@ public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract {
super.addFacet(facet);
}
- void processEditing(final ProcessMethodContext processMethodContext, Optional<Collection> collectionIfAny) {
+ void processEditing(final ProcessMethodContext processMethodContext) {
val holder = processMethodContext.getFacetHolder();
-
- // check for @Collection(editing=...)
- val facet = DisabledFacetForCollectionAnnotation.create(collectionIfAny, holder);
+ val facet = DisabledFacetForCollection.create(holder);
super.addFacet(facet);
}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/disabled/DisabledFacetForCollection.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/disabled/DisabledFacetForCollection.java
new file mode 100644
index 0000000..b99e1b1
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/disabled/DisabledFacetForCollection.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.metamodel.facets.collections.collection.disabled;
+
+import org.apache.isis.applib.annotation.Where;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacet;
+import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacetAbstractImpl;
+
+public class DisabledFacetForCollection extends DisabledFacetAbstractImpl {
+
+ public static DisabledFacet create(final FacetHolder holder) {
+ return new DisabledFacetForCollection(holder);
+ }
+
+ private DisabledFacetForCollection(final FacetHolder holder) {
+ super(Where.EVERYWHERE, "Always disabled", holder);
+ }
+
+}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/disabled/DisabledFacetForCollectionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/disabled/DisabledFacetForCollectionAnnotation.java
deleted file mode 100644
index 39faaf0..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/disabled/DisabledFacetForCollectionAnnotation.java
+++ /dev/null
@@ -1,69 +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.core.metamodel.facets.collections.collection.disabled;
-
-import java.util.Optional;
-
-import org.apache.isis.applib.annotation.Collection;
-import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacet;
-import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacetAbstractImpl;
-
-public class DisabledFacetForCollectionAnnotation extends DisabledFacetAbstractImpl {
-
- public static DisabledFacet create(
- final Optional<Collection> collectionIfAny,
- final FacetHolder holder) {
-
- return collectionIfAny
- .filter(collection -> collection.editing() != Editing.NOT_SPECIFIED)
- .map(collection -> {
- final Editing editing = collection.editing();
- final String disabledReason = collection.editingDisabledReason();
-
- switch (editing) {
- case AS_CONFIGURED:
-
- // nothing needs to be done here; the DomainObjectFactory (processing @DomainObject annotation)
- // will install an ImmutableFacetForDomainObjectAnnotation on the domain object and then a
- // DisabledFacetOnCollectionDerivedFromImmutable facet will be installed.
-
- return null;
-
- case DISABLED:
- return (DisabledFacet)new DisabledFacetForCollectionAnnotation(disabledReason, holder);
-
- case ENABLED:
- return null;
- default:
- break;
- }
- throw new IllegalStateException("editing '" + editing + "' not recognised");
- })
- .orElse(null);
- }
-
- private DisabledFacetForCollectionAnnotation(final String reason, final FacetHolder holder) {
- super(Where.EVERYWHERE, reason, holder);
- }
-
-}
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java
index 5405423..18657e1 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java
@@ -5,9 +5,9 @@
* 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
@@ -43,7 +43,6 @@ import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacet;
import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacetInferredFromArray;
import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacetInferredFromGenerics;
import org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet;
-import org.apache.isis.core.metamodel.facets.collections.collection.disabled.DisabledFacetForCollectionAnnotation;
import org.apache.isis.core.metamodel.facets.collections.collection.hidden.HiddenFacetForCollectionAnnotation;
import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForDomainEventFromCollectionAnnotation;
import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForDomainEventFromDefault;
@@ -94,13 +93,13 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
}
});
}
-
+
private static void processModify(
CollectionAnnotationFacetFactory facetFactory, FacetFactory.ProcessMethodContext processMethodContext) {
val collectionIfAny = processMethodContext.synthesizeOnMethod(Collection.class);
facetFactory.processModify(processMethodContext, collectionIfAny);
}
-
+
private static void processHidden(
CollectionAnnotationFacetFactory facetFactory, FacetFactory.ProcessMethodContext processMethodContext) {
val collectionIfAny = processMethodContext.synthesizeOnMethod(Collection.class);
@@ -110,16 +109,16 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
private static void processEditing(
CollectionAnnotationFacetFactory facetFactory, FacetFactory.ProcessMethodContext processMethodContext) {
val collectionIfAny = processMethodContext.synthesizeOnMethod(Collection.class);
- facetFactory.processEditing(processMethodContext, collectionIfAny);
+ facetFactory.processEditing(processMethodContext);
}
-
+
private static void processTypeOf(
CollectionAnnotationFacetFactory facetFactory, FacetFactory.ProcessMethodContext processMethodContext) {
val collectionIfAny = processMethodContext.synthesizeOnMethod(Collection.class);
facetFactory.processTypeOf(processMethodContext, collectionIfAny);
}
-
+
@Before
public void setUp() throws Exception {
facetFactory = new CollectionAnnotationFacetFactory();
@@ -432,6 +431,9 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
}
+ /**
+ * This feature has been removed, so this is a negative test
+ */
public static class Editing extends CollectionAnnotationFacetFactoryTest {
@Test
@@ -440,10 +442,7 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
class Order {
}
class Customer {
- @Collection(
- editing = org.apache.isis.applib.annotation.Editing.DISABLED,
- editingDisabledReason = "you cannot edit the orders collection"
- )
+ @Collection()
public List<Order> getOrders() {
return null;
}
@@ -464,10 +463,6 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
// then
final DisabledFacet disabledFacet = facetedMethod.getFacet(DisabledFacet.class);
Assert.assertNotNull(disabledFacet);
- Assert.assertTrue(disabledFacet instanceof DisabledFacetForCollectionAnnotation);
- final DisabledFacetForCollectionAnnotation disabledFacetImpl = (DisabledFacetForCollectionAnnotation) disabledFacet;
- assertThat(disabledFacet.where(), is(Where.EVERYWHERE));
- assertThat(disabledFacetImpl.getReason(), is("you cannot edit the orders collection"));
}
}
@@ -567,4 +562,4 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
}
-}
\ No newline at end of file
+}
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/DisabledAnnotationOnCollectionFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/DisabledAnnotationOnCollectionFacetFactoryTest.java
index 9556f33..51082ec 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/DisabledAnnotationOnCollectionFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/DisabledAnnotationOnCollectionFacetFactoryTest.java
@@ -50,17 +50,17 @@ public class DisabledAnnotationOnCollectionFacetFactoryTest extends AbstractFace
facetFactory = null;
super.tearDown();
}
-
+
private static void processEditing(
CollectionAnnotationFacetFactory facetFactory, FacetFactory.ProcessMethodContext processMethodContext) {
val collectionIfAny = processMethodContext.synthesizeOnMethod(Collection.class);
- facetFactory.processEditing(processMethodContext, collectionIfAny);
+ facetFactory.processEditing(processMethodContext);
}
- public void testDisabledAnnotationPickedUpOnCollection() {
+ public void testDisabledFacetPickedUpOnCollection() {
class Customer {
- @org.apache.isis.applib.annotation.Collection(editing = Editing.DISABLED)
+ @org.apache.isis.applib.annotation.Collection()
public java.util.Collection<?> getOrders() {
return null;
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Collection/editing/.gitkeep b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Collection/editing/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/extensions/security/secman/persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo/dom/role/ApplicationRole.java b/extensions/security/secman/persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo/dom/role/ApplicationRole.java
index d4f5e5e..9355370 100644
--- a/extensions/security/secman/persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo/dom/role/ApplicationRole.java
+++ b/extensions/security/secman/persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo/dom/role/ApplicationRole.java
@@ -87,12 +87,12 @@ import lombok.Setter;
@DomainObjectLayout(
bookmarking = BookmarkPolicy.AS_ROOT
)
-public class ApplicationRole
+public class ApplicationRole
implements org.apache.isis.extensions.secman.api.role.ApplicationRole, Comparable<ApplicationRole> {
@Inject private ApplicationFeatureRepository applicationFeatureRepository;
@Inject private ApplicationPermissionRepository applicationPermissionRepository;
-
+
// -- name (property)
public static class NameDomainEvent extends PropertyDomainEvent<String> {}
@@ -167,8 +167,7 @@ implements org.apache.isis.extensions.secman.api.role.ApplicationRole, Comparabl
@javax.jdo.annotations.Persistent(mappedBy = "roles")
@Collection(
- domainEvent = UsersDomainEvent.class,
- editing = Editing.DISABLED
+ domainEvent = UsersDomainEvent.class
)
@CollectionLayout(
defaultView="table"
diff --git a/extensions/security/secman/persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo/dom/tenancy/ApplicationTenancy.java b/extensions/security/secman/persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo/dom/tenancy/ApplicationTenancy.java
index 6e0dd1b..21b371c 100644
--- a/extensions/security/secman/persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo/dom/tenancy/ApplicationTenancy.java
+++ b/extensions/security/secman/persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo/dom/tenancy/ApplicationTenancy.java
@@ -143,8 +143,7 @@ org.apache.isis.extensions.secman.api.tenancy.ApplicationTenancy {
@javax.jdo.annotations.Persistent(mappedBy = "parent")
@Collection(
- domainEvent = ChildrenDomainEvent.class,
- editing = Editing.DISABLED
+ domainEvent = ChildrenDomainEvent.class
)
@CollectionLayout(
defaultView="table"
diff --git a/extensions/security/secman/persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo/dom/user/ApplicationUser.java b/extensions/security/secman/persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo/dom/user/ApplicationUser.java
index a71ebae..85d6c20 100644
--- a/extensions/security/secman/persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo/dom/user/ApplicationUser.java
+++ b/extensions/security/secman/persistence-jdo/src/main/java/org/apache/isis/extensions/secman/jdo/dom/user/ApplicationUser.java
@@ -124,7 +124,7 @@ import lombok.val;
// middle= {"Contact Details"},
// right= {"Status", "AtPath"}
//)
-public class ApplicationUser implements Comparable<ApplicationUser>,
+public class ApplicationUser implements Comparable<ApplicationUser>,
org.apache.isis.extensions.secman.api.user.ApplicationUser {
@Inject private ApplicationUserRepository applicationUserRepository;
@@ -371,8 +371,7 @@ org.apache.isis.extensions.secman.api.user.ApplicationUser {
@javax.jdo.annotations.Join(column="userId")
@javax.jdo.annotations.Element(column="roleId")
@Collection(
- domainEvent = RolesDomainEvent.class,
- editing = Editing.DISABLED
+ domainEvent = RolesDomainEvent.class
)
@CollectionLayout(
defaultView="table"
@@ -431,7 +430,7 @@ org.apache.isis.extensions.secman.api.user.ApplicationUser {
// -- equals, hashCode, compareTo, toString
private static final String propertyNames = "username";
- private static final ObjectContract<ApplicationUser> contract =
+ private static final ObjectContract<ApplicationUser> contract =
ObjectContracts.parse(ApplicationUser.class, propertyNames);
[isis] 03/06: ISIS-2476: improves docs for property
mementoSerialization
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-2476
in repository https://gitbox.apache.org/repos/asf/isis.git
commit f94549fd17ff2610ab617ff82a88472c8b43d247
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jan 13 07:18:10 2021 +0000
ISIS-2476: improves docs for property mementoSerialization
---
...PropertyMementoSerializationVm-description.adoc | 129 ++++++---------------
.../PropertyMementoSerializationVm.java | 15 ++-
...ropertyMementoSerializationVm_takeSnapshot.java | 31 ++---
3 files changed, 61 insertions(+), 114 deletions(-)
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm-description.adoc
index a86fcdc..0c0bd9b 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm-description.adoc
@@ -1,135 +1,78 @@
:Notice: 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 ag [...]
-The `associateWith` element specifies an action has a relationship with another property or another collection of the domain class.
+The `mementoSerialization` element of the `@Property` annotation specifies whether a property should be included in an XML snapshot, as created by the `XmlSnapshotService`:
-* For properties, the association (currently) is used solely for layout purposes, so that the action will by default be rendered close to the property.
-+
-This can of course be overridden using `@ActionLayout` or the layout file
-
-* For collections, the association is also used for layout purposes, rendering the action near to the collection.
-+
-However, it is also used at a deeper level, because the action may have a collection parameter which is the same type as the collection elements.
-In the Wicket viewer, the collection is rendered with checkboxes; those selected objects are used as defaults for the action collection parameter.
-
-
-== Associated with Properties
-
-The `AssociateWithVm` class defines two properties, `text` and `anotherProperty`:
-
-[source,java]
-----
-include::ActionAssociateWithVm.java[tags=class-properties]
-----
-
-The regular `updateText` action is associated with the `text` property:
-
-[source,java,indent=0]
-----
-include::ActionAssociateWithVm.java[tags=action-associateWith-property]
-----
-<.> indicates the property to associate with
-<.> if there are multiple actions associated with the property, indicates their order in the UI
-
-Meanwhile the mixin `updateOtherProperty` is associated with the `otherProperty` property:
+The `takeSnapshot` mixin action shows how this service is used:
[source,java,indent=0]
----
-include::ActionAssociateWithVm_updateOtherProperty.java[tags=class]
+include::PropertyMementoSerializationVm_takeSnapshot.java[tags=class]
----
-<.> indicates the property to associate with
-<.> indicates their order in the UI
+There are several use cases of the resultant XML; a common one is for adhoc auditing.
+Another is when there's a need to pass the state of an object (graph) into a supporting domain service, for example to perform a mail merge.
+All that is required is the state of the object, which can then be extracted, eg using XPath.
+This allows the domain object and service to have no direct knowledge of each other; the binding is entirely configuration driven.
-== Collection
-The `AssociateWithVm` class also defines the `children` collection:
-[source,java]
-----
-include::ActionAssociateWithVm.java[tags=class-collections-children]
-----
+== Annotations and Meta-annotations
-There are three actions associated with this collection:
+The example view model indicates which properties to include or exclude from the view model:
-* the `addChild` action:
+* with no annotation:
+
[source,java,indent=0]
----
-include::ActionAssociateWithVm.java[tags=action-associateWith-children-1]
+include::PropertyMementoSerializationVm.java[tags=no-annotation]
----
-<.> associates with the "children" collection
-<.> positioned first in the UI
++
+These will be included by default.
-* the `removeChild` action.
+* explicitly included:
+
[source,java,indent=0]
----
-include::ActionAssociateWithVm.java[tags=action-associateWith-children-2]
+include::PropertyMementoSerializationVm.java[tags=annotated-included]
----
-<.> associates with the "children" collection
-<.> positioned second in the UI
-<.> because this action is associated with a collection, no supporting `choices()` or `autoComplete(...)` is required to provide the parameter.
-Instead, the elements in the collection are automatically used.
-
-+
-TIP: an explicit `choices()` or `autoComplete(...)` supporting method can be provided to override the default usage of the collection elements if required.
-* the `removeChildren` action, which allows multiple children to be removed:
+* explicitly excluded:
+
[source,java,indent=0]
----
-include::ActionAssociateWithVm.java[tags=action-associateWith-children-3]
+include::PropertyMementoSerializationVm.java[tags=annotated-excluded]
----
-<.> associates with the "children" collection
-<.> positioned third in the UI
-<.> again, no supporting `choices()` or `autoComplete(...)` method is required.
-Instead, the elements of the collection are used as options.
-Also, each row in the collection is rendered with a checkbox, and those selected are used as the default for the parameter.
-
-== Mixin Actions
-
-The `AssociateWithVm` class also defines the `favorites` collection:
-[source,java]
+* included through a meta-annotation:
++
+[source,java,indent=0]
----
-include::ActionAssociateWithVm.java[tags=class-collections-favorites]
+include::PropertyMementoSerializationVm.java[tags=meta-annotated-included]
----
-
-There are three mixin actions associated with this collection:
-
-* the `makeFavorite` action.
-This takes a element from the "children" collectio and also adds to the "favorites" collection:
+
-[source,java]
+where the meta-annotation is:
++
+[source,java,indent=0]
----
-include::child/ActionAssociateWithVm_makeFavorite.java[tags=class]
+include::MementoSerializationIncludedMetaAnnotation.java[tags=class]
----
-<.> associates with the "favorites" collection
-<.> positioned first in the UI
-<.> choices are taken from the "children" collection
-* the `noLongerFavorite` action.
-This just removes a selected element from the "children" collection:
+* excluded through a meta-annotation:
+
-[source,java]
+[source,java,indent=0]
----
-include::child/ActionAssociateWithVm_noLongerFavorite.java[tags=class]
+include::PropertyMementoSerializationVm.java[tags=meta-annotated-excluded]
----
-<.> associates with the "children" collection
-<.> positioned second in the UI
-<.> because this action is associated with a collection, no supporting `choices()` or `autoComplete(...)` is required to provide the parameter.
-Instead, the elements in the collection are automatically used.
-
-* the `noLongerFavorites` action.
-This is similar to the previous action, but for multiple favorite elements:
+
-[source,java]
+where the meta-annotation is:
++
+[source,java,indent=0]
----
-include::child/ActionAssociateWithVm_noLongerFavorites.java[tags=class]
+include::MementoSerializationExcludedMetaAnnotation.java[tags=class]
----
-<.> associates with the "favorites" collection
-<.> positioned third in the UI
-<.> because this action is associated with a collection, no supporting `choices()` or `autoComplete(...)` is required to provide the parameter.
-Instead, the elements in the collection are automatically used.
+
+== Snapshot
+
+TODO: inline the resultant snapshot
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm.java
index a4e2f26..abb8b44 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm.java
@@ -32,11 +32,12 @@ import org.apache.isis.applib.annotation.Nature;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.PropertyLayout;
-import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
+import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+
@XmlRootElement(name = "root")
@XmlType
@XmlAccessorType(XmlAccessType.FIELD)
@@ -61,12 +62,15 @@ public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
return "PropertyMementoSerializationVm";
}
+//tag::no-annotation[]
@Property()
@MemberOrder(name = "no-annotations", sequence = "1")
@XmlElement(required = true)
@Getter @Setter
private String text;
+//end::no-annotation[]
+//tag::annotated-not_specified[]
@Property(
mementoSerialization = MementoSerialization.NOT_SPECIFIED
)
@@ -77,7 +81,9 @@ public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
@XmlElement(required = true)
@Getter @Setter
private String notSpecifiedProperty;
+//end::annotated-not_specified[]
+//tag::annotated-excluded[]
@Property(
mementoSerialization = MementoSerialization.EXCLUDED
)
@@ -88,7 +94,9 @@ public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
@XmlElement(required = true)
@Getter @Setter
private String excludedProperty;
+//end::annotated-excluded[]
+//tag::annotated-included[]
@Property(
mementoSerialization = MementoSerialization.INCLUDED
)
@@ -99,7 +107,9 @@ public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
@XmlElement(required = true)
@Getter @Setter
private String includedProperty;
+//end::annotated-included[]
+//tag::meta-annotated-excluded[]
@MementoSerializationExcludedMetaAnnotation // <.>
@Property()
@PropertyLayout(
@@ -109,7 +119,9 @@ public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
@XmlElement(required = true)
@Getter @Setter
private String metaAnnotatedProperty;
+//end::meta-annotated-excluded[]
+//tag::meta-annotated-included[]
@MementoSerializationIncludedMetaAnnotation // <.>
@Property(
mementoSerialization = MementoSerialization.EXCLUDED // <.>
@@ -123,5 +135,6 @@ public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
@XmlElement(required = true)
@Getter @Setter
private String metaAnnotatedPropertyOverridden;
+//end::meta-annotated-included[]
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm_takeSnapshot.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm_takeSnapshot.java
index 7e97ae8..bb49d51 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm_takeSnapshot.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm_takeSnapshot.java
@@ -36,33 +36,24 @@ import lombok.val;
@RequiredArgsConstructor
public class PropertyMementoSerializationVm_takeSnapshot {
- @Inject
- XmlSnapshotService xmlSnapshotService;
- @Inject
- XmlService xmlService;
-
- // ...
-//end::class[]
-
- private final PropertyMementoSerializationVm propertyMementoSerializationVm;
+ @Inject XmlSnapshotService xmlSnapshotService;
+ @Inject XmlService xmlService;
+ private final PropertyMementoSerializationVm vm;
//tag::class[]
- public Clob act() {
- return snapshotUsing(propertyMementoSerializationVm);
- }
-
- private Clob snapshotUsing(
- final Object parentVm) {
- val builder = xmlSnapshotService.builderFor(parentVm);
+ public Clob act(String fileName) {
+ val builder = xmlSnapshotService.builderFor(vm);
val snapshot = builder.build();
val doc = snapshot.getXmlDocument();
- return asClob(xmlService.asString(doc));
+ return asClob(xmlService.asString(doc), fileName);
+ }
+ public String default0Act() {
+ return "snapshot.xml";
}
-
- private static Clob asClob(final String xmlStr) {
- return new Clob("snapshot.xml", "application/xml", xmlStr);
+ private static Clob asClob(final String xmlStr, final String fileName) {
+ return new Clob(fileName, "application/xml", xmlStr);
}
}
//end::class[]
[isis] 05/06: ISIS-439: fully remove installing DisabledFacet for
collections.
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-2476
in repository https://gitbox.apache.org/repos/asf/isis.git
commit b1fbd06f7ccb1062cf54fdaffacbc4fe6e4cd08e
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jan 14 18:38:26 2021 +0000
ISIS-439: fully remove installing DisabledFacet for collections.
Also potential fixes for XmlSnapshotService to honour @Property(mementoSerialization=...)
---
.../core/metamodel/util/snapshot/XmlSnapshot.java | 3 +
.../CollectionAnnotationFacetFactoryTest.java | 40 -----------
...bledAnnotationOnCollectionFacetFactoryTest.java | 82 ----------------------
3 files changed, 3 insertions(+), 122 deletions(-)
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/snapshot/XmlSnapshot.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/snapshot/XmlSnapshot.java
index 6c72124..c3bd5ee 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/snapshot/XmlSnapshot.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/snapshot/XmlSnapshot.java
@@ -695,6 +695,9 @@ public class XmlSnapshot implements Snapshot {
}
final OneToOneAssociation valueAssociation = ((OneToOneAssociation) field);
+ if(valueAssociation.isNotPersisted()) {
+ continue eachField;
+ }
final Element xmlValueElement = xmlFieldElement; // more meaningful locally scoped name
ManagedObject value;
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java
index 18657e1..ba5dbf0 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java
@@ -106,11 +106,6 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
facetFactory.processHidden(processMethodContext, collectionIfAny);
}
- private static void processEditing(
- CollectionAnnotationFacetFactory facetFactory, FacetFactory.ProcessMethodContext processMethodContext) {
- val collectionIfAny = processMethodContext.synthesizeOnMethod(Collection.class);
- facetFactory.processEditing(processMethodContext);
- }
private static void processTypeOf(
CollectionAnnotationFacetFactory facetFactory, FacetFactory.ProcessMethodContext processMethodContext) {
@@ -431,41 +426,6 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
}
- /**
- * This feature has been removed, so this is a negative test
- */
- public static class Editing extends CollectionAnnotationFacetFactoryTest {
-
- @Test
- public void withAnnotation() {
-
- class Order {
- }
- class Customer {
- @Collection()
- public List<Order> getOrders() {
- return null;
- }
-
- public void setOrders(final List<Order> orders) {
- }
- }
-
- // given
- final Class<?> cls = Customer.class;
- collectionMethod = findMethod(Customer.class, "getOrders");
-
- // when
- final FacetFactory.ProcessMethodContext processMethodContext = new FacetFactory.ProcessMethodContext(cls,
- null, collectionMethod, mockMethodRemover, facetedMethod);
- processEditing(facetFactory, processMethodContext);
-
- // then
- final DisabledFacet disabledFacet = facetedMethod.getFacet(DisabledFacet.class);
- Assert.assertNotNull(disabledFacet);
- }
- }
-
public static class TypeOf extends CollectionAnnotationFacetFactoryTest {
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/DisabledAnnotationOnCollectionFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/DisabledAnnotationOnCollectionFacetFactoryTest.java
deleted file mode 100644
index 51082ec..0000000
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/DisabledAnnotationOnCollectionFacetFactoryTest.java
+++ /dev/null
@@ -1,82 +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.core.metamodel.facets.collections.collection;
-
-import java.lang.reflect.Method;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.apache.isis.applib.annotation.Collection;
-import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facets.AbstractFacetFactoryTest;
-import org.apache.isis.core.metamodel.facets.FacetFactory;
-import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacet;
-import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacetAbstract;
-
-import lombok.val;
-
-public class DisabledAnnotationOnCollectionFacetFactoryTest extends AbstractFacetFactoryTest {
-
- private CollectionAnnotationFacetFactory facetFactory;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- facetFactory = new CollectionAnnotationFacetFactory();
- }
-
- @Override
- protected void tearDown() throws Exception {
- facetFactory = null;
- super.tearDown();
- }
-
- private static void processEditing(
- CollectionAnnotationFacetFactory facetFactory, FacetFactory.ProcessMethodContext processMethodContext) {
- val collectionIfAny = processMethodContext.synthesizeOnMethod(Collection.class);
- facetFactory.processEditing(processMethodContext);
- }
-
-
- public void testDisabledFacetPickedUpOnCollection() {
- class Customer {
- @org.apache.isis.applib.annotation.Collection()
- public java.util.Collection<?> getOrders() {
- return null;
- }
- }
- final Method actionMethod = findMethod(Customer.class, "getOrders");
-
- processEditing(facetFactory, new FacetFactory.ProcessMethodContext(Customer.class, null, actionMethod, methodRemover, facetedMethod));
-
- final Facet facet = facetedMethod.getFacet(DisabledFacet.class);
- assertNotNull(facet);
- assertTrue(facet instanceof DisabledFacetAbstract);
-
- final DisabledFacet disabledFacet = (DisabledFacet) facet;
- assertThat(disabledFacet.disabledReason(null), is("Always disabled"));
-
- assertNoMethodsRemoved();
- }
-
-}
[isis] 02/06: ISIS-2476: removes some redundant .gitkeep files
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-2476
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 545ca2874ad6eb0a9ac46b2d24dfb4d1068c7040
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jan 13 06:19:10 2021 +0000
ISIS-2476: removes some redundant .gitkeep files
---
.../src/main/java/demoapp/dom/annotDomain/Action/restrictTo/.gitkeep | 0
.../src/main/java/demoapp/dom/annotDomain/Action/semantics/.gitkeep | 0
2 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/restrictTo/.gitkeep b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/restrictTo/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/semantics/.gitkeep b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/semantics/.gitkeep
deleted file mode 100644
index e69de29..0000000
[isis] 06/06: ISSI-439: renames mementoSerialization to snapshot
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-2476
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 430e6364ad3931917a5307d1ec00d50b2973bf03
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 15 17:43:00 2021 +0000
ISSI-439: renames mementoSerialization to snapshot
---
.../2.0.0-M1/mignotes/removed-annotations.adoc | 4 +-
.../2.0.0-M1/mignotes/updated-annotations.adoc | 7 +-
.../modules/ROOT/pages/2020/2.0.0-M5/mignotes.adoc | 43 ++++++------
.../pages/index/applib/annotation/Property.adoc | 4 +-
.../userguide/modules/fun/pages/view-models.adoc | 3 +-
.../adoc/modules/applib-ant/pages/Property.adoc | 4 +-
.../{mementoSerialization.adoc => snapshot.adoc} | 11 ++-
.../adoc/modules/applib-ant/pages/view-models.adoc | 6 +-
.../apache/isis/applib/annotation/Property.java | 10 +--
.../{MementoSerialization.java => Snapshot.java} | 19 +++--
...ExcludeFacet.java => SnapshotExcludeFacet.java} | 2 +-
...ract.java => SnapshotExcludeFacetAbstract.java} | 6 +-
.../property/PropertyAnnotationFacetFactory.java | 4 +-
...SnapshotExcludeFacetForPropertyAnnotation.java} | 18 ++---
.../update/PropertySetAndClearFacetFactory.java | 2 +-
...rred.java => SnapshotExcludeFacetInferred.java} | 6 +-
.../spec/feature/OneToOneAssociation.java | 4 +-
.../specimpl/OneToManyAssociationMixedIn.java | 8 +--
.../PropertyMethodsFacetFactoryTest.java | 12 ++--
...sistedAnnotationOnPropertyFacetFactoryTest.java | 12 ++--
.../PropertyAnnotationFacetFactoryTest.java | 14 ++--
.../specimpl/OneToOneAssociationAbstractTest.java | 6 +-
.../HasAsciiDocDescription_description.java | 4 +-
.../HasAsciiDocDescription_sources.java | 4 +-
.../child/ActionAssociateWithVm-description.adoc | 2 +-
.../dom/annotDomain/Property/PropertyMenu.java | 22 +++---
.../PropertySnapshotVm-description.adoc} | 10 ++-
.../PropertySnapshotVm.java} | 51 +++++++++-----
.../PropertySnapshotVm.layout.xml} | 3 +-
.../PropertySnapshotVm_takeXmlSnapshot.java} | 35 ++++++++--
.../SnapshotExcludedMetaAnnotation.java} | 8 +--
.../SnapshotIncludedMetaAnnotation.java} | 8 +--
.../PropertySnapshotChildVm-description.adoc} | 4 +-
.../snapshot/child/PropertySnapshotChildVm.java} | 81 +++++++++++-----------
.../child/PropertySnapshotChildVm.layout.xml} | 15 ++--
.../src/main/java/demoapp/dom/menubars.layout.xml | 2 +-
.../xmlSnapshotService/XmlSnapshotParentVm.java | 4 +-
.../child/XmlSnapshotChildVm-description.adoc | 2 +-
.../peer/XmlSnapshotPeerVm-description.adoc | 2 +-
39 files changed, 248 insertions(+), 214 deletions(-)
diff --git a/antora/components/relnotes/modules/ROOT/pages/2018/2.0.0-M1/mignotes/removed-annotations.adoc b/antora/components/relnotes/modules/ROOT/pages/2018/2.0.0-M1/mignotes/removed-annotations.adoc
index 71f1d6a..6b5ac86 100644
--- a/antora/components/relnotes/modules/ROOT/pages/2018/2.0.0-M1/mignotes/removed-annotations.adoc
+++ b/antora/components/relnotes/modules/ROOT/pages/2018/2.0.0-M1/mignotes/removed-annotations.adoc
@@ -67,7 +67,7 @@ Similarly, the `Bulk.InteractionContext` domain service is replaced with the lin
|`@Collection`
|`notPersisted`
-| Removed, replaced with link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant_Collection_mementoSerialization[`@Collection#mementoSerialization()`]
+| Removed, no replacement.
|`@CollectionInteraction`
|
@@ -247,7 +247,7 @@ ChangedEvent`
|`@Property`
|`notPersisted`
-| Removed, replaced with link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant_Collection_mementoSerialization[`@Collection#mementoSerialization()`]
+| Removed, replaced with link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant_Property_snapshot[`@Property#snapshot()`]
|`@PropertyInteraction`
|
diff --git a/antora/components/relnotes/modules/ROOT/pages/2018/2.0.0-M1/mignotes/updated-annotations.adoc b/antora/components/relnotes/modules/ROOT/pages/2018/2.0.0-M1/mignotes/updated-annotations.adoc
index fce030f..611524f 100644
--- a/antora/components/relnotes/modules/ROOT/pages/2018/2.0.0-M1/mignotes/updated-annotations.adoc
+++ b/antora/components/relnotes/modules/ROOT/pages/2018/2.0.0-M1/mignotes/updated-annotations.adoc
@@ -56,7 +56,7 @@ In all cases `NOT_SPECIFIED` is the new default.
| Default changed from `BELOW` to `NOT_SPECIFIED`.
-.3+|link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant-Collection[`@Collection`]
+.2+|link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant-Collection[`@Collection`]
| link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant-Collection_hidden[`hidden`]
| Default changed from `NOWHERE` to `NOT_SPECIFIED`.
@@ -64,9 +64,6 @@ In all cases `NOT_SPECIFIED` is the new default.
| link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant-Collection_editing[`editing`]
| Default changed from `AS_CONFIGURED` to `NOT_SPECIFIED`.
-| link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant-Collection_mementoSerialization[`mementoSerialization`]
-| Replaces `notPersisted`, taking values of `INCLUDED`, `EXCLUDED` or `NOT_SPECIFIED`.
-Defaults to `NOT_SPECIFIED`.
@@ -125,7 +122,7 @@ Defaults to `NOT_SPECIFIED`.
| link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant-Property_hidden[`hidden`]
| Default changed from `NOWHERE` to `NOT_SPECIFIED`.
-| link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant-Property_mementoSerialization[`mementoSerialization`]
+| link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant-Property_snapshot[`snapshot`]
| Replaces `notPersisted`, taking values of `INCLUDED`, `EXCLUDED` or `NOT_SPECIFIED`.
Defaults to `NOT_SPECIFIED`.
diff --git a/antora/components/relnotes/modules/ROOT/pages/2020/2.0.0-M5/mignotes.adoc b/antora/components/relnotes/modules/ROOT/pages/2020/2.0.0-M5/mignotes.adoc
index d5548de..0c0bb1e 100644
--- a/antora/components/relnotes/modules/ROOT/pages/2020/2.0.0-M5/mignotes.adoc
+++ b/antora/components/relnotes/modules/ROOT/pages/2020/2.0.0-M5/mignotes.adoc
@@ -27,8 +27,8 @@ isis.core.metaModel.validator.serviceActionsOnly=true // <.>
isis.core.metaModel.validator.mixins-only=true // <.>
----
<.> `@DomainService(natureOfService=VIEW/REST)` is now solely used for UI menu action providers and REST end-points.
-There is no longer the need to validate uses of `natureOfService=DOMAIN` as this option was removed.
-<.> Support for services that contribute members to other `DomainObjects` was removed. Use `Mixins` instead.
+There is no longer the need to validate uses of `natureOfService=DOMAIN` as this option was removed.
+<.> Support for services that contribute members to other `DomainObjects` was removed. Use `Mixins` instead.
See the former java-doc for hints on how to migrate the previous options.
@@ -87,19 +87,16 @@ VIEW_CONTRIBUTIONS_ONLY,
| was
| now what?
-| `@ActionLayout(contributed=...)`
+| `@ActionLayout(contributed=...)`
| was only effective on mixin methods; use `@Action`, `@Property` or `@Collection` instead
-| `@Action/@Property(command=...)`
+| `@Action/@Property(command=...)`
| replaced with `commandPublishing`
-| `@Action/@Property(publish=...)`
+| `@Action/@Property(publish=...)`
| replaced with `executionPublishing`
-| `@Collection(mementoSerialization=...)`
-| TODO: work in progress
-
-| `@DomainObject(audit=...)`
+| `@DomainObject(audit=...)`
| replaced with `entityChangePublishing`
| `@DomainObject(nature=...)`
@@ -108,23 +105,23 @@ VIEW_CONTRIBUTIONS_ONLY,
* `INMEMORY_ENTITY`
| use `@DomainObject(nature=VIEW_MODEL)` instead
-| `@DomainObject(publish=...)`
+| `@DomainObject(publish=...)`
| replaced with `entityChangePublishing`
| `@DomainService(repositoryFor=...)`
-| if this domain service acts as a repository for an entity type,
+| if this domain service acts as a repository for an entity type,
specify that entity type (was never implemented)
| `@Mixin`
-| use `@Action`, `@Property` or `@Collection` instead;
+| use `@Action`, `@Property` or `@Collection` instead;
-for more fine grained control (eg. setting the mixin's method name)
+for more fine grained control (eg. setting the mixin's method name)
use `@DomainObject(nature=MIXIN, ...)` combined with one of the above
| `@ViewModel`
| use `@DomainObject(nature=VIEW_MODEL)` instead
-| `@ViewModelLayout`
+| `@ViewModelLayout`
| use `@DomainObjectLayout` instead
|===
@@ -190,18 +187,18 @@ CommandServiceInternal -> CommandPublisher
| new
| AuthenticationSession
-| Authentication (no longer holds MessageBroker or session attributes, is now immutable)
+| Authentication (no longer holds MessageBroker or session attributes, is now immutable)
-| AuthenticationSessionStrategy
+| AuthenticationSessionStrategy
| AuthenticationStrategy
-| AuthenticationSessionStrategyBasicAuth (*1*)
-| AuthenticationStrategyBasicAuth
+| AuthenticationSessionStrategyBasicAuth (*1*)
+| AuthenticationStrategyBasicAuth
-| AuthenticationSessionStrategyDefault (*1*)
+| AuthenticationSessionStrategyDefault (*1*)
| AuthenticationStrategyDefault
-| AuthenticationSessionTracker#getInteraction : Interaction
+| AuthenticationSessionTracker#getInteraction : Interaction
| AuthenticationContext#currentInteraction : *Optional*<Interaction>
| Clock (moved from applib module to fixture-applib module)
@@ -220,10 +217,10 @@ CommandServiceInternal -> CommandPublisher
| MessageBroker is held by InteractionSession
| QueryDefault removed
-|
+|
[line-through]#new QueryDefault<>(CommandJdo.class, "findByParent",
"parent", parent));#
-
+
Query.named(CommandJdo.class, "findByParent") +
.withParameter("parent", parent));
@@ -248,7 +245,7 @@ Query.named(CommandJdo.class, "findByParent") +
<T> T detachedEntity(Class<T> ofType); // <.>
----
<.> if applicable use `<T> T detachedEntity(T entity)` instead ... "new is the new new", passing
-in a new-ed up (entity) instance is more flexible and also more error prone, eg. it allows the compiler to check
+in a new-ed up (entity) instance is more flexible and also more error prone, eg. it allows the compiler to check
validity of the used constructor rather than doing construction reflective at runtime
diff --git a/antora/components/system/modules/generated/pages/index/applib/annotation/Property.adoc b/antora/components/system/modules/generated/pages/index/applib/annotation/Property.adoc
index ba77536..34be6e0 100644
--- a/antora/components/system/modules/generated/pages/index/applib/annotation/Property.adoc
+++ b/antora/components/system/modules/generated/pages/index/applib/annotation/Property.adoc
@@ -26,7 +26,7 @@ Domain semantics for domain object property.
int maxLength() default -1; // <.>
- MementoSerialization mementoSerialization() default MementoSerialization.NOT_SPECIFIED; // <.>
+ Snapshot snapshot() default Snapshot.NOT_SPECIFIED; // <.>
Class<? extends Specification>[] mustSatisfy() default {}; // <.>
@@ -107,7 +107,7 @@ The maximum entry length of a field.
The default value (-1) indicates that no maxLength has been specified.
--
-<.> `[teal]#*_mementoSerialization_*#` : `xref:system:generated:index/applib/annotation/MementoSerialization.adoc[MementoSerialization]`
+<.> `[teal]#*_snapshot_*#` : `xref:system:generated:index/applib/annotation/MementoSerialization.adoc[MementoSerialization]`
+
--
Indicates whether the property should be included or excluded from mementos.
diff --git a/api/adoc/userguide/modules/fun/pages/view-models.adoc b/api/adoc/userguide/modules/fun/pages/view-models.adoc
index a5130ba..fef7075 100644
--- a/api/adoc/userguide/modules/fun/pages/view-models.adoc
+++ b/api/adoc/userguide/modules/fun/pages/view-models.adoc
@@ -241,7 +241,8 @@ public class CustomerRecordOnSAP {
// ...
}
----
-|Annotated with xref:refguide:applib-ant:DomainObject.adoc#nature[`@DomainObject#nature`] and a nature of `EXTERNAL_ENTITY`, with memento derived automatically from the properties of the domain object. Collections are ignored, as are any properties annotated as xref:refguide:applib-ant:Property.adoc#mementoSerialization[memento serialization].
+|Annotated with xref:refguide:applib-ant:DomainObject.adoc#nature[`@DomainObject#nature`] and a nature of `EXTERNAL_ENTITY`, with memento derived automatically from the properties of the domain object.
+Collections are ignored, as are any properties annotated as xref:refguide:applib-ant:Property.adoc#snapshot[snapshot=EXCLUDED].
| In-memory entity
| WARNING: TODO INMEMORY_ENTITY was removed, this use-case is still valid for consideration, what to do?
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc
index 5f99732..b86a33c 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc
@@ -54,7 +54,7 @@ Maximum number of characters for string parameters; ignored otherwise +
+
TIP: In many/most cases you should however use xref:refguide:applib-ant:Column.adoc[`@Column#length()`]
-<.> xref:refguide:applib-ant:Property.adoc#mementoSerialization[`mementoSerialization()`]
+<.> xref:refguide:applib-ant:Property.adoc#snapshot[`snapshot()`]
+
Whether to exclude from snapshots. +
@@ -134,7 +134,7 @@ include::Property/fileAccept.adoc[leveloffset=+1]
include::Property/hidden.adoc[leveloffset=+1]
include::Property/maxLength.adoc[leveloffset=+1]
include::Property/mustSatisfy.adoc[leveloffset=+1]
-include::Property/mementoSerialization.adoc[leveloffset=+1]
+include::Property/snapshot.adoc[leveloffset=+1]
include::Property/optionality.adoc[leveloffset=+1]
include::Property/projecting.adoc[leveloffset=+1]
include::Property/regexPattern.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Property/mementoSerialization.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Property/snapshot.adoc
similarity index 73%
rename from api/applib/src/main/adoc/modules/applib-ant/pages/Property/mementoSerialization.adoc
rename to api/applib/src/main/adoc/modules/applib-ant/pages/Property/snapshot.adoc
index 8b584a7..91ce4c7 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Property/mementoSerialization.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Property/snapshot.adoc
@@ -1,12 +1,12 @@
-[#mementoSerialization]
-= `mementoSerialization()`
+[#snapshot]
+= `snapshot()`
:Notice: 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 ag [...]
:page-partial:
CAUTION: this documentation may be inaccurate.
-The `mementoSerialization` attribute indicates whether the property should be included/excluded from any snapshots generated by the xref:refguide:applib-svc:XmlSnapshotService.adoc[`XmlSnapshotService`].
+The `snapshot` attribute indicates whether the property should be included/excluded from any snapshots generated by the xref:refguide:applib-svc:XmlSnapshotService.adoc[`XmlSnapshotService`].
For example:
@@ -17,7 +17,7 @@ import lombok.Setter;
public class Order {
- @Property(mementoSerialization=EXCLUDED)
+ @Property(snapshot=EXCLUDED)
@Getter @Setter
private Order previousOrder;
@@ -35,7 +35,4 @@ public class Order {
}
----
-== See also
-
-This attribute is also supported for xref:refguide:applib-ant:Collection.adoc#mementoSerialization[collections].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/view-models.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/view-models.adoc
index bcce4c8..cb115a0 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/view-models.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/view-models.adoc
@@ -50,7 +50,7 @@ See this xref:userguide:btb:about.adoc#view-model-instantiation[tip] for further
View models must have a no-arg constructor; this is used internally by the framework for subsequent "recreation".
The view model's memento will be derived from the value of the view model object's properties.
-Any xref:refguide:applib-ant:Property.adoc#mementoSerialization[`@Property#mementoSerialization`] properties will be excluded from the memento, as will any properties excluded from the metamodel using xref:refguide:applib-ant:Programmatic.adoc[`@Programmatic`].
+Any properties annotated with xref:refguide:applib-ant:Programmatic.adoc[`@Programmatic`] will be excluded from the memento.
Properties that are merely xref:refguide:applib-ant:Property.adoc#hidden[hidden] _are_ included in the memento.
View models, as defined by `@DomainObject(nature=VIEW_MODEL)` have some limitations:
@@ -64,8 +64,8 @@ If you are using view models heavily, you may wish to restrict yourself to just
[NOTE]
====
-The `@DomainObject` annotation allows the `objectType` to be specified,
-meaning that it is compatible with the metamodel validation check enabled by the
+The `@DomainObject` annotation allows the `objectType` to be specified,
+meaning that it is compatible with the metamodel validation check enabled by the
xref:refguide:config:configuring-core.adoc#metamodel-validation[`explicitObjectType`] configuration property.
Instead, use xref:refguide:applib-ant:DomainObject.adoc#nature[`@DomainObject#nature()`] with `Nature.VIEW_MODEL`, and specify xref:refguide:applib-ant:DomainObject.adoc#objectType[`@DomainObject#objectType()`].
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/Property.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
index 1308583..526a68d 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
@@ -110,13 +110,13 @@ public @interface Property {
default "";
/**
- * Whether {@link Interaction.Execution}s
- * (triggered property edits), should be dispatched to
+ * Whether {@link Interaction.Execution}s
+ * (triggered property edits), should be dispatched to
* {@link ExecutionSubscriber}s.
*/
Publishing executionPublishing()
default Publishing.NOT_SPECIFIED;
-
+
/**
* For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
*
@@ -153,8 +153,8 @@ public @interface Property {
* <code>javax.jdo.annotations.NotPersistent</code>
* </p>
*/
- MementoSerialization mementoSerialization()
- default MementoSerialization.NOT_SPECIFIED;
+ Snapshot snapshot()
+ default Snapshot.NOT_SPECIFIED;
/**
* The {@link org.apache.isis.applib.spec.Specification}(s) to be satisfied by this property.
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/MementoSerialization.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/Snapshot.java
similarity index 67%
rename from api/applib/src/main/java/org/apache/isis/applib/annotation/MementoSerialization.java
rename to api/applib/src/main/java/org/apache/isis/applib/annotation/Snapshot.java
index cf670a6..145951e 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/MementoSerialization.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/Snapshot.java
@@ -19,29 +19,26 @@
package org.apache.isis.applib.annotation;
/**
- * Whether the property or collection is included if the domain object is serialized into a memento.
- * @since 1.x {@index}
+ * Whether the property is included if the domain object graph is serialized
+ * into a snapshot.
+ * @since 2.x {@index}
*/
-public enum MementoSerialization {
+public enum Snapshot {
/**
- * Property or collection is included in any mementos.
+ * Property is included in any snapshots.
* This is the fallback/default if not explicitly excluded.
*/
INCLUDED,
/**
- * Property or collection's state is excluded from any mementos.
- *
- * <p>
- * Corresponds to <tt>@Property(notPersisted=true)</tt> or <tt>@Collection(notPersisted=true)</tt> prior to Isis 2.x
- * </p>
+ * Property is excluded from any snapshots.
*/
EXCLUDED,
/**
- * Ignore the value provided by this annotation (meaning that the framework will keep searching, in meta
- * annotations or superclasses/interfaces).
+ * Ignore the value provided by this annotation (meaning that the framework
+ * will keep searching, in meta annotations or superclasses/interfaces).
*/
NOT_SPECIFIED
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/MementoSerializationExcludeFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/SnapshotExcludeFacet.java
similarity index 94%
rename from core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/MementoSerializationExcludeFacet.java
rename to core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/SnapshotExcludeFacet.java
index 029221c..fd3e341 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/MementoSerializationExcludeFacet.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/SnapshotExcludeFacet.java
@@ -25,6 +25,6 @@ import org.apache.isis.core.metamodel.facetapi.Facet;
* Indicates that a property should be excluded from snapshots (as per
* <code>XmlSnapshotService</code>.
*/
-public interface MementoSerializationExcludeFacet extends Facet {
+public interface SnapshotExcludeFacet extends Facet {
}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/MementoSerializationExcludeFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/SnapshotExcludeFacetAbstract.java
similarity index 81%
rename from core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/MementoSerializationExcludeFacetAbstract.java
rename to core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/SnapshotExcludeFacetAbstract.java
index a8d17dd..5798aeb 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/MementoSerializationExcludeFacetAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/propcoll/memserexcl/SnapshotExcludeFacetAbstract.java
@@ -23,13 +23,13 @@ import org.apache.isis.core.metamodel.facetapi.Facet;
import org.apache.isis.core.metamodel.facetapi.FacetAbstract;
import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-public abstract class MementoSerializationExcludeFacetAbstract extends FacetAbstract implements MementoSerializationExcludeFacet {
+public abstract class SnapshotExcludeFacetAbstract extends FacetAbstract implements SnapshotExcludeFacet {
public static Class<? extends Facet> type() {
- return MementoSerializationExcludeFacet.class;
+ return SnapshotExcludeFacet.class;
}
- public MementoSerializationExcludeFacetAbstract(final FacetHolder holder) {
+ public SnapshotExcludeFacetAbstract(final FacetHolder holder) {
super(type(), holder);
}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
index e3d445d..57f46f1 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
@@ -55,7 +55,7 @@ import org.apache.isis.core.metamodel.facets.properties.property.modify.Property
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromDefault;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.mustsatisfy.MustSatisfySpecificationFacetForPropertyAnnotation;
-import org.apache.isis.core.metamodel.facets.properties.property.notpersisted.MementoSerializationExcludeFacetForPropertyAnnotation;
+import org.apache.isis.core.metamodel.facets.properties.property.notpersisted.SnapshotExcludeFacetForPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.regex.RegExFacetForPatternAnnotationOnProperty;
import org.apache.isis.core.metamodel.facets.properties.property.regex.RegExFacetForPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.update.clear.PropertyClearFacet;
@@ -315,7 +315,7 @@ implements MetaModelRefiner {
val holder = processMethodContext.getFacetHolder();
// search for @Property(notPersisted=...)
- val facet = MementoSerializationExcludeFacetForPropertyAnnotation.create(propertyIfAny, holder);
+ val facet = SnapshotExcludeFacetForPropertyAnnotation.create(propertyIfAny, holder);
super.addFacet(facet);
}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/notpersisted/MementoSerializationExcludeFacetForPropertyAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/notpersisted/SnapshotExcludeFacetForPropertyAnnotation.java
similarity index 66%
rename from core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/notpersisted/MementoSerializationExcludeFacetForPropertyAnnotation.java
rename to core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/notpersisted/SnapshotExcludeFacetForPropertyAnnotation.java
index d69b5b0..494ebfc 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/notpersisted/MementoSerializationExcludeFacetForPropertyAnnotation.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/notpersisted/SnapshotExcludeFacetForPropertyAnnotation.java
@@ -21,26 +21,26 @@ package org.apache.isis.core.metamodel.facets.properties.property.notpersisted;
import java.util.Optional;
-import org.apache.isis.applib.annotation.MementoSerialization;
+import org.apache.isis.applib.annotation.Snapshot;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.MementoSerializationExcludeFacet;
-import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.MementoSerializationExcludeFacetAbstract;
+import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.SnapshotExcludeFacet;
+import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.SnapshotExcludeFacetAbstract;
-public class MementoSerializationExcludeFacetForPropertyAnnotation extends MementoSerializationExcludeFacetAbstract {
+public class SnapshotExcludeFacetForPropertyAnnotation extends SnapshotExcludeFacetAbstract {
- public MementoSerializationExcludeFacetForPropertyAnnotation(final FacetHolder holder) {
+ public SnapshotExcludeFacetForPropertyAnnotation(final FacetHolder holder) {
super(holder);
}
- public static MementoSerializationExcludeFacet create(
+ public static SnapshotExcludeFacet create(
final Optional<Property> propertyIfAny,
final FacetHolder holder) {
return propertyIfAny
- .map(Property::mementoSerialization)
- .filter(mementoSerialization -> mementoSerialization == MementoSerialization.EXCLUDED)
- .map(mementoSerialization -> new MementoSerializationExcludeFacetForPropertyAnnotation(holder))
+ .map(Property::snapshot)
+ .filter(snapshot -> snapshot == Snapshot.EXCLUDED)
+ .map(snapshot -> new SnapshotExcludeFacetForPropertyAnnotation(holder))
.orElse(null);
}
}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/PropertySetAndClearFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/PropertySetAndClearFacetFactory.java
index 013bd29..0d66ed1 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/PropertySetAndClearFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/PropertySetAndClearFacetFactory.java
@@ -75,7 +75,7 @@ public class PropertySetAndClearFacetFactory extends MethodPrefixBasedFacetFacto
FacetUtil.addFacet(new PropertySetterFacetViaSetterMethod(setMethod, property));
FacetUtil.addFacet(new PropertyInitializationFacetViaSetterMethod(setMethod, property));
} else {
- FacetUtil.addFacet(new NotPersistableFacetInferred(property));
+ FacetUtil.addFacet(new SnapshotExcludeFacetInferred(property));
// previously we also added the DisabledFacetAlwaysEverywhere facet here.
// however, the PropertyModifyFacetFactory (which comes next) might install a PropertySetterFacet instead.
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/NotPersistableFacetInferred.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/SnapshotExcludeFacetInferred.java
similarity index 83%
rename from core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/NotPersistableFacetInferred.java
rename to core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/SnapshotExcludeFacetInferred.java
index 8846339..31a8ed8 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/NotPersistableFacetInferred.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/SnapshotExcludeFacetInferred.java
@@ -20,11 +20,11 @@
package org.apache.isis.core.metamodel.facets.properties.update;
import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.MementoSerializationExcludeFacetAbstract;
+import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.SnapshotExcludeFacetAbstract;
-public class NotPersistableFacetInferred extends MementoSerializationExcludeFacetAbstract {
+public class SnapshotExcludeFacetInferred extends SnapshotExcludeFacetAbstract {
- public NotPersistableFacetInferred(final FacetHolder holder) {
+ public SnapshotExcludeFacetInferred(final FacetHolder holder) {
super(holder);
}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/OneToOneAssociation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/OneToOneAssociation.java
index b6861c7..9f184c4 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/OneToOneAssociation.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/OneToOneAssociation.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.spec.feature;
import org.apache.isis.core.metamodel.consent.Consent;
import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
-import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.MementoSerializationExcludeFacet;
+import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.SnapshotExcludeFacet;
import org.apache.isis.core.metamodel.spec.ManagedObject;
/**
@@ -56,7 +56,7 @@ public interface OneToOneAssociation extends ObjectAssociation, OneToOneFeature,
* not be persisted.
*/
default boolean isNotPersisted() {
- return containsFacet(MementoSerializationExcludeFacet.class);
+ return containsFacet(SnapshotExcludeFacet.class);
}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationMixedIn.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationMixedIn.java
index b42e35f..3b1c6a4 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationMixedIn.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationMixedIn.java
@@ -33,8 +33,8 @@ import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacetAbstract;
import org.apache.isis.core.metamodel.facets.all.named.NamedFacetInferred;
import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacet;
import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacetForContributee;
-import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.MementoSerializationExcludeFacet;
-import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.MementoSerializationExcludeFacetAbstract;
+import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.SnapshotExcludeFacet;
+import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.SnapshotExcludeFacetAbstract;
import org.apache.isis.core.metamodel.interactions.InteractionHead;
import org.apache.isis.core.metamodel.services.publishing.ExecutionPublisher;
import org.apache.isis.core.metamodel.spec.ManagedObject;
@@ -100,11 +100,11 @@ public class OneToManyAssociationMixedIn extends OneToManyAssociationDefault imp
//
// ensure the mixedIn collection cannot be modified, and derive its TypeOfFaccet
//
- final MementoSerializationExcludeFacet mementoSerializationExcludeFacet = new MementoSerializationExcludeFacetAbstract(this) {};
+ final SnapshotExcludeFacet snapshotExcludeFacet = new SnapshotExcludeFacetAbstract(this) {};
final DisabledFacet disabledFacet = disabledFacet();
final TypeOfFacet typeOfFacet = new TypeOfFacetAbstract(getSpecification().getCorrespondingClass(), this) {};
- FacetUtil.addFacet(mementoSerializationExcludeFacet);
+ FacetUtil.addFacet(snapshotExcludeFacet);
FacetUtil.addFacet(disabledFacet);
FacetUtil.addFacet(typeOfFacet);
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/PropertyMethodsFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/PropertyMethodsFacetFactoryTest.java
index a22194b..161abeb 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/PropertyMethodsFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/PropertyMethodsFacetFactoryTest.java
@@ -35,7 +35,7 @@ import org.apache.isis.core.metamodel.facets.members.hidden.method.HideForContex
import org.apache.isis.core.metamodel.facets.members.hidden.method.HideForContextFacetViaMethod;
import org.apache.isis.core.metamodel.facets.members.hidden.method.HideForContextFacetViaMethodFactory;
import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.MementoSerializationExcludeFacet;
+import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.SnapshotExcludeFacet;
import org.apache.isis.core.metamodel.facets.properties.accessor.PropertyAccessorFacetViaAccessor;
import org.apache.isis.core.metamodel.facets.properties.accessor.PropertyAccessorFacetViaAccessorFactory;
import org.apache.isis.core.metamodel.facets.properties.autocomplete.PropertyAutoCompleteFacet;
@@ -48,7 +48,7 @@ import org.apache.isis.core.metamodel.facets.properties.defaults.PropertyDefault
import org.apache.isis.core.metamodel.facets.properties.defaults.method.PropertyDefaultFacetViaMethod;
import org.apache.isis.core.metamodel.facets.properties.defaults.method.PropertyDefaultFacetViaMethodFactory;
import org.apache.isis.core.metamodel.facets.properties.disabled.inferred.DisabledFacetOnPropertyInferredFactory;
-import org.apache.isis.core.metamodel.facets.properties.update.NotPersistableFacetInferred;
+import org.apache.isis.core.metamodel.facets.properties.update.SnapshotExcludeFacetInferred;
import org.apache.isis.core.metamodel.facets.properties.update.PropertyModifyFacetFactory;
import org.apache.isis.core.metamodel.facets.properties.update.PropertySetAndClearFacetFactory;
import org.apache.isis.core.metamodel.facets.properties.update.clear.PropertyClearFacet;
@@ -175,8 +175,8 @@ public class PropertyMethodsFacetFactoryTest extends AbstractFacetFactoryTest {
facetFactory.process(new FacetFactory.ProcessMethodContext(Customer.class, null, propertyAccessorMethod, methodRemover, facetedMethod));
- assertNull(facetedMethod.getFacet(MementoSerializationExcludeFacet.class));
- assertNull(facetedMethod.getFacet(MementoSerializationExcludeFacet.class));
+ assertNull(facetedMethod.getFacet(SnapshotExcludeFacet.class));
+ assertNull(facetedMethod.getFacet(SnapshotExcludeFacet.class));
}
public void testSetterFacetIsInstalledForModifyMethodAndMethodRemoved() {
@@ -239,9 +239,9 @@ public class PropertyMethodsFacetFactoryTest extends AbstractFacetFactoryTest {
facetFactoryForModify.process(processMethodContext);
disabledFacetOnPropertyInferredFactory.process(processMethodContext);
- Facet facet = facetedMethod.getFacet(MementoSerializationExcludeFacet.class);
+ Facet facet = facetedMethod.getFacet(SnapshotExcludeFacet.class);
assertNotNull(facet);
- assertTrue(facet instanceof NotPersistableFacetInferred);
+ assertTrue(facet instanceof SnapshotExcludeFacetInferred);
facet = facetedMethod.getFacet(DisabledFacet.class);
assertNull(facet);
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/NotPersistedAnnotationOnPropertyFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/NotPersistedAnnotationOnPropertyFacetFactoryTest.java
index d38495d..b19f01a 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/NotPersistedAnnotationOnPropertyFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/NotPersistedAnnotationOnPropertyFacetFactoryTest.java
@@ -21,13 +21,13 @@ package org.apache.isis.core.metamodel.facets.properties.property;
import java.lang.reflect.Method;
-import org.apache.isis.applib.annotation.MementoSerialization;
+import org.apache.isis.applib.annotation.Snapshot;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.core.metamodel.facetapi.Facet;
import org.apache.isis.core.metamodel.facets.AbstractFacetFactoryTest;
import org.apache.isis.core.metamodel.facets.FacetFactory;
-import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.MementoSerializationExcludeFacet;
-import org.apache.isis.core.metamodel.facets.properties.property.notpersisted.MementoSerializationExcludeFacetForPropertyAnnotation;
+import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.SnapshotExcludeFacet;
+import org.apache.isis.core.metamodel.facets.properties.property.notpersisted.SnapshotExcludeFacetForPropertyAnnotation;
import lombok.val;
@@ -51,7 +51,7 @@ public class NotPersistedAnnotationOnPropertyFacetFactoryTest extends AbstractFa
class Customer {
@SuppressWarnings("unused")
- @Property(mementoSerialization = MementoSerialization.EXCLUDED)
+ @Property(snapshot = Snapshot.EXCLUDED)
public String getFirstName() {
return null;
}
@@ -60,9 +60,9 @@ public class NotPersistedAnnotationOnPropertyFacetFactoryTest extends AbstractFa
processNotPersisted(facetFactory, new FacetFactory.ProcessMethodContext(Customer.class, null, method, methodRemover, facetedMethod));
- final Facet facet = facetedMethod.getFacet(MementoSerializationExcludeFacet.class);
+ final Facet facet = facetedMethod.getFacet(SnapshotExcludeFacet.class);
assertNotNull(facet);
- assertTrue(facet instanceof MementoSerializationExcludeFacetForPropertyAnnotation);
+ assertTrue(facet instanceof SnapshotExcludeFacetForPropertyAnnotation);
assertNoMethodsRemoved();
}
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactoryTest.java
index 8a636e1..0692b73 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactoryTest.java
@@ -33,7 +33,7 @@ import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertTrue;
-import org.apache.isis.applib.annotation.MementoSerialization;
+import org.apache.isis.applib.annotation.Snapshot;
import org.apache.isis.applib.annotation.Optionality;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.Where;
@@ -54,7 +54,7 @@ import org.apache.isis.core.metamodel.facets.objectvalue.maxlen.MaxLengthFacet;
import org.apache.isis.core.metamodel.facets.objectvalue.mustsatisfyspec.MustSatisfySpecificationFacet;
import org.apache.isis.core.metamodel.facets.objectvalue.regex.RegExFacet;
import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacetAbstract;
-import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.MementoSerializationExcludeFacet;
+import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.SnapshotExcludeFacet;
import org.apache.isis.core.metamodel.facets.properties.property.disabled.DisabledFacetForPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.hidden.HiddenFacetForPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.mandatory.MandatoryFacetForPropertyAnnotation;
@@ -67,7 +67,7 @@ import org.apache.isis.core.metamodel.facets.properties.property.modify.Property
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromDefault;
import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.mustsatisfy.MustSatisfySpecificationFacetForPropertyAnnotation;
-import org.apache.isis.core.metamodel.facets.properties.property.notpersisted.MementoSerializationExcludeFacetForPropertyAnnotation;
+import org.apache.isis.core.metamodel.facets.properties.property.notpersisted.SnapshotExcludeFacetForPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.property.regex.RegExFacetForPropertyAnnotation;
import org.apache.isis.core.metamodel.facets.properties.update.clear.PropertyClearFacet;
import org.apache.isis.core.metamodel.facets.properties.update.clear.PropertyClearFacetAbstract;
@@ -581,7 +581,7 @@ public class PropertyAnnotationFacetFactoryTest extends AbstractFacetFactoryJUni
public void withAnnotation() {
class Customer {
- @Property(mementoSerialization = MementoSerialization.EXCLUDED)
+ @Property(snapshot = Snapshot.EXCLUDED)
@Getter @Setter private String name;
}
@@ -595,9 +595,9 @@ public class PropertyAnnotationFacetFactoryTest extends AbstractFacetFactoryJUni
processNotPersisted(facetFactory, processMethodContext);
// then
- final MementoSerializationExcludeFacet mementoSerializationExcludeFacet = facetedMethod.getFacet(MementoSerializationExcludeFacet.class);
- Assert.assertNotNull(mementoSerializationExcludeFacet);
- Assert.assertTrue(mementoSerializationExcludeFacet instanceof MementoSerializationExcludeFacetForPropertyAnnotation);
+ final SnapshotExcludeFacet snapshotExcludeFacet = facetedMethod.getFacet(SnapshotExcludeFacet.class);
+ Assert.assertNotNull(snapshotExcludeFacet);
+ Assert.assertTrue(snapshotExcludeFacet instanceof SnapshotExcludeFacetForPropertyAnnotation);
}
}
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationAbstractTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationAbstractTest.java
index d22993d..79716b5 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationAbstractTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationAbstractTest.java
@@ -36,7 +36,7 @@ import org.apache.isis.core.internaltestsupport.jmocking.JUnitRuleMockery2.Mode;
import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
import org.apache.isis.core.metamodel.facetapi.Facet;
import org.apache.isis.core.metamodel.facets.FacetedMethod;
-import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.MementoSerializationExcludeFacet;
+import org.apache.isis.core.metamodel.facets.propcoll.memserexcl.SnapshotExcludeFacet;
import org.apache.isis.core.metamodel.interactions.UsabilityContext;
import org.apache.isis.core.metamodel.interactions.VisibilityContext;
import org.apache.isis.core.metamodel.spec.ManagedObject;
@@ -148,14 +148,14 @@ public class OneToOneAssociationAbstractTest {
@Test
public void notPersistedWhenDerived() throws Exception {
- final MementoSerializationExcludeFacet mockFacet = mockFacetIgnoring(MementoSerializationExcludeFacet.class);
+ final SnapshotExcludeFacet mockFacet = mockFacetIgnoring(SnapshotExcludeFacet.class);
facetedMethod.addFacet(mockFacet);
assertTrue(objectAssociation.isNotPersisted());
}
@Test
public void notPersistedWhenFlaggedAsNotPersisted() throws Exception {
- final MementoSerializationExcludeFacet mockFacet = mockFacetIgnoring(MementoSerializationExcludeFacet.class);
+ final SnapshotExcludeFacet mockFacet = mockFacetIgnoring(SnapshotExcludeFacet.class);
facetedMethod.addFacet(mockFacet);
assertTrue(objectAssociation.isNotPersisted());
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/_infra/asciidocdesc/HasAsciiDocDescription_description.java b/examples/demo/domain/src/main/java/demoapp/dom/_infra/asciidocdesc/HasAsciiDocDescription_description.java
index edcbff2..1ba84b8 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/_infra/asciidocdesc/HasAsciiDocDescription_description.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/_infra/asciidocdesc/HasAsciiDocDescription_description.java
@@ -22,7 +22,7 @@ import javax.inject.Inject;
import org.apache.isis.applib.annotation.LabelPosition;
import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.MementoSerialization;
+import org.apache.isis.applib.annotation.Snapshot;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.PropertyLayout;
import org.apache.isis.applib.annotation.Where;
@@ -33,7 +33,7 @@ import lombok.RequiredArgsConstructor;
import demoapp.dom._infra.resources.AsciiDocReaderService;
@SuppressWarnings("CdiManagedBeanInconsistencyInspection")
-@Property(mementoSerialization = MementoSerialization.EXCLUDED)
+@Property(snapshot = Snapshot.EXCLUDED)
@RequiredArgsConstructor
public class HasAsciiDocDescription_description {
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/_infra/asciidocdesc/HasAsciiDocDescription_sources.java b/examples/demo/domain/src/main/java/demoapp/dom/_infra/asciidocdesc/HasAsciiDocDescription_sources.java
index 9aec142..1f0a24b 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/_infra/asciidocdesc/HasAsciiDocDescription_sources.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/_infra/asciidocdesc/HasAsciiDocDescription_sources.java
@@ -22,7 +22,7 @@ import javax.inject.Inject;
import org.apache.isis.applib.annotation.LabelPosition;
import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.MementoSerialization;
+import org.apache.isis.applib.annotation.Snapshot;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.PropertyLayout;
import org.apache.isis.applib.annotation.Where;
@@ -33,7 +33,7 @@ import lombok.val;
import demoapp.dom._infra.resources.MarkupVariableResolverService;
-@Property(mementoSerialization = MementoSerialization.EXCLUDED)
+@Property(snapshot = Snapshot.EXCLUDED)
@RequiredArgsConstructor @SuppressWarnings("CdiManagedBeanInconsistencyInspection")
public class HasAsciiDocDescription_sources {
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/associateWith/child/ActionAssociateWithVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/associateWith/child/ActionAssociateWithVm-description.adoc
index e755465..e781e8d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/associateWith/child/ActionAssociateWithVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/associateWith/child/ActionAssociateWithVm-description.adoc
@@ -1,3 +1,3 @@
:Notice: 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 ag [...]
-This child object exists just to act as the element of the two collections of the `PropertyMementoSerializationVm` demo object.
+This child object exists just to act as the element of the two collections of the `PropertySnapshotVm` demo object.
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/PropertyMenu.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/PropertyMenu.java
index aaf17a7..e284d38 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/PropertyMenu.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/PropertyMenu.java
@@ -30,7 +30,7 @@ import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.value.Blob;
import org.apache.isis.applib.value.Clob;
-import demoapp.dom.annotDomain.Property.mementoSerialization.PropertyMementoSerializationVm;
+import demoapp.dom.annotDomain.Property.snapshot.PropertySnapshotVm;
import lombok.RequiredArgsConstructor;
import lombok.val;
@@ -50,6 +50,7 @@ import demoapp.dom.annotDomain.Property.projecting.PropertyProjectingVm;
import demoapp.dom.annotDomain.Property.projecting.child.PropertyProjectingChildVm;
import demoapp.dom.annotDomain.Property.projecting.jdo.PropertyProjectingChildJdoEntities;
import demoapp.dom.annotDomain.Property.regexPattern.PropertyRegexPatternVm;
+import demoapp.dom.annotDomain.Property.snapshot.child.PropertySnapshotChildVm;
import demoapp.dom.types.Samples;
@DomainService(nature=NatureOfService.VIEW, objectType = "demo.PropertyMenu")
@@ -132,13 +133,6 @@ public class PropertyMenu {
}
@Action(semantics = SemanticsOf.SAFE)
- @ActionLayout(cssClassFa="fa-camera", describedAs = "Snapshot inclusion/exclusion")
- public PropertyMementoSerializationVm mementoSerialization(){
- val vm = new PropertyMementoSerializationVm("value");
- return new PropertyMementoSerializationVm("value");
- }
-
- @Action(semantics = SemanticsOf.SAFE)
@ActionLayout(cssClassFa="fa-star-half-alt", describedAs = "Regular expressions, such as email")
public PropertyMustSatisfyVm mustSatisfy(){
val vm = new PropertyMustSatisfyVm();
@@ -182,6 +176,18 @@ public class PropertyMenu {
return vm;
}
+ @Action(semantics = SemanticsOf.SAFE)
+ @ActionLayout(cssClassFa="fa-camera", describedAs = "Snapshot inclusion/exclusion")
+ public PropertySnapshotVm snapshot(){
+ val vm = new PropertySnapshotVm("value");
+
+ vm.getChildren().add(new PropertySnapshotChildVm("child 1"));
+ vm.getChildren().add(new PropertySnapshotChildVm("child 2"));
+ vm.getChildren().add(new PropertySnapshotChildVm("child 3"));
+
+ return new PropertySnapshotVm("value");
+ }
+
private void setSampleBlob(String suffix, Consumer<Blob> blobConsumer) {
blobSamples.stream()
.filter(x -> x.getName().endsWith(suffix))
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/PropertySnapshotVm-description.adoc
similarity index 92%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm-description.adoc
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/PropertySnapshotVm-description.adoc
index 0c0bd9b..ff7689d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/PropertySnapshotVm-description.adoc
@@ -1,6 +1,6 @@
:Notice: 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 ag [...]
-The `mementoSerialization` element of the `@Property` annotation specifies whether a property should be included in an XML snapshot, as created by the `XmlSnapshotService`:
+The `snapshot` element of the `@Property` annotation specifies whether a property should be included in an XML snapshot, as created by the `XmlSnapshotService`:
The `takeSnapshot` mixin action shows how this service is used:
@@ -76,3 +76,11 @@ include::MementoSerializationExcludedMetaAnnotation.java[tags=class]
== Snapshot
TODO: inline the resultant snapshot
+
+[source,xml]
+.snapshot.xml
+----
+----
+
+
+
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/PropertySnapshotVm.java
similarity index 72%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm.java
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/PropertySnapshotVm.java
index abb8b44..370e279 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/PropertySnapshotVm.java
@@ -16,18 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
-package demoapp.dom.annotDomain.Property.mementoSerialization;
+package demoapp.dom.annotDomain.Property.snapshot;
+
+import java.util.ArrayList;
+import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
+import org.apache.isis.applib.annotation.Collection;
import org.apache.isis.applib.annotation.DomainObject;
import org.apache.isis.applib.annotation.Editing;
import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.MementoSerialization;
+import org.apache.isis.applib.annotation.Snapshot;
import org.apache.isis.applib.annotation.Nature;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.PropertyLayout;
@@ -37,19 +42,20 @@ import lombok.NoArgsConstructor;
import lombok.Setter;
import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom.annotDomain.Property.snapshot.child.PropertySnapshotChildVm;
@XmlRootElement(name = "root")
@XmlType
@XmlAccessorType(XmlAccessType.FIELD)
@DomainObject(
nature=Nature.VIEW_MODEL,
- objectType = "demo.PropertyMementoSerializationVm",
+ objectType = "demo.PropertySnapshotVm",
editing = Editing.ENABLED
)
@NoArgsConstructor
-public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
+public class PropertySnapshotVm implements HasAsciiDocDescription {
- public PropertyMementoSerializationVm(String text) {
+ public PropertySnapshotVm(String text) {
this.text = text;
this.excludedProperty = text;
this.includedProperty = text;
@@ -59,7 +65,7 @@ public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
}
public String title() {
- return "PropertyMementoSerializationVm";
+ return "PropertySnapshotVm";
}
//tag::no-annotation[]
@@ -72,10 +78,10 @@ public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
//tag::annotated-not_specified[]
@Property(
- mementoSerialization = MementoSerialization.NOT_SPECIFIED
+ snapshot = Snapshot.NOT_SPECIFIED
)
@PropertyLayout(
- describedAs = "@Property(mementoSerialization = NOT_SPECIFIED)"
+ describedAs = "@Property(snapshot = NOT_SPECIFIED)"
)
@MemberOrder(name = "annotations", sequence = "1")
@XmlElement(required = true)
@@ -85,10 +91,10 @@ public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
//tag::annotated-excluded[]
@Property(
- mementoSerialization = MementoSerialization.EXCLUDED
+ snapshot = Snapshot.EXCLUDED
)
@PropertyLayout(
- describedAs = "@Property(mementoSerialization = EXCLUDED)"
+ describedAs = "@Property(snapshot = EXCLUDED)"
)
@MemberOrder(name = "annotations", sequence = "2")
@XmlElement(required = true)
@@ -98,10 +104,10 @@ public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
//tag::annotated-included[]
@Property(
- mementoSerialization = MementoSerialization.INCLUDED
+ snapshot = Snapshot.INCLUDED
)
@PropertyLayout(
- describedAs = "@Property(mementoSerialization = INCLUDED)"
+ describedAs = "@Property(snapshot = INCLUDED)"
)
@MemberOrder(name = "annotations", sequence = "2")
@XmlElement(required = true)
@@ -110,10 +116,10 @@ public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
//end::annotated-included[]
//tag::meta-annotated-excluded[]
- @MementoSerializationExcludedMetaAnnotation // <.>
+ @SnapshotExcludedMetaAnnotation // <.>
@Property()
@PropertyLayout(
- describedAs = "@MementoSerializationExcludedMetaAnnotation "
+ describedAs = "@SnapshotExcludedMetaAnnotation "
)
@MemberOrder(name = "meta-annotations", sequence = "1")
@XmlElement(required = true)
@@ -122,14 +128,14 @@ public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
//end::meta-annotated-excluded[]
//tag::meta-annotated-included[]
- @MementoSerializationIncludedMetaAnnotation // <.>
+ @SnapshotIncludedMetaAnnotation // <.>
@Property(
- mementoSerialization = MementoSerialization.EXCLUDED // <.>
+ snapshot = Snapshot.EXCLUDED // <.>
)
@PropertyLayout(
describedAs =
- "@MementoSerializationIncludedMetaAnnotation "
- + "@Property(mementoSerialization = EXCLUDED)"
+ "@SnapshotIncludedMetaAnnotation "
+ + "@Property(snapshot = EXCLUDED)"
)
@MemberOrder(name = "meta-annotations-overridden", sequence = "1")
@XmlElement(required = true)
@@ -137,4 +143,13 @@ public class PropertyMementoSerializationVm implements HasAsciiDocDescription {
private String metaAnnotatedPropertyOverridden;
//end::meta-annotated-included[]
+//tag::children[]
+ @Getter @Setter
+ @Collection
+ @XmlElementWrapper(name = "children")
+ @XmlElement(name = "child")
+ private List<PropertySnapshotChildVm> children = new ArrayList<>();
+//end::children[]
+
+
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/PropertySnapshotVm.layout.xml
similarity index 97%
copy from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm.layout.xml
copy to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/PropertySnapshotVm.layout.xml
index 8c2abe6..82a1249 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/PropertySnapshotVm.layout.xml
@@ -18,7 +18,7 @@
<bs3:row>
<bs3:col span="10" unreferencedActions="true">
<cpt:domainObject />
- <cpt:action id="takeSnapshot"/>
+ <cpt:action id="takeXmlSnapshot"/>
</bs3:col>
<bs3:col span="2">
<cpt:fieldSet name="" id="sources" />
@@ -34,6 +34,7 @@
<cpt:fieldSet name="Meta-annotated" id="meta-annotations"/>
<cpt:fieldSet name="Meta-annotated overrriden" id="meta-annotated-overrriden"/>
<cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
+ <cpt:collection id="children"/>
</bs3:col>
</bs3:row>
</bs3:col>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm_takeSnapshot.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/PropertySnapshotVm_takeXmlSnapshot.java
similarity index 65%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm_takeSnapshot.java
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/PropertySnapshotVm_takeXmlSnapshot.java
index bb49d51..7843394 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm_takeSnapshot.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/PropertySnapshotVm_takeXmlSnapshot.java
@@ -16,7 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package demoapp.dom.annotDomain.Property.mementoSerialization;
+package demoapp.dom.annotDomain.Property.snapshot;
+
+import java.util.Locale;
import javax.inject.Inject;
@@ -34,22 +36,41 @@ import lombok.val;
semantics = SemanticsOf.SAFE
)
@RequiredArgsConstructor
-public class PropertyMementoSerializationVm_takeSnapshot {
+public class PropertySnapshotVm_takeXmlSnapshot {
@Inject XmlSnapshotService xmlSnapshotService;
@Inject XmlService xmlService;
- private final PropertyMementoSerializationVm vm;
+ private final PropertySnapshotVm vm;
+
+ public static enum FileType {
+ XML,
+ XSD
+ }
//tag::class[]
- public Clob act(String fileName) {
+ public Clob act(
+ final FileType fileType,
+ final String fileName,
+ final boolean includeChildren,
+ final boolean forceIncludeExcluded) {
val builder = xmlSnapshotService.builderFor(vm);
+ if(includeChildren) {
+ builder.includePath("children");
+ }
+ if(forceIncludeExcluded) {
+ builder.includePath("excludedProperty");
+ }
val snapshot = builder.build();
- val doc = snapshot.getXmlDocument();
+ val doc = fileType == FileType.XML
+ ? snapshot.getXmlDocument() : snapshot.getXsdDocument();
return asClob(xmlService.asString(doc), fileName);
}
- public String default0Act() {
- return "snapshot.xml";
+ public FileType default0Act() {
+ return FileType.XML;
+ }
+ public String default1Act(final FileType fileType) {
+ return "snapshot." + fileType.name().toLowerCase();
}
private static Clob asClob(final String xmlStr, final String fileName) {
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/MementoSerializationIncludedMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/SnapshotExcludedMetaAnnotation.java
similarity index 82%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/MementoSerializationIncludedMetaAnnotation.java
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/SnapshotExcludedMetaAnnotation.java
index c7725c1..1312704 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/MementoSerializationIncludedMetaAnnotation.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/SnapshotExcludedMetaAnnotation.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package demoapp.dom.annotDomain.Property.mementoSerialization;
+package demoapp.dom.annotDomain.Property.snapshot;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
@@ -24,17 +24,17 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import org.apache.isis.applib.annotation.MementoSerialization;
+import org.apache.isis.applib.annotation.Snapshot;
import org.apache.isis.applib.annotation.Property;
//tag::class[]
-@Property(mementoSerialization = MementoSerialization.INCLUDED) // <.>
+@Property(snapshot = Snapshot.EXCLUDED) // <.>
@Inherited
@Target({
ElementType.METHOD, ElementType.FIELD // <.>
})
@Retention(RetentionPolicy.RUNTIME)
-public @interface MementoSerializationIncludedMetaAnnotation {
+public @interface SnapshotExcludedMetaAnnotation {
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/MementoSerializationExcludedMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/SnapshotIncludedMetaAnnotation.java
similarity index 82%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/MementoSerializationExcludedMetaAnnotation.java
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/SnapshotIncludedMetaAnnotation.java
index e8d399c..abcf653 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/MementoSerializationExcludedMetaAnnotation.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/SnapshotIncludedMetaAnnotation.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package demoapp.dom.annotDomain.Property.mementoSerialization;
+package demoapp.dom.annotDomain.Property.snapshot;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
@@ -24,17 +24,17 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import org.apache.isis.applib.annotation.MementoSerialization;
+import org.apache.isis.applib.annotation.Snapshot;
import org.apache.isis.applib.annotation.Property;
//tag::class[]
-@Property(mementoSerialization = MementoSerialization.EXCLUDED) // <.>
+@Property(snapshot = Snapshot.INCLUDED) // <.>
@Inherited
@Target({
ElementType.METHOD, ElementType.FIELD // <.>
})
@Retention(RetentionPolicy.RUNTIME)
-public @interface MementoSerializationExcludedMetaAnnotation {
+public @interface SnapshotIncludedMetaAnnotation {
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/peer/XmlSnapshotPeerVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/child/PropertySnapshotChildVm-description.adoc
similarity index 89%
copy from examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/peer/XmlSnapshotPeerVm-description.adoc
copy to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/child/PropertySnapshotChildVm-description.adoc
index a2f1be1..d34d5a3 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/peer/XmlSnapshotPeerVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/child/PropertySnapshotChildVm-description.adoc
@@ -1,3 +1,5 @@
:Notice: 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 ag [...]
-This object exists just to be referenced by the `PropertyMementoSerializationVm` demo object.
+TODO
+
+This (child) object ...
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/XmlSnapshotParentVm.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/child/PropertySnapshotChildVm.java
similarity index 52%
copy from examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/XmlSnapshotParentVm.java
copy to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/child/PropertySnapshotChildVm.java
index cacc2f6..6f2cf9d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/XmlSnapshotParentVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/child/PropertySnapshotChildVm.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package demoapp.dom.services.core.xmlSnapshotService;
+package demoapp.dom.annotDomain.Property.snapshot.child;
import java.util.ArrayList;
import java.util.List;
@@ -24,76 +24,73 @@ import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.apache.isis.applib.annotation.Collection;
-import org.apache.isis.applib.annotation.CollectionLayout;
import org.apache.isis.applib.annotation.DomainObject;
-import org.apache.isis.applib.annotation.Editing;
import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.MementoSerialization;
import org.apache.isis.applib.annotation.Nature;
import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.Snapshot;
-import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
-import demoapp.dom.services.core.xmlSnapshotService.child.XmlSnapshotChildVm;
-import demoapp.dom.services.core.xmlSnapshotService.peer.XmlSnapshotPeerVm;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
-import lombok.val;
-@XmlRootElement(name = "root")
+import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom.annotDomain.Property.hidden.PropertyHiddenVm;
+import demoapp.dom.annotDomain.Property.snapshot.SnapshotExcludedMetaAnnotation;
+import demoapp.dom.annotDomain.Property.snapshot.SnapshotIncludedMetaAnnotation;
+
+//tag::class[]
+@XmlRootElement(name = "child")
@XmlType
@XmlAccessorType(XmlAccessType.FIELD)
@DomainObject(
- nature=Nature.VIEW_MODEL,
- objectType = "demo.XmlSnapshotParentVm"
+ nature=Nature.VIEW_MODEL,
+ objectType = "demo.PropertyHiddenChildVm"
)
@NoArgsConstructor
-public class XmlSnapshotParentVm implements HasAsciiDocDescription {
+public class PropertySnapshotChildVm implements HasAsciiDocDescription {
- public XmlSnapshotParentVm(String text) {
- this.text = text;
- this.otherText = text;
+ public PropertySnapshotChildVm(String value) {
+ excludedProperty = value;
+ includedProperty = value;
}
public String title() {
- return "XmlSnapshotService parent VM";
+ return "Property#xmlSnapshot (child object)";
}
- @Property(editing = Editing.ENABLED)
- @MemberOrder(name = "properties", sequence = "1")
+//tag::annotated-excluded[]
+ @Property(
+ snapshot = Snapshot.EXCLUDED
+ )
+ @PropertyLayout(
+ describedAs = "@Property(snapshot = EXCLUDED)"
+ )
+ @MemberOrder(name = "annotations", sequence = "2")
@XmlElement(required = true)
@Getter @Setter
- private String text;
+ private String excludedProperty;
+//end::annotated-excluded[]
- @Property(editing = Editing.ENABLED, mementoSerialization = MementoSerialization.EXCLUDED)
- @MemberOrder(name = "properties", sequence = "2")
+//tag::annotated-included[]
+ @Property(
+ snapshot = Snapshot.INCLUDED
+ )
+ @PropertyLayout(
+ describedAs = "@Property(snapshot = INCLUDED)"
+ )
+ @MemberOrder(name = "annotations", sequence = "2")
@XmlElement(required = true)
@Getter @Setter
- private String otherText;
-
- @Property(editing = Editing.ENABLED)
- @MemberOrder(name = "properties", sequence = "3")
- @XmlElement(required = false)
- @Getter @Setter
- private XmlSnapshotPeerVm peer;
-
-//tag::class-collections-children[]
- @Collection()
- @CollectionLayout()
- @Getter
- private List<XmlSnapshotChildVm> children = new ArrayList<>();
+ private String includedProperty;
+//end::annotated-included[]
- // ...
-//end::class-collections-children[]
-
- public XmlSnapshotParentVm addChild(final String value) {
- val childVm = new XmlSnapshotChildVm(value);
- getChildren().add(childVm);
- return this;
- }
}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/child/PropertySnapshotChildVm.layout.xml
similarity index 83%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm.layout.xml
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/child/PropertySnapshotChildVm.layout.xml
index 8c2abe6..70f0ba4 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mementoSerialization/PropertyMementoSerializationVm.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/snapshot/child/PropertySnapshotChildVm.layout.xml
@@ -15,10 +15,10 @@
xmlns:cpt="http://isis.apache.org/applib/layout/component"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
<bs3:row>
<bs3:col span="10" unreferencedActions="true">
<cpt:domainObject />
- <cpt:action id="takeSnapshot"/>
</bs3:col>
<bs3:col span="2">
<cpt:fieldSet name="" id="sources" />
@@ -27,15 +27,10 @@
<bs3:row>
<bs3:col span="6">
- <bs3:row>
- <bs3:col span="12">
- <cpt:fieldSet name="Not annotated" id="no-annotations"/>
- <cpt:fieldSet name="Annotated" id="annotations"/>
- <cpt:fieldSet name="Meta-annotated" id="meta-annotations"/>
- <cpt:fieldSet name="Meta-annotated overrriden" id="meta-annotated-overrriden"/>
- <cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
- </bs3:col>
- </bs3:row>
+ <cpt:fieldSet name="Properties" id="variants"/>
+ <cpt:fieldSet name="Meta-annotated" id="meta-annotated"/>
+ <cpt:fieldSet name="Meta-annotated Overridden" id="meta-annotated-overridden"/>
+ <cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
</bs3:col>
<bs3:col span="6">
<cpt:fieldSet name="Description" id="description" >
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
index 49c642d..ce0a40e 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
@@ -153,11 +153,11 @@ For latest we use: https://raw.githubusercontent.com/apache/isis/master/antora/s
<mb3:serviceAction objectType="demo.PropertyMenu" id="fileAccept"/>
<mb3:serviceAction objectType="demo.PropertyMenu" id="hidden"/>
<mb3:serviceAction objectType="demo.PropertyMenu" id="maxLength"/>
- <mb3:serviceAction objectType="demo.PropertyMenu" id="mementoSerialization"/>
<mb3:serviceAction objectType="demo.PropertyMenu" id="mustSatisfy"/>
<mb3:serviceAction objectType="demo.PropertyMenu" id="optionality"/>
<mb3:serviceAction objectType="demo.PropertyMenu" id="projecting"/>
<mb3:serviceAction objectType="demo.PropertyMenu" id="regexPattern"/>
+ <mb3:serviceAction objectType="demo.PropertyMenu" id="snapshot"/>
</mb3:section>
</mb3:menu>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/XmlSnapshotParentVm.java b/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/XmlSnapshotParentVm.java
index cacc2f6..f887f87 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/XmlSnapshotParentVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/XmlSnapshotParentVm.java
@@ -32,7 +32,7 @@ import org.apache.isis.applib.annotation.CollectionLayout;
import org.apache.isis.applib.annotation.DomainObject;
import org.apache.isis.applib.annotation.Editing;
import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.MementoSerialization;
+import org.apache.isis.applib.annotation.Snapshot;
import org.apache.isis.applib.annotation.Nature;
import org.apache.isis.applib.annotation.Property;
@@ -69,7 +69,7 @@ public class XmlSnapshotParentVm implements HasAsciiDocDescription {
@Getter @Setter
private String text;
- @Property(editing = Editing.ENABLED, mementoSerialization = MementoSerialization.EXCLUDED)
+ @Property(editing = Editing.ENABLED, snapshot = Snapshot.EXCLUDED)
@MemberOrder(name = "properties", sequence = "2")
@XmlElement(required = true)
@Getter @Setter
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/child/XmlSnapshotChildVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/child/XmlSnapshotChildVm-description.adoc
index e755465..e781e8d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/child/XmlSnapshotChildVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/child/XmlSnapshotChildVm-description.adoc
@@ -1,3 +1,3 @@
:Notice: 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 ag [...]
-This child object exists just to act as the element of the two collections of the `PropertyMementoSerializationVm` demo object.
+This child object exists just to act as the element of the two collections of the `PropertySnapshotVm` demo object.
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/peer/XmlSnapshotPeerVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/peer/XmlSnapshotPeerVm-description.adoc
index a2f1be1..063e761 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/peer/XmlSnapshotPeerVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/services/core/xmlSnapshotService/peer/XmlSnapshotPeerVm-description.adoc
@@ -1,3 +1,3 @@
:Notice: 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 ag [...]
-This object exists just to be referenced by the `PropertyMementoSerializationVm` demo object.
+This object exists just to be referenced by the `PropertySnapshotVm` demo object.
[isis] 04/06: ISIS-439: completely removes the
DisabledFacetForCollection
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-2476
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 94e4add3a4c44e7eab0d451173e6f481ccc7e336
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jan 13 18:39:33 2021 +0000
ISIS-439: completely removes the DisabledFacetForCollection
what I had before wasn't quite right - was making _everything_ immutable!
---
.../CollectionAnnotationFacetFactory.java | 11 +------
.../disabled/DisabledFacetForCollection.java | 37 ----------------------
2 files changed, 1 insertion(+), 47 deletions(-)
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
index 84fdca4..c9dea13 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
@@ -34,10 +34,9 @@ import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacet;
import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacetInferredFromArray;
import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacetInferredFromGenerics;
-import org.apache.isis.core.metamodel.facets.actions.contributing.ContributingFacetAbstract;
import org.apache.isis.core.metamodel.facets.actions.contributing.ContributingFacet.Contributing;
+import org.apache.isis.core.metamodel.facets.actions.contributing.ContributingFacetAbstract;
import org.apache.isis.core.metamodel.facets.actions.semantics.ActionSemanticsFacetAbstract;
-import org.apache.isis.core.metamodel.facets.collections.collection.disabled.DisabledFacetForCollection;
import org.apache.isis.core.metamodel.facets.collections.collection.hidden.HiddenFacetForCollectionAnnotation;
import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForDomainEventFromAbstract;
import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForDomainEventFromCollectionAnnotation;
@@ -73,7 +72,6 @@ public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract {
processModify(processMethodContext, collectionIfAny);
processHidden(processMethodContext, collectionIfAny);
- processEditing(processMethodContext);
processTypeOf(processMethodContext, collectionIfAny);
}
@@ -208,13 +206,6 @@ public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract {
super.addFacet(facet);
}
- void processEditing(final ProcessMethodContext processMethodContext) {
- val holder = processMethodContext.getFacetHolder();
- val facet = DisabledFacetForCollection.create(holder);
-
- super.addFacet(facet);
- }
-
void processTypeOf(final ProcessMethodContext processMethodContext, Optional<Collection> collectionIfAny) {
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/disabled/DisabledFacetForCollection.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/disabled/DisabledFacetForCollection.java
deleted file mode 100644
index b99e1b1..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/disabled/DisabledFacetForCollection.java
+++ /dev/null
@@ -1,37 +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.core.metamodel.facets.collections.collection.disabled;
-
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacet;
-import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacetAbstractImpl;
-
-public class DisabledFacetForCollection extends DisabledFacetAbstractImpl {
-
- public static DisabledFacet create(final FacetHolder holder) {
- return new DisabledFacetForCollection(holder);
- }
-
- private DisabledFacetForCollection(final FacetHolder holder) {
- super(Where.EVERYWHERE, "Always disabled", holder);
- }
-
-}