[jira] [Commented] (SLING-11141) Make compatible with org.apache.felix.healthcheck.generalchecks version 3.x

2022-06-30 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-11141:
---

Let's move forward, we can deprecate this ScriptedHealthCheck in the next 
release and for this release, it will work side by side with the Felix 3.x one. 

> Make compatible with org.apache.felix.healthcheck.generalchecks version 3.x
> ---
>
> Key: SLING-11141
> URL: https://issues.apache.org/jira/browse/SLING-11141
> Project: Sling
>  Issue Type: Bug
>Reporter: Eric Norman
>Assignee: Eric Norman
>Priority: Major
> Fix For: Health Check Support 1.0.8
>
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> After updating to the org.apache.felix.healthcheck.generalchecks version 
> 3.0.0 release, the org.apache.sling.hc.support bundle fails during the 
> feature analyzer with this error:
> {noformat}
> [ERROR] [bundle-packages] org.apache.sling:org.apache.sling.hc.support:1.0.6: 
>  is importing package(s) org.apache.felix.hc.generalchecks.util in start 
> level 20 but no bundle is exporting these for that start level.
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (SLING-9662) Introduce an URI Mapping SPI

2021-10-27 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9662:
--

[~cziegeler] yes this part is still missing (while the first part SLING-9745 is 
done) - IMHO we should implement it but since we we said we move it before 
authentication, the change become quite big... maybe we should change strategy 
and start KISS and leave it "after authentication" that way the change would by 
far not be as impactful.

> Introduce an URI Mapping SPI
> 
>
> Key: SLING-9662
> URL: https://issues.apache.org/jira/browse/SLING-9662
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> _an earlier version used the terms ResourceUri/ResourceToUriMapper (updated 
> this description during the discussion)_ 
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> Prerequisite *SlingUri:* (SLING-9745 to be completed first)
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *SlingUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any SlingUriMapper chain member may or may not 
> make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the SlingUriMapper with 
> the highest service ranking and rr.map() passes through the 
> chain starting at the SlingUriMapper with the lowest service 
> ranking
> *PathToUriMappingService:* 
> The new OSGi service to provide path to URI resolution and path to URI 
> mapping. The methods rr.resolve() and rr.map() and should delegate to this 
> service.
>  
> _Mailing List References:_
>  [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
>  [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-10871) Add builder API for request/resource objects

2021-10-27 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-10871:
---

[~cziegeler] Just came across 
[RequestPathInfoImpl|https://github.com/apache/sling-org-apache-sling-api/blob/master/src/main/java/org/apache/sling/api/request/builder/impl/RequestPathInfoImpl.java]
 that is already merged (but not released), shouldn't we use 
[SlingUri|https://github.com/apache/sling-org-apache-sling-api/blob/master/src/main/java/org/apache/sling/api/uri/SlingUri.java]
 that implements RequestPathInfo as well instead to avoid duplicate code? 
[SlingHttpServletRequestBuilder|https://github.com/apache/sling-org-apache-sling-api/blob/master/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletRequestBuilder.java]
 would not have to change (it's simplifying the impl only, it could provide the 
method {{withSlingUri}} but maybe it's not clear then what happens in case a 
URI with a host is used)

> Add builder API for request/resource objects
> 
>
> Key: SLING-10871
> URL: https://issues.apache.org/jira/browse/SLING-10871
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: API 2.24.0
>
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> As discussed in SLING-10840 and in [1] we should a builder api for Sling http 
> servlet request/response objects which do not have a real request/response  
> as a backing
> [1] 
> https://lists.apache.org/thread.html/r7c66bcfb66b30f801f6e3a17d42b437cfeca7f233d240d965f471dfd%40%3Cdev.sling.apache.org%3E



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-10030) Add an optional ranking as a property for PostOperation implementation

2021-01-07 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-10030:
---

[~tomas.almeida] The current behaviour is certainly not ideal, a PR for this 
would be welcome. 

bq. bindPostOperation method will store all PostOperations by order of ranking 
(higher first), PostOperations with no ranking will be added to the end by 
order of calling.

If no ranking property is present we should follow the default [SRC 
semantics|https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-reference.cardinality]
 and assume 0. Also {{ReferencePolicyOption.GREEDY}} should be added to 
https://github.com/apache/sling-org-apache-sling-servlets-post/blob/c8b623f88ae9a2e087756172d6ad368a655b94f7/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java#L535
 to ensure all service updates are reflected to the SlingPostServlet.

> Add an optional ranking as a property for PostOperation implementation 
> ---
>
> Key: SLING-10030
> URL: https://issues.apache.org/jira/browse/SLING-10030
> Project: Sling
>  Issue Type: Improvement
>Affects Versions: Servlets Post 2.3.36
>Reporter: Tomás Dias Almeida
>Priority: Major
>
> Given the case, a PostOperation PO1 implementation is provided for a given 
> operation, but it does not solve a particular need. I would like to be able 
> to create another PostOperation implementation PO2 with a higher ranking and 
> replace the PO1.
> h2. *Current status*
> h3. *Last wins condition*
> [org.apache.sling.servlets.post.impl.SlingPostServlet|https://github.com/apache/sling-org-apache-sling-servlets-post/blob/master/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java]
>  can only store one PostOperation per operation as it is stored like
>  
> {code:java}
> private final Map postOperations = new 
> HashMap<>();{code}
>  
> This map is filled by the binding function per order of activation
>  
> {code:java}
> protected void bindPostOperation(final PostOperation operation, final 
> Map properties) {
> final String operationName = (String) 
> properties.get(PostOperation.PROP_OPERATION_NAME);
> if ( operationName != null && operation != null ) {
> synchronized (this.postOperations) {
> this.postOperations.put(operationName, operation);
> }
> }
> }{code}
>  
> If two classes provide an implementation for the given operation, we run into 
> a concurrency problem and the last activated component "wins" the race and 
> will be used.
> h3. Incorrect map if a component is stopped
> The map is updated using an unbinding method, that relies on the axiom that 
> there is only one PostOperation per operation.
>  
> {code:java}
> protected void unbindPostOperation(final PostOperation operation, final 
> Map properties) {
> final String operationName = (String) 
> properties.get(PostOperation.PROP_OPERATION_NAME);
> if ( operationName != null ) {
> synchronized (this.postOperations) {
> this.postOperations.remove(operationName);
> }
> }
> }
> {code}
> And so, if we have the following scenario: 
>  
>  # PostOperation P1 is activated for operation P
>  # PostOperation P2 is activated for operation P
>  # 
> [SlingPostServlet|https://github.com/apache/sling-org-apache-sling-servlets-post/blob/master/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java]
>  stores P2 as PostOperation for P (as described above)
>  # P2 is stopped for any reason
>  # 
> [SlingPostServlet|https://github.com/apache/sling-org-apache-sling-servlets-post/blob/master/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java]
>  has no PostOperation set for P, but P1 could be the right one.
> h2. Proposal
> Each PostOperation can provide an optional "operation.ranking" integer 
> property.
> bindPostOperation method will store all PostOperations by order of ranking 
> (higher first), PostOperations with no ranking will be added to the end by 
> order of calling.
> unbindPostOperation removes the given PostOperation of the sorted list.
>  
>  
> If you believe that is a good idea, I can provide an implementation to 
> discuss the solution.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-9859) Avoid import of package of o.a.felix.hc.generalchecks.util

2020-10-27 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler resolved SLING-9859.
--
Resolution: Fixed

Fixed in 
[7c331cde0c821c|https://github.com/apache/sling-org-apache-sling-hc-support/commit/7c331cde0c821c35e60cd2c8e7323a4e765f5ba4]

> Avoid import of package of o.a.felix.hc.generalchecks.util
> --
>
> Key: SLING-9859
> URL: https://issues.apache.org/jira/browse/SLING-9859
> Project: Sling
>  Issue Type: Improvement
>  Components: Health Check
>Affects Versions: Health Check Support 1.0.6
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Health Check Support 1.0.8
>
>
> Depending on setup, some Sling instances do not make 
> org.apache.felix.hc.generalchecks.util available to bundle 
> org.apache.sling.hc.support du to API region restrictions. To ensure 
> org.apache.sling.hc.support  can be used in all setups, use 
> Conditional-Package to inline the util package



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-9859) Avoid import of package of o.a.felix.hc.generalchecks.util

2020-10-27 Thread Georg Henzler (Jira)
Georg Henzler created SLING-9859:


 Summary: Avoid import of package of o.a.felix.hc.generalchecks.util
 Key: SLING-9859
 URL: https://issues.apache.org/jira/browse/SLING-9859
 Project: Sling
  Issue Type: Improvement
  Components: Health Check
Affects Versions: Health Check Support 1.0.6
Reporter: Georg Henzler
Assignee: Georg Henzler
 Fix For: Health Check Support 1.0.8


Depending on setup, some Sling instances do not make 
org.apache.felix.hc.generalchecks.util available to bundle 
org.apache.sling.hc.support du to API region restrictions. To ensure 
org.apache.sling.hc.support  can be used in all setups, use Conditional-Package 
to inline the util package



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (SLING-7246) Document changes for SLING-6855 and SLING-6946

2020-10-27 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-7246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler closed SLING-7246.


> Document changes for SLING-6855 and SLING-6946
> --
>
> Key: SLING-7246
> URL: https://issues.apache.org/jira/browse/SLING-7246
> Project: Sling
>  Issue Type: Task
>  Components: Health Check
>Reporter: Karl Pauls
>Assignee: Georg Henzler
>Priority: Major
>
> Moving out the pending documentation for SLING-6855 and SLING-6946 to this 
> issue. [~henzlerg], please follow-up wrt. the missing documentation (if any) 
> using this issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-7246) Document changes for SLING-6855 and SLING-6946

2020-10-27 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-7246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-7246:
-
Fix Version/s: (was: Health Check Core 1.2.12)

> Document changes for SLING-6855 and SLING-6946
> --
>
> Key: SLING-7246
> URL: https://issues.apache.org/jira/browse/SLING-7246
> Project: Sling
>  Issue Type: Task
>  Components: Health Check
>Reporter: Karl Pauls
>Assignee: Georg Henzler
>Priority: Major
>
> Moving out the pending documentation for SLING-6855 and SLING-6946 to this 
> issue. [~henzlerg], please follow-up wrt. the missing documentation (if any) 
> using this issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-9777) Better handling for invalid URIs when using SlingUri (special characters, spaces)

2020-10-08 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler resolved SLING-9777.
--
Resolution: Fixed

> Better handling for invalid URIs when using SlingUri (special characters, 
> spaces) 
> --
>
> Key: SLING-9777
> URL: https://issues.apache.org/jira/browse/SLING-9777
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Affects Versions: API 2.23.0
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: API 2.23.2
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> SlingUri should not "have an opinion" about when URIs should be encoded or 
> not. It should be able to deal with invalid URIs in a best effort manner 
> (e.g. URIs containing a space in the path are already invalid) and always try 
> to not change the identity of the URI (means: 
> {{UriBuilder.parse(inputStr,null).build().toString()}} should almost always 
> be equal to the original {{inputStr}}). This also means if the SlingUri 
> contains escape sequences (e.g. %20), it should keep them, if escape 
> sequences are unescaped already this is also fine when using the builder 
> (when using parse() this can lead to invalid URIs, best effort parsing shall 
> be used for those cases). 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9777) Better handling for invalid URIs when using SlingUri (special characters, spaces)

2020-10-01 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9777:
--

PR: https://github.com/apache/sling-org-apache-sling-api/pull/24

> Better handling for invalid URIs when using SlingUri (special characters, 
> spaces) 
> --
>
> Key: SLING-9777
> URL: https://issues.apache.org/jira/browse/SLING-9777
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Affects Versions: API 2.23.0
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: API 2.23.2
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> SlingUri should not "have an opinion" about when URIs should be encoded or 
> not. It should be able to deal with invalid URIs in a best effort manner 
> (e.g. URIs containing a space in the path are already invalid) and always try 
> to not change the identity of the URI (means: 
> {{UriBuilder.parse(inputStr,null).build().toString()}} should almost always 
> be equal to the original {{inputStr}}). This also means if the SlingUri 
> contains escape sequences (e.g. %20), it should keep them, if escape 
> sequences are unescaped already this is also fine when using the builder 
> (when using parse() this can lead to invalid URIs, best effort parsing shall 
> be used for those cases). 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9777) Better handling for invalid URIs when using SlingUri (special characters, spaces)

2020-09-30 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9777:
--

The PR for SLING-7000 https://github.com/apache/sling-old-svn-mirror/pull/247 
introduced {{unescapePercentInQuery}} in 
https://github.com/Buuhuu/sling/blob/72516b5072c2b22e2c95adc094446eaaee835d02/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/extension/URIManipulationFilterExtension.java#L126
 - with the approach as described in this ticket and after using SlingUri 
there, this should not be needed anymore - FYI [~kwin] [~diru]

> Better handling for invalid URIs when using SlingUri (special characters, 
> spaces) 
> --
>
> Key: SLING-9777
> URL: https://issues.apache.org/jira/browse/SLING-9777
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Affects Versions: API 2.23.0
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: API 2.23.2
>
>
> SlingUri should not "have an opinion" about when URIs should be encoded or 
> not. It should be able to deal with invalid URIs in a best effort manner 
> (e.g. URIs containing a space in the path are already invalid) and always try 
> to not change the identity of the URI (means: 
> {{UriBuilder.parse(inputStr,null).build().toString()}} should almost always 
> be equal to the original {{inputStr}}). This also means if the SlingUri 
> contains escape sequences (e.g. %20), it should keep them, if escape 
> sequences are unescaped already this is also fine when using the builder 
> (when using parse() this can lead to invalid URIs, best effort parsing shall 
> be used for those cases). 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-9777) Better handling for invalid URIs when using SlingUri (special characters, spaces)

2020-09-30 Thread Georg Henzler (Jira)
Georg Henzler created SLING-9777:


 Summary: Better handling for invalid URIs when using SlingUri 
(special characters, spaces) 
 Key: SLING-9777
 URL: https://issues.apache.org/jira/browse/SLING-9777
 Project: Sling
  Issue Type: Improvement
  Components: API
Affects Versions: API 2.23.0
Reporter: Georg Henzler
Assignee: Georg Henzler
 Fix For: API 2.23.2


SlingUri should not "have an opinion" about when URIs should be encoded or not. 
It should be able to deal with invalid URIs in a best effort manner (e.g. URIs 
containing a space in the path are already invalid) and always try to not 
change the identity of the URI (means: 
{{UriBuilder.parse(inputStr,null).build().toString()}} should almost always be 
equal to the original {{inputStr}}). This also means if the SlingUri contains 
escape sequences (e.g. %20), it should keep them, if escape sequences are 
unescaped already this is also fine when using the builder (when using parse() 
this can lead to invalid URIs, best effort parsing shall be used for those 
cases). 





