Tobias Jeger pushed to branch master at cms-community / hippo-essentials

Commits:
49385f10 by Tobias Jeger at 2018-01-16T23:26:38+01:00
ESSENTIALS-1137 Simplify aggregation of RebuildEvents

Essentials plugins can indicate that they require a project rebuild and
restart. They used to do so by constructing an event class, and posting
it on the eventBus. A listener would collect them into a list, from
which the dashboard collects them during each Ping.
The same functionality has been simplified inside the RebuildService,
which avoid the need for the event bus, collects the relevant information
(plugin IDs only) and provides them to the dashboard.
With this change, the last use of the API's PluginEvent is gone, and so
the PluginEvent interface is removed from the API.

- - - - -
7e9607b3 by Tobias Jeger at 2018-01-16T23:26:38+01:00
ESSENTIALS-1137 Remove unused classes

- - - - -
91e2b1f0 by Tobias Jeger at 2018-01-16T23:26:38+01:00
ESSENTIALS-1137 Remove superfluous ProjectResource#coordinates endpoint

- - - - -
a19da663 by Tobias Jeger at 2018-01-16T23:26:38+01:00
ESSENTIALS-1137 Make the selections tool depend on the SDK API only

- - - - -
1e258b4c by Tobias Jeger at 2018-01-16T23:26:38+01:00
ESSENTIALS-1137 Refactor PluginContext and ProjectUtils

PluginContext used to be a misnamed collection of project specific
settings and logic, extensively using ProjectUtils and, upon construction
reading the ProjectSettings from a project resource, over and over again.

This extensive refactoring moves most of the combined logic from
PluginContext and ProjectUtils into a new, Spring-injectable
ProjectService, who, in turn, uses a new SettingsService for managing
the project settings/parameters.

This refactoring cleans up quite some duplicate (and sometimes buggy)
logic and reduces the weight of and need to instantiate and pass along
PluginContexts all through Essentials.

- - - - -
da6bfe03 by Tobias Jeger at 2018-01-16T23:26:38+01:00
ESSENTIALS-1137 More refactoring of PluginContext

With the PluginContext having lost much of its weight and importance,
it was now unused in many method signature and interface. This commit
focuses on removing this superfluous passing-around of PluginContext
instances.

This commit also cleans up the ProjectSettings API to only contain
getters, and only for fields potentially relevant to plugins. Dashboard-
internal data can be accessed through the ProjectSettingsBean, as can
the settings be adjusted.

- - - - -
c60b793e by Tobias Jeger at 2018-01-16T23:26:38+01:00
ESSENTIALS-1137 Remove unnecessary complexity in PluginConfigService

PluginConfigService used to be an SDK API interface for (de-)serializing
Documents to/from XML files. This mechanism is intended for the
Dashboard only, and used in the plugin InstallStateMachine and the
SettingsServiceImpl (for managing the project-global settings).

This refactoring removes these concepts from the SDK API (not relevant
there) and removes unnecessary abstraction layers.

- - - - -
53838ddb by Tobias Jeger at 2018-01-16T23:26:38+01:00
ESSENTIALS-1137 Improve Javadoc of SDK API services

- - - - -
c4fd0d5c by Tobias Jeger at 2018-01-16T23:26:38+01:00
ESSENTIALS-1137 Remove unused JAX-RS parameters

- - - - -
ab2a0d02 by Tobias Jeger at 2018-01-16T23:26:38+01:00
ESSENTIALS-1137 Remove lots of unused and some duplicate code

- Moved the PluginModuleRestful from the SDK to the dashboard, because
it's only used in the dashboard and not intended to be exposed to
plugins.

- - - - -
da76b33c by Tobias Jeger at 2018-01-16T23:26:38+01:00
ESSENTIALS-1137 Remove usage of instructions from REST and Gallery tools

Instead of "manually" executing an instruction set, I refactored the
FileInstruction to use the ProjectService for copying files to the
project or deleting files from the project. The REST resource if the
REST plugin can now use the ProjectService (and JcrService) directly,
rather than taking the elaborate detour through the instruction
mechanism, which should really be dashboard-internal.

- - - - -
fd12bf29 by Tobias Jeger at 2018-01-16T23:26:38+01:00
ESSENTIALS-1137 Remove installation instruction-related APIs

All but the Instruction API are really only used internally by the
Dashboard, so they should not be part of the API. Plugins who used to
use these InstructionXYZ APIs have been refactored to use the
services directly, which is considerably simpler to comprehend/
maintain.

- - - - -
39a431f7 by Tobias Jeger at 2018-01-16T23:26:38+01:00
ESSENTIALS-1137 Move MessageGroup and InstructionStatus into Instruction

These two enumerations were only used in the context of an Instruction.
Also, their naming has been improved to "Type" and "Status".

