[ 
https://issues.apache.org/jira/browse/SLING-4001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14188514#comment-14188514
 ] 

Sandro Boehme commented on SLING-4001:
--------------------------------------

++ Building without OSGi OBR deployment ++
The JSTL libraries are already part of the launchpad in the mean time. This 
makes the JSNodeTypes dependency the only one right now that one needs to put 
into the running Sling instance before being able to install it to the server.

This dependency would have to be embedded into the final Maven artifact in 
order for the Maven-Sling-Plugin to be able to upload it to the server on 
install. But if it would be already part of a running Sling instance then that 
would add an unnecessary copy of this or other potential library that might be 
added later on. 

Instead I would like to keep the inconvenient requirement that one needs to 
deploy the Resource-Editor via the OBR before in order to be able to install it 
to the server. But only as long as the Resource-Editor is located in contrib. 
If it is later moved to the launchpad I would like to add the JSNodeTypes 
library there as well. Then the installation will be simple and convenient 
again.

This way the Resource-Editor can easily be installed to a Sling instance using 
an OBR when no build is needed while no libraries are embedded.

++ Is it needed to specify the Import-Packages manually? ++
Yes, it is needed. This is because the Bnd tool does not detect import 
statements and taglib statements from the JSPs and thus would not create the 
Import-Package statements for the JSTL taglibs [1].
The next patch for the Resource-Editor will contain the Import-Package 
statements that resolve to the libraries that are currently part of the 
Launchpad and don't add new dependencies for the Taglibs as it is the case in 
the initial contribution. The duplicated imports will also be removed.

++ getting rid of the Require-Bundle ++
As David Bosschaert pointed [2] out there are two ways. Using the 
capabilities/requirements model and using a fake package.
Sadly the capabilities/requirements model doesn't work with the OBR as it 
doesn't support the require-capability header [3]. This is why I will use the 
fake "package" in the upcoming patch for the Resource-Editor.

[1] - 
http://apache-felix.18485.x6.nabble.com/maven-bundle-plugin-add-JSTL-libraries-to-the-OSGi-imports-tp5010333p5010335.html

[2] - 
http://mail-archives.apache.org/mod_mbox/sling-dev/201410.mbox/%3ccamit8sohpjua0orjdbb3w2imftjwmbng7d60qmo6temslgr...@mail.gmail.com%3E

[3] - 
http://mail-archives.apache.org/mod_mbox/felix-users/201410.mbox/%3CetPan.544e6915.643c9869.30b7%40Endofunctor.local%3E
 

> Apache Sling Resource Editor contribution
> -----------------------------------------
>
>                 Key: SLING-4001
>                 URL: https://issues.apache.org/jira/browse/SLING-4001
>             Project: Sling
>          Issue Type: New Feature
>            Reporter: Sandro Boehme
>            Assignee: Bertrand Delacretaz
>         Attachments: apache _sling_resource_editor.zip
>
>
> Based on the discussion at the dev list [1, 2] I would like to contribute the 
> Apache Sling Resource Editor (previously named JCRBrowser and Apache Sling 
> Content Editor). 
> ++ Features ++
> Currently it can be used to rename and delete nodes. Rename works by double 
> clicking the node and you can multi select nodes for the deletion with the 
> 'del' key. The node names are HTML and URL escaped and it provides stateless 
> deep links to the nodes.
> ++ Further development ++
> In the months to come I can work more intensely on the Sling Resource Editor 
> and I might add commercial add-ons separately. This is why I would like to be 
> able to point users to such an add-on from Sling. But judging from other 
> Apache projects [6] I assume this is probably not a problem.
> I will continue the development at GitHub[7] and send patch files to Sling 
> when new features are implemented.
> ++ Implementation ++
> It uses the Sling API. 
> For the tree on the left the JSTree library is used. It expects a URL to a 
> JSON that contains the data for the child nodes. This URL points to a
> Sling resource with a 'reseditor.nodes' selector and a 'json' extension. This 
> way the JSPs [3] render the JSON for the resource that is consumed by the 
> JSTree library.
> For the deletion and renaming of nodes I use jQuery Ajax calls to the Sling 
> POST servlet. 
> The properties list on the right is rendered [4] using JSTL and the 
> currentNode variable of Sling.
> The html.jsp is registered for the 'reseditor' selector relatively to the 
> default servlet. And for not getting overruled by servlets registered by 
> paths and by other resources that are using the 'reseditor' selector I use a 
> ResourceDecorator [5]. 
> After a hint from Dominik Süß I work on using a ResourceProvider instead.
> I'm looking forward to your feedback! 
> [1] - http://comments.gmane.org/gmane.comp.apache.sling.devel/47292
> [2] - http://comments.gmane.org/gmane.comp.apache.sling.devel/47517
> [3] - 
> https://github.com/sandroboehme/resourceeditor/tree/master/src/main/resources/SLING-INF/libs/sling/servlet/default/reseditor
> [4] - 
> https://github.com/sandroboehme/resourceeditor/blob/master/src/main/resources/SLING-INF/libs/sling/servlet/default/reseditor/html.jsp
>  line 174
> [5] - 
> https://github.com/sandroboehme/resourceeditor/blob/master/src/main/java/org/apache/sling/reseditor/SelectorBasedResourceDecorator.java
> [6] - https://www.google.de/search?q=site%3Aapache.org+commercial 
> [7] - https://github.com/sandroboehme/resourceeditor



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to