Re: Stopping Apache Sling Launchpad upon exception in OSGi bundle

2021-04-27 Thread Bertrand Delacretaz
Hi, On Tue, Apr 27, 2021 at 6:45 PM Eric Norman wrote: > ...I don't believe there is currently any configuration for the Apache Felix > Jetty Based Http Service that would do that automatically... I also think there's no built-in way to achieve what you want. In addition to Eric's suggestions,

Re: Trying to authenticate sling with Keycloak

2020-12-21 Thread Bertrand Delacretaz
Hi, On Mon, Dec 21, 2020 at 6:29 AM gokul vs wrote: > ..Trying to use key cloak as IAM system for sling, > is there any available implementations or extensions available... This adaptTo() presentation might help:

Re: Datasource selection

2020-12-15 Thread Bertrand Delacretaz
On Tue, Dec 15, 2020 at 4:58 PM Robert Munteanu wrote: > ...This way you get the datasources injected and via SCR and you get to > use the datasource.name as a key... sounds good and it's certainly more efficient than what I suggested. -Bertrand

Re: Datasource selection

2020-12-15 Thread Bertrand Delacretaz
Hi, On Fri, Dec 11, 2020 at 4:16 PM Nicola Cisternino wrote: > ...I can select single datasource using DS annotations: > @Reference(target = > "(&(objectclass=javax.sql.DataSource)(datasource.name=*source1*))") > private DataSource dataSource; > > But ... how can I select single datasource

Re: [mock] best way to mock http(s) endpoint

2020-12-01 Thread Bertrand Delacretaz
Hi, On Tue, Dec 1, 2020 at 10:24 AM Stefan Seifert wrote: > ...maybe wiremock? it does real HTTP communication but neatly integrated in > junit (i've not tried to use it with JUnit 5). > https://github.com/tomakehurst/wiremock ... I've been using wiremock in Sling,

Re: Getting SlingHttpServletRequest in a HTTP Whiteboard

2020-11-17 Thread Bertrand Delacretaz
Hi, On Mon, Nov 16, 2020 at 4:37 PM Roy Teeuwen wrote: > ...how can you register a Filter programmatically that its inside the > SlingHttpServletRequest chain?... As explained at https://sling.apache.org/documentation/the-sling-engine/filters.html , you need a javax.servlet.Filter OSGi service

Re: org.apache.sling.commons.metrics.MetricsService not supporting gauge type

2020-05-28 Thread Bertrand Delacretaz
Hi, On Wed, May 27, 2020 at 11:47 PM Allen Liu wrote: > ...I created a function in my monitoring service to register gauge as a > service... You should rather add a @Component(service=GaugeMonitor.class) annotation to your GaugeImpl, so that's it's registered as an OSGi service if your build

Re: Resource to json serializing

2020-05-14 Thread Bertrand Delacretaz
On Thu, May 14, 2020 at 9:25 AM Carsten Ziegeler wrote: > > I think it makes sense to discuss API options first, to avoid going back > and forth. .. Agreed. FWIW for the graphql-core module that I'm working on I need to convert arbitrary objects to and from JSON [1], I suppose that's part of

Re: Resource to json serializing

2020-05-12 Thread Bertrand Delacretaz
Hi, On Tue, May 12, 2020 at 4:10 PM JCR wrote: > ...the entire commons.json package > disappeared. Seemingly, this package has been replaced by Apache Johnzon > but I cannot find anything equivalent to JsonItemWriter. > > Anybody aware of its substitute?... I'm not sure if we have one, and

Re: Sling Slack Channel

2020-04-23 Thread Bertrand Delacretaz
Hi, On Wed, Apr 22, 2020 at 9:00 PM Sergiu Dumitriu wrote: > ...There is indeed a volume issue, and personally I think it's from the > fact that the list doesn't contain just direct email discussions, but > also all notifications from github and jira... Those should be easy to filter to

Re: Calling OSGi Service from JSP

2020-04-08 Thread Bertrand Delacretaz
Hi Juerg, On Wed, Apr 8, 2020 at 1:42 PM JCR wrote: > ...So this is the secret sauce that does the job. That needs to be added to > the project's pom.xml... Ok, glad you found out and sorry if our (lack of) examples made your life harder than it should be! -Bertrand

Re: Calling OSGi Service from JSP

2020-04-07 Thread Bertrand Delacretaz
Hi, On Tue, Apr 7, 2020 at 11:37 AM JCR wrote: > ...But what I > observe is, that MANIFEST.MF gets overriden on every change and even > package-info is present, the package in there gets set back to to private... It looks like your build setup is causing trouble. I recommend that you compare

Re: Repoinit Classpath

2020-04-07 Thread Bertrand Delacretaz
Hi, On Mon, Apr 6, 2020 at 11:07 PM Daniel Klco wrote: > > I'm looking into executing a Repoinit script from the classpath of a bundle > upon installation using the references property, but can't work out the > correct format So IIUC your scenario is as follows: 1) Your Bundle starts and

