You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Sandro Boehme <sa...@gmx.de> on 2015/12/02 22:16:53 UTC

Re: Sling API for copying a folder to sling_home and mounting it as a FS Resource

Hi Carsten,

I just found out that there is an API for the OSGi Configuration Admin. 
I only knew about the web console. This API is certainly the way to go, 
thanks again for your hint!

Best,

Sandro

Am 27.11.15 um 15:17 schrieb Carsten Ziegeler:
> Hi Sandro,
>
> the API is in fact the OSGi Configuration Admin :) You can create an
> OSGi Configuration and this will mount the provider. That's basically
> the server side part of the POST request.
>
> Regards
> Carsten
>
> Sandro Boehme wrote
>> Hi,
>>
>> on activation of the sitebuilder bundle I would like to copy a folder to
>> sling_home and mount it as a FS Resource.
>>
>> It is used for example to contain the frontend packages (npm,
>> github,...) and as they can get updated at runtime the FS folder should
>> be mounted to the repo.
>>
>> If there is no API for copying things to sling_home I would simply do
>> that on my own but whats a bit more important is, that I haven't found
>> an API for mounting a FS Resource. Of course I could send a post request
>> to the config manager like
>> 'AbstractBundleInstallMojo().addConfiguration()' does. But my code
>> already runs in the same VM so this is too much overhead in my opinion.
>> It would be good to call the FileMonitor directly but it's in an
>> 'internal' package which is marked private.
>> Is there an other API that I've missed?
>>
>> Best,
>>
>> Sandro
>>
>
>
>
>