--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9745) Introduce SlingUri API to simplify creation/manipulation of Sling URIs

2020-09-26 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9745:
-
Description: General purpose class to represent a SlingUri (like e.g. a 
link in an html  tag). Immutable itself but adjustable using the builder 
pattern (SlingUriBuilder). Part of the Sling API and can be used anywhere to 
simplify handling/modification of Sling Uris and implements RequestPathInfo. 
SlingUris can be created easily from a String, a Request, a Resource, a URI or 
a RequestPathInfo.  (was: General purpose class to represent a SlingUri (like 
e.g. a link in an html  tag). Immutable itself but adjustable using the 
builder pattern. Part of the Sling API and can be used anywhere to simplify 
handling/modification of Sling ResourceUri. Implements RequestPathInfo. 
ResourceUri can be created easily from a String, a Request, a Resource, a URI 
or a RequestPathInfo.)

> Introduce SlingUri API to simplify creation/manipulation of Sling URIs
> --
>
> Key: SLING-9745
> URL: https://issues.apache.org/jira/browse/SLING-9745
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: API 2.23.0
>
>  Time Spent: 8h 50m
>  Remaining Estimate: 0h
>
> General purpose class to represent a SlingUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern 
> (SlingUriBuilder). Part of the Sling API and can be used anywhere to simplify 
> handling/modification of Sling Uris and implements RequestPathInfo. SlingUris 
> can be created easily from a String, a Request, a Resource, a URI or a 
> RequestPathInfo.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9762) Automatic Mapping of URIs in HTL

2020-09-23 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9762:
--

So for now it would be 
[rr.map()|https://sling.apache.org/apidocs/sling11/org/apache/sling/api/resource/ResourceResolver.html#map-javax.servlet.http.HttpServletRequest-java.lang.String-]
 - mid-term the idea would be to use [PathToUriMappingService.map(request, 
path)|https://github.com/apache/sling-org-apache-sling-api/blob/415ec0d4b3dfb184d653571364a07d821a890a10/src/main/java/org/apache/sling/api/resource/mapping/PathToUriMappingService.java#L67]
 (once this is implemented rr.map() will just call 
PathToUriMappingService.map())

With SLING-9662 implemented, the SPI interface 
[SlingUriMapper|https://github.com/apache/sling-org-apache-sling-api/blob/415ec0d4b3dfb184d653571364a07d821a890a10/src/main/java/org/apache/sling/spi/urimapping/SlingUriMapper.java]
 will allow to contribute custom mappings (while others might be fine with 
today's /etc/maps that will come as one ootb SlingUriMapper in the chain)

> Automatic Mapping of URIs in HTL
> 
>
> Key: SLING-9762
> URL: https://issues.apache.org/jira/browse/SLING-9762
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Reporter: Georg Henzler
>Assignee: Radu Cotescu
>Priority: Major
>
> There should be the possibility to automatically map non-absolute URIs in HTL 
> (that is 
> [URI.isAbsolute()|https://docs.oracle.com/javase/8/docs/api/java/net/URI.html#isAbsolute--]
>  = false). If all URIs are mapped automatically or not should be globally 
> configurable and then be overridden if necessary in HTL as follows:
> {code}
> 
> {code}
> If auto-mapping is globally deactivated, the following should allow to 
> activate it:
> {code}
> 
> {code}
> See https://www.mail-archive.com/dev@sling.apache.org/msg98145.html for 
> initial discussion



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9762) Automatic Mapping of URIs in HTL

2020-09-23 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9762:
--

The idea is to map non-absolute URIs only, I updated the description.

> Automatic Mapping of URIs in HTL
> 
>
> Key: SLING-9762
> URL: https://issues.apache.org/jira/browse/SLING-9762
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Reporter: Georg Henzler
>Priority: Major
>
> There should be the possibility to automatically map non-absolute URIs in HTL 
> (that is 
> [URI.isAbsolute()|https://docs.oracle.com/javase/8/docs/api/java/net/URI.html#isAbsolute--]
>  = false). If all URIs are mapped automatically or not should be globally 
> configurable and then be overridden if necessary in HTL as follows:
> {code}
> 
> {code}
> If auto-mapping is globally deactivated, the following should allow to 
> activate it:
> {code}
> 
> {code}
> See https://www.mail-archive.com/dev@sling.apache.org/msg98145.html for 
> initial discussion



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9762) Automatic Mapping of URIs in HTL

2020-09-23 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9762:
-
Description: 
There should be the possibility to automatically map non-absolute URIs in HTL 
(that is 
[URI.isAbsolute()|https://docs.oracle.com/javase/8/docs/api/java/net/URI.html#isAbsolute--]
 = false). If all URIs are mapped automatically or not should be globally 
configurable and then be overridden if necessary in HTL as follows:

{code}

{code}

If auto-mapping is globally deactivated, the following should allow to activate 
it:
{code}

{code}

See https://www.mail-archive.com/dev@sling.apache.org/msg98145.html for initial 
discussion

  was:
There should be the possibility to automatically map URIs in HTL. If all URIs 
are mapped automatically or not should be globally configurable and then be 
overridden if necessary in HTL as follows:

{code}

{code}

If auto-mapping is globally deactivated, the following should allow to activate 
it:
{code}

{code}

See https://www.mail-archive.com/dev@sling.apache.org/msg98145.html for initial 
discussion


> Automatic Mapping of URIs in HTL
> 
>
> Key: SLING-9762
> URL: https://issues.apache.org/jira/browse/SLING-9762
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Reporter: Georg Henzler
>Priority: Major
>
> There should be the possibility to automatically map non-absolute URIs in HTL 
> (that is 
> [URI.isAbsolute()|https://docs.oracle.com/javase/8/docs/api/java/net/URI.html#isAbsolute--]
>  = false). If all URIs are mapped automatically or not should be globally 
> configurable and then be overridden if necessary in HTL as follows:
> {code}
> 
> {code}
> If auto-mapping is globally deactivated, the following should allow to 
> activate it:
> {code}
> 
> {code}
> See https://www.mail-archive.com/dev@sling.apache.org/msg98145.html for 
> initial discussion



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-9762) Automatic Mapping of URIs in HTL

2020-09-23 Thread Georg Henzler (Jira)
Georg Henzler created SLING-9762:


 Summary: Automatic Mapping of URIs in HTL
 Key: SLING-9762
 URL: https://issues.apache.org/jira/browse/SLING-9762
 Project: Sling
  Issue Type: New Feature
  Components: Scripting
Reporter: Georg Henzler


There should be the possibility to automatically map URIs in HTL. If all URIs 
are mapped automatically or not should be globally configurable and then be 
overridden if necessary in HTL as follows:

{code}

{code}

If auto-mapping is globally deactivated, the following should allow to activate 
it:
{code}

{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9762) Automatic Mapping of URIs in HTL

2020-09-23 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9762:
-
Description: 
There should be the possibility to automatically map URIs in HTL. If all URIs 
are mapped automatically or not should be globally configurable and then be 
overridden if necessary in HTL as follows:

{code}

{code}

If auto-mapping is globally deactivated, the following should allow to activate 
it:
{code}

{code}

See https://www.mail-archive.com/dev@sling.apache.org/msg98145.html for initial 
discussion

  was:
There should be the possibility to automatically map URIs in HTL. If all URIs 
are mapped automatically or not should be globally configurable and then be 
overridden if necessary in HTL as follows:

{code}

{code}

If auto-mapping is globally deactivated, the following should allow to activate 
it:
{code}

{code}


> Automatic Mapping of URIs in HTL
> 
>
> Key: SLING-9762
> URL: https://issues.apache.org/jira/browse/SLING-9762
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Reporter: Georg Henzler
>Priority: Major
>
> There should be the possibility to automatically map URIs in HTL. If all URIs 
> are mapped automatically or not should be globally configurable and then be 
> overridden if necessary in HTL as follows:
> {code}
> 
> {code}
> If auto-mapping is globally deactivated, the following should allow to 
> activate it:
> {code}
> 
> {code}
> See https://www.mail-archive.com/dev@sling.apache.org/msg98145.html for 
> initial discussion



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9662) Introduce an URI Mapping SPI

2020-09-23 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9662:
-
Description: 
_an earlier version used the terms ResourceUri/ResourceToUriMapper (updated 
this description during the discussion)_ 

Introduce a simple SPI that allows to contribute to the resource resolver's 
map() and resolve() methods:

Prerequisite *SlingUri:* (SLING-9745 to be completed first)

General purpose class to represent a ResourceUri (like e.g. a link in an html 
 tag). Immutable itself but adjustable using the builder pattern. Part of 
the Sling API and can be used anywhere to simplify handling/modification of 
Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
easily from a String, a Request, a Resource, a URI or a RequestPathInfo.

*SlingUriMapper:*

SPI interface to be implemented as OSGi Service. All registered services build 
a conceptual chain sorted by service ranking. The resource link is passed 
through the chain while any SlingUriMapper chain member may or may not make 
adjustments to the resource link.
 rr.resolve() passes through the chain starting at the SlingUriMapper with the 
highest service ranking and rr.map() passes through the chain 
starting at the SlingUriMapper with the lowest service ranking

*PathToUriMappingService:* 

The new OSGi service to provide path to URI resolution and path to URI mapping. 
The methods rr.resolve() and rr.map() and should delegate to this service.

 

_Mailing List References:_
 [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
 [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]

  was:
_an earlier version used the terms ResourceUri/ResourceToUriMapper (updated 
this description during the discussion)_ 

Introduce a simple SPI that allows to contribute to the resource resolver's 
map() and resolve() methods:

Prerequisite *SlingUri:* (SLING-9745 to be completed first)

General purpose class to represent a ResourceUri (like e.g. a link in an html 
 tag). Immutable itself but adjustable using the builder pattern. Part of 
the Sling API and can be used anywhere to simplify handling/modification of 
Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
easily from a String, a Request, a Resource, a URI or a RequestPathInfo.

*SlingUriMapper:*

SPI interface to be implemented as OSGi Service. All registered services build 
a conceptual chain sorted by service ranking. The resource link is passed 
through the chain while any SlingUriMapper chain member may or may not make 
adjustments to the resource link.
 rr.resolve() passes through the chain starting at the SlingUriMapper with the 
highest service ranking and rr.map() passes through the chain 
starting at the SlingUriMapper with the lowest service ranking

_Mailing List References:_
 [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
 [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]


> Introduce an URI Mapping SPI
> 
>
> Key: SLING-9662
> URL: https://issues.apache.org/jira/browse/SLING-9662
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> _an earlier version used the terms ResourceUri/ResourceToUriMapper (updated 
> this description during the discussion)_ 
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> Prerequisite *SlingUri:* (SLING-9745 to be completed first)
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *SlingUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any SlingUriMapper chain member may or may not 
> make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the SlingUriMapper with 
> the highest service ranking and rr.map() passes through the 
> chain starting at the SlingUriMapper with the lowest service 
> ranking
> *PathToUriMappingService:* 
> The new OSGi service to provide path to URI resolution and path to URI 
> mapping. The methods rr.resolve() and rr.map() and should delegate to this 
> service.
>  
> _Mailing List References:_
>  [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
>  

[jira] [Updated] (SLING-9060) Improve Redirect handling for Resources that can be served from alternative URLs

2020-09-23 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9060:
-
Fix Version/s: (was: Servlets Get 2.1.42)

> Improve Redirect handling for Resources that can be served from alternative 
> URLs
> 
>
> Key: SLING-9060
> URL: https://issues.apache.org/jira/browse/SLING-9060
> Project: Sling
>  Issue Type: Improvement
>  Components: API, Servlets
>Affects Versions: API 2.22.0, Servlets Get 2.1.40
>Reporter: Ian Boston
>Assignee: Ian Boston
>Priority: Major
>  Time Spent: 14h 20m
>  Remaining Estimate: 0h
>
> Improve the mechanism used to redirect streamed binary requests so that it 
> has the context of the request and can be extended without provider API 
> changes.
>  
> This was discussed on list at [https://markmail.org/message/msmxgulkmzx7czth 
> |https://markmail.org/message/msmxgulkmzx7czth]
> PR to follow



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9060) Improve Redirect handling for Resources that can be served from alternative URLs

2020-09-23 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9060:
-
Fix Version/s: (was: API 2.23.0)

> Improve Redirect handling for Resources that can be served from alternative 
> URLs
> 
>
> Key: SLING-9060
> URL: https://issues.apache.org/jira/browse/SLING-9060
> Project: Sling
>  Issue Type: Improvement
>  Components: API, Servlets
>Affects Versions: API 2.22.0, Servlets Get 2.1.40
>Reporter: Ian Boston
>Assignee: Ian Boston
>Priority: Major
> Fix For: Servlets Get 2.1.42
>
>  Time Spent: 14h 20m
>  Remaining Estimate: 0h
>
> Improve the mechanism used to redirect streamed binary requests so that it 
> has the context of the request and can be extended without provider API 
> changes.
>  
> This was discussed on list at [https://markmail.org/message/msmxgulkmzx7czth 
> |https://markmail.org/message/msmxgulkmzx7czth]
> PR to follow



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9060) Improve Redirect handling for Resources that can be served from alternative URLs

2020-09-23 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9060:
--

Removed fix versions (to prepare API release)

> Improve Redirect handling for Resources that can be served from alternative 
> URLs
> 
>
> Key: SLING-9060
> URL: https://issues.apache.org/jira/browse/SLING-9060
> Project: Sling
>  Issue Type: Improvement
>  Components: API, Servlets
>Affects Versions: API 2.22.0, Servlets Get 2.1.40
>Reporter: Ian Boston
>Assignee: Ian Boston
>Priority: Major
>  Time Spent: 14h 20m
>  Remaining Estimate: 0h
>
> Improve the mechanism used to redirect streamed binary requests so that it 
> has the context of the request and can be extended without provider API 
> changes.
>  
> This was discussed on list at [https://markmail.org/message/msmxgulkmzx7czth 
> |https://markmail.org/message/msmxgulkmzx7czth]
> PR to follow



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9140) utility to merge multiple value maps

2020-09-23 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9140:
-
Fix Version/s: (was: API 2.22.2)
   API 2.23.0

>  utility to merge multiple value maps
> -
>
> Key: SLING-9140
> URL: https://issues.apache.org/jira/browse/SLING-9140
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Nicolas Peltier
>Assignee: Julian Sedding
>Priority: Major
> Fix For: API 2.23.0
>
>  Time Spent: 10h 10m
>  Remaining Estimate: 0h
>
> utility class to provide a simple way to have a fallback valuemap
> discussed here 
> [https://lists.apache.org/thread.html/r0afe5f5d7c9537c25e7aedf466239047eedf4e88143376e10ae87b95%40%3Cdev.sling.apache.org%3E]
> and in the PR too https://github.com/apache/sling-org-apache-sling-api/pull/19
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9555) Define ResourceChange.ChangeType also as constant string values

2020-09-23 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9555:
-
Fix Version/s: (was: API 2.22.2)
   API 2.23.0

> Define ResourceChange.ChangeType also as constant string values
> ---
>
> Key: SLING-9555
> URL: https://issues.apache.org/jira/browse/SLING-9555
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: API 2.23.0
>
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> As all annotation values have to be provided as constants (e.g. in 
> https://docs.osgi.org/javadoc/r6/residential/org/osgi/service/component/annotations/Component.html#property())
>  and conversion from {{Enum}} to {{String}} cannot be resolved at compile 
> time all enum values of {{ResourceChange.ChangeType}} should also be provided 
> as String constants.
> Something like this does not work
> {code}
> @Component(property = { 
> ResourceChangeListener.CHANGES+"="+ResourceChange.ChangeType.REMOVED.toString()}
> )
> {code}
> Compare with https://stackoverflow.com/a/13253879.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8984) SyntheticResource and ResourceWrapper: Add missing @NotNull annotations

2020-09-23 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8984:
-
Fix Version/s: (was: API 2.22.2)
   API 2.23.0

> SyntheticResource and ResourceWrapper: Add missing @NotNull annotations
> ---
>
> Key: SLING-8984
> URL: https://issues.apache.org/jira/browse/SLING-8984
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Minor
> Fix For: API 2.23.0
>
>
> alle methods of SyntheticResource and ResourceWrapper should have the 
> approritate @NotNull anotations for mandatory parameters.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9312) LazyBindings.entrySet: hashCode of binding values is calculated

2020-09-23 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9312:
-
Fix Version/s: (was: API 2.22.2)
   API 2.23.0

> LazyBindings.entrySet: hashCode of binding values is calculated
> ---
>
> Key: SLING-9312
> URL: https://issues.apache.org/jira/browse/SLING-9312
> Project: Sling
>  Issue Type: Bug
>  Components: API
>Affects Versions: API 2.21.0
>Reporter: Hans-Peter Stoerr
>Assignee: Radu Cotescu
>Priority: Minor
> Fix For: API 2.23.0
>
>
> The method entrySet in org.apache.sling.api.scripting.LazyBindings currently 
> has a bug that forces the hashCode of the entry values in Bindings are 
> calculated in each HTL request, when it should only be the hashCode of the 
> keys - if at all. This can be a performance problem if the value is e.g. a 
> large map, in our (complicated) case this even got us a StackOverflowError.
> The problematic code is:
> {code:java}
> public Set> entrySet() {
> HashSet> entrySet = new 
> HashSet<>(super.entrySet());
> for (Map.Entry supplierEntry : suppliers.entrySet()) {
> entrySet.add(supplierEntry);
> }
> return Collections.unmodifiableSet(entrySet);
> } {code}
> Since the entries are put together in a HashSet, each add will calculate the 
> hashCode of the entry - which sums the hashCode of the key *and the value* of 
> each binding entry. I suggest to replace this with a HashMap and return it's 
> entrySet. Another problem is that this could return several entries for the 
> same key, which is probably not intended.
> In case you are wondering, this is called in every HTL request like this:
> {code:java}
>  at java.base/java.util.HashSet.add(HashSet.java:220)
>   at 
> java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:336)
>   at java.base/java.util.HashSet.(HashSet.java:120)
>   at 
> org.apache.sling.api.scripting.LazyBindings.entrySet(LazyBindings.java:117) 
> [org.apache.sling.api:2.21.0]
>   at 
> org.apache.sling.api.scripting.LazyBindings.putAll(LazyBindings.java:87) 
> [org.apache.sling.api:2.21.0]
>   at 
> org.apache.sling.scripting.sightly.impl.engine.SightlyCompiledScript.eval(SightlyCompiledScript.java:50)
>  [org.apache.sling.scripting.sightly:1.2.0.0]
>   at 
> org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:386)
>  [org.apache.sling.scripting.core:2.1.0]
>   at 
> org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184)
>  [org.apache.sling.scripting.core:2.1.0]
>   at 
> org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491)
>  [org.apache.sling.scripting.core:2.1.0]
>   at 
> org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)
>  [org.apache.sling.engine:2.6.20]
>   at 
> org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)
>  [org.apache.sling.engine:2.6.20] {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-9745) Introduce SlingUri API to simplify creation/manipulation of Sling URIs

2020-09-23 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler resolved SLING-9745.
--
Fix Version/s: API 2.23.0
   Resolution: Fixed

> Introduce SlingUri API to simplify creation/manipulation of Sling URIs
> --
>
> Key: SLING-9745
> URL: https://issues.apache.org/jira/browse/SLING-9745
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: API 2.23.0
>
>  Time Spent: 8h 50m
>  Remaining Estimate: 0h
>
> General purpose class to represent a SlingUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9662) Introduce an URI Mapping SPI