Re: Everyone ACL Read on /

2020-03-12 Thread Bertrand Delacretaz
Hi, On Thu, Mar 12, 2020 at 7:25 AM Oliver Lietz wrote: > On Wednesday, March 11, 2020 10:05:20 PM CET Cris Rockwell wrote: > > ...I am asking why this default exists. > > Is there is a rationale for the default or no?... > It is convenient for the Sling Starter and the sample applications...

Re: Mock resource resolver factory for use in OSGi?

2020-03-04 Thread Bertrand Delacretaz
Hi, On Wed, Mar 4, 2020 at 11:03 AM Christian Schneider wrote: > ...Now I also need to change nodes in the repository. Is there a way to test > this without the full sling pax exam testing?.. You might "manually" setup just the bundles that you need to get a ResourceResolverFactory service, but

Re: How to create a namespace mapping from a remote test?

2019-02-08 Thread Bertrand Delacretaz
Hi, On Fri, Feb 8, 2019 at 5:14 AM Julian Sedding wrote: > ...2. Deploy a custom bundle with a servlet that allows registering a > namespace... Yes and you might use tinybundles to create that bundle, to avoid too complex a setup. > ...I'm not sure how far the Teleporter junit rule would get

Re: Apache sling without file system

2018-10-18 Thread Bertrand Delacretaz
Hi, On Thu, Oct 18, 2018 at 4:33 PM Nikita wrote: > ...Please tell me whether it is possible to teach sling not to save data in > the > file system. I want to use only postgresql database to store files... As Chris says, Oak can use various databases for its backend storage. However by

Re: Status of sling provisioning model & documentation of models

2018-10-09 Thread Bertrand Delacretaz
Hi Joerg, On Sat, Oct 6, 2018 at 6:36 PM Jörg Hoh wrote: > ...it looks pretty slick and uses the sling feature module > (provisioning model? Unsure about the correct naming) to build the runtime > environment for the integration tests, see [1] and the pom [2]... That's provisioning model

Re: How do you identify the original content path of a request?

2018-09-18 Thread Bertrand Delacretaz
Hi, On Mon, Sep 17, 2018 at 6:13 PM Jason E Bailey wrote: > ...When I'm at a component level, I'm trying to identify what the original > content path/ resource is and there doesn't seem to be a way to do it... Doesn't HttpServletRequest.getRequestPath help? Maybe the info is lost during

Re: Custom error handling scripts that consider the request file extension?

2018-08-13 Thread Bertrand Delacretaz
Hi, On Thu, Aug 9, 2018 at 10:01 PM Eric Norman wrote: > ...Basically I would like to have the client get JSON back when something goes > wrong instead of html that won't parse as JSON. > > If no one disagrees, I can open a bug report and provide the proposed > changes to

Re: Sightly-based multi-module Maven archetype available?

2018-07-12 Thread Bertrand Delacretaz
Hi, On Thu, Jul 12, 2018 at 1:45 PM Greg Fullard wrote: > ...Has anyone else done this, that I'm just missing? If not, would anyone else > find it valuable if I work on something like that?... I don't think we have that and it's certainly welcome! -Bertrand

Re: RMI based ResourceProvider

2018-06-28 Thread Bertrand Delacretaz
Hi Jason, On Wed, Jun 27, 2018 at 11:57 PM Jason E Bailey wrote: > ...I was thinking, wouldn't it be cool if I had a ResourceProvider which > was a connected via RMI to a JCR Resource Provider for a specific path... I'm not sure if Oak still provides an RMI interface, but Jackrabbit did. In

Re: SlingHttpServletRequestWrapper Example?

2018-06-26 Thread Bertrand Delacretaz
Hi Cris, On Mon, Jun 25, 2018 at 9:55 PM Cris Rockwell wrote: > ...I would like to add a POST parameter in a Sling Filter using > SlingHttpServletRequestWrapper... As per https://sling.apache.org/apidocs/sling7/org/apache/sling/api/SlingHttpServletRequest.html you probably need to

Re: Sling and other database technologies

2018-06-04 Thread Bertrand Delacretaz
Hi Yuri, (dropping dev@, definitely a users question) Thanks for your interest! On Thu, May 31, 2018 at 4:16 PM, Yuri Simione wrote: > ...I would like to use Sling for other back-ends, not limited Jcr > repositories: how strong > is the relationship between Sling and Jcr? How hard is a new

Re: Suppress registerMimeType output on console

