Sling Node Type Web Console Plugin

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Sling Node Type Web Console Plugin

Andreas Schaefer
Hi

Twice in a row was I faced with the question what Node Types are deployed in Sling and what is its hierarchy.

I know there is this XML web page: http://localhost:8080/_jcr_system/_jcr_nodeTypes.xml <http://localhost:8080/_jcr_system/_jcr_nodeTypes.xml>

but that one is not very user friendly and hard to find.

Would you guys be interested in a Web Console Plugin that shows the installed Node Types with their hierarchy
in a way similar the “good-old CRX Explorer” from AEM?

Or at least a page that has anchors and links so that the user can jump through the hierarchy and find the necessary
data.

Cheers - Andy
Reply | Threaded
Open this post in threaded view
|

Re: Sling Node Type Web Console Plugin

Bertrand Delacretaz
Hi Andy,

On Thu, Jun 8, 2017 at 12:46 AM, Andreas Schaefer Sr. <[hidden email]> wrote:
> ...Would you guys be interested in a Web Console Plugin that shows the installed Node Types with their hierarchy
> in a way similar the “good-old CRX Explorer” from AEM?...

I think that would be useful, unless we already have something that I missed.

Implementing it as a resource provider might make sense? And mount it
by default under /system/nodetypes.

-Bertrand
Reply | Threaded
Open this post in threaded view
|

Re: Sling Node Type Web Console Plugin

Ioan Eugen Stan
Sounds great Andreas. Bertrand's advice seems good too.


On 08.06.2017 11:26, Bertrand Delacretaz wrote:

> Hi Andy,
>
> On Thu, Jun 8, 2017 at 12:46 AM, Andreas Schaefer Sr. <[hidden email]> wrote:
>> ...Would you guys be interested in a Web Console Plugin that shows the installed Node Types with their hierarchy
>> in a way similar the “good-old CRX Explorer” from AEM?...
> I think that would be useful, unless we already have something that I missed.
>
> Implementing it as a resource provider might make sense? And mount it
> by default under /system/nodetypes.
>
> -Bertrand


signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Sling Node Type Web Console Plugin

Andreas Schaefer
In reply to this post by Bertrand Delacretaz
Sorry for the late reply but had to upgrade my pet project to Sling 9 / OSGi annotations.

Anyhow I am trying to understand what you have in mind.

The Resource Provider is there to create a resource of a node type, right?

The list of node types and their dependencies is then handling in a
“Web Console Plugin” to display them inside the OSGi console?

Does anyone know a good example of them (Resource Provider and Web
Console Plugin) I could use as template?

Thanks - Andy

> On Jun 8, 2017, at 1:26 AM, Bertrand Delacretaz <[hidden email]> wrote:
>
> Hi Andy,
>
> On Thu, Jun 8, 2017 at 12:46 AM, Andreas Schaefer Sr. <[hidden email]> wrote:
>> ...Would you guys be interested in a Web Console Plugin that shows the installed Node Types with their hierarchy
>> in a way similar the “good-old CRX Explorer” from AEM?...
>
> I think that would be useful, unless we already have something that I missed.
>
> Implementing it as a resource provider might make sense? And mount it
> by default under /system/nodetypes.
>
> -Bertrand

Reply | Threaded
Open this post in threaded view
|

Re: Sling Node Type Web Console Plugin

Bertrand Delacretaz
Hi,

On Sat, Jun 17, 2017 at 10:06 PM, Andreas Schaefer Sr. <[hidden email]> wrote:
> ...The Resource Provider is there to create a resource of a node type, right?...

Yes, the idea is that a request like /system/nodetypes.tidy.99.json
outputs a JSON dump of all nodetypes.

> ...The list of node types and their dependencies is then handling in a
> “Web Console Plugin” to display them inside the OSGi console?...

Yes, that plugin would (internally) make that request and format the output.

>
> ...Does anyone know a good example of them (Resource Provider and Web
> Console Plugin) I could use as template?...

I think the simplest ResourceProvider example is the
PlanetResourceProvider used in our tests [1] , and the JMX
ResourceProvider [2] has similarities to what you need.


We have many webconsole plugin in our codebase. The Health Checks
plugin [2] is a relatively simple one.

-Bertrand

[1] https://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/resourceprovider/
[2] https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/jmxprovider
[3] https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/webconsole