2020-09-21 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9662:
--

See 
[https://github.com/apache/sling-org-apache-sling-api/compare/feature/SLING-9662-Introduce-SlingUri-Mapping-SPI-v3]
 for the current draft version:
 * API: 
[PathToUriMappingService|https://github.com/apache/sling-org-apache-sling-api/blob/364ffe3ef4ced4267f112c8639e8ce5ab81e8b46/src/main/java/org/apache/sling/api/resource/mapping/PathToUriMappingService.java]
 (can be used instead of rr.map() and rr.resolve(), the idea is to change the 
implementation of those rr methods to use this service (and to gradually move 
the mapping functionality to the impl of this service)
 * SPI: 
[SlingUriMapper|https://github.com/apache/sling-org-apache-sling-api/blob/364ffe3ef4ced4267f112c8639e8ce5ab81e8b46/src/main/java/org/apache/sling/spi/urimapping/SlingUriMapper.java]
 (moved to SPI package). The context 
[MappingChainContext|https://github.com/apache/sling-org-apache-sling-api/blob/364ffe3ef4ced4267f112c8639e8ce5ab81e8b46/src/main/java/org/apache/sling/spi/urimapping/MappingChainContext.java]
 does provide a read-only resource resolver (but not the rr of the request to 
allow to move resolve() before authentication to fix the problems we have today 
as mentioned by [~cziegeler] above)

> Introduce an URI Mapping SPI
> 
>
> Key: SLING-9662
> URL: https://issues.apache.org/jira/browse/SLING-9662
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> _an earlier version used the terms ResourceUri/ResourceToUriMapper (updated 
> this description during the discussion)_ 
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> Prerequisite *SlingUri:* (SLING-9745 to be completed first)
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *SlingUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any SlingUriMapper chain member may or may not 
> make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the SlingUriMapper with 
> the highest service ranking and rr.map() passes through the 
> chain starting at the SlingUriMapper with the lowest service 
> ranking
> _Mailing List References:_
>  [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
>  [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9662) Introduce an URI Mapping SPI

2020-09-21 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9662:
-
Summary: Introduce an URI Mapping SPI  (was: Introduce a Resource Mapping 
SPI)

> Introduce an URI Mapping SPI
> 
>
> Key: SLING-9662
> URL: https://issues.apache.org/jira/browse/SLING-9662
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> _an earlier version used the terms ResourceUri/ResourceToUriMapper (updated 
> this description during the discussion)_ 
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> Prerequisite *SlingUri:* (SLING-9745 to be completed first)
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *SlingUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any SlingUriMapper chain member may or may not 
> make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the SlingUriMapper with 
> the highest service ranking and rr.map() passes through the 
> chain starting at the SlingUriMapper with the lowest service 
> ranking
> _Mailing List References:_
>  [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
>  [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9662) Introduce a Resource Mapping SPI

2020-09-21 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9662:
-
Description: 
_an earlier version used the terms ResourceUri/ResourceToUriMapper (updated 
this description during the discussion)_ 

Introduce a simple SPI that allows to contribute to the resource resolver's 
map() and resolve() methods:

Prerequisite *SlingUri:* (SLING-9745 to be completed first)

General purpose class to represent a ResourceUri (like e.g. a link in an html 
 tag). Immutable itself but adjustable using the builder pattern. Part of 
the Sling API and can be used anywhere to simplify handling/modification of 
Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
easily from a String, a Request, a Resource, a URI or a RequestPathInfo.

*SlingUriMapper:*

SPI interface to be implemented as OSGi Service. All registered services build 
a conceptual chain sorted by service ranking. The resource link is passed 
through the chain while any SlingUriMapper chain member may or may not make 
adjustments to the resource link.
 rr.resolve() passes through the chain starting at the SlingUriMapper with the 
highest service ranking and rr.map() passes through the chain 
starting at the SlingUriMapper with the lowest service ranking

_Mailing List References:_
 [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
 [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]

  was:
SlingUriMapper

 

Introduce a simple SPI that allows to contribute to the resource resolver's 
map() and resolve() methods:

Prerequisite *SlingUri:* (SLING-9745 to be completed first)

General purpose class to represent a ResourceUri (like e.g. a link in an html 
 tag). Immutable itself but adjustable using the builder pattern. Part of 
the Sling API and can be used anywhere to simplify handling/modification of 
Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
easily from a String, a Request, a Resource, a URI or a RequestPathInfo.

*SlingUriMapper:*

SPI interface to be implemented as OSGi Service. All registered services build 
a conceptual chain sorted by service ranking. The resource link is passed 
through the chain while any SlingUriMapper chain member may or may not make 
adjustments to the resource link.
 rr.resolve() passes through the chain starting at the SlingUriMapper with the 
highest service ranking and rr.map() passes through the chain 
starting at the SlingUriMapper with the lowest service ranking

_Mailing List References:_
 [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
 [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]


> Introduce a Resource Mapping SPI
> 
>
> Key: SLING-9662
> URL: https://issues.apache.org/jira/browse/SLING-9662
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> _an earlier version used the terms ResourceUri/ResourceToUriMapper (updated 
> this description during the discussion)_ 
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> Prerequisite *SlingUri:* (SLING-9745 to be completed first)
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *SlingUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any SlingUriMapper chain member may or may not 
> make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the SlingUriMapper with 
> the highest service ranking and rr.map() passes through the 
> chain starting at the SlingUriMapper with the lowest service 
> ranking
> _Mailing List References:_
>  [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
>  [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9662) Introduce a Resource Mapping SPI

2020-09-21 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9662:
-
Description: 
SlingUriMapper

 

Introduce a simple SPI that allows to contribute to the resource resolver's 
map() and resolve() methods:

Prerequisite *SlingUri:* (SLING-9745 to be completed first)

General purpose class to represent a ResourceUri (like e.g. a link in an html 
 tag). Immutable itself but adjustable using the builder pattern. Part of 
the Sling API and can be used anywhere to simplify handling/modification of 
Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
easily from a String, a Request, a Resource, a URI or a RequestPathInfo.

*SlingUriMapper:*

SPI interface to be implemented as OSGi Service. All registered services build 
a conceptual chain sorted by service ranking. The resource link is passed 
through the chain while any SlingUriMapper chain member may or may not make 
adjustments to the resource link.
 rr.resolve() passes through the chain starting at the SlingUriMapper with the 
highest service ranking and rr.map() passes through the chain 
starting at the SlingUriMapper with the lowest service ranking

_Mailing List References:_
 [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
 [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]

  was:
Introduce a simple SPI that allows to contribute to the resource resolver's 
map() and resolve() methods:

Prerequisite *ResourceUri:* (SLING-9745 to be completed first)

General purpose class to represent a ResourceUri (like e.g. a link in an html 
 tag). Immutable itself but adjustable using the builder pattern. Part of 
the Sling API and can be used anywhere to simplify handling/modification of 
Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
easily from a String, a Request, a Resource, a URI or a RequestPathInfo.

*ResourceToUriMapper:*

SPI interface to be implemented as OSGi Service. All registered services build 
a conceptual chain sorted by service ranking. The resource link is passed 
through the chain while any ResourceToUriMapper chain member may or may not 
make adjustments to the resource link.
 rr.resolve() passes through the chain starting at the ResourceToUriMapper with 
the highest service ranking and rr.map() passes through the 
chain starting at the ResourceToUriMapper with the lowest 
service ranking

_Mailing List References:_
 [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
 [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]


> Introduce a Resource Mapping SPI
> 
>
> Key: SLING-9662
> URL: https://issues.apache.org/jira/browse/SLING-9662
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> SlingUriMapper
>  
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> Prerequisite *SlingUri:* (SLING-9745 to be completed first)
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *SlingUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any SlingUriMapper chain member may or may not 
> make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the SlingUriMapper with 
> the highest service ranking and rr.map() passes through the 
> chain starting at the SlingUriMapper with the lowest service 
> ranking
> _Mailing List References:_
>  [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
>  [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9745) Introduce SlingUri API to simplify creation/manipulation of Sling URIs

2020-09-21 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9745:
-
Description: General purpose class to represent a SlingUri (like e.g. a 
link in an html  tag). Immutable itself but adjustable using the builder 
pattern. Part of the Sling API and can be used anywhere to simplify 
handling/modification of Sling ResourceUri. Implements RequestPathInfo. 
ResourceUri can be created easily from a String, a Request, a Resource, a URI 
or a RequestPathInfo.  (was: General purpose class to represent a ResourceUri 
(like e.g. a link in an html  tag). Immutable itself but adjustable using 
the builder pattern. Part of the Sling API and can be used anywhere to simplify 
handling/modification of Sling ResourceUri. Implements RequestPathInfo. 
ResourceUri can be created easily from a String, a Request, a Resource, a URI 
or a RequestPathInfo.)

> Introduce SlingUri API to simplify creation/manipulation of Sling URIs
> --
>
> Key: SLING-9745
> URL: https://issues.apache.org/jira/browse/SLING-9745
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>  Time Spent: 5h 10m
>  Remaining Estimate: 0h
>
> General purpose class to represent a SlingUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9745) Introduce SlingUri API to simplify creation/manipulation of Sling URIs

2020-09-21 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9745:
-
Summary: Introduce SlingUri API to simplify creation/manipulation of Sling 
URIs  (was: Introduce ResourceUri API to simplify creation/manipulation of 
Sling URIs)

> Introduce SlingUri API to simplify creation/manipulation of Sling URIs
> --
>
> Key: SLING-9745
> URL: https://issues.apache.org/jira/browse/SLING-9745
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>  Time Spent: 5h 10m
>  Remaining Estimate: 0h
>
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9745) Introduce ResourceUri API to simplify creation/manipulation of Sling URIs

2020-09-18 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9745:
--

PR: https://github.com/apache/sling-org-apache-sling-api/pull/23/

> Introduce ResourceUri API to simplify creation/manipulation of Sling URIs
> -
>
> Key: SLING-9745
> URL: https://issues.apache.org/jira/browse/SLING-9745
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9660) Add RequestPathInfoBuilder for easily constructing Sling URLs

2020-09-18 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9660:
--

SLING-9662 was a bit too big in what it contained, therefore ResourceURI and 
builder for it is done via separate issue SLING-9745 now

> Add RequestPathInfoBuilder for easily constructing Sling URLs
> -
>
> Key: SLING-9660
> URL: https://issues.apache.org/jira/browse/SLING-9660
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>
> Currently Sling URLs with their parts outlined in 
> https://sling.apache.org/documentation/the-sling-engine/url-decomposition.html
>  must be constructed manually (i.e. by String operations). 
> To ease constructing such URLs a {{RequestPathInfoBuilder}} should be 
> provided which allows to create a URL out of the individual parts easily.
> Such a Builder should be either constructed from an existing URL or 
> RequestPathInfo and should allow to modify/extend each of the given parts.
> The Builder should work similarly to 
> https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/utils/URIBuilder.html.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9662) Introduce a Resource Mapping SPI

2020-09-17 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9662:
-
Description: 
Introduce a simple SPI that allows to contribute to the resource resolver's 
map() and resolve() methods:

Prerequisite *ResourceUri:* (SLING-9745 to be completed first)

General purpose class to represent a ResourceUri (like e.g. a link in an html 
 tag). Immutable itself but adjustable using the builder pattern. Part of 
the Sling API and can be used anywhere to simplify handling/modification of 
Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
easily from a String, a Request, a Resource, a URI or a RequestPathInfo.

*ResourceToUriMapper:*

SPI interface to be implemented as OSGi Service. All registered services build 
a conceptual chain sorted by service ranking. The resource link is passed 
through the chain while any ResourceToUriMapper chain member may or may not 
make adjustments to the resource link.
 rr.resolve() passes through the chain starting at the ResourceToUriMapper with 
the highest service ranking and rr.map() passes through the 
chain starting at the ResourceToUriMapper with the lowest 
service ranking

_Mailing List References:_
 [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
 [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]

  was:
Introduce a simple SPI that allows to contribute to the resource resolver's 
map() and resolve() methods:

*ResourceUri:*

General purpose class to represent a ResourceUri (like e.g. a link in an html 
 tag). Immutable itself but adjustable using the builder pattern. Part of 
the Sling API and can be used anywhere to simplify handling/modification of 
Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
easily from a String, a Request, a Resource, a URI or a RequestPathInfo.

*ResourceToUriMapper:*

SPI interface to be implemented as OSGi Service. All registered services build 
a conceptual chain sorted by service ranking. The resource link is passed 
through the chain while any ResourceToUriMapper chain member may or may not 
make adjustments to the resource link.
 rr.resolve() passes through the chain starting at the ResourceToUriMapper with 
the highest service ranking and rr.map() passes through the 
chain starting at the ResourceToUriMapper with the lowest 
service ranking

_Mailing List References:_
 [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
 [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]


> Introduce a Resource Mapping SPI
> 
>
> Key: SLING-9662
> URL: https://issues.apache.org/jira/browse/SLING-9662
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> Prerequisite *ResourceUri:* (SLING-9745 to be completed first)
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *ResourceToUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any ResourceToUriMapper chain member may or 
> may not make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the ResourceToUriMapper 
> with the highest service ranking and rr.map() passes through 
> the chain starting at the ResourceToUriMapper with the 
> lowest service ranking
> _Mailing List References:_
>  [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
>  [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-9745) Introduce ResourceUri API to simplify creation/manipulation of Sling URIs

2020-09-17 Thread Georg Henzler (Jira)
Georg Henzler created SLING-9745:


 Summary: Introduce ResourceUri API to simplify 
creation/manipulation of Sling URIs
 Key: SLING-9745
 URL: https://issues.apache.org/jira/browse/SLING-9745
 Project: Sling
  Issue Type: New Feature
  Components: API
Reporter: Georg Henzler
Assignee: Georg Henzler


General purpose class to represent a ResourceUri (like e.g. a link in an html 
 tag). Immutable itself but adjustable using the builder pattern. Part of 
the Sling API and can be used anywhere to simplify handling/modification of 
Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
easily from a String, a Request, a Resource, a URI or a RequestPathInfo.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (SLING-9662) Introduce a Resource Mapping SPI

2020-08-19 Thread Georg Henzler (Jira)


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

Georg Henzler edited comment on SLING-9662 at 8/19/20, 2:18 PM:


One open question is how we deal with the lifecycle of ResourceResolvers (and 
ResourceResolverFactory resp.) compared to the ResourceToUriMapper services - 
ATM the lifecycle is independent [1], references to 
ResourceResolver/ResourceResolverFactory remain intact if a ResourceToUriMapper 
vanishes (e.g. during a deployment) and the respective mapping will just be 
"missing" during this time (which could potentially lead to problems, but a 
ServiceUnavailableFilter can be configured to mitigate). I think this behaviour 
is in line with changes to /etc/maps (here the bundle is also not restarted 
upon changes IIRC). We could introduce a config property 
"requiredResourceToUriMapperServices" that the activator for the 
ResourceResolverFactory waits for, but if not needed I would like to avoid the 
complexity.

[~cziegeler] [~rombert] Do you see a problem with the current referencing 
approach as it is on branch [1]? 

[1] 
https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/9a703ac38bee64c6ebe73b5c4df3b56307fdaed0/src/main/java/org/apache/sling/resourceresolver/impl/mappingchain/ResourceUriMappingChain.java#L53


was (Author: henzlerg):
One open question is how we deal the the lifecycle of the ResourceResolver (and 
ResourceResolverFactory resp.) compared to the ResourceToUriMapper services - 
ATM the lifecycle is independent [1], references to 
ResourceResolver/ResourceResolverFactory remain intact if a ResourceToUriMapper 
vanishes (e.g. during a deployment) and the respective mapping will be just 
"missing" during this time (which could potentially lead to problems, but a 
ServiceUnavailableFilter can be configured to mitigate). I think this behaviour 
is in line with changes to /etc/maps (here the bundle is also not restarted 
upon changes IIRC). We could introduce a config property 
"requiredResourceToUriMapperServices" that the activator for the 
ResourceResolverFactory waits for, but if not needed I would like to avoid the 
complexity.

[~cziegeler] [~rombert] Do you see a problem with the current approach as it is 
on branch [1]? 

[1] 
https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/9a703ac38bee64c6ebe73b5c4df3b56307fdaed0/src/main/java/org/apache/sling/resourceresolver/impl/mappingchain/ResourceUriMappingChain.java#L53

> Introduce a Resource Mapping SPI
> 
>
> Key: SLING-9662
> URL: https://issues.apache.org/jira/browse/SLING-9662
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> *ResourceUri:*
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *ResourceToUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any ResourceToUriMapper chain member may or 
> may not make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the ResourceToUriMapper 
> with the highest service ranking and rr.map() passes through 
> the chain starting at the ResourceToUriMapper with the 
> lowest service ranking
> _Mailing List References:_
>  [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
>  [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9662) Introduce a Resource Mapping SPI

2020-08-19 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9662:
--

One open question is how we deal the the lifecycle of the ResourceResolver (and 
ResourceResolverFactory resp.) compared to the ResourceToUriMapper services - 
ATM the lifecycle is independent [1], references to 
ResourceResolver/ResourceResolverFactory remain intact if a ResourceToUriMapper 
vanishes (e.g. during a deployment) and the respective mapping will be just 
"missing" during this time (which could potentially lead to problems, but a 
ServiceUnavailableFilter can be configured to mitigate). I think this behaviour 
is in line with changes to /etc/maps (here the bundle is also not restarted 
upon changes IIRC). We could introduce a config property 
"requiredResourceToUriMapperServices" that the activator for the 
ResourceResolverFactory waits for, but if not needed I would like to avoid the 
complexity.

[~cziegeler] [~rombert] Do you see a problem with the current approach as it is 
on branch [1]? 

[1] 
https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/9a703ac38bee64c6ebe73b5c4df3b56307fdaed0/src/main/java/org/apache/sling/resourceresolver/impl/mappingchain/ResourceUriMappingChain.java#L53

> Introduce a Resource Mapping SPI
> 
>
> Key: SLING-9662
> URL: https://issues.apache.org/jira/browse/SLING-9662
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> *ResourceUri:*
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *ResourceToUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any ResourceToUriMapper chain member may or 
> may not make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the ResourceToUriMapper 
> with the highest service ranking and rr.map() passes through 
> the chain starting at the ResourceToUriMapper with the 
> lowest service ranking
> _Mailing List References:_
>  [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
>  [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9662) Introduce a Resource Mapping SPI

2020-08-14 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9662:
--

[~rombert] So far there are only two "hook in points", so if there are 
conflicts they'll be easy to fix. Maybe the fixes for SLING-9620 and SLING-9623 
can already help improving the test coverage :) 

> Introduce a Resource Mapping SPI
> 
>
> Key: SLING-9662
> URL: https://issues.apache.org/jira/browse/SLING-9662
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> *ResourceUri:*
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *ResourceToUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any ResourceToUriMapper chain member may or 
> may not make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the ResourceToUriMapper 
> with the highest service ranking and rr.map() passes through 
> the chain starting at the ResourceToUriMapper with the 
> lowest service ranking
> _Mailing List References:_
>  [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
>  [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9662) Introduce a Resource Mapping SPI

2020-08-14 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9662:
--

[~bdelacretaz] I'm well aware of the cross cutting impact this change has (it's 
used everywhere!). To make it build I had to adjust a fair amount of JUnit 
tests already and I'd say the current state is 100% backwards compatible. But 
once I start refactoring (which is optional btw., we could also keep it 
side-by-side) the mentioned "status quo mechanisms" this has to be ensured also 
by integration test coverage. Would you add more integration tests to bundle 
org.apache.sling.resourceresolver (we have some "sort of integration tests" 
based on https://github.com/apache/sling-org-apache-sling-testing-osgi-mock) or 
extend tests in another place? 

> Introduce a Resource Mapping SPI
> 
>
> Key: SLING-9662
> URL: https://issues.apache.org/jira/browse/SLING-9662
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> *ResourceUri:*
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *ResourceToUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any ResourceToUriMapper chain member may or 
> may not make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the ResourceToUriMapper 
> with the highest service ranking and rr.map() passes through 
> the chain starting at the ResourceToUriMapper with the 
> lowest service ranking
> _Mailing List References:_
>  [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
>  [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (SLING-9660) Add RequestPathInfoBuilder for easily constructing Sling URLs

2020-08-14 Thread Georg Henzler (Jira)


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

Georg Henzler edited comment on SLING-9660 at 8/14/20, 7:14 AM:


[~kwin] I think this is now already covered by SLING-9662, also constructing 
URLs works with it [~joerghoh], see 
https://github.com/apache/sling-org-apache-sling-api/tree/feature/SLING-9662-Introduce-Resource-Mapping-SPI/src/main/java/org/apache/sling/api/resource/uri
 and:

{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.forPath("/path/to/resouce.sel.html/suffix");
// this works because ResourceUri implements  RequestPathInfo
RequestPathInfo requestPathInfo = requestPathInfoBuilder.build();
{code}
 if you want to change this in a URL you can just use 
{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.forPath("/path/to/resouce.sel.html/suffix");
resourceUriBuilder.useSchemeAndAuthority(new URI("https://example.com:8443;))
ResourceUri resourceUri = requestPathInfoBuilder.build();
String resourceUriStr = resourceUri.toString();
URI resourceRealURI = resourceUri.toUri();
{code}
or you can create a full URI to start with
{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.parse("https://example.com/path/to/resouce.sel.html/suffix?test=1#frag;)
// and e.g. add a selector and change the suffix
.addSelector("sel2") // methods are chainable
.setSuffix("/anotherSuffix");
ResourceUri resourceUri = requestPathInfoBuilder.build();
// resourceUri.toString() will contain
// https://example.com/path/to/resouce.sel.sel2.html/anotherSuffix?test=1#frag
{code}



was (Author: henzlerg):
[~kwin] I think this is now already covered by SLING-9662, also constructing 
URLs works with it [~joerghoh], see 
https://github.com/apache/sling-org-apache-sling-api/tree/feature/SLING-9662-Introduce-Resource-Mapping-SPI/src/main/java/org/apache/sling/api/resource/uri
 and:

{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.forPath("/path/to/resouce.sel.html/suffix");
// this works because ResourceUri implements  RequestPathInfo
RequestPathInfo requestPathInfo = requestPathInfoBuilder.build();
{code}
 if you want to change this in a URL you can just use 
{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.forPath("/path/to/resouce.sel.html/suffix");
resourceUriBuilder.useSchemeAndAuthority(new URI("https://example.com:8443;))
ResourceUri resourceUri = requestPathInfoBuilder.build();
String resourceUriStr = resourceUri.toString();
URI resourceRealURI = resourceUri.toUri();
{code}
or you can create a full URI to start with
{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.parse("https://example.com/path/to/resouce.sel.html/suffix?test=1#frag;);
// and e.g. add a selector and change the suffix
resourceUriBuilder.addSelector("sel2")
resourceUriBuilder.setSuffix("/anotherSuffix")
ResourceUri resourceUri = requestPathInfoBuilder.build();
// resourceUri.toString() will contain
// https://example.com/path/to/resouce.sel.sel2.html/anotherSuffix?test=1#frag
{code}


> Add RequestPathInfoBuilder for easily constructing Sling URLs
> -
>
> Key: SLING-9660
> URL: https://issues.apache.org/jira/browse/SLING-9660
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: API 2.22.2
>
>
> Currently Sling URLs with their parts outlined in 
> https://sling.apache.org/documentation/the-sling-engine/url-decomposition.html
>  must be constructed manually (i.e. by String operations). 
> To ease constructing such URLs a {{RequestPathInfoBuilder}} should be 
> provided which allows to create a URL out of the individual parts easily.
> Such a Builder should be either constructed from an existing URL or 
> RequestPathInfo and should allow to modify/extend each of the given parts.
> The Builder should work similarly to 
> https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/utils/URIBuilder.html.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (SLING-9660) Add RequestPathInfoBuilder for easily constructing Sling URLs

2020-08-14 Thread Georg Henzler (Jira)


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

Georg Henzler edited comment on SLING-9660 at 8/14/20, 7:13 AM:


[~kwin] I think this is now already covered by SLING-9662, also constructing 
URLs works with it [~joerghoh], see 
https://github.com/apache/sling-org-apache-sling-api/tree/feature/SLING-9662-Introduce-Resource-Mapping-SPI/src/main/java/org/apache/sling/api/resource/uri
 and:

{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.forPath("/path/to/resouce.sel.html/suffix");
// this works because ResourceUri implements  RequestPathInfo
RequestPathInfo requestPathInfo = requestPathInfoBuilder.build();
{code}
 if you want to change this in a URL you can just use 
{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.forPath("/path/to/resouce.sel.html/suffix");
resourceUriBuilder.useSchemeAndAuthority(new URI("https://example.com:8443;))
ResourceUri resourceUri = requestPathInfoBuilder.build();
String resourceUriStr = resourceUri.toString();
URI resourceRealURI = resourceUri.toUri();
{code}
or you can create a full URI to start with
{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.parse("https://example.com/path/to/resouce.sel.html/suffix?test=1#frag;);
// and e.g. add a selector and change the suffix
resourceUriBuilder.addSelector("sel2")
resourceUriBuilder.setSuffix("/anotherSuffix")
ResourceUri resourceUri = requestPathInfoBuilder.build();
// resourceUri.toString() will contain
// https://example.com/path/to/resouce.sel.sel2.html/anotherSuffix?test=1#frag
{code}



was (Author: henzlerg):
[~kwin] I think this is now already covered by SLING-9662, also constructing 
URLs works with it [~joerghoh], see 
https://github.com/apache/sling-org-apache-sling-api/tree/feature/SLING-9662-Introduce-Resource-Mapping-SPI/src/main/java/org/apache/sling/api/resource/uri
 and:

{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.forPath("/path/to/resouce.sel.html/suffix");
// this works because ResourceUri implements  RequestPathInfo
RequestPathInfo requestPathInfo = requestPathInfoBuilder.build();
{code}
 if you want to change this in a URL you can just use 
{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.forPath("/path/to/resouce.sel.html/suffix");
resourceUriBuilder.useSchemeAndAuthority(new URI("https://example.com:8443;))
ResourceUri resourceUri = requestPathInfoBuilder.build();
String resourceUriStr = resourceUri.toString();
URI resourceRealURI = resourceUri.toUri();
{code}
or you can create a full URI to start with
{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.forPath("https://example.com/path/to/resouce.sel.html/suffix?test=1#frag;);
// and e.g. add a selector and change the suffix
resourceUriBuilder.addSelector("sel2")
resourceUriBuilder.setSuffix("/anotherSuffix")
ResourceUri resourceUri = requestPathInfoBuilder.build();
// resourceUri.toString() will contain
// https://example.com/path/to/resouce.sel.sel2.html/anotherSuffix?test=1#frag
{code}


> Add RequestPathInfoBuilder for easily constructing Sling URLs
> -
>
> Key: SLING-9660
> URL: https://issues.apache.org/jira/browse/SLING-9660
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: API 2.22.2
>
>
> Currently Sling URLs with their parts outlined in 
> https://sling.apache.org/documentation/the-sling-engine/url-decomposition.html
>  must be constructed manually (i.e. by String operations). 
> To ease constructing such URLs a {{RequestPathInfoBuilder}} should be 
> provided which allows to create a URL out of the individual parts easily.
> Such a Builder should be either constructed from an existing URL or 
> RequestPathInfo and should allow to modify/extend each of the given parts.
> The Builder should work similarly to 
> https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/utils/URIBuilder.html.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9660) Add RequestPathInfoBuilder for easily constructing Sling URLs

2020-08-14 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9660:
--

[~kwin] I think this is now already covered by SLING-9662, also constructing 
URLs works with it [~joerghoh], see 
https://github.com/apache/sling-org-apache-sling-api/tree/feature/SLING-9662-Introduce-Resource-Mapping-SPI/src/main/java/org/apache/sling/api/resource/uri
 and:

{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.forPath("/path/to/resouce.sel.html/suffix");
// this works because ResourceUri implements  RequestPathInfo
RequestPathInfo requestPathInfo = requestPathInfoBuilder.build();
{code}
 if you want to change this in a URL you can just use 
{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.forPath("/path/to/resouce.sel.html/suffix");
resourceUriBuilder.useSchemeAndAuthority(new URI("https://example.com:8443;))
ResourceUri resourceUri = requestPathInfoBuilder.build();
String resourceUriStr = resourceUri.toString();
URI resourceRealURI = resourceUri.toUri();
{code}
or you can create a full URI to start with
{code}
ResourceUriBuilder resourceUriBuilder = 
ResourceUriBuilder.forPath("https://example.com/path/to/resouce.sel.html/suffix?test=1#frag;);
// and e.g. add a selector and change the suffix
resourceUriBuilder.addSelector("sel2")
resourceUriBuilder.setSuffix("/anotherSuffix")
ResourceUri resourceUri = requestPathInfoBuilder.build();
// resourceUri.toString() will contain
// https://example.com/path/to/resouce.sel.sel2.html/anotherSuffix?test=1#frag
{code}


> Add RequestPathInfoBuilder for easily constructing Sling URLs
> -
>
> Key: SLING-9660
> URL: https://issues.apache.org/jira/browse/SLING-9660
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: API 2.22.2
>
>
> Currently Sling URLs with their parts outlined in 
> https://sling.apache.org/documentation/the-sling-engine/url-decomposition.html
>  must be constructed manually (i.e. by String operations). 
> To ease constructing such URLs a {{RequestPathInfoBuilder}} should be 
> provided which allows to create a URL out of the individual parts easily.
> Such a Builder should be either constructed from an existing URL or 
> RequestPathInfo and should allow to modify/extend each of the given parts.
> The Builder should work similarly to 
> https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/utils/URIBuilder.html.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9662) Introduce a Resource Mapping SPI

2020-08-14 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9662:
-
Description: 
Introduce a simple SPI that allows to contribute to the resource resolver's 
map() and resolve() methods:

*ResourceUri:*

General purpose class to represent a ResourceUri (like e.g. a link in an html 
 tag). Immutable itself but adjustable using the builder pattern. Part of 
the Sling API and can be used anywhere to simplify handling/modification of 
Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
easily from a String, a Request, a Resource, a URI or a RequestPathInfo.

*ResourceToUriMapper:*

SPI interface to be implemented as OSGi Service. All registered services build 
a conceptual chain sorted by service ranking. The resource link is passed 
through the chain while any ResourceToUriMapper chain member may or may not 
make adjustments to the resource link.
 rr.resolve() passes through the chain starting at the ResourceToUriMapper with 
the highest service ranking and rr.map() passes through the 
chain starting at the ResourceToUriMapper with the lowest 
service ranking

_Mailing List References:_
 [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
 [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]

  was:
Introduce a simple SPI that allows to contribute to the resource resolver's 
map() and resolve() methods: 

*ResourceUri:*

General purpose class to represent a ResourceUri (like e.g. a link in an html 
 tag). Immutable itself but adjustable using the builder pattern. Part of 
the Sling API and can be used anywhere to simplify handling/modification of 
Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
easily from a String, a Request, a Resource, a URI or a RequestPathInfo.

*ResourceToUriMapper:*

SPI interface to be implemented as OSGi Service. All registered services build 
a conceptual chain sorted by service ranking. All registered services build a 
conceptual chain sorted by service ranking. The resource link is passed through 
the chain while any ResourceToUriMapper chain member may or may not make 
adjustments to the resource link.
rr.resolve() passes through the chain starting at the ResourceToUriMapper with 
the highest service ranking and rr.map() passes through the 
chain starting at the ResourceToUriMapper with the lowest 
service ranking

_Mailing List References:_
https://www.mail-archive.com/dev@sling.apache.org/msg93537.html 
https://www.mail-archive.com/dev@sling.apache.org/msg87736.html


> Introduce a Resource Mapping SPI
> 
>
> Key: SLING-9662
> URL: https://issues.apache.org/jira/browse/SLING-9662
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> *ResourceUri:*
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *ResourceToUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any ResourceToUriMapper chain member may or 
> may not make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the ResourceToUriMapper 
> with the highest service ranking and rr.map() passes through 
> the chain starting at the ResourceToUriMapper with the 
> lowest service ranking
> _Mailing List References:_
>  [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
>  [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-9662) Introduce a Resource Mapping SPI

2020-08-13 Thread Georg Henzler (Jira)
Georg Henzler created SLING-9662:


 Summary: Introduce a Resource Mapping SPI
 Key: SLING-9662
 URL: https://issues.apache.org/jira/browse/SLING-9662
 Project: Sling
  Issue Type: New Feature
  Components: API
Reporter: Georg Henzler
Assignee: Georg Henzler


Introduce a simple SPI that allows to contribute to the resource resolver's 
map() and resolve() methods: 

*ResourceUri:*

General purpose class to represent a ResourceUri (like e.g. a link in an html 
 tag). Immutable itself but adjustable using the builder pattern. Part of 
the Sling API and can be used anywhere to simplify handling/modification of 
Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
easily from a String, a Request, a Resource, a URI or a RequestPathInfo.

*ResourceToUriMapper:*

SPI interface to be implemented as OSGi Service. All registered services build 
a conceptual chain sorted by service ranking. All registered services build a 
conceptual chain sorted by service ranking. The resource link is passed through 
the chain while any ResourceToUriMapper chain member may or may not make 
adjustments to the resource link.
rr.resolve() passes through the chain starting at the ResourceToUriMapper with 
the highest service ranking and rr.map() passes through the 
chain starting at the ResourceToUriMapper with the lowest 
service ranking

_Mailing List References:_
https://www.mail-archive.com/dev@sling.apache.org/msg93537.html 
https://www.mail-archive.com/dev@sling.apache.org/msg87736.html



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-8354) Migrate all existing Health Checks in Sling to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler resolved SLING-8354.
--
Resolution: Fixed

> Migrate all existing Health Checks in Sling to Felix HC API
> ---
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: JUnit Health Check 1.0.8, Content Distribution Core 
> 0.4.4, Installer Health Checks 2.0.4, Commons Scheduler 2.7.8, Discovery Oak 
> 1.2.32
>
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to {{org.apache.felix.hc.api}} optional (to 
> make the base functionality still available if the HC framework is not 
> available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8354) Migrate all existing Health Checks in Sling to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8354:
-
Summary: Migrate all existing Health Checks in Sling to Felix HC API  (was: 
Migrate all existing Sling Health Checks to Felix HC API)

> Migrate all existing Health Checks in Sling to Felix HC API
> ---
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: JUnit Health Check 1.0.8, Content Distribution Core 
> 0.4.4, Installer Health Checks 2.0.4, Commons Scheduler 2.7.8, Discovery Oak 
> 1.2.32
>
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to {{org.apache.felix.hc.api}} optional (to 
> make the base functionality still available if the HC framework is not 
> available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8354) Migrate all existing Sling Health Checks to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8354:
-
Fix Version/s: JUnit Health Check 1.0.8

> Migrate all existing Sling Health Checks to Felix HC API
> 
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: JUnit Health Check 1.0.8, Content Distribution Core 
> 0.4.4, Installer Health Checks 2.0.4, Commons Scheduler 2.7.8, Discovery Oak 
> 1.2.32
>
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to {{org.apache.felix.hc.api}} optional (to 
> make the base functionality still available if the HC framework is not 
> available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-8354) Migrate all existing Sling Health Checks to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-8354:
--

Fixed for org-apache-sling-junit-healthcheck in 
[a9e947c25401db|https://github.com/apache/sling-org-apache-sling-junit-healthcheck/commit/a9e947c25401db062ae3cd7b5f1fde1db649c1b6]

> Migrate all existing Sling Health Checks to Felix HC API
> 
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Content Distribution Core 0.4.4, Installer Health Checks 
> 2.0.4, Commons Scheduler 2.7.8, Discovery Oak 1.2.32
>
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to {{org.apache.felix.hc.api}} optional (to 
> make the base functionality still available if the HC framework is not 
> available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8354) Migrate all existing Sling Health Checks to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8354:
-
Fix Version/s: Installer Health Checks 2.0.4

> Migrate all existing Sling Health Checks to Felix HC API
> 
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Content Distribution Core 0.4.4, Installer Health Checks 
> 2.0.4, Commons Scheduler 2.7.8, Discovery Oak 1.2.32
>
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to {{org.apache.felix.hc.api}} optional (to 
> make the base functionality still available if the HC framework is not 
> available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-8354) Migrate all existing Sling Health Checks to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-8354:
--

Fixed for org-apache-sling-installer-hc in 
[e70731be8fcaf62|https://github.com/apache/sling-org-apache-sling-installer-hc/commit/e70731be8fcaf624c6df15260559d76f5c51f850]

> Migrate all existing Sling Health Checks to Felix HC API
> 
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Content Distribution Core 0.4.4, Commons Scheduler 
> 2.7.8, Discovery Oak 1.2.32
>
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to {{org.apache.felix.hc.api}} optional (to 
> make the base functionality still available if the HC framework is not 
> available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-8354) Migrate all existing Sling Health Checks to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-8354:
--

Fixed for 
sling-org-apache-sling-commons-scheduler in 
[f6a4f78a9fbfe37|https://github.com/apache/sling-org-apache-sling-commons-scheduler/commit/f6a4f78a9fbfe37e127f36fbb96e5615f963d4bf]

> Migrate all existing Sling Health Checks to Felix HC API
> 
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Content Distribution Core 0.4.4, Discovery Oak 1.2.32
>
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to {{org.apache.felix.hc.api}} optional (to 
> make the base functionality still available if the HC framework is not 
> available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8354) Migrate all existing Sling Health Checks to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8354:
-
Fix Version/s: Commons Scheduler 2.7.8

> Migrate all existing Sling Health Checks to Felix HC API
> 
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Content Distribution Core 0.4.4, Commons Scheduler 
> 2.7.8, Discovery Oak 1.2.32
>
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to {{org.apache.felix.hc.api}} optional (to 
> make the base functionality still available if the HC framework is not 
> available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8354) Migrate all existing Sling Health Checks to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8354:
-
Fix Version/s: Discovery Oak 1.2.32

> Migrate all existing Sling Health Checks to Felix HC API
> 
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Content Distribution Core 0.4.4, Discovery Oak 1.2.32
>
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to {{org.apache.felix.hc.api}} optional (to 
> make the base functionality still available if the HC framework is not 
> available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8354) Migrate all existing Sling Health Checks to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8354:
-
Description: 
Migrate all health checks in Sling project to use the new Felix HC API.

Generally make the package import to {{org.apache.felix.hc.api}} optional (to 
make the base functionality still available if the HC framework is not 
available)

  was:
Migrate all health checks in Sling project to use the new Felix HC API.

Generally make the package import to optional (to make the base functionality 
still available if the HC framework is not available)


> Migrate all existing Sling Health Checks to Felix HC API
> 
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Content Distribution Core 0.4.4
>
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to {{org.apache.felix.hc.api}} optional (to 
> make the base functionality still available if the HC framework is not 
> available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-8354) Migrate all existing Sling Health Checks to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-8354:
--

Fixed for org.apache.sling.discovery.oak in 
[e84a875062ecc17ed6d5|https://github.com/apache/sling-org-apache-sling-distribution-core/commit/e84a875062ecc17ed6d5711ef6e666c932dbe7ab]

> Migrate all existing Sling Health Checks to Felix HC API
> 
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Content Distribution Core 0.4.4
>
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to optional (to make the base functionality 
> still available if the HC framework is not available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8354) Migrate all existing Sling Health Checks to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8354:
-
Fix Version/s: Content Distribution Core 0.4.4

> Migrate all existing Sling Health Checks to Felix HC API
> 
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Content Distribution Core 0.4.4
>
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to optional (to make the base functionality 
> still available if the HC framework is not available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-8354) Migrate all existing Sling Health Checks to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-8354:
--

Fixed for sling-org-apache-sling-distribution-core in 
[e84a875062ecc17ed6d5|https://github.com/apache/sling-org-apache-sling-distribution-core/commit/e84a875062ecc17ed6d5711ef6e666c932dbe7ab]

> Migrate all existing Sling Health Checks to Felix HC API
> 
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to optional (to make the base functionality 
> still available if the HC framework is not available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8354) Migrate all existing Sling Health Checks to Felix HC API

2020-08-04 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8354:
-
Description: 
Migrate all health checks in Sling project to use the new Felix HC API.

Generally make the package import to optional (to make the base functionality 
still available if the HC framework is not available)

  was:Migrate all health checks in Sling project to use the new Felix HC API.


> Migrate all existing Sling Health Checks to Felix HC API
> 
>
> Key: SLING-8354
> URL: https://issues.apache.org/jira/browse/SLING-8354
> Project: Sling
>  Issue Type: New Feature
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> Migrate all health checks in Sling project to use the new Felix HC API.
> Generally make the package import to optional (to make the base functionality 
> still available if the HC framework is not available)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9211) Startup detection not working reliable anymore

2020-07-20 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9211:
--

So I checked with 
{code}
java -jar org.apache.sling.feature.launcher-1.1.4.jar -f 
target/slingfeature-tmp/feature-oak_tar.json
{code}
that produced the log file  
[^startup-ServiceUnavailableFilter-first-startup-feature-launcher.log]. It 
works well and the ServiceUnavailableFilter is correctly activated at start 
level 5 on first start already. 

> Startup detection not working reliable anymore
> --
>
> Key: SLING-9211
> URL: https://issues.apache.org/jira/browse/SLING-9211
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Attachments: 
> startup-ServiceUnavailableFilter-2nd-startup-works-fine.log, 
> startup-ServiceUnavailableFilter-first-startup-feature-launcher.log, 
> startup-ServiceUnavailableFilter-too-late-registered.log
>
>
> It seems with SLING-8418 the 503 responses are not as reliable as with the 
> previous custom solution. 
> To be checked with script in 
> https://issues.apache.org/jira/browse/FELIX-6097?focusedCommentId=16813130=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16813130



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9211) Startup detection not working reliable anymore

2020-07-20 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9211:
-
Attachment: 
startup-ServiceUnavailableFilter-first-startup-feature-launcher.log

> Startup detection not working reliable anymore
> --
>
> Key: SLING-9211
> URL: https://issues.apache.org/jira/browse/SLING-9211
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Attachments: 
> startup-ServiceUnavailableFilter-2nd-startup-works-fine.log, 
> startup-ServiceUnavailableFilter-first-startup-feature-launcher.log, 
> startup-ServiceUnavailableFilter-too-late-registered.log
>
>
> It seems with SLING-8418 the 503 responses are not as reliable as with the 
> previous custom solution. 
> To be checked with script in 
> https://issues.apache.org/jira/browse/FELIX-6097?focusedCommentId=16813130=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16813130



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9211) Startup detection not working reliable anymore

2020-07-20 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9211:
--

[~rombert] I think at the moment the feature model variant is marked as 
experimental README.md - but if we swap over soon we obviously don't need to 
fix "the old world" (I think the problem described is more in project 
org.apache.sling.launchpad.installer than in OSGi installer, but also that will 
be deprecated soon I suppose). I'm testing now the experimental feature model 
variant

> Startup detection not working reliable anymore
> --
>
> Key: SLING-9211
> URL: https://issues.apache.org/jira/browse/SLING-9211
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Attachments: 
> startup-ServiceUnavailableFilter-2nd-startup-works-fine.log, 
> startup-ServiceUnavailableFilter-too-late-registered.log
>
>
> It seems with SLING-8418 the 503 responses are not as reliable as with the 
> previous custom solution. 
> To be checked with script in 
> https://issues.apache.org/jira/browse/FELIX-6097?focusedCommentId=16813130=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16813130



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (SLING-9211) Startup detection not working reliable anymore

2020-07-20 Thread Georg Henzler (Jira)


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

Georg Henzler edited comment on SLING-9211 at 7/20/20, 10:28 AM:
-

[~rombert] I think at the moment the feature model variant is marked as 
experimental in README.md - but if we swap over soon we obviously don't need to 
fix "the old world" (I think the problem described is more in project 
org.apache.sling.launchpad.installer than in OSGi installer, but also that will 
be deprecated soon I suppose). I'm testing now the experimental feature model 
variant


was (Author: henzlerg):
[~rombert] I think at the moment the feature model variant is marked as 
experimental README.md - but if we swap over soon we obviously don't need to 
fix "the old world" (I think the problem described is more in project 
org.apache.sling.launchpad.installer than in OSGi installer, but also that will 
be deprecated soon I suppose). I'm testing now the experimental feature model 
variant

> Startup detection not working reliable anymore
> --
>
> Key: SLING-9211
> URL: https://issues.apache.org/jira/browse/SLING-9211
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Attachments: 
> startup-ServiceUnavailableFilter-2nd-startup-works-fine.log, 
> startup-ServiceUnavailableFilter-too-late-registered.log
>
>
> It seems with SLING-8418 the 503 responses are not as reliable as with the 
> previous custom solution. 
> To be checked with script in 
> https://issues.apache.org/jira/browse/FELIX-6097?focusedCommentId=16813130=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16813130



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (SLING-9211) Startup detection not working reliable anymore

2020-07-20 Thread Georg Henzler (Jira)


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

Georg Henzler edited comment on SLING-9211 at 7/20/20, 10:24 AM:
-

See attached [^startup-ServiceUnavailableFilter-too-late-registered.log] on 
what is happening (the result of {{cat sling/logs/error.log | grep -E 
"(ServiceUnavailable|health|Health)"}}). The only difference to the current 
committed version is that I added a bundle with 
org.apache.sling.starter.startup.impl.EventLogger that logs OSGi events 
together with current start level. 

See also  [^startup-ServiceUnavailableFilter-2nd-startup-works-fine.log] on how 
everything works fine (on second startup bundles start at start level 5 and 
configs become correctly active)

[~cziegeler] So I'm pretty sure the expected behaviour is currently broken... 
maybe you can have a look? 


was (Author: henzlerg):
See attached [^startup-ServiceUnavailableFilter-too-late-registered.log] on 
what is happening (the result of {{cat sling/logs/error.log | grep -E 
"(ServiceUnavailable|health|Health)"}}). The only difference to the current 
committed version is that I added a bundle with 
org.apache.sling.starter.startup.impl.EventLogger that logs OSGi events 
together with current startlevel. 

[~cziegeler] So I'm pretty sure the expected behaviour is currently broken... 
maybe you can have a look? 

> Startup detection not working reliable anymore
> --
>
> Key: SLING-9211
> URL: https://issues.apache.org/jira/browse/SLING-9211
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Attachments: 
> startup-ServiceUnavailableFilter-2nd-startup-works-fine.log, 
> startup-ServiceUnavailableFilter-too-late-registered.log
>
>
> It seems with SLING-8418 the 503 responses are not as reliable as with the 
> previous custom solution. 
> To be checked with script in 
> https://issues.apache.org/jira/browse/FELIX-6097?focusedCommentId=16813130=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16813130



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9211) Startup detection not working reliable anymore

2020-07-20 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9211:
-
Attachment: startup-ServiceUnavailableFilter-2nd-startup-works-fine.log

> Startup detection not working reliable anymore
> --
>
> Key: SLING-9211
> URL: https://issues.apache.org/jira/browse/SLING-9211
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Attachments: 
> startup-ServiceUnavailableFilter-2nd-startup-works-fine.log, 
> startup-ServiceUnavailableFilter-too-late-registered.log
>
>
> It seems with SLING-8418 the 503 responses are not as reliable as with the 
> previous custom solution. 
> To be checked with script in 
> https://issues.apache.org/jira/browse/FELIX-6097?focusedCommentId=16813130=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16813130



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9211) Startup detection not working reliable anymore

2020-07-20 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9211:
--

See attached [^startup-ServiceUnavailableFilter-too-late-registered.log] on 
what is happening (the result of {{cat sling/logs/error.log | grep -E 
"(ServiceUnavailable|health|Health)"}}). The only difference to the current 
committed version is that I added a bundle with 
org.apache.sling.starter.startup.impl.EventLogger that logs OSGi events 
together with current startlevel. 

[~cziegeler] So I'm pretty sure the expected behaviour is currently broken... 
maybe you can have a look? 

> Startup detection not working reliable anymore
> --
>
> Key: SLING-9211
> URL: https://issues.apache.org/jira/browse/SLING-9211
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Attachments: startup-ServiceUnavailableFilter-too-late-registered.log
>
>
> It seems with SLING-8418 the 503 responses are not as reliable as with the 
> previous custom solution. 
> To be checked with script in 
> https://issues.apache.org/jira/browse/FELIX-6097?focusedCommentId=16813130=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16813130



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9211) Startup detection not working reliable anymore

2020-07-20 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-9211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-9211:
-
Attachment: startup-ServiceUnavailableFilter-too-late-registered.log

> Startup detection not working reliable anymore
> --
>
> Key: SLING-9211
> URL: https://issues.apache.org/jira/browse/SLING-9211
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Attachments: startup-ServiceUnavailableFilter-too-late-registered.log
>
>
> It seems with SLING-8418 the 503 responses are not as reliable as with the 
> previous custom solution. 
> To be checked with script in 
> https://issues.apache.org/jira/browse/FELIX-6097?focusedCommentId=16813130=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16813130



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9211) Startup detection not working reliable anymore

2020-07-19 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-9211:
--

I analysed the problem and I think the problem only exists on first startup 
(subsequent startups seem fine). The following is happening:

* the OSGi framework quickly "shoots up" to start level 30
* then the OSGi installer installs the bundles following the "conceptual start 
level order" as given by provisioning files but at actual start level 30 (also 
the start level is set to bundle for subsequent startups, but first startup 
installs everything on start level 30)
* only once all bundles are installed the configurations are installed (there 
is a significant delay between installing a bundle and configurations that are 
meant for the bundle). 
* While the configurations for ServiceUnvailableFilter and systemready health 
checks are not available yet (delay from point above), the Sling startup page 
is not shown yet

There are multiple options to fix the problem:
# Extend health check core with a bundle activator that "forces the relevant 
configurations" into the systems
** I have tested this approach (using "felix.health.ServiceUnavailableFilter.*" 
framework properties) and it works, however it feels like a workaround
# Change the launchpad to generally install configurations straight after the 
config admin is available (this seems conceptually the right thing to do for 
me, but there might be reasons for the current state that I'm not aware of)
# Change the launchpad to mark certain configurations as "bootstrap" (or 
similar naming), only those are installed immediately after the config admin 
becomes available

I also see that SLING-9498 introduced the possibility to run it with the 
feature model (maybe there configurations are respected as early as possible 
during startup? I haven't tried yet)

[~cziegeler] WDYT, what option from above would be best?



> Startup detection not working reliable anymore
> --
>
> Key: SLING-9211
> URL: https://issues.apache.org/jira/browse/SLING-9211
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> It seems with SLING-8418 the 503 responses are not as reliable as with the 
> previous custom solution. 
> To be checked with script in 
> https://issues.apache.org/jira/browse/FELIX-6097?focusedCommentId=16813130=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16813130



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-9211) Startup detection not working reliable anymore

2020-03-17 Thread Georg Henzler (Jira)
Georg Henzler created SLING-9211:


 Summary: Startup detection not working reliable anymore
 Key: SLING-9211
 URL: https://issues.apache.org/jira/browse/SLING-9211
 Project: Sling
  Issue Type: Improvement
  Components: Starter
Reporter: Georg Henzler
Assignee: Georg Henzler


It seems with SLING-8418 the 503 responses are not as reliable as with the 
previous custom solution. 

To be checked with script in 
https://issues.apache.org/jira/browse/FELIX-6097?focusedCommentId=16813130=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16813130



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-8948) Ignore Installer Vault Package Install Hook when being used with the feature model

2019-12-21 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-8948:
--

Fixed in 
[ca524dd129ddd|https://github.com/apache/sling-org-apache-sling-installer-provider-installhook/commit/ca524dd129ddd13a8f847292d94e009e7f3f49cd]

> Ignore Installer Vault Package Install Hook when being used with the feature 
> model
> --
>
> Key: SLING-8948
> URL: https://issues.apache.org/jira/browse/SLING-8948
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>
> For instances being set up with the feature model, 
> org.apache.sling.installer.api may not be available. For that case the 
> Installer Vault Package Install Hook should be ignored (that way packages 
> containing the hook can be used for both starter mechanisms).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-8948) Ignore Installer Vault Package Install Hook when being used with the feature model

2019-12-21 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler resolved SLING-8948.
--
Resolution: Fixed

> Ignore Installer Vault Package Install Hook when being used with the feature 
> model
> --
>
> Key: SLING-8948
> URL: https://issues.apache.org/jira/browse/SLING-8948
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>
> For instances being set up with the feature model, 
> org.apache.sling.installer.api may not be available. For that case the 
> Installer Vault Package Install Hook should be ignored (that way packages 
> containing the hook can be used for both starter mechanisms).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-8949) Handle two digits versions correctly

2019-12-21 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler resolved SLING-8949.
--
Resolution: Fixed

> Handle two digits versions correctly
> 
>
> Key: SLING-8949
> URL: https://issues.apache.org/jira/browse/SLING-8949
> Project: Sling
>  Issue Type: Bug
>  Components: Installer
>Reporter: Georg Henzler
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>
> See e.g. 
> https://search.maven.org/artifact/org.bouncycastle/bcprov-jdk15on/1.64/jar 
> The problem is that org.osgi.framework.Version.toString() returns 1.64.0, the 
> respecting code needs to be adjusted to handle two digit versions correctly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-8949) Handle two digits versions correctly

2019-12-21 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-8949:
--

Fixed in 
[f45a29a581980d|https://github.com/apache/sling-org-apache-sling-installer-provider-installhook/commit/f45a29a581980d15974e530263d91a5d435829d3]

> Handle two digits versions correctly
> 
>
> Key: SLING-8949
> URL: https://issues.apache.org/jira/browse/SLING-8949
> Project: Sling
>  Issue Type: Bug
>  Components: Installer
>Reporter: Georg Henzler
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>
> See e.g. 
> https://search.maven.org/artifact/org.bouncycastle/bcprov-jdk15on/1.64/jar 
> The problem is that org.osgi.framework.Version.toString() returns 1.64.0, the 
> respecting code needs to be adjusted to handle two digit versions correctly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-8291) Expose the reason why a resource is currently not in "INSTALLED" state

2019-12-21 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler resolved SLING-8291.
--
Resolution: Fixed

> Expose the reason why a resource is currently not in "INSTALLED" state
> --
>
> Key: SLING-8291
> URL: https://issues.apache.org/jira/browse/SLING-8291
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Vault Package Install Hook 1.0.2
>Reporter: Konrad Windszus
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> With SLING-6176 there is now an optional error text available why a resource 
> was not installed. That error text should be exposed in 
> https://github.com/apache/sling-org-apache-sling-installer-provider-installhook/blob/4a5f5812003262b7ac7687bcaadc96bc094dec2d/src/main/java/org/apache/sling/installer/provider/installhook/OsgiInstallerHook.java#L266
>  as well to ease debugging.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-8291) Expose the reason why a resource is currently not in "INSTALLED" state

2019-12-21 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-8291:
--

Fixed in  
[2fe294dc2bd80e3|https://github.com/apache/sling-org-apache-sling-installer-provider-installhook/commit/2fe294dc2bd80e3778d716c785c324da4872301d],
 thanks [~kwin] for providing the PR.

> Expose the reason why a resource is currently not in "INSTALLED" state
> --
>
> Key: SLING-8291
> URL: https://issues.apache.org/jira/browse/SLING-8291
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Vault Package Install Hook 1.0.2
>Reporter: Konrad Windszus
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> With SLING-6176 there is now an optional error text available why a resource 
> was not installed. That error text should be exposed in 
> https://github.com/apache/sling-org-apache-sling-installer-provider-installhook/blob/4a5f5812003262b7ac7687bcaadc96bc094dec2d/src/main/java/org/apache/sling/installer/provider/installhook/OsgiInstallerHook.java#L266
>  as well to ease debugging.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-8713) Get rid of commons lang 2.x

2019-12-21 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler resolved SLING-8713.
--
Resolution: Fixed

> Get rid of commons lang 2.x
> ---
>
> Key: SLING-8713
> URL: https://issues.apache.org/jira/browse/SLING-8713
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Vault Package Install Hook 1.0.2
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>
> Compare with https://issues.apache.org/jira/browse/SLING-7953. Commons Lang 2 
> is no longer provided with new launchpad (compare with 
> https://issues.apache.org/jira/browse/SLING-7953).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-8713) Get rid of commons lang 2.x

2019-12-21 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-8713:
--

Fixed in 
[52e56ebf9b4e092984|https://github.com/apache/sling-org-apache-sling-installer-provider-installhook/commit/52e56ebf9b4e092984759647fa6a36e34daa811f]

> Get rid of commons lang 2.x
> ---
>
> Key: SLING-8713
> URL: https://issues.apache.org/jira/browse/SLING-8713
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Vault Package Install Hook 1.0.2
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>
> Compare with https://issues.apache.org/jira/browse/SLING-7953. Commons Lang 2 
> is no longer provided with new launchpad (compare with 
> https://issues.apache.org/jira/browse/SLING-7953).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-8714) Mark all dependencies with scope provided

2019-12-21 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler resolved SLING-8714.
--
Resolution: Fixed

> Mark all dependencies with scope provided
> -
>
> Key: SLING-8714
> URL: https://issues.apache.org/jira/browse/SLING-8714
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Vault Package Install Hook 1.0.2
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>
> Currently some dependencies in 
> https://github.com/apache/sling-org-apache-sling-installer-provider-installhook/blob/master/pom.xml
>  are not of scope "provided" which may lead to undesired transitive class 
> path clutter.
> Also all test dependencies should always have the explicit scope "test" (even 
> in case they are managed with a scope).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-8714) Mark all dependencies with scope provided

2019-12-21 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-8714:
--

Fixed in 
[9adba7706e8930|https://github.com/apache/sling-org-apache-sling-installer-provider-installhook/commit/9adba7706e8930cdb668198249dc12876fa89c0b]

> Mark all dependencies with scope provided
> -
>
> Key: SLING-8714
> URL: https://issues.apache.org/jira/browse/SLING-8714
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Vault Package Install Hook 1.0.2
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>
> Currently some dependencies in 
> https://github.com/apache/sling-org-apache-sling-installer-provider-installhook/blob/master/pom.xml
>  are not of scope "provided" which may lead to undesired transitive class 
> path clutter.
> Also all test dependencies should always have the explicit scope "test" (even 
> in case they are managed with a scope).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8949) Handle two digits versions correctly

2019-12-20 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8949:
-
Fix Version/s: Installer Vault Package Install Hook 1.1.0

> Handle two digits versions correctly
> 
>
> Key: SLING-8949
> URL: https://issues.apache.org/jira/browse/SLING-8949
> Project: Sling
>  Issue Type: Bug
>  Components: Installer
>Reporter: Georg Henzler
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>
> See e.g. 
> https://search.maven.org/artifact/org.bouncycastle/bcprov-jdk15on/1.64/jar 
> The problem is that org.osgi.framework.Version.toString() returns 1.64.0, the 
> respecting code needs to be adjusted to handle two digit versions correctly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-8949) Handle two digits versions correctly

2019-12-20 Thread Georg Henzler (Jira)
Georg Henzler created SLING-8949:


 Summary: Handle two digits versions correctly
 Key: SLING-8949
 URL: https://issues.apache.org/jira/browse/SLING-8949
 Project: Sling
  Issue Type: Bug
  Components: Installer
Reporter: Georg Henzler


See e.g. 
https://search.maven.org/artifact/org.bouncycastle/bcprov-jdk15on/1.64/jar 

The problem is that org.osgi.framework.Version.toString() returns 1.64.0, the 
respecting code needs to be adjusted to handle two digit versions correctly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8948) Ignore Installer Vault Package Install Hook when being used with the feature model

2019-12-20 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8948:
-
Fix Version/s: Installer Vault Package Install Hook 1.1.0

> Ignore Installer Vault Package Install Hook when being used with the feature 
> model
> --
>
> Key: SLING-8948
> URL: https://issues.apache.org/jira/browse/SLING-8948
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>
> For instances being set up with the feature model, 
> org.apache.sling.installer.api may not be available. For that case the 
> Installer Vault Package Install Hook should be ignored (that way packages 
> containing the hook can be used for both starter mechanisms).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8291) Expose the reason why a resource is currently not in "INSTALLED" state

2019-12-20 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8291:
-
Fix Version/s: (was: Installer Vault Package Install Hook 1.0.4)
   Installer Vault Package Install Hook 1.1.0

> Expose the reason why a resource is currently not in "INSTALLED" state
> --
>
> Key: SLING-8291
> URL: https://issues.apache.org/jira/browse/SLING-8291
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Vault Package Install Hook 1.0.2
>Reporter: Konrad Windszus
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> With SLING-6176 there is now an optional error text available why a resource 
> was not installed. That error text should be exposed in 
> https://github.com/apache/sling-org-apache-sling-installer-provider-installhook/blob/4a5f5812003262b7ac7687bcaadc96bc094dec2d/src/main/java/org/apache/sling/installer/provider/installhook/OsgiInstallerHook.java#L266
>  as well to ease debugging.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8713) Get rid of commons lang 2.x

2019-12-20 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8713:
-
Fix Version/s: (was: Installer Vault Package Install Hook 1.0.4)
   Installer Vault Package Install Hook 1.1.0

> Get rid of commons lang 2.x
> ---
>
> Key: SLING-8713
> URL: https://issues.apache.org/jira/browse/SLING-8713
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Vault Package Install Hook 1.0.2
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>
> Compare with https://issues.apache.org/jira/browse/SLING-7953. Commons Lang 2 
> is no longer provided with new launchpad (compare with 
> https://issues.apache.org/jira/browse/SLING-7953).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8714) Mark all dependencies with scope provided

2019-12-20 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8714:
-
Fix Version/s: (was: Installer Vault Package Install Hook 1.0.4)
   Installer Vault Package Install Hook 1.1.0

> Mark all dependencies with scope provided
> -
>
> Key: SLING-8714
> URL: https://issues.apache.org/jira/browse/SLING-8714
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Vault Package Install Hook 1.0.2
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: Installer Vault Package Install Hook 1.1.0
>
>
> Currently some dependencies in 
> https://github.com/apache/sling-org-apache-sling-installer-provider-installhook/blob/master/pom.xml
>  are not of scope "provided" which may lead to undesired transitive class 
> path clutter.
> Also all test dependencies should always have the explicit scope "test" (even 
> in case they are managed with a scope).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-8948) Ignore Installer Vault Package Install Hook when being used with the feature model

2019-12-20 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8948:
-
Component/s: Installer

> Ignore Installer Vault Package Install Hook when being used with the feature 
> model
> --
>
> Key: SLING-8948
> URL: https://issues.apache.org/jira/browse/SLING-8948
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>
> For instances being set up with the feature model, 
> org.apache.sling.installer.api may not be available. For that case the 
> Installer Vault Package Install Hook should be ignored (that way packages 
> containing the hook can be used for both starter mechanisms).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-8948) Ignore Installer Vault Package Install Hook when being used with the feature model

2019-12-20 Thread Georg Henzler (Jira)
Georg Henzler created SLING-8948:


 Summary: Ignore Installer Vault Package Install Hook when being 
used with the feature model
 Key: SLING-8948
 URL: https://issues.apache.org/jira/browse/SLING-8948
 Project: Sling
  Issue Type: Improvement
Reporter: Georg Henzler
Assignee: Georg Henzler


For instances being set up with the feature model, 
org.apache.sling.installer.api may not be available. For that case the 
Installer Vault Package Install Hook should be ignored (that way packages 
containing the hook can be used for both starter mechanisms).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-8939) Async Health Checks also executed every minute

2019-12-19 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-8939:
--

bq. health checks were executed every minute by default

by default HCs are only executed when requested, that means there is some 
client requesting every minute. 

if that client (could be http, JMX or via API) sets the option 
forceInstantExecution, you get the described behavior. Can you check if that’s 
the case in your setup [~muenkti] ?

> Async Health Checks also executed every minute
> --
>
> Key: SLING-8939
> URL: https://issues.apache.org/jira/browse/SLING-8939
> Project: Sling
>  Issue Type: Bug
>  Components: Health Check
>Reporter: Timo Münkenwarf
>Priority: Major
>
> Hello,
> I currently observed something with async health checks.
> We recently migrated to AEM6.5 and observed, that our health checks were 
> executed every minute by default. Because this was to often, I tried to use 
> asyncCronExpression.
> This makes our Health Checks executed as defined in the asyncCronExpression, 
> but additionally they are still executed every minute.
> Is this a bug or how can I let my Health Checks _only_ be executed as defined 
> in the asyncCronExpression?
> I add some log output at the end. In that case the StaleWorkflowsHealthCheck  
> should be executed every 5 minutes (asyncCronExpression = "0 0/5 * * * ? *")
> Thanks for your help.
> Timo
>  
> |44| 
> [Apache Sling Health Check API 
> (org.apache.sling.hc.api)|http://localhost:4502/system/console/bundles/44]|1.0.2|sling|Active|
>  |
> |536| 
> [Apache Sling Health Check Core 
> (org.apache.sling.hc.core)|http://localhost:4502/system/console/bundles/536]|1.2.10|sling|Active|
>  
> {code:java}
>  19.12.2019 16:46:01.402 *DEBUG* [OsgiInstallerImpl] 
> com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck CUST-Web 
> Stale Workflows Health Check started.
> 19.12.2019 16:47:01.406 *DEBUG* 
> [sling-default-4-health-com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck]
>  com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck CUST-Web 
> Stale Workflows Health Check started.
> 19.12.2019 16:48:01.406 *DEBUG* 
> [sling-default-1-health-com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck]
>  com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck CUST-Web 
> Stale Workflows Health Check started.
> 19.12.2019 16:49:01.406 *DEBUG* 
> [sling-default-5-health-com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck]
>  com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck CUST-Web 
> Stale Workflows Health Check started.
> 19.12.2019 16:50:00.000 *DEBUG* [sling-default-3-job-hc-13695] 
> org.apache.sling.hc.core.impl.executor.AsyncHealthCheckExecutor Running job 
> [Async job for HealthCheck 'CUST-Web Stale Workflows Health Check']
> 19.12.2019 16:50:00.000 *DEBUG* [HealthCheck CUST-Web Stale Workflows Health 
> Check] org.apache.sling.hc.core.impl.executor.HealthCheckFuture Starting 
> check HealthCheck 'CUST-Web Stale Workflows Health Check'
> 19.12.2019 16:50:00.000 *DEBUG* [HealthCheck CUST-Web Stale Workflows Health 
> Check] com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck 
> CUST-Web Stale Workflows Health Check started.
> 19.12.2019 16:50:00.005 *DEBUG* [HealthCheck CUST-Web Stale Workflows Health 
> Check] com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck No 
> stale workflows that are older then 2 day(s) were found.
> 19.12.2019 16:50:00.005 *DEBUG* [HealthCheck CUST-Web Stale Workflows Health 
> Check] org.apache.sling.hc.core.impl.executor.HealthCheckFuture Time consumed 
> for HealthCheck 'CUST-Web Stale Workflows Health Check': 4ms
> 19.12.2019 16:50:00.005 *DEBUG* [HealthCheck CUST-Web Stale Workflows Health 
> Check] org.apache.sling.hc.core.impl.executor.AsyncHealthCheckExecutor 
> Updated result for async hc HealthCheck 'CUST-Web Stale Workflows Health 
> Check' with ExecutionResult [status=OK, finishedAt=Thu Dec 19 16:50:00 CET 
> 2019, elapsedTimeInMs=4, timedOut=false]
> 19.12.2019 16:50:01.406 *DEBUG* 
> [sling-default-4-health-com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck]
>  com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck CUST-Web 
> Stale Workflows Health Check started.
> 19.12.2019 16:51:01.407 *DEBUG* 
> [sling-default-3-health-com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck]
>  com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck CUST-Web 
> Stale Workflows Health Check started.
> 19.12.2019 16:52:01.407 *DEBUG* 
> [sling-default-5-health-com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck]
>  com.cust.web.core.service.healthchecks.StaleWorkflowsHealthCheck CUST-Web 
> Stale Workflows 

[jira] [Resolved] (SLING-8653) Noop version of bundles org.apache.sling.hc.core and org.apache.sling.hc.webconsole

2019-08-22 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler resolved SLING-8653.
--
Resolution: Fixed

> Noop version of bundles org.apache.sling.hc.core and 
> org.apache.sling.hc.webconsole
> ---
>
> Key: SLING-8653
> URL: https://issues.apache.org/jira/browse/SLING-8653
> Project: Sling
>  Issue Type: Improvement
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Health Check Core 2.0.0, Health Check webconsole 2.0.0
>
>
> When creating new runtimes (by e.g. using the Sling starter SLING-8343) the 
> bundles org.apache.sling.hc.core and org.apache.sling.hc.webconsole can be 
> just left out. However for existing instances (based on the legacy 
> provisioning model), it would be handy to have noop versions of the bundles 
> to allow "deactivating" the sling hc bundles (leaving only the felix bundles 
> active)



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Commented] (SLING-8653) Noop version of bundles org.apache.sling.hc.core and org.apache.sling.hc.webconsole

2019-08-22 Thread Georg Henzler (Jira)


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

Georg Henzler commented on SLING-8653:
--

Pushed 
https://github.com/apache/sling-org-apache-sling-hc-core/tree/noop-version-for-felix-migration
 and 
https://github.com/apache/sling-org-apache-sling-hc-webconsole/tree/noop-version-for-felix-migration
 with version 2.0.0 (although there are no packages exported with semantic 
versioning, a major version bump makes sense here as everything changes, also 
this allows to potentially release a 1.x version from maintenance branch if 
really needed)

> Noop version of bundles org.apache.sling.hc.core and 
> org.apache.sling.hc.webconsole
> ---
>
> Key: SLING-8653
> URL: https://issues.apache.org/jira/browse/SLING-8653
> Project: Sling
>  Issue Type: Improvement
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Health Check Core 2.0.0, Health Check webconsolee 2.0.0
>
>
> When creating new runtimes (by e.g. using the Sling starter SLING-8343) the 
> bundles org.apache.sling.hc.core and org.apache.sling.hc.webconsole can be 
> just left out. However for existing instances (based on the legacy 
> provisioning model), it would be handy to have noop versions of the bundles 
> to allow "deactivating" the sling hc bundles (leaving only the felix bundles 
> active)



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Updated] (SLING-8653) Noop version of bundles org.apache.sling.hc.core and org.apache.sling.hc.webconsole

2019-08-22 Thread Georg Henzler (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler updated SLING-8653:
-
Fix Version/s: Health Check webconsolee 2.0.0
   Health Check Core 2.0.0

> Noop version of bundles org.apache.sling.hc.core and 
> org.apache.sling.hc.webconsole
> ---
>
> Key: SLING-8653
> URL: https://issues.apache.org/jira/browse/SLING-8653
> Project: Sling
>  Issue Type: Improvement
>  Components: Health Check
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Health Check Core 2.0.0, Health Check webconsolee 2.0.0
>
>
> When creating new runtimes (by e.g. using the Sling starter SLING-8343) the 
> bundles org.apache.sling.hc.core and org.apache.sling.hc.webconsole can be 
> just left out. However for existing instances (based on the legacy 
> provisioning model), it would be handy to have noop versions of the bundles 
> to allow "deactivating" the sling hc bundles (leaving only the felix bundles 
> active)



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Created] (SLING-8653) Noop version of bundles org.apache.sling.hc.core and org.apache.sling.hc.webconsole

2019-08-22 Thread Georg Henzler (Jira)
Georg Henzler created SLING-8653:


 Summary: Noop version of bundles org.apache.sling.hc.core and 
org.apache.sling.hc.webconsole
 Key: SLING-8653
 URL: https://issues.apache.org/jira/browse/SLING-8653
 Project: Sling
  Issue Type: Improvement
  Components: Health Check
Reporter: Georg Henzler
Assignee: Georg Henzler


When creating new runtimes (by e.g. using the Sling starter SLING-8343) the 
bundles org.apache.sling.hc.core and org.apache.sling.hc.webconsole can be just 
left out. However for existing instances (based on the legacy provisioning 
model), it would be handy to have noop versions of the bundles to allow 
"deactivating" the sling hc bundles (leaving only the felix bundles active)



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Commented] (SLING-8567) Support start levels declared via JCR path in input packages to cp2sf

2019-07-09 Thread Georg Henzler (JIRA)


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

Georg Henzler commented on SLING-8567:
--

Fixed in 
[424e121130b|https://github.com/apache/sling-org-apache-sling-feature-cpconverter/commit/424e121130b75f296a2b327b01e4796468c35602]

> Support start levels declared via JCR path in input packages to cp2sf
> -
>
> Key: SLING-8567
> URL: https://issues.apache.org/jira/browse/SLING-8567
> Project: Sling
>  Issue Type: Improvement
>  Components: Content-Package to Feature Model Converter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> The JCR Installer provider supports start levels [1], hence the 
> Content-Package to Feature Model Converter should also support this feature.
> [1]  
> https://sling.apache.org/documentation/bundles/jcr-installer-provider.html#start-level-support
>  - this was introduced with SLING-2011



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SLING-8567) Support start levels declared via JCR path in input packages to cp2sf

2019-07-09 Thread Georg Henzler (JIRA)


 [ 
https://issues.apache.org/jira/browse/SLING-8567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler resolved SLING-8567.
--
Resolution: Fixed

> Support start levels declared via JCR path in input packages to cp2sf
> -
>
> Key: SLING-8567
> URL: https://issues.apache.org/jira/browse/SLING-8567
> Project: Sling
>  Issue Type: Improvement
>  Components: Content-Package to Feature Model Converter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> The JCR Installer provider supports start levels [1], hence the 
> Content-Package to Feature Model Converter should also support this feature.
> [1]  
> https://sling.apache.org/documentation/bundles/jcr-installer-provider.html#start-level-support
>  - this was introduced with SLING-2011



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SLING-8567) Support start levels declared via JCR path in input packages to cp2sf

2019-07-08 Thread Georg Henzler (JIRA)
Georg Henzler created SLING-8567:


 Summary: Support start levels declared via JCR path in input 
packages to cp2sf
 Key: SLING-8567
 URL: https://issues.apache.org/jira/browse/SLING-8567
 Project: Sling
  Issue Type: Improvement
  Components: Content-Package to Feature Model Converter
Reporter: Georg Henzler
Assignee: Georg Henzler


The JCR Installer provider supports start levels [1], hence the Content-Package 
to Feature Model Converter should also support this feature.

[1]  
https://sling.apache.org/documentation/bundles/jcr-installer-provider.html#start-level-support
 - this was introduced with SLING-2011



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-8375) SlingPostServlet: :import operation must skip protected properties if present

2019-07-02 Thread Georg Henzler (JIRA)


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

Georg Henzler commented on SLING-8375:
--

I fully agree to [~sdumitriu]'s comment 
https://issues.apache.org/jira/browse/SLING-8375?focusedCommentId=16874490=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16874490

We should not impose unnecessary complexity in the client (because that has to 
be implemented at scale across many projects) but rather do it in the server 
(where it is fixed for everyone once implemented). IMHO the goal has to be to 
allow for for a roundtrip without knowing that something like a "roundtrip get 
url" exists. 

Now it turns out that we cannot rely purely on the "protected" state of a 
property, I think it would be best to introduce a property :ignoreProperties 
with a reasonable default list as [~viorell] proposed earlier.

> SlingPostServlet: :import operation must skip protected properties if present
> -
>
> Key: SLING-8375
> URL: https://issues.apache.org/jira/browse/SLING-8375
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
> Environment: AEM 6.3
>Reporter: Viorel Lupu
>Priority: Major
>  Labels: import, json
> Fix For: Servlets Post 2.3.32
>
> Attachments: error-import-json.log
>
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> h2. Description
> Posting JSON content to the SlingPostServlet with *:import* operation as 
> documented at 
> [https://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html#importing-content-structures]
>  fails when the JSON payload contains protected property names such as:
>  
> {code:java}
> "jcr:createdBy",
> "jcr:created",
> "jcr:createdBy",
> "jcr:baseVersion",
> "jcr:lastModified",
> "jcr:lastModifiedBy",
> "jcr:uuid",
> "cq:lastModified",
> "cq:lastModifiedBy",
> "cq:lastReplicated",
> "jcr:versionHistory",
> "rep:policy",
> "onTime",
> "offTime"
> {code}
> {code:java}
> # curl invocation
> curl -L -vv -u admin:admin \
> -F ":operation=import" \
> -F ":contentType=json" \
> -F ":name=newcontentnode" \
> -F ":content=@data.json" \
> -F ":replace=true" \
> -H 'Referer: http://localhost:4502/content/we-retail/language-masters/en' \
> -H 'User-Agent: Adobe-Campaign/5.0' \
>  http://localhost:4502/content/we-retail/language-masters/en{code}
>  
> h2. Suggested Improvement
> Add a new POST parameter {{:ignoreProperties}} which can take a 
> comma-separated list of properties for the importer to skip.
> h2. Error.log:
> more detailed error log attached to issue
>  
> {code:java}
> 26.04.2019 16:34:55.298 *ERROR* [0:0:0:0:0:0:0:1 [1556289295274] POST 
> /content/we-retail/language-masters HTTP/1.1] 
> org.apache.sling.servlets.post.impl.operations.ImportOperation Exception 
> during response processing.
> javax.jcr.nodetype.ConstraintViolationException: Property is protected: 
> jcr:createdBy = admin
> at 
> org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate.setProperty(NodeDelegate.java:525)
> at 
> org.apache.jackrabbit.oak.jcr.session.NodeImpl$35.perform(NodeImpl.java:1376)
> at 
> org.apache.jackrabbit.oak.jcr.session.NodeImpl$35.perform(NodeImpl.java:1364)
> at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:208)
> at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112)
> at 
> org.apache.jackrabbit.oak.jcr.session.NodeImpl.internalSetProperty(NodeImpl.java:1364)
> at 
> org.apache.jackrabbit.oak.jcr.session.NodeImpl.setProperty(NodeImpl.java:434)
> at 
> org.apache.sling.jcr.contentloader.internal.DefaultContentCreator.createProperty(DefaultContentCreator.java:361)
> at 
> org.apache.sling.jcr.contentloader.internal.readers.JsonReader.createProperty(JsonReader.java:226)
> at 
> org.apache.sling.jcr.contentloader.internal.readers.JsonReader.createNode(JsonReader.java:199)
> at 
> org.apache.sling.jcr.contentloader.internal.readers.JsonReader.createNode(JsonReader.java:197)
> at 
> org.apache.sling.jcr.contentloader.internal.readers.JsonReader.parse(JsonReader.java:159)
> at 
> org.apache.sling.jcr.contentloader.internal.DefaultContentImporter.importContent(DefaultContentImporter.java:93)
> at 
> org.apache.sling.servlets.post.impl.operations.ImportOperation.doRun(ImportOperation.java:176)
> at 
> org.apache.sling.servlets.post.AbstractPostOperation.run(AbstractPostOperation.java:97)
> at 
> org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:205)
> at 
> org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:146)
> at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342)
> at 
> 

[jira] [Commented] (SLING-8418) Consolidate starter-startup and startupfilter/startupfilter-disabler to use Apache Felix HC ServiceUnavailableFilter

2019-05-28 Thread Georg Henzler (JIRA)


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

Georg Henzler commented on SLING-8418:
--

Updated https://sling.apache.org/downloads.cgi as suggested.

> Consolidate starter-startup and startupfilter/startupfilter-disabler to use 
> Apache Felix HC ServiceUnavailableFilter
> 
>
> Key: SLING-8418
> URL: https://issues.apache.org/jira/browse/SLING-8418
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Starter 12, Starter Content 1.0.4
>
>
> See 
> https://github.com/apache/felix/blob/trunk/healthcheck/README.md#service-unavailable-filter
>  for a general-purpose mechanism from Apache Felix to replace starter-startup 
> and startupfilter/startupfilter-disabler
> [1] 
> http://apache-sling.73963.n3.nabble.com/DISCUSS-Consolidate-starter-startup-and-startupfilter-startupfilter-disabler-to-use-Apache-Felix-HC-r-tt4090963.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SLING-8418) Consolidate starter-startup and startupfilter/startupfilter-disabler to use Apache Felix HC ServiceUnavailableFilter

2019-05-22 Thread Georg Henzler (JIRA)


 [ 
https://issues.apache.org/jira/browse/SLING-8418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Henzler resolved SLING-8418.
--
Resolution: Fixed

> Consolidate starter-startup and startupfilter/startupfilter-disabler to use 
> Apache Felix HC ServiceUnavailableFilter
> 
>
> Key: SLING-8418
> URL: https://issues.apache.org/jira/browse/SLING-8418
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Starter 12, Starter Content 1.0.4
>
>
> See 
> https://github.com/apache/felix/blob/trunk/healthcheck/README.md#service-unavailable-filter
>  for a general-purpose mechanism from Apache Felix to replace starter-startup 
> and startupfilter/startupfilter-disabler
> [1] 
> http://apache-sling.73963.n3.nabble.com/DISCUSS-Consolidate-starter-startup-and-startupfilter-startupfilter-disabler-to-use-Apache-Felix-HC-r-tt4090963.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-8418) Consolidate starter-startup and startupfilter/startupfilter-disabler to use Apache Felix HC ServiceUnavailableFilter

2019-05-22 Thread Georg Henzler (JIRA)


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

Georg Henzler commented on SLING-8418:
--

Marked the following modules as obsolete (only leaving the README file with a 
notice):
 * 
[org.apache.sling.startupfilter|https://github.com/apache/sling-org-apache-sling-startupfilter]
 * 
[org.apache.sling.startupfilter-disabler|https://github.com/apache/sling-org-apache-sling-startupfilter-disabler]
 * 
[org.apache.sling.starter-startup|https://github.com/apache/sling-org-apache-sling-starter-startup]

> Consolidate starter-startup and startupfilter/startupfilter-disabler to use 
> Apache Felix HC ServiceUnavailableFilter
> 
>
> Key: SLING-8418
> URL: https://issues.apache.org/jira/browse/SLING-8418
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
> Fix For: Starter 12, Starter Content 1.0.4
>
>
> See 
> https://github.com/apache/felix/blob/trunk/healthcheck/README.md#service-unavailable-filter
>  for a general-purpose mechanism from Apache Felix to replace starter-startup 
> and startupfilter/startupfilter-disabler
> [1] 
> http://apache-sling.73963.n3.nabble.com/DISCUSS-Consolidate-starter-startup-and-startupfilter-startupfilter-disabler-to-use-Apache-Felix-HC-r-tt4090963.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


  1   2   3   4   5   >