2018-04-23 Thread Bertrand Delacretaz
On Mon, Apr 23, 2018 at 9:59 AM, Christian Schneider wrote: > ...It seems the class checks if there is a log service installed and prints > out directly if not... Ah yes, MimeTypeServiceImpl.log(...) That code's been there forever [1] but I don't think it's useful, +1

Re: pom.xml for import with default Sling dependencies

2018-03-22 Thread Bertrand Delacretaz
Hi, On Thu, Mar 22, 2018 at 9:38 AM, Evgeniy Fitsner wrote: > ...Sling Framework has OOTB dependencies. > Maybe we already have pom.xml file with this dependencies which I could > import into my project... The parent pom has http://github.com/apache/sling-parent provides

Re: Sling POST servlet and empty arrays?

2018-03-05 Thread Bertrand Delacretaz
Hi, On Thu, Mar 1, 2018 at 5:07 AM, John Logan wrote: > Hi, I'm trying to create node with an empty String[] property via the Sling > POST servlet... ... > Is there a more succinct and accepted way?... I don't think so, in general the convention is that empty property

Re: Deprecation of SlingRepository.loginAdministrative()

2018-02-06 Thread Bertrand Delacretaz
On Tue, Feb 6, 2018 at 1:02 PM, Jörg Hoh wrote: > ...Long story short: Is the loginAdministrative() method planned to be > removed? If yes, we should clearly give best practices and document how it > can be replaced even in the non-trivial cases. If it's going to stay, we

Re: Integration test depending of Sling job

2017-12-20 Thread Bertrand Delacretaz
Hi, On Wed, Dec 20, 2017 at 3:16 PM, Johan Ruttens wrote: >... Basically I'm searching for a better way to determine when the job is > finished I don't remember the details off the top of my head but I suppose OSGi events are sent to indicate the job's progress -

Re: Setting sling:resourceType on a node as part of repo initialization?

2017-12-16 Thread Bertrand Delacretaz
Hi John, On Fri, Dec 15, 2017 at 8:00 PM, John Logan wrote: > It wouldn't work if I had any other required properties that needed to be > mapped from the node... > For that, the repoinit language would need to support general property > initialization, and I'm not >

Re: Setting sling:resourceType on a node as part of repo initialization?

2017-12-15 Thread Bertrand Delacretaz
Hi John, On Fri, Dec 15, 2017 at 1:44 AM, John Logan wrote: >... I'm creating a node at repository initialization time using a "create >path" statement in my repoinit > block, and wondering what the best practice would be for also setting the > sling:resourceType on >

Re: [ANN] New Apache Sling PMC Chair: Robert Munteanu

2017-11-16 Thread Bertrand Delacretaz
On Thu, Nov 16, 2017 at 3:25 PM, Carsten Ziegeler wrote: > ...it's my pleasure to announce that Robert took up the role as our new PMC > chair Congrats Robert and thank you for taking up this job! And many thanks Carsten for several years of service! -Bertrand

Re: SlingPostServlet File Upload Section Documentation Needs an Update

2017-10-06 Thread Bertrand Delacretaz
Hi, On Thu, Oct 5, 2017 at 10:40 AM, Gaurav Sachdeva wrote: > ..I have updated the file and created a Pull Request for the same... Thanks, I have commented at https://github.com/apache/sling-site/pull/2 -Bertrand

Re: Rendering a Resource inside Sling / OSGi Service

2017-08-21 Thread Bertrand Delacretaz
Hi, On Sat, Aug 19, 2017 at 5:59 PM, Andreas Schaefer wrote: > ...I use a SlingRequestProcessor but then I need to provide my own > implementation > of an Http Servlet Request and Response... http://sling.apache.org/documentation/bundles/servlet-helpers.html is probably what

CVE-2016-5394 : Apache Sling XSS vulnerability

2017-07-18 Thread Bertrand Delacretaz
Severity: Important Vendor: The Apache Software Foundation Versions Affected: Sling XSS Protection API 1.0.8 Description: The encoding done by the XSSAPI.encodeForJSString() method is not restrictive enough and for some input patterns allows script tags to pass through unencoded, leading to

CVE-2016-6798 : Apache Sling XXE vulnerability

2017-07-18 Thread Bertrand Delacretaz
Severity: Important Vendor: The Apache Software Foundation Versions Affected: Sling XSS Protection API 1.0.0 Description: The method XSS.getValidXML() uses an insecure SAX parser to validate the input string, which allows for XXE [0] attacks in all scripts which use this method to validate user

Re: Adding bootdelegation during startup requires restart of instance

2017-07-10 Thread Bertrand Delacretaz
Hi Joerg, On Wed, Jul 5, 2017 at 4:06 PM, Jörg Hoh wrote: > ...What I did: > * Place all files in place > * Added my bootdelegation statements to ${sling.home}/sling.properties > * started up the instance... AFAIK if you don't have a pre-existing sling state folder that