- - - - -
50e2dad2 by Tobias Jeger at 2018-01-16T23:26:39+01:00
ESSENTIALS-1137 Move 'EssentialsGenerated' annotation to SDK impl module

- - - - -
22bb2c5e by Tobias Jeger at 2018-01-16T23:26:39+01:00
ESSENTIALS-1137 Improve plugin SDK package naming

changed o.o.c.essentials.dashboard.* to o.o.c.essentials.plugin.sdk.*

- - - - -
c64f613b by Tobias Jeger at 2018-01-16T23:26:39+01:00
ESSENTIALS-1137 Rename Instruction's package to 'install'

- - - - -
d5a39711 by Tobias Jeger at 2018-01-16T23:26:39+01:00
ESSENTIALS-1137 Move non-REST service beans to service.model package

- - - - -
c21885f5 by Tobias Jeger at 2018-01-16T23:26:39+01:00
ESSENTIALS-1137 Rename TargetPom to more comprehensible Module

- - - - -
a0cf312f by Tobias Jeger at 2018-01-16T23:26:39+01:00
ESSENTIALS-1137 Remove superfluous BaseResource

- - - - -
72d1764a by Tobias Jeger at 2018-01-16T23:26:39+01:00
ESSENTIALS-1137 Revert move of HippoEssentialsGenerated annotation

this annotation is use in import statements of HST beans out there in
the field. We cannot change it in a minor release.

- - - - -
1be2dd35 by Tobias Jeger at 2018-01-16T23:26:39+01:00
ESSENTIALS-1137 Refactor REST plugin packages

in order not to share the plugin.sdk package with the SDK.

- - - - -
5ccf9ebd by Tobias Jeger at 2018-01-16T23:26:39+01:00
ESSENTIALS-1137 Clean up installation instruction infrastructure

Many instruction type unit tests used an executor and a wrapping
instruction-set, this is unnecessary complexity in the tests, I removed
them. Furthermore, the instruction package and associated classes
contained a bunch of unused code, which I also removed. And I made the
naming of the CommonsInstructionPackage more comprehensible by renaming
it to SkeletonInstrictionPackage.

- - - - -
4a8e875c by Tobias Jeger at 2018-01-16T23:26:39+01:00
ESSENTIALS-1137 Add unit tests for ProjectService

- - - - -
f70907e9 by Tobias Jeger at 2018-01-16T23:26:40+01:00
ESSENTIALS-1137 Improve unit tests for ProjectUtils

- - - - -
5cecdfc4 by Tobias Jeger at 2018-01-17T09:44:02+01:00
ESSENTIALS-1137 Get rid of Restful marker interface

Many serializable bean classes in Essentials (and plugins) implemented
the empty Restful marker interface. Its primary usage was the
RestfulList, which encapsulates a list of various such Restful beans.
In reality, the list was only used for homogenous lists of type
PluginDescriptor, MessageRestful or KeyValueRestful. These usages have
been refactored, and RestfulList is now only used in combination with
PluginDescriptor, when parsing/deserializing a list of them from JSON.
The Restful marker interface is gone, and the remaining REST-scoped
classes in the SDK API are all pure beans now.

- - - - -
b92062f7 by Tobias Jeger at 2018-01-17T09:52:18+01:00
ESSENTIALS-1137 Rename package of REST models

Rename the 'model' package to 'rest', indicating that these 
beans are
exposed through REST, and consumed by the plugins in the front-end,
which is why they're part of the SDK API.

- - - - -
aaf129f8 by Tobias Jeger at 2018-01-17T22:12:26+01:00
ESSENTIALS-1137 Refactor API packages

Instead of xx.essentials.plugin.sdk.xx, use the more explicit
xx.essentials.sdk.api.xx package for API classes.

- - - - -
c7443631 by Tobias Jeger at 2018-01-17T22:30:35+01:00
ESSENTIALS-1137 Remove unused {{templateExtension}} placeholder

Apparently, this thing used to be in use, no longer is, but has never
been cleaned up. I did so now.

- - - - -
7174e8ca by Tobias Jeger at 2018-01-19T23:08:29+01:00
ESSENTIALS-1137 Refactor PluginContext into PlaceholderService

The content of PluginContext has already gradually been brought down to
only wrap a map of placeholder objects, to be used when working with
template resources during plugin installation or configuration.

To make the intent of this functionality much clearer, It is now
provided through the PlaceholderService of the SDK API. The creation of
the placeholder data has been pushed as close to its usage as possible,
such that it is more comprehensible what kind of data is carried inside
that map. This change caused the removal of the PluginContext and its
factory service, as well as a change to the Instruction SPI.
The installation logic has been simplified a little, for better
maintainability. The handling of installation parameters is now more
explicit, and clearly separated from the placeholder data management.
Supported placeholder names who show up in the plugin's template
resources are now part of the API.

- - - - -
fc354c50 by Tobias Jeger at 2018-01-20T21:54:45+01:00
ESSENTIALS-1137 Remove unused code/classes

- - - - -
1a0940bd by Tobias Jeger at 2018-01-20T21:58:15+01:00
ESSENTIALS-1137 Make plugin-used dashboard rest endpoints explicit API

Two endpoints of the dashboard's DocumentResource used to return a list
of generic KeyValueRestful instances. The plugin would then guess the
meaning of the 'key' and the 'value', and the implementation 
would be
bound to these two fields. To avoid the guessing and make the API more
future-proof, I introduce the ContentTypeInstance and TemplateQuery
beans to the SDK API, which are now returned by the corresponding REST
endpoints, and consumed by the Selections and Document Wizard plugins.
KeyValueRestful is no longer used and has been removed.

- - - - -
a8034a62 by Tobias Jeger at 2018-01-21T17:33:34+01:00
ESSENTIALS-1137 Fix error in change message retrieval

- - - - -
ea0d975f by Tobias Jeger at 2018-01-21T22:05:16+01:00
ESSENTIALS-1137 Refactor plugin front-end

Some plugin JS resources access the dashboard's "generic" REST
endpoints to retrieve data (plugin state, project settings, content type
related data). In order to express this de-facto front-end API, I
created a number of essentialsXyzServices defined in the API module,
which can be injected into the plugin AngularJS controllers in order
to decouple the plugins from direct access to the dashboard's REST
endpoints.
I removed the Essentials.js helper class, this code was by now not used
anymore, and I cleaned up some unused definitions in app.js.

- - - - -
d95840d8 by Tobias Jeger at 2018-01-21T22:22:22+01:00
ESSENTIALS-1137 Remove RebuildService#getRequestingPluginIds from API

this method is only used by (and intended for) the dashboard.

- - - - -
c13f1b00 by Tobias Jeger at 2018-01-21T22:52:56+01:00
ESSENTIALS-1137 Remove unused 'packageClass' from PluginDescriptor API

- - - - -
cf155f43 by Tobias Jeger at 2018-01-30T09:44:56+01:00
ESSENTIALS-1137 Improve file handling on Windows

- - - - -
1823b6d2 by Tobias Jeger at 2018-01-30T12:06:36+01:00
ESSENTIALS-1137 Merge branch 'master' into feature/ESSENTIALS-1137

- - - - -
6c60c788 by Tobias Jeger at 2018-01-31T09:53:50+01:00
ESSENTIALS-1137 Move ApplicationModule into test sources

ApplicationModule has been trimmed down during the SDK API refactoring,
and all that's left is the component scan configuration duplicated in
the dashboard's applicationContext.xml. Analysing where/how it's still
used, I noted that it is only relevant to the (SDK implementation( unit
tests, so I moved it there to express that fact more appropriately.

- - - - -
1a932cf0 by Tobias Jeger at 2018-01-31T10:34:06+01:00
ESSENTIALS-1137 Remove void swagger ApiModel annotations

These annotations currently provide no added value, because no parameter
of the annotation is used anywhere, and automatic inspection of models
is working fine.

- - - - -
ce7fc4a7 by Tobias Jeger at 2018-01-31T13:24:22+01:00
ESSENTIALS-1137 Rename MessageRestful

MessageRestful is now only used for "change messages" produced by
instructions. I renamed them to ChangeMessage therefore, and cleaned up
their content. Adjusting the front-end accidentally fixed a bug in
there, so the change messages now also work in the configuration screen.

- - - - -
332005c3 by Tobias Jeger at 2018-01-31T13:39:50+01:00
ESSENTIALS-1137 Rename RestfulList

RestfulList is only used in the context of supporting old "plugin
descriptor list" JSON files. I renamed the class to PluginDescriptorList
and documented its (intended) usage.

- - - - -
e141fb3f by Tobias Jeger at 2018-01-31T14:15:21+01:00
ESSENTIALS-1137 Rename PluginModuleRestful and StatusRestful

With the end of the Restful interface, still naming classes *Restful*
makes little sense. A scan for such classes led to the rename of
PluginModuleRestful to ApplicationData and StatusRestful to
ProjectStatus.

- - - - -
19fadcf8 by Tobias Jeger at 2018-01-31T14:30:23+01:00
ESSENTIALS-1137 Rename plugin's XyzRestful model classes

With the end of the Restful interface, still naming classes *Restful*
makes little sense. A scan for such classes led to the rename of
a few plugin-specific model classes.

- - - - -
001eb045 by Tobias Jeger at 2018-01-31T17:19:23+01:00
ESSENTIALS-1137 Repackage API model classes

Put all model classes into the model package, with a "rest" 
sub-package
for model classes which are exposed over REST (which makes them API).

- - - - -
b455cf78 by Tobias Jeger at 2018-02-01T20:14:06+01:00
ESSENTIALS-1137 Better test fixture for settings service

and clean-up unused code in app.js (now that MessageRestful has been
replaced by UserFeedback).

- - - - -
859b242c by Tobias Jeger at 2018-02-02T11:11:55+01:00
ESSENTIALS-1137 Remove NodeFolder instruction support

When working towards YAML import, I noticed that YAML and
NodeFolderInstruction don't combine well. Also, the current usages of
the <folder> instruction don't add much value over using the 
<xml>
instruction. To obtain a cleaner API, I've therefore removed support
of the <folder> instruction.

- - - - -
d437b848 by Tobias Jeger at 2018-02-02T11:15:02+01:00
ESSENTIALS-1137 Merge branch 'master' into feature/ESSENTIALS-1137

- - - - -
041206f6 by Tobias Jeger at 2018-02-02T11:52:59+01:00
ESSENTIALS-1137 Reintegrate branch 'feature/ESSENTIALS-1137'

- - - - -


30 changed files:

- dashboard/src/main/java/org/onehippo/cms7/essentials/WebUtils.java
- 
dashboard/src/main/java/org/onehippo/cms7/essentials/filters/EssentialsContextListener.java
- 
dashboard/src/main/java/org/onehippo/cms7/essentials/filters/RequirementsCheckFilter.java
- 
dashboard/src/main/java/org/onehippo/cms7/essentials/plugin/InstallStateMachine.java
- dashboard/src/main/java/org/onehippo/cms7/essentials/plugin/Plugin.java
- 
plugin-sdk/implementation/src/main/java/org/onehippo/cms7/essentials/dashboard/config/ResourcePluginService.java
 → 
dashboard/src/main/java/org/onehippo/cms7/essentials/plugin/PluginFileResourceService.java
- dashboard/src/main/java/org/onehippo/cms7/essentials/plugin/PluginStore.java
- 
dashboard/src/main/java/org/onehippo/cms7/essentials/rest/DocumentResource.java
- dashboard/src/main/java/org/onehippo/cms7/essentials/rest/PluginResource.java
- dashboard/src/main/java/org/onehippo/cms7/essentials/rest/ProjectResource.java
- 
plugin-sdk/implementation/src/main/java/org/onehippo/cms7/essentials/dashboard/rest/PluginModuleRestful.java
 → 
dashboard/src/main/java/org/onehippo/cms7/essentials/rest/model/ApplicationData.java
- 
dashboard/src/main/java/org/onehippo/cms7/essentials/rest/model/StatusRestful.java
 → 
dashboard/src/main/java/org/onehippo/cms7/essentials/rest/model/ProjectStatus.java
- − 
dashboard/src/main/java/org/onehippo/cms7/essentials/rest/model/PropertyRestful.java
- − 
dashboard/src/main/java/org/onehippo/cms7/essentials/rest/model/RestList.java
- 
dashboard/src/main/java/org/onehippo/cms7/essentials/rest/model/SystemInfo.java
- − 
dashboard/src/main/java/org/onehippo/cms7/essentials/rest/model/TranslationRestful.java
- 
dashboard/src/main/java/org/onehippo/cms7/essentials/rest/picker/JcrBrowserResource.java
- dashboard/src/main/java/org/onehippo/cms7/essentials/rest/picker/JcrNode.java
- 
dashboard/src/main/java/org/onehippo/cms7/essentials/rest/picker/JcrProperty.java
- dashboard/src/main/java/org/onehippo/cms7/essentials/rest/picker/JcrQuery.java
- 
dashboard/src/main/java/org/onehippo/cms7/essentials/servlet/DynamicRestPointsApplication.java
- dashboard/src/main/java/org/onehippo/cms7/essentials/servlet/EndPointList.java
- 
dashboard/src/main/java/org/onehippo/cms7/essentials/project/ProjectUtils.java 
→ dashboard/src/main/java/org/onehippo/cms7/essentials/utils/DashboardUtils.java
- dashboard/src/main/resources/applicationContext.xml
- dashboard/src/main/webapp/WEB-INF/jsp/index.jsp
- dashboard/src/main/webapp/directives/essentials-feature-footer.html
- dashboard/src/main/webapp/directives/essentials-messages.html
- dashboard/src/main/webapp/directives/essentials-plugin.html
- − dashboard/src/main/webapp/js/Essentials.js
- dashboard/src/main/webapp/js/app.js


The diff was not included because it is too large.


View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-essentials/compare/3c7d181cf3cbf5252f57f103548af9f70104e9d9...041206f6f79bf6e097552c1f7664f833615f6ee8

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-essentials/compare/3c7d181cf3cbf5252f57f103548af9f70104e9d9...041206f6f79bf6e097552c1f7664f833615f6ee8
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to