[
https://issues.apache.org/jira/browse/SLING-4558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14389835#comment-14389835
]
Alexander Klimetschek edited comment on SLING-4558 at 4/1/15 1:33 AM:
----------------------------------------------------------------------
Attached a simple change of the jcr installer's ConfigNodeConverter:
[^SLING-4558.patch]
If a {{sling:OsgiConfig}} node has the name {{serviceuser}}, then the special
case kicks in. The properties ({{user.mapping}} in particular) stay the same,
and the unique factory alias is automatically taken from the first mapping's
bundle name.
Example JCR structure:
{noformat}
/libs/project/config
+ serviceuser [sling:OsgiConfig]
- user.mapping = ["org.example.app.app-bundle:myservice=myservice-user"]
{noformat}
Note this only supports sling:OsgiConfig style, not the property files, but
that shouldn't be necessary given one always only configures the user.mapping
which doesn't have number values.
was (Author: alexander.klimetschek):
Attached a simple change of the jcr installer's ConfigNodeConverter:
[^SLING-4558.patch]
If a {{sling:OsgiConfig}} node has the name {{serviceuser}}, then the special
case kicks in. The properties ({{user.mapping}} in particular) stay the same,
and the unique factory alias is automatically taken from the first mapping's
bundle name.
Example JCR structure:
{noformat}
/libs/project/config
+ serviceuser [sling:OsgiConfig]
- user.mapping = ["org.example.app.app-bundle:myservice=myservice-user']
{noformat}
Note this only supports sling:OsgiConfig style, not the property files, but
that shouldn't be necessary given one always only configures the user.mapping
which doesn't have number values.
> Simpler serviceuser config for service user mappings
> ----------------------------------------------------
>
> Key: SLING-4558
> URL: https://issues.apache.org/jira/browse/SLING-4558
> Project: Sling
> Issue Type: Bug
> Components: Installer
> Reporter: Alexander Klimetschek
> Attachments: SLING-4558.patch
>
>
> For a service user configuration (amendment), one has to currently remember a
> weird long PID:
> {{org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended}}
> plus making sure it has a unique ID by appending "-something", which confuses
> people to whether that "something" must correspond to a bundle or service
> name or they come up with these long names:
> {{org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended.something.xml}}
> which then create too long paths for some cases (git checkouts under windows
> or jcr repository limitations).
> A simple "serviceuser" config node name would be better.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)