[oak] FYI, Oakathon in Basel in August

2017-05-29 Thread Bertrand Delacretaz
Hi Sling users, FYI the Oak team just announced a hackathon in Basel, August 21-25. I'm relaying the info here as Sling users might be interested in contributing to our storage layers or better understanding how they work. Please ask any specific questions on the oak-dev list. See

Re: Sling pipes release

2017-04-28 Thread Bertrand Delacretaz
On Fri, Apr 28, 2017 at 12:28 AM, Correia wrote: > ...The "ignoreImportProviders=json" is not a solution because I use JSON for > all my content... That option is per path, so I suppose if you isolate those .json files in a specific path that should work - but

Re: Sling JSON i18n

2017-04-27 Thread Bertrand Delacretaz
Hi, On Thu, Apr 27, 2017 at 1:01 PM, Correia wrote: > ...I'm importing the files to the JCR repository via maven and i'm using JSON > instead of XML... Ah ok got it, your problem is how to provide those json files as initial content in your source code,

Re: Sling JSON i18n

2017-04-27 Thread Bertrand Delacretaz
On Thu, Apr 27, 2017 at 12:14 PM, Correia wrote: > ...What I wanted to do is having a pure JSON file like: > { > "hello": "Hello", > "hello2": "Hello 2" > } > > Is this possible... Yes, as described in the docs. The corresponding test is

Re: Securing a Servlet w/o Resource

2017-04-11 Thread Bertrand Delacretaz
Hi, On Mon, Apr 10, 2017 at 10:15 PM, Andreas Schaefer Sr. wrote: > ...If I have a servlet that is not based on a resource how would > I secure access in Sling?.. IIUC in your code you check for membership in a specific group - that would probably work but it might be more

Re: Fling Installation on Trunk

2017-03-29 Thread Bertrand Delacretaz
On Tue, Mar 28, 2017 at 8:48 PM, Oliver Lietz wrote: > -...The Fling sample is using modules (from trunk) which cannot be part of > Launchpad... > Nevertheless it works for others and some find it quite useful... I have added a warning about snapshots to the Fling sample

Re: Best Sling samples for a beginner to look at?

2017-03-29 Thread Bertrand Delacretaz
On Tue, Mar 28, 2017 at 7:15 PM, Andreas Schaefer Sr. wrote: > ...Slingbucks is ok but it is outdated (as far as I can tell) using ESPs > and not using HTL and Sling Models FWIW it's always been important for Sling to avoid imposing too much in terms of scripting languages

Re: Export content as JSON ready to be imported

2017-03-28 Thread Bertrand Delacretaz
Hi, On Tue, Mar 28, 2017 at 11:25 AM, Guillaume Lucazeau wrote: > ...Considering the lack of responses, Re-importing exported JSON, including > the priviliges, doesn't seem to be a feature that lots of people need, so I > will try to patch the importer on my own :).. I

Re: Best Sling samples for a beginner to look at?

2017-03-28 Thread Bertrand Delacretaz
Hi Greg, On Tue, Mar 28, 2017 at 6:21 AM, Greg Fullard wrote: > ...The only ones that have been touched in the last year are: > - Slingshot > - Slingbucks > - Fling (the one Andy mentioned) ... I can really only speak about Slingbucks - that one is relevant and up to

Re: [1.0.0] Sling metrics one bundle works other does not register?

2017-03-22 Thread Bertrand Delacretaz
On Fri, Mar 17, 2017 at 11:34 PM, nino martinez wael wrote: > ...The metric service are discovered as it should but this line below, never > impacts the sling metrics frontend listing: > getMetricsService().counter("Webadmin.renderings").increment(); .. Did you

Re: How to set up a servlet to return HTTP error status instead of redirecting to the login form?

2017-03-01 Thread Bertrand Delacretaz
On Tue, Feb 28, 2017 at 10:17 PM, John Logan wrote: > ...The SlingAuthenticator.doLogin() method first > calls AuthUtil.isBrowserRequest(), and if the return value is true, then > calls AuthUtil.isAjaxRequest(). This method returns true if the following > header is

Re: How to set up a servlet to return HTTP error status instead of redirecting to the login form?

2017-02-28 Thread Bertrand Delacretaz
Hi John, On Mon, Feb 27, 2017 at 10:11 PM, John Logan wrote: > ...I receive 302 if the curl request includes the user agent, and > 401 otherwise AFAIK it's the AuthUtil.isBrowserRequest method [1] that makes this decision. > I don't think this helps for browser

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-02-01 Thread Bertrand Delacretaz
Hi Lance, On Tue, Jan 31, 2017 at 10:25 PM, lancedolan wrote: > Aha! Solved Here's my solution for posterity thanks for sharing! Note that (and maybe I should have tried that earlier, sorry) you can also use our planets resource example on Sling 8 by building it

