Apache MetaModel

Apache MetaModel

Source changes - FishEye

Shows the 20 most recent commits for Apache MetaModel.

Dan Haywood <dan@haywood-associates.co.uk> committed 19b7e0eb2cfbdee9e3a4b0e32442bef79bcfd766 (40 files)
Reviews: none

ISIS-993: pretty much there on deriving and syncing the metamodel with the layout.xml info;
next step is to do the new Wicket views for the tabs themselves

isis-git
Dan Haywood <dan@haywood-associates.co.uk> committed 499366fdc85478f82a746a6a9ad3815005c7d7d6 (40 files)
Reviews: none

ISIS-993: pretty much there on deriving and syncing the metamodel with the layout.xml info;
next step is to do the new Wicket views for the tabs themselves

isis-git ISIS-993
Dan Haywood <dan@haywood-associates.co.uk> committed 4a8ff11b322c97a5efe72e55ae7535f9bd847cc5 (40 files)
Reviews: none

ISIS-993: pretty much there on deriving and syncing the metamodel with the layout.xml info;
next step is to do the new Wicket views for the tabs themselves

isis-git
Dan Haywood <dan@haywood-associates.co.uk> committed 6c888136560b8648df110498cf5eb69f591095ed (26 files)
Reviews: none

ISIS-1213: renamed metamodel classes ("...Impl" to "...Default"); derive name of ObjectActionMixedIn from mixin type (if "_"); simplified logic of #getParameters; also...
renamed:
- ObjectActionImpl to ObjectActionDefault
- OneToOneAssociationImpl to OneToOneAssociationDefault
- OneToManyAssociationImpl to OneToManyAssociationDefault
- OneToOneActionParameterImpl to OneToOneActionParameterDefault

also:
- reduced number of methods subclassed under ObjectMemberAbstract by introducing overridable getFacetHolder()
  - OneToOneAssociationContributee
  - OneToManyAssociationContributee
- similarly for ObjectActionParameterAbstract

isis-git ISIS-1249
Dan Haywood <dan@haywood-associates.co.uk> committed a129fd2d5b3817d682aa128086d2cfa3a02854a3 (67 files)
Reviews: none

ISIS-1194: simplfying the bootstrap and wiring of components, in particular around PersistenceSessionFactory
specifically:
- IsisSessionFactory
  - now passed in the ServicesInjector (rather than obtaining it from the PersistenceSessionFactory)
  - initialization of FixtureClock done in IsisSessionFactory rather than PersistenceSessionFactory
- IsisSystem
  - createSessionFactory(), changed the order in order to remove some bidir relationships
  - in shutdownServices, avoid NPE if the serviceInitializer was never instantiated during init()
- PersistenceSessionFactory
- no longer implements MetaModelRefiner, instead moved out to separate class (PersistenceSessionFactoryMetamodelRefiner)
    - this allows us to break the bidir between PersistenceSessionFactory and SpecificationLoader
  - no longer requires a RuntimeContext
  - no longer requires a ServicesInjector (is provided by IsisSessionFactory when #createPersistenceSession() is called to pass onto the created PersistenceSession)
  - no longer implements SpecificationLoaderAware, nor requires a SpecificationLoader (is provided by IsisSessionFactory when #createPerisistenceSession is called)
- similar changes to IsisMetaModel, in its constructor an init() method, to wire up components in the correct order
- PersistenceSession
  - no longer holds reference to PersistenceSessionFactory (though does only as FixturesInstallerFlag in order that PSF can continue to cache whether fixtures installed)
  - is passed in the JDO PersistenceManagerFactory from Isis' PSF (rather than accessing the PSF's DataNucleusApplicationComponents, which is now wholly internal to PSF)
  - is passed in the ServicesInjector directly (rather than obtain from Isis' PSF)
- RuntimeContextAbstract
  - now also passed in SpecificationLoader into its constructor (required reordering of IsisSessionFactory#init to be able to do this)
  - thereby remove the whole SpecificationLookupDelegator contrivance
- JavaReflectorHelper
  - pass through deploymentType to ObjectReflectorDefault
- ObjectReflectorDefault
  - removal of isInjectorMethodFor, instead have callers instantiate the InjectorMethodEvaluatorDefault directly

also, to make caller hierarchy more useful::
- changed ApplicationScopedComponent and SessionScopedComponent into marker interfaces
- removed Injectable, pushed injectInto(Object) into subtypes

also:
- enhanced IsisMojoAbstract and IsisMojoValidate (maven-isis-plugin)
  - to accept an appManifest in the pom.xml
  - use an AppManifest rather than MetaModel to bootstrap the system and validate
- moved IsisComponentProviderDefault from core-integtest into core-runtime (renamed as ...Default2), so can be used by maven-isis-plugin

also:
- deleted AdapterManagerDefault, no longer used

isis-git ISIS-1249
Dan Haywood <dan@haywood-associates.co.uk> committed d120bf747f5fecf61bc98d4a9a74cdde77e42eec (161 files)
Reviews: none

ISIS-1044: adding interactionInitiatedBy as param to all interactions with metamodel members.
- renamed/repurposed InvocationInteractionMethod

also:
- added new RendererContext4 to provide access to this info
- removed AuthenticationSession/DeploymentCategory as parameters to ObjectMember calls (since are injected)
- call with InteractionInitiatedBy.USER for Wicket UI, Restful Objects server, WrapperFactory proxy when executionMode == enforce_rules
- call with InteractionInitiatedBy.FRAMEWORK for Memento, Auditing, XmlSnapshot, Dump, DomainObjectContainer#validate(), Title context, RecreatableObjectFacet (ie view models) and WrapperFactory proxy when executionMode != enforce_rules

Still to do:
- remove the ThreadLocal accessed by ObjectAdapter.Util#isVisible()
- should inject AuthenticationSessionProvider and DeploymentCategoryProvider into all facet factories, so can then propogate into Facet impls and not have to pass in as parameters
- should write MetaModelValidator to disallow previous use of the old InteractionInvocationMethod (ProgramPersistable interface etc, ie NotPersistableFacet implementations).
- remove DeploymentCategory, AuthenticationSession from the InteractionContext class hierarchy and also ParseValueContext

isis-git ISIS-1249
Dan Haywood <dan@haywood-associates.co.uk> committed 4ac11bbcae21f3279cb8de13b0276c6961613ce2 (182 files)
Reviews: none

ISIS-1044: introducing interaction contexts - analogous to those visibility/usability/validity checking, for accessing properties, collections, invoking actions; also action prompt (for choices and autoComplete).
This commit rationalizes the metamodel API to use contexts in a more consistent manner for the accessors as well as the business rule checks. The idea is for the caller to provide a context, but to leave the AuthenticationSession as null if no visibility filtering is to be performed.

Have not, as of yet, removed the InteractionUtils#withFiltering, nor the AuthenticationSession and DeploymentCategory from the various method calls (these will be removed in a later commit).

isis-git
Dan Haywood <dan@haywood-associates.co.uk> committed ec51c58274c49e56e1c6592742415fb66d93d091 (182 files)
Reviews: none

ISIS-1044: introducing interaction contexts - analogous to those visibility/usability/validity checking, for accessing properties, collections, invoking actions; also action prompt (for choices and autoComplete).
This commit rationalizes the metamodel API to use contexts in a more consistent manner for the accessors as well as the business rule checks. The idea is for the caller to provide a context, but to leave the AuthenticationSession as null if no visibility filtering is to be performed.

Have not, as of yet, removed the InteractionUtils#withFiltering, nor the AuthenticationSession and DeploymentCategory from the various method calls (these will be removed in a later commit).

isis-git
Dan Haywood <dan@haywood-associates.co.uk> committed 38f19258bb0278cda35244422930b83b334a3d06 (13 files)
Reviews: none

ISIS-1044: filtering changed so that it is "opt-in", only enabled from selected callers.
It turns out that it's wrong to perform filtering all the time at the facet (metamodel) level... there are other internal "trusted" callers of the metamodel for which filtering should not be performed. Examples are the auditing support, and creating XmlSnapshots.

As a first step to refactoring, have put a guard around the code via a thread-local, and provided an API - InteractionUtils.withFiltering(Callable) - which callers can use when they do want filtering.

Have then gone through the Wicket viewer (EntityModel, EntityCollectionModel, ActionModel) and also the WrapperFactory (DomainObjectInvocationHandler) to enable:
- In the case of the wicket viewer, it is enabled for property references, collections, action results and also autocomplete, choices.
- For the wrapper factory, it is enabled provided that the execution mode is NOT skipRules.

Note that the Restful Objects viewer currently has NOT been updated.

In addition, have simplified the configuration properties to a single property, "isis.reflector.facet.filterVisibility".

~~~
All that said, I'm now realizing that even this isn't quite safe enough... the thread-local stays in effect for the duration of the call to the getter or action or autoComplete/choices method etc, and that in turn could call domain services or flush the transaction which results in framework-level code (eg auditing) then running while the thread-local is in effect. So next step is to get rid of the thread-local just introduced, and simply filter in the caller afterwards. I'll get there on this one, eventually...

Dan Haywood <dan@haywood-associates.co.uk> committed 401aa027bdea6b2e6ee25c2b3e22b56c1ed343fd (12 files)
Reviews: none

ISIS-1044: filtering changed so that it is "opt-in", only enabled from selected callers.
It turns out that it's wrong to perform filtering all the time at the facet (metamodel) level... there are other internal "trusted" callers of the metamodel for which filtering should not be performed. Examples are the auditing support, and creating XmlSnapshots.

As a first step to refactoring, have put a guard around the code via a thread-local, and provided an API - InteractionUtils.withFiltering(Callable) - which callers can use when they do want filtering.

Have then gone through the Wicket viewer (EntityModel, EntityCollectionModel, ActionModel) and also the WrapperFactory (DomainObjectInvocationHandler) to enable:
- In the case of the wicket viewer, it is enabled for property references, collections, action results and also autocomplete, choices.
- For the wrapper factory, it is enabled provided that the execution mode is NOT skipRules.

Note that the Restful Objects viewer currently has NOT been updated.

In addition, have simplified the configuration properties to a single property, "isis.reflector.facet.filterVisibility".

~~~
All that said, I'm now realizing that even this isn't quite safe enough... the thread-local stays in effect for the duration of the call to the getter or action or autoComplete/choices method etc, and that in turn could call domain services or flush the transaction which results in framework-level code (eg auditing) then running while the thread-local is in effect. So next step is to get rid of the thread-local just introduced, and simply filter in the caller afterwards. I'll get there on this one, eventually...

Dan Haywood <dan@haywood-associates.co.uk> committed af84e41ccbe5d286f3bf9cf2c50faf9447d227ed (12 files)
Reviews: none

ISIS-1044: filtering changed so that it is "opt-in", only enabled from selected callers.
It turns out that it's wrong to perform filtering all the time at the facet (metamodel) level... there are other internal "trusted" callers of the metamodel for which filtering should not be performed. Examples are the auditing support, and creating XmlSnapshots.

As a first step to refactoring, have put a guard around the code via a thread-local, and provided an API - InteractionUtils.withFiltering(Callable) - which callers can use when they do want filtering.

Have then gone through the Wicket viewer (EntityModel, EntityCollectionModel, ActionModel) and also the WrapperFactory (DomainObjectInvocationHandler) to enable:
- In the case of the wicket viewer, it is enabled for property references, collections, action results and also autocomplete, choices.
- For the wrapper factory, it is enabled provided that the execution mode is NOT skipRules.

Note that the Restful Objects viewer currently has NOT been updated.

In addition, have simplified the configuration properties to a single property, "isis.reflector.facet.filterVisibility".

~~~
All that said, I'm now realizing that even this isn't quite safe enough... the thread-local stays in effect for the duration of the call to the getter or action or autoComplete/choices method etc, and that in turn could call domain services or flush the transaction which results in framework-level code (eg auditing) then running while the thread-local is in effect. So next step is to get rid of the thread-local just introduced, and simply filter in the caller afterwards. I'll get there on this one, eventually...

Dan Haywood <dan@haywood-associates.co.uk> committed 1d82584114f75d786d78d5fbaff9e231cfbba2a5 (29 files)
Reviews: none

ISIS-1085: reviewing; reverting the deletion of ActionLayout.CssClassFaPosition and the introduction of CssClassFaPosition ...
... as this would break backward compatibility. Instead introduced similar enums into DomainObjectLayout and ViewModelLayout. The CssClassFaPosition enum itself moves from applib to core.metamodel.

isis-git ISIS-1249
Jörg Rade <joerg.rade@kuehne-nagel.com> committed 2499884a8993969d05cd63b4fd93072e62c801c1 (13 files)
Reviews: none

ISIS-1085: more references to ActionLayout.CssClassFaPosition replaced by CssClassFaPosition in applib, metamodel, and viewer-wicket.

isis-git ISIS-1249
Jörg Rade <joerg.rade@kuehne-nagel.com> committed cdfa9535e3bd46048cf8d42e62bc4ce13c99a978 (13 files)
Reviews: none

ISIS-1085: more references to ActionLayout.CssClassFaPosition replaced by CssClassFaPosition in applib, metamodel, and viewer-wicket.

isis-git ISIS-1249
Dan Haywood <dan@haywood-associates.co.uk> committed 62d4b99e1d13780d5ef97ffe719aab5442191275 (1 file)
Reviews: none

ISIS-1076: introduced metamodel validation to reproduce
in SimpleObjects domain service (simpleapp example)

Dan Haywood <dan@haywood-associates.co.uk> committed 189395ea8fe03c95801a52b3c2b67fc511638bb6 (20 files)
Reviews: none

ISIS-903: allow translations to be read from externalized config location.
In addition, pick up value of deploymentType by reading IsisContext.getDeploymentType() rather than the hacky way of reading config; this should work in all situations (org.apache.isis.WebServer, integtetss, tomcat etc). This necessitates moving the TranslatioServiePo implementation (and supporting classes) from core/metamodel to core/runtime.

isis-git
Dan Haywood <dan@haywood-associates.co.uk> committed 362a5bfcc7f5a8f45c15c9f5c242a3b4618ce3e5 (20 files)
Reviews: none

ISIS-903: allow translations to be read from externalized config location.
In addition, pick up value of deploymentType by reading IsisContext.getDeploymentType() rather than the hacky way of reading config; this should work in all situations (org.apache.isis.WebServer, integtetss, tomcat etc). This necessitates moving the TranslatioServiePo implementation (and supporting classes) from core/metamodel to core/runtime.

isis-git ISIS-1249
Dan Haywood <dan@haywood-associates.co.uk> committed 8bd12522c5f0436dd54be27236c00b323114ce51 (12 files)