Re: Sling Health Checks

2017-01-31 Thread Bertrand Delacretaz
Hi. On Tue, Jan 31, 2017 at 9:23 AM, Georg Henzler wrote: > ...nobody stops you to make the HC > component also provide an additional, custom MBean that shares some > additional result properties of the HC execution to other services Or maybe put that additional

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-30 Thread Bertrand Delacretaz
Hi Lance, On Fri, Jan 27, 2017 at 10:27 PM, lancedolan wrote: > ...Bertrand suggests creating a ResourceProvider, as in the example here [1]. > However, that uses the spi package which is not in version 2.9.0 of > org.apache.sling.api, and thus, not available to me in

Re: Not-sticky sessions with Sling?

2017-01-19 Thread Bertrand Delacretaz
Hi Lance, On Wed, Jan 18, 2017 at 11:21 PM, lancedolan wrote: > ...Bertrand, I'd feel selfish taking you up on your offer to build this for > me. > Yet I'd be a fool to not at least partner with you to get it done. Should we > correspond outside this mail list?... I

Re: Not-sticky sessions with Sling?

2017-01-18 Thread Bertrand Delacretaz
On Wed, Jan 18, 2017 at 12:48 PM, Chetan Mehrotra wrote: > ...there is a "asyncDelay" setting in DocumentNodeStore which > defaults to 1 sec. Currently its not possible to modify it via OSGi > config though But Lance could patch [1] to experiment with different

Re: Not-sticky sessions with Sling?

2017-01-18 Thread Bertrand Delacretaz
Hi Lance, On Wed, Jan 18, 2017 at 2:43 AM, lancedolan wrote: > ...It pretty much always takes 1 second exactly for a Sling instance to get > the > latest revision, and thus the latest data. When not 1 second, it takes 2 > seconds exactly I don't know enough about Oak

Re: Not-sticky sessions with Sling?

2017-01-16 Thread Bertrand Delacretaz
Hi, On Mon, Jan 16, 2017 at 9:16 PM, lancedolan wrote: > ...this probably shoots down our entire Sling > proof of concept project... That would be a pity, as I suppose you're starting to like Sling now ;-) > ...Is there any way > to force all reads to read the most

Re: How to change run mode in Sling8

2017-01-13 Thread Bertrand Delacretaz
Hi Lance, On Fri, Jan 13, 2017 at 1:54 AM, lancedolan wrote: > ...It's just some text files that neatly describe > which OSGI bundles and configurations (including run modes) you'd like > present in a new .war file which is then built using *actual* sling > artifacts from

Re: Lock on LOCAL_REVISONS table

2016-11-29 Thread Bertrand Delacretaz
Hi, On Tue, Nov 29, 2016 at 4:39 PM, JMR wrote: > ...Do you know this kind of problem and how to solve it?... Maybe someone here can help (I can't) but this looks more like a pure Jackrabbit problem, maybe related to https://issues.apache.org/jira/browse/JCR-3738 ?

Re: Need help in implementing Sling Context Aware Configuration

2016-11-20 Thread Bertrand Delacretaz
On Fri, Nov 18, 2016 at 8:36 AM, Gopal Agarwal wrote: ... > ResourceResolver resourceResolver = request.getResourceResolver(); > Resource contentResource = (Resource) > resourceResolver.getResource("/content/ubi/test"); > ValueMap props = >

Re: Creating a service user for your own bundle

2016-11-07 Thread Bertrand Delacretaz
On Mon, Nov 7, 2016 at 12:19 PM, Oliver Lietz wrote: > .. and a service which executes repoinit statements at runtime (not sure > if Carsten already created an issue for that) You can already do that today by passing the output of a RepoInitParser to a

Re: Creating a service user for your own bundle

2016-11-07 Thread Bertrand Delacretaz
On Mon, Nov 7, 2016 at 12:01 PM, Carsten Ziegeler <cziege...@apache.org> wrote: > Bertrand Delacretaz wrote >>... That's a nice model but IIUC Carsten earlier in this thread OSGi >> capabilities cannot be created at runtime so that won't work for >> service users or ac

Re: Creating a service user for your own bundle

2016-11-07 Thread Bertrand Delacretaz
On Mon, Nov 7, 2016 at 11:20 AM, Oliver Lietz wrote: > ...If a bundle requires a capability the system has to provide that capability > otherwise the bundle would not resolve That's a nice model but IIUC Carsten earlier in this thread OSGi capabilities cannot be

Re: Creating lots of nodes

2016-10-31 Thread Bertrand Delacretaz
Hi, On Fri, Oct 28, 2016 at 4:55 PM, Christoph Thodte wrote: > ...My importer is very fast for the 30.000 nodes than it will be very slow > down It's not likely that Sling is the cause of this, but to find out the best way by far is profiling or at least

Re: OO style inheritance of master website to child websites

2016-10-20 Thread Bertrand Delacretaz
Hi, On Thu, Oct 20, 2016 at 2:28 PM, Carsten Steckel wrote: > ...Inheritance comes to mind where a Master website is defined and every child > inherits its masters config, content, assets, ... but overwrites if > necessary... The Sling Resource Merger [1] goes in that

Re: [Service Ranking] WebDAV Handlers are being managed in reverse order of service ranking.

2016-09-14 Thread Bertrand Delacretaz
Hi, On Tue, Sep 13, 2016 at 10:17 AM, Anshika Agarwal wrote: >> ...the lowest ranked service get the chance to process first. >> In contradiction, the sling documentation states that it should be that >> higher ranking is given preference over lower one. See [3] ...

Re: User Defined Token Substitution in Content

2016-09-12 Thread Bertrand Delacretaz
Hi Adam, On Sun, Sep 11, 2016 at 10:19 PM, Adam Henderson wrote: > .../content/products/product1 > - description : string = “This is the description of Product 1, hurry > - discount of $JCR[‘/content/promotions/discounts:holidayspecialdiscount’]% > applies!”

Re: Sling in Karaf not working well

2016-09-06 Thread Bertrand Delacretaz
Hi, On Tue, Sep 6, 2016 at 9:32 AM, Mike Hummel wrote: > ...I try to run sling in karaf but have an issue with the Authentication > Support Did you use the Karaf features provided under https://svn.apache.org/repos/asf/sling/trunk/karaf/ ? I don't think they are released yet

Re: Custom installer: watch for data files to transform them in resources

2016-08-02 Thread Bertrand Delacretaz
Hi Guillaume, On Mon, Aug 1, 2016 at 4:50 PM, Guillaume Lucazeau wrote: > ...I was thinking I could upload JSON files in a watched folder, containings > information for the command (type, root path, data to update etc.) and that > a service could read them, and create

Re: One Resource to multiple views in different locations

2016-07-12 Thread Bertrand Delacretaz
On Tue, Jul 12, 2016 at 3:56 PM, Jason E Bailey wrote: > ...When discussing different views for a resource, the key thing is that a > URL should define one view. If you want a resource to be displayed in > different ways, you want to modify the URL to be different. Either

Re: Deploying a bundle with configuration removes other configuration saved with Felix web console

2016-07-06 Thread Bertrand Delacretaz
Hi, On Wed, Jul 6, 2016 at 11:17 AM, Guillaume Lucazeau wrote: > ...3. I deploy bundle-ui with the Maven Sling plugin. During deployment, I see > it removes the configuration previously set... ... > [JcrInstaller.1] INFO o.a.s.i.p.jcr.impl.JcrInstaller - Deleting >

Re: Deploying a bundle with configuration removes other configuration saved with Felix web console

2016-07-06 Thread Bertrand Delacretaz
Hi Guillaume, On Wed, Jul 6, 2016 at 9:01 AM, Guillaume Lucazeau wrote: > ...I've found out that if a configuration is initialized through a > sling:OsgiConfig node in a config.json file in /libs/myApp/install, the > configuration (even modified through the web console) is

Re: Response content type when url has no extension

2016-06-23 Thread Bertrand Delacretaz
Hi, On Wed, Jun 22, 2016 at 4:19 PM, Jason Bailey wrote: > ...Under > org.apache.sling.servlets.resolver > for the property servletresolver.defaultExtensions ... This is not for the use case discussed here, as explained in that parameter's OSGi config description:

Re: Response content type when url has no extension

2016-06-22 Thread Bertrand Delacretaz
Hi, On Wed, Jun 22, 2016 at 12:39 AM, Ben Fortuna wrote: > ...Should this be handled in sling or is it common practice to use another > mechanism to redirect / to /index.html? ... I suspect people often use front-end rewriters like mod_rewrite to add extensions to URLs

Re: Use of request/resource wrappers

2016-04-27 Thread Bertrand Delacretaz
Hi, On Wed, Apr 27, 2016 at 11:16 AM, Guillaume Lucazeau wrote: > ...My application is supposed to have a "presentation mode" that disables > editing capabilities on content Can't you use access control for that? For example give read only access to the anonymous user

Re: [import] how to POST ordered structures

2016-04-20 Thread Bertrand Delacretaz
Hi Nicolas, On Wed, Apr 20, 2016 at 11:11 AM, Nicolas Peltier wrote: > ...so to me ootb i have 2 choices... OOTB yes, the alternative being to extend the POST servlet to do what you need, as it's generally useful. -Bertrand

Re: [import] how to POST ordered structures

2016-04-20 Thread Bertrand Delacretaz
Hi, On Tue, Apr 19, 2016 at 6:11 PM, Nicolas Peltier wrote: > json objects’ key values are not ordered, so does that mean there is no choice > but to use xml to POST ordered structure?... Could you use arrays instead of objects in your POST requests to keep ordering? I

Re: Websockets in Sling

2016-04-05 Thread Bertrand Delacretaz
On Tue, Apr 5, 2016 at 12:03 PM, Olaf wrote: > ...I've gotten it to work by wrapping the init() method in a try/catch block > temporarily setting the context class loader to the current bundle's class > loader. > This did the trick Cool! Is this something worth contributing

Re: Websockets in Sling

2016-04-05 Thread Bertrand Delacretaz
Hi Olaf, On Tue, Apr 5, 2016 at 11:11 AM, Olaf wrote: > ...Has anyone implemented a server-side websocket in Sling? While the jetty > API > is around, I'm not sure how to make best use of it and how this works in > conjunction with @SlingServlet & co A few experiments exist,

Re: New to Sling

2016-03-31 Thread Bertrand Delacretaz
Hi, On Wed, Mar 30, 2016 at 9:56 PM, Raymond Auge wrote: > Used a Sling thing today for the first time! OSGi-Mocks [1] ... Welcome! Our docs are not always fantastic, so feel free to ask questions here. We have lots of samples and examples around. -Bertrand

Re: Sling 8 standalone jar

2016-01-18 Thread Bertrand Delacretaz
On Mon, Jan 18, 2016 at 2:17 PM, Roll, Kevin wrote: > ...I'll take a look at the plugin BTW there are some docs at https://sling.apache.org/documentation/development/slingstart.html but I haven't checked recently if they are up to date - the Truth Is In The Code as

Re: Sling 8 standalone jar

2016-01-18 Thread Bertrand Delacretaz
Hi, On Fri, Jan 15, 2016 at 9:28 PM, Roll, Kevin wrote: > We build our own standalone jar which includes an overriden Main class as > well as several custom bundles that contain our functionality... I'm curious why you needed a custom Main class - not saying it's wrong but

Re: Fake request/response classes

2016-01-14 Thread Bertrand Delacretaz
On Wed, Jan 13, 2016 at 11:58 PM, Stefan Seifert wrote: > ... https://issues.apache.org/jira/browse/SLING-5428 ... Thanks for this new servlet-helpers module! I have mentioned it in the SlingRequestProcessor javadocs (rev 1724549) and added minimal docs at

Re: How to create a proper System User for Services?

2016-01-06 Thread Bertrand Delacretaz
Hi, On Wed, Jan 6, 2016 at 11:35 AM, olimination wrote: > ...For creating such service users we still need to do a > ".loginAdministrative()", but this method is actually deprecated. How do > you handle this? Should we use then the JCR API directly instead of the >

Re: How to create a proper System User for Services?

2015-12-22 Thread Bertrand Delacretaz
Hi, On Fri, Dec 18, 2015 at 10:35 AM, Robert Munteanu wrote: > ...We are also working on a solution for a more declarative approach, see > https://issues.apache.org/jira/browse/SLING-5355 ... And you could use that code [1] as an example to create system users

Re: How to create a proper System User for Services?

2015-12-21 Thread Bertrand Delacretaz
Hi, On Mon, Dec 21, 2015 at 2:29 PM, olimination wrote: > ...According to SLING-5355 the Provisioning Model will be extended with this > ability to create service users. Would it also be an idea to offer such > possibility during Content Loading?... The code I'm writing

Re: Fake request/response classes

2015-12-21 Thread Bertrand Delacretaz
Hi, On Mon, Dec 21, 2015 at 4:30 PM, Stefan Seifert wrote: > ...here are the classes > https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock/src/main/java/org/apache/sling/testing/mock/sling/servlet > > most of them have no dependencies except some to

Re: Upgrading an installation

2015-11-02 Thread Bertrand Delacretaz
Hi, On Fri, Oct 30, 2015 at 8:16 PM, Roll, Kevin wrote: > ...The problem comes when we upgrade to a new version and provide a > newer standalone launcher Could you provide a minimal example (source code) that demonstrates the problem? I'm not saying it does not

Re: Control JcrInstaller (OsgiInstaller) Behavior of Bundle Updating vs Installing

2015-09-22 Thread Bertrand Delacretaz
On Tue, Sep 22, 2015 at 8:36 AM, Julian Sedding wrote: > ...By specifying the desired deployment state in a provisioning model file, > the installer could make sure it has all required artifacts available (e.g. > local folder, maven repository, etc). Once that is the case it

Re: Further clarification of SLING-2512

2015-08-24 Thread Bertrand Delacretaz
On Mon, Aug 24, 2015 at 4:08 PM, steven.walters steven.walt...@icidigital.com wrote: ...If the intent was to not allow absolute URLs in the XML format to exclude the possibility of arbitrary content, then that should've been the approach taken instead of the current approach of simply not

Re: Further clarification of SLING-2512

2015-08-24 Thread Bertrand Delacretaz
Hi, On Fri, Aug 21, 2015 at 3:13 AM, Steven Walters steven.walt...@icidigital.com wrote: ...Is there any additional detail as to why SLING-2512 is a bug exactly, in that it is classified as should not be allowed?... I had another look and the functionality that SLING-2512 disables could in

Re: Further clarification of SLING-2512

2015-08-21 Thread Bertrand Delacretaz
Hi, On Fri, Aug 21, 2015 at 3:13 AM, Steven Walters steven.walt...@icidigital.com wrote: ...as a result, this completely blocks being able to have absolute URLs in the imported XML content in this scenario... Could you provide a minimal example of what doesn't work for you? Maybe an example

Re: quick way to see all service user mappings?

2015-08-06 Thread Bertrand Delacretaz
On Thu, Aug 6, 2015 at 6:36 PM, Rob Ryan rr...@adobe.com wrote: There is also /system/console/status-Configurations where searching for user.mapping will find the mappings It will find the mapping configurations, right? The SLING-4930 InventoryProvider shows the actual mappings used by

Re: Greetings and IRC consult

2015-07-06 Thread Bertrand Delacretaz
On Mon, Jul 6, 2015 at 3:37 PM, Jason Bailey jason.bai...@sas.com wrote: ...anything that could actually create an actual sling community would be a positive step Why do you think such a community cannot happen here? Questions and discussions are welcome, we do our best to reply, and the

Re: Greetings and IRC consult

2015-07-06 Thread Bertrand Delacretaz
Hi, On Mon, Jul 6, 2015 at 8:57 PM, Jason Bailey jason.bai...@sas.com wrote: ...It's not like I don't think a community can happen out of this mailing list. It's that I don't believe that it has happened for Sling yet I tend to agree, but given the current small size of the Sling

Re: register sling post processor by resourcetype. what is the state?

2015-05-27 Thread Bertrand Delacretaz
Hi, On Fri, May 22, 2015 at 10:55 AM, Santiago García Pimentel santiago.pimen...@netcentric.biz wrote: ...I've been looking at sling post processor and I noticed that the idea of being able to register them by resourcetype has been raised in more than once occasion [0],[1]... I don't think

Re: mime type detection

2015-05-04 Thread Bertrand Delacretaz
Hi, On Mon, May 4, 2015 at 1:36 PM, Satya Deep Maheshwari connus...@gmail.com wrote: ...How about modifying the existing SlingTikaDetector itself and adding a mechanism in it to resort to inputstream based mime-type detection if name based detection draws a null I don't think we want to

Re: Initialize OBR configuration in a crankstart driven sling instances

2015-03-26 Thread Bertrand Delacretaz
On Wed, Mar 25, 2015 at 11:46 PM, Bruce Edge bruce.e...@nextissuemedia.com wrote: ...Perhaps the right question is, how does one initialize the configuration for an OBR, independent of startup method?... Ah I get it now, you want to set an OSGi config from code, that's used to setup an OBR?

Re: Initialize OBR configuration in a crankstart driven sling instances

2015-03-25 Thread Bertrand Delacretaz
On Wed, Mar 25, 2015 at 7:17 PM, Bruce Edge bruce.e...@nextissuemedia.com wrote: With the launchpad one could set launchpad/src/main/sling/common.properties:obr.repository.url to a custom URL to specify a custom OBR configuration... That doesn't work with crankstart so far, as it only knows

[ANN] ApacheCon, Austin, Texas, April 13th - 16th, 2015

2015-03-20 Thread Bertrand Delacretaz
(Bcc dev@) Dear Apache Sling enthusiast, In just a few weeks, we'll be holding ApacheCon in Austin, Texas, and we'd love to have you in attendance. You can save $300 on admission by registering NOW, since the early bird price ends on the 21st. Register at http://s.apache.org/acna2015-reg

Re: Moving nodes using Transformer

2015-02-16 Thread Bertrand Delacretaz
Hi, On Fri, Feb 13, 2015 at 2:21 PM, Omar Crea omar.c...@thyme.it wrote: ...What I want to achieve, within my html page, is to move certain nodes (stylesheets and javascript) from the middle of the HTML document to the head element Can this task be achieved using a Transformer?... You

  1   2   3   >