[jira] [Created] (SLING-3558) Updating of sling:VanityPath mixins is ignored by sling resource resolution
Antonio Sanso created SLING-3558: Summary: Updating of sling:VanityPath mixins is ignored by sling resource resolution Key: SLING-3558 URL: https://issues.apache.org/jira/browse/SLING-3558 Project: Sling Issue Type: Bug Components: ResourceResolver Reporter: Antonio Sanso Priority: Critical Updating (adding/removing) of sling:VanityPath mixins is ignored by sling resource resolution. The reason behind it is that the event handler in the MapEntries doesn't listen for sling:VanityPath (mixin) but only for sling:vanityPath (property name). -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Resolved] (SLING-3557) Build Failure from sling trunk
[ https://issues.apache.org/jira/browse/SLING-3557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler resolved SLING-3557. - Resolution: Fixed Fix Version/s: Launchpad Builder 7 Thanks for reporting - should be fixed now Build Failure from sling trunk -- Key: SLING-3557 URL: https://issues.apache.org/jira/browse/SLING-3557 Project: Sling Issue Type: Bug Components: Launchpad Environment: all Reporter: Yogesh Upadhyay Assignee: Carsten Ziegeler Fix For: Launchpad Builder 7 Getting following error when trying to build from trunk [INFO] Apache Sling Launchpad Application Builder FAILURE [23.482s] [ERROR] Failed to execute goal on project org.apache.sling.launchpad: Could not resolve dependencies for project org.apache.sling:org.apache.sling.launchpad:war:7-SNAPSHOT: Could not find artifact org.apache.sling:org.apache.sling.launchpad.impl:jar:0.0.1-SNAPSHOT in apache.snapshots (http://repository.apache.org/snapshots) - [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn goals -rf :org.apache.sling.launchpad -- This message was sent by Atlassian JIRA (v6.2#6252)
Re: [VOTE] Release Apache Sling JCR ContentLoader 2.1.8
On Tuesday 06 May 2014 21:09:20 Oliver Lietz wrote: Hi, We solved 3 issues in this release: https://issues.apache.org/jira/browse/SLING/fixforversion/12322442/ +1 One binding vote is missing. Anyone else? O.
[jira] [Commented] (SLING-3558) Updating of sling:VanityPath mixins is ignored by sling resource resolution
[ https://issues.apache.org/jira/browse/SLING-3558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13997338#comment-13997338 ] Antonio Sanso commented on SLING-3558: -- added showcase test in rev. 1594485 . This issue will be address together with SLING-3505 Updating of sling:VanityPath mixins is ignored by sling resource resolution --- Key: SLING-3558 URL: https://issues.apache.org/jira/browse/SLING-3558 Project: Sling Issue Type: Bug Components: ResourceResolver Reporter: Antonio Sanso Priority: Critical Updating (adding/removing) of sling:VanityPath mixins is ignored by sling resource resolution. The reason behind it is that the event handler in the MapEntries doesn't listen for sling:VanityPath (mixin) but only for sling:vanityPath (property name). -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (SLING-3558) Updating of sling:VanityPath mixins is ignored by sling resource resolution
[ https://issues.apache.org/jira/browse/SLING-3558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13997470#comment-13997470 ] Justin Edelson commented on SLING-3558: --- Why is this a problem? Updating of sling:VanityPath mixins is ignored by sling resource resolution --- Key: SLING-3558 URL: https://issues.apache.org/jira/browse/SLING-3558 Project: Sling Issue Type: Bug Components: ResourceResolver Reporter: Antonio Sanso Priority: Critical Updating (adding/removing) of sling:VanityPath mixins is ignored by sling resource resolution. The reason behind it is that the event handler in the MapEntries doesn't listen for sling:VanityPath (mixin) but only for sling:vanityPath (property name). -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Comment Edited] (SLING-3558) Updating of sling:VanityPath mixins is ignored by sling resource resolution
[ https://issues.apache.org/jira/browse/SLING-3558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13997471#comment-13997471 ] Antonio Sanso edited comment on SLING-3558 at 5/14/14 11:33 AM: why not :) ? If I remove a sling:VanityPath mixin from a node i would expect that that vanityPath is not anymore enabled. Unless I got a wrong understanding of the feature. BTW see also the test i committed... was (Author: asanso): why not :) ? If I remove a sling:VanityPath mixin from a node i would expect that that vanityPath is not anymore enabled. Unless I got a wrong understanding of the feature. BTW see also the test i commttied... Updating of sling:VanityPath mixins is ignored by sling resource resolution --- Key: SLING-3558 URL: https://issues.apache.org/jira/browse/SLING-3558 Project: Sling Issue Type: Bug Components: ResourceResolver Reporter: Antonio Sanso Priority: Critical Updating (adding/removing) of sling:VanityPath mixins is ignored by sling resource resolution. The reason behind it is that the event handler in the MapEntries doesn't listen for sling:VanityPath (mixin) but only for sling:vanityPath (property name). -- This message was sent by Atlassian JIRA (v6.2#6252)
Re: [RESULT][VOTE] Release Apache Sling Archetype Parent Version 1
Hi, On Mon, May 12, 2014 at 5:47 PM, Robert Munteanu robert.munte...@gmail.com wrote: ...I think this was lost in the email blackout. I would appreciate if someone from the PMC could perform the final steps for the release... I'll take care of that. -Bertrand
Re: content-package-maven-plugin and tooling around it
Is there any news about that? Maybe a rough timeline, when the content-package-maven-plugin is becoming Open Source? I would like to get my patch https://issues.apache.org/jira/browse/SLING-3100 in the Sling IDE Tooling in one of the first releases if possible. Thanks, Konrad On 30 Oct 2013, at 08:18, Tobias Bocanegra tri...@day.com wrote: Hi, we will donate the content-package maven plugin (and package manager) to Apache Jackrabbit soon. we just need some time to finalize the contribution. Thanks for your understanding and patience. Regards. Toby On Tue, Oct 29, 2013 at 6:42 AM, Robert Munteanu rob...@lmn.ro wrote: Hi Konrad, On Tue, Oct 29, 2013 at 2:34 PM, Konrad Windszus konra...@gmx.de wrote: Hi, unfortunately right now Sling only supports OSGi bundles as a deployable artifacts (however, the bundles might be extended by JCR content with the help of [0]). On the other hand there is already the content-package-maven-plugin from Adobe [1], which wraps parts of a JCR repository into a deployable artifact (leveraging the JackrabbitFileVaultFS [2]). I would like to extend the Sling IDE Tooling with a custom m2e project configurator for the packaging “content-package”. Right now the patch is not integrated because of the unclear status of the content-package-maven-plugin [3]. Is it supposed to become Open Source like FileVault as indicated in [4]? Do you think that such a m2e project configurator should become part of the Sling IDE Tooling? Just to restate my opinion, I definitely think this configurator should be part of the Sling tooling. However, I'm reluctant to include it until the actual maven plugin is open-sourced. The main reason is that this will not be applicable for/testable by many users, due to its licensing/availability. Robert Thanks for your input on this topic, Konrad [0] - http://sling.apache.org/site/content-loading-jcrcontentloader.html [1] - http://dev.day.com/docs/en/cq/current/core/how_to/how_to_use_the_vlttool/vlt-mavenplugin.html [2] - http://wiki.apache.org/jackrabbit/JackrabbitFileVaultFS [3] - https://issues.apache.org/jira/browse/SLING-3100 [4] - http://mail-archives.apache.org/mod_mbox/jackrabbit-dev/201305.mbox/%3CCAB+dfim97qLN=mv+dleddovvsh5j6puq_2nd9gbr7djo3in...@mail.gmail.com%3E -- Sent from my (old) computer
Re: [RESULT][VOTE] Release Apache Sling Archetype Parent Version 1
Hi, On Mon, May 12, 2014 at 5:47 PM, Robert Munteanu robert.munte...@gmail.com wrote: ...I would appreciate if someone from the PMC could perform the final steps for the release... I have committed the artifacts to https://dist.apache.org/repos/dist/release/sling/ release the staging repository updated http://sling.apache.org/news.html please cross-check. -Bertrand
[jira] [Resolved] (SLING-3560) Never run project launches when publishing
[ https://issues.apache.org/jira/browse/SLING-3560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Munteanu resolved SLING-3560. Resolution: Duplicate Fix Version/s: (was: Sling Eclipse IDE 1.0.0) Oops, accidental double-submission Never run project launches when publishing -- Key: SLING-3560 URL: https://issues.apache.org/jira/browse/SLING-3560 Project: Sling Issue Type: Bug Components: IDE Reporter: Robert Munteanu Assignee: Robert Munteanu The SlingLaunchpadBehaviour still runs project launches if they exist. I don't think that's needed anymore, as the content sync code should be good enough, and launches are reserved for other tasks. As such, we should remove that code. [~egli] - is there anything that I missed? -- This message was sent by Atlassian JIRA (v6.2#6252)
Re: Events, Jobs and admin sessions
Hello Carsten Thanks for your reply. No, I don't see an obvious solution either. It's just that while reviewing the loginAdmin() usages, I discovered that a lot of the cases are based on this problem, and I was hoping for a solution that is as generic as possible. For the jobs, I could imagine an extension of the JobManager API that allows passing the subject. The resource resolver factory could then take the event/job as a parameter and return a resolver with the privileges of the corresponding subject. For the events, the situation seems to be even more complicated because usualy the event is not created manually, and I'm not sure if it is possible to assign a specific subject to an event in many cases. The alternative is to use a service-user in the consumer who has access to the respective payload, which somehow looks wrong to me from a security perspective. Well.. Ideas very welcome :) Best greetings Lars On 13.05.2014 22:57, Carsten Ziegeler wrote: Hi Lars, I see your point, I don't see right now how a general approach could look like. However, the creator of a job could add the subject as a property to the job and the consumer can use this value to create a resource resolver based on that value. But I think this has to be done on a job by job base. Or do you see a general mechanism which always gets the subject of the sender? Carsten 2014-05-13 17:21 GMT+02:00 Lars Krapf lkr...@adobe.com: Hello list When processing events and jobs, the corresponding subject triggering the event usually gets lost. This lead to event handlers / job consumers often operating with administrative sessions/resolvers to do their work, which in turn can lead to privilege escalations. A possible solution to this problem could be to add a serialization of the event-triggering subject (if available) as a property to the event by default, so the handlers could easily recreate the session by using JAAS doAsPrivileged(). Would that make sense? Best greetings Lars
[jira] [Updated] (SLING-3547) Default handling for numerical types on Sling Models broken
[ https://issues.apache.org/jira/browse/SLING-3547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Justin Edelson updated SLING-3547: -- Affects Version/s: Sling Models Implementation 1.0.4 Default handling for numerical types on Sling Models broken --- Key: SLING-3547 URL: https://issues.apache.org/jira/browse/SLING-3547 Project: Sling Issue Type: Bug Components: Extensions Affects Versions: Sling Models Implementation 1.0.2, Sling Models Implementation 1.0.4 Reporter: Konrad Windszus Assignee: Justin Edelson Fix For: Sling Models Implementation 1.0.6 Currently all default annotations on numeric types lead to the following warning: org.apache.sling.models.impl.ModelAdapterFactory Default values for class java.lang.Boolean are not supported and the default is not used. This is due to the fact that first all types are converted from Primitives to Object Wrapper Classes (in mapPrimitiveClasses). Then the comparison against that type only considers Primitives (in getDefaultValue, except for Strings), which obviously failed, because either those were Object Wrapper Classes right from the beginning, or they were converted to those. In my regard you should compare the Type against e.g. Integer.class instead of Integer.TYPE (ModelAdapterFactory, line 428ff). Otherwise defaults for numerical types will not work. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Comment Edited] (SLING-3558) Updating of sling:VanityPath mixins is ignored by sling resource resolution
[ https://issues.apache.org/jira/browse/SLING-3558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13997471#comment-13997471 ] Antonio Sanso edited comment on SLING-3558 at 5/14/14 1:20 PM: --- @justinedelson why not :) ? If I remove a sling:VanityPath mixin from a node i would expect that that vanityPath is not anymore enabled. Unless I got a wrong understanding of the feature. BTW see also the test i committed... was (Author: asanso): why not :) ? If I remove a sling:VanityPath mixin from a node i would expect that that vanityPath is not anymore enabled. Unless I got a wrong understanding of the feature. BTW see also the test i committed... Updating of sling:VanityPath mixins is ignored by sling resource resolution --- Key: SLING-3558 URL: https://issues.apache.org/jira/browse/SLING-3558 Project: Sling Issue Type: Bug Components: ResourceResolver Reporter: Antonio Sanso Priority: Critical Updating (adding/removing) of sling:VanityPath mixins is ignored by sling resource resolution. The reason behind it is that the event handler in the MapEntries doesn't listen for sling:VanityPath (mixin) but only for sling:vanityPath (property name). -- This message was sent by Atlassian JIRA (v6.2#6252)
Sling Sonar analysis working again
Hi, With the kind help of the Infra team, the Sonar analysis for Sling is working again. Feel free to have a look at the discovered issues. https://analysis.apache.org/dashboard/index/org.apache.sling:sling-builder Cheers, Robert
[jira] [Updated] (SLING-3528) Add ability to configure OSGi components from crank files
[ https://issues.apache.org/jira/browse/SLING-3528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Artyom Stetsenko updated SLING-3528: Attachment: crankstart-processor+config.patch Adapted the Configure command to the new API and changed the CrankstartFileProcessor implementation to use CrankstartParser. Note: I had to make a few modifications to the parser API and its implementation, particularly switched from using the low-level Reader object to a higher-level Scanner. Add ability to configure OSGi components from crank files - Key: SLING-3528 URL: https://issues.apache.org/jira/browse/SLING-3528 Project: Sling Issue Type: New Feature Reporter: Artyom Stetsenko Labels: crankstart, osgi-config Attachments: crankstart-config.patch, crankstart-config.patch, crankstart-processor+config.patch Users should be able to specify OSGi configs inside .crank.txt files. -- This message was sent by Atlassian JIRA (v6.2#6252)
Re: Sling Sonar analysis working again
cool, thanks Robert! Tommaso 2014-05-14 15:41 GMT+02:00 Robert Munteanu romb...@apache.org: Hi, With the kind help of the Infra team, the Sonar analysis for Sling is working again. Feel free to have a look at the discovered issues. https://analysis.apache.org/dashboard/index/org.apache.sling:sling-builder Cheers, Robert
[jira] [Commented] (SLING-3525) Launchpad notification thread cannot access JNDI ressources on Websphere
[ https://issues.apache.org/jira/browse/SLING-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13997472#comment-13997472 ] Chetan Mehrotra commented on SLING-3525: bq. Would it be possible to get such threads using appserver-specific threadpools instead of just instantiating the raw Thread object? In such cases we would already have the required ThreadLocals to make JNDI-lookups possible. The problem is that there are lots of other places where thread are created (Franework, Sling Scheduler etc) and it would not be possible to change all of them. Hence the only reliable way is to extract the required object (if its like singleton and does not change for every call) and publish it to OSGi service registry and use std OSGi constructs to access the service Launchpad notification thread cannot access JNDI ressources on Websphere Key: SLING-3525 URL: https://issues.apache.org/jira/browse/SLING-3525 Project: Sling Issue Type: Improvement Components: Launchpad Affects Versions: Launchpad Base 2.5.0 Environment: Websphere 7 on Linux Reporter: Jörg Hoh Attachments: was_258f258f_14.04.29_03.14.01.7877107172171903438789 copy.txt We have an existing JavaEnterprise-based application, which we want to move into sling running on IBM Websphere appserver. In some of the resulting bundles we need to access JNDI resources. We get this exception: {code} [29.04.14 03:14:01:790 CEST] FFDC Exception:javax.naming.ConfigurationException SourceId:com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS ProbeId:440 Reporter:java.lang.Class@5ef85ef8 javax.naming.ConfigurationException: A JNDI operation on a java: name cannot be completed because the server runtime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the java: name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on java: names within static code blocks or in threads created by that J2EE application. Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on java: names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/tm not found in context java:.] at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:428) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:399) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:221) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:161) at javax.naming.InitialContext.lookup(InitialContext.java:436) ... at org.apache.sling.launchpad.webapp.SlingServlet.startSling(SlingServlet.java:384) at org.apache.sling.launchpad.webapp.SlingServlet.updated(SlingServlet.java:262) at org.apache.sling.launchpad.base.impl.SlingFelix$Notifier.run(SlingFelix.java:172) at java.lang.Thread.run(Thread.java:761) Caused by: javax.naming.NameNotFoundException: Name comp/env/tm not found in context java:. at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1837) at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1166) at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:1095) at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1235) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:395) ... 60 more {code} According to the JavaEnterprise spec, you should not create threads on your own but use the mechanisms of the appserver (mostly because of the massive use of threadlocals to access JDNI and stuff like that). See http://stackoverflow.com/questions/533783/why-spawning-threads-in-java-ee-container-is-discouraged for some discussion of it. We would like the Launchpad to use a native Websphere thread so it can actually do JNDI lookups, and not to create a new thread on the fly. We would like to avoid any change to the way how JNDI resources are looked up in our application. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (SLING-3516) Sling Models Resource Child List Injector
[ https://issues.apache.org/jira/browse/SLING-3516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13993695#comment-13993695 ] Konrad Windszus commented on SLING-3516: I would rather go for a separate injector, which also supports some kind of filtering expression (a regexp) against the child node names, to only adapt some of the children (and leave out others). Your approach is different from the regular ResourceChild injector, because it does not consider the name at all. I think using a separate injector is the cleaner approach here. Sling Models Resource Child List Injector - Key: SLING-3516 URL: https://issues.apache.org/jira/browse/SLING-3516 Project: Sling Issue Type: New Feature Components: Extensions Affects Versions: Sling Models Implementation 1.0.2 Reporter: Igor Sechyn Priority: Minor Attachments: ChildResourceInjectorPatch.txt Hi All, We have decided to use the sling models to process some hierarchical data in our project and are facing the following issue right now. Our content structure looks as follows: {code} +- dealer | +- addresses | + -address1 | +- address2 {code} Dealer and address nodes have attributes, that can be injected through the ValueMapInjector, so everything works fine here. Our goal however is also to inject the List of AddressModel objects into the DealerModel object, something like this: {code} @Inject ListAddressModel addresses {code} The desired behavior would be: - the injector resolves addresses as a child resource of the adaptable object - iterates over the children of this resource (in this case „addresses) - adapts each child to the actual type argument of the parameterized list type - returns the list of adapted model objects I have tried to play around with @Named but could not get it to work. The only way of making it work, was to write a custom injector, which worked out pretty fine. But I was still wondering, if there might be an OOTB functionality, which can be used for this use case Cheers, Igor. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (SLING-3557) Build Failure from sling trunk
Yogesh Upadhyay created SLING-3557: -- Summary: Build Failure from sling trunk Key: SLING-3557 URL: https://issues.apache.org/jira/browse/SLING-3557 Project: Sling Issue Type: Bug Components: Launchpad Environment: all Reporter: Yogesh Upadhyay Getting following error when trying to build from trunk [INFO] Apache Sling Launchpad Application Builder FAILURE [23.482s] [ERROR] Failed to execute goal on project org.apache.sling.launchpad: Could not resolve dependencies for project org.apache.sling:org.apache.sling.launchpad:war:7-SNAPSHOT: Could not find artifact org.apache.sling:org.apache.sling.launchpad.impl:jar:0.0.1-SNAPSHOT in apache.snapshots (http://repository.apache.org/snapshots) - [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn goals -rf :org.apache.sling.launchpad -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (SLING-3559) Never run project launches when publishing
[ https://issues.apache.org/jira/browse/SLING-3559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13997901#comment-13997901 ] Robert Munteanu commented on SLING-3559: It can work in theory, but in practice the user can set up the launch for different purposes. For instance, running unit tests :-) So there's no guarantee that we will get the result that we want. Also, bundles are not deployed anymore if the tooling support bundle is not installed, see SLING-3159 . Never run project launches when publishing -- Key: SLING-3559 URL: https://issues.apache.org/jira/browse/SLING-3559 Project: Sling Issue Type: Bug Components: IDE Reporter: Robert Munteanu Assignee: Robert Munteanu Fix For: Sling Eclipse IDE 1.0.0 The SlingLaunchpadBehaviour still runs project launches if they exist. I don't think that's needed anymore, as the content sync code should be good enough, and launches are reserved for other tasks. As such, we should remove that code. [~egli] - is there anything that I missed? -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (SLING-3556) The Filter API should work on resources, not on filesystem-based paths
[ https://issues.apache.org/jira/browse/SLING-3556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Munteanu updated SLING-3556: --- Description: Today the SlingLaunchpadBehaviour encapsulates lot of knowledge about what it takes to find out if a resource should be filtered or not ( also visited in the context of SLING-3122 ). This knowledge should be rooted in the Filter API, which currently takes paths. Instead, it should take a ResourceProxy instance, and delegate to the SerializationKindManager to see what the serialization policy is, so that it can determine the repository path. was: Today the SlingLaunchpadBehaviour encapsulates lot of knowledge about what it takes to find out if a resource should be filtered or not ( also visited in the context of SLING-3112 ). This knowledge should be rooted in the Filter API, which currently takes paths. Instead, it should take a ResourceProxy instance, and delegate to the SerializationKindManager to see what the serialization policy is, so that it can determine the repository path. The Filter API should work on resources, not on filesystem-based paths -- Key: SLING-3556 URL: https://issues.apache.org/jira/browse/SLING-3556 Project: Sling Issue Type: Improvement Components: IDE Affects Versions: Sling Eclipse IDE 1.0.0 Reporter: Robert Munteanu Fix For: Sling Eclipse IDE 1.0.2 Attachments: SLING-3556-wip-1.patch Today the SlingLaunchpadBehaviour encapsulates lot of knowledge about what it takes to find out if a resource should be filtered or not ( also visited in the context of SLING-3122 ). This knowledge should be rooted in the Filter API, which currently takes paths. Instead, it should take a ResourceProxy instance, and delegate to the SerializationKindManager to see what the serialization policy is, so that it can determine the repository path. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (SLING-3547) Default handling for numerical types on Sling Models broken
[ https://issues.apache.org/jira/browse/SLING-3547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13992731#comment-13992731 ] ASF GitHub Bot commented on SLING-3547: --- GitHub user kwin opened a pull request: https://github.com/apache/sling/pull/16 SLING-3547, add test for numerical defaults (both boolean and long, test exposing the wrong behaviour of numerical defaults in Sling Models You can merge this pull request into a Git repository by running: $ git pull https://github.com/kwin/sling SLING-3547 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/sling/pull/16.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #16 commit 63b59bceecae1670a58da257d9165a5905a52075 Author: Konrad Windszus konrad.winds...@netcentric.biz Date: 2014-05-08T12:37:19Z SLING-3547, add test for numerical defaults (both boolean and long, primitive and object wrapper) Default handling for numerical types on Sling Models broken --- Key: SLING-3547 URL: https://issues.apache.org/jira/browse/SLING-3547 Project: Sling Issue Type: Bug Components: Extensions Affects Versions: Sling Models Implementation 1.0.2 Reporter: Konrad Windszus Currently all default annotations on numeric types lead to the following warning: org.apache.sling.models.impl.ModelAdapterFactory Default values for class java.lang.Boolean are not supported and the default is not used. This is due to the fact that first all types are converted from Primitives to Object Wrapper Classes (in mapPrimitiveClasses). Then the comparison against that type only considers Primitives (in getDefaultValue, except for Strings), which obviously failed, because either those were Object Wrapper Classes right from the beginning, or they were converted to those. In my regard you should compare the Type against e.g. Integer.class instead of Integer.TYPE (ModelAdapterFactory, line 428ff). Otherwise defaults for numerical types will not work. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Assigned] (SLING-3122) Incorrect filtering for full coverage nodes
[ https://issues.apache.org/jira/browse/SLING-3122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Munteanu reassigned SLING-3122: -- Assignee: Robert Munteanu Incorrect filtering for full coverage nodes --- Key: SLING-3122 URL: https://issues.apache.org/jira/browse/SLING-3122 Project: Sling Issue Type: Bug Components: IDE Reporter: Robert Munteanu Assignee: Robert Munteanu Fix For: Sling Eclipse IDE 1.0.0 With the following filter ?xml version=1.0 encoding=UTF-8? workspaceFilter version=1.0 filter root=/content/slingDemo/ filter root=/apps/slingDemo/ filter root=/var/full-coverage/ /workspaceFilter changes to /var/full-coverage.xml not synced, were that is file corresponds to a node with full coverage present at /var/full-coverage -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Resolved] (SLING-3236) Unable to change node primary type once created
[ https://issues.apache.org/jira/browse/SLING-3236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Munteanu resolved SLING-3236. Resolution: Fixed Unable to change node primary type once created --- Key: SLING-3236 URL: https://issues.apache.org/jira/browse/SLING-3236 Project: Sling Issue Type: Bug Components: IDE Reporter: Robert Munteanu Assignee: Robert Munteanu Fix For: Sling Eclipse IDE 1.0.0 Consider the following scenario in a Sling content module: - folder is created in the project - folder is synced and created in the repo with a nt:folder primary type - a .content.xml file is added and the primary type set to sling:Folder At this point the the primary type is not updated in the repository and additional metadata is not updated. Originally reported by [~dsuess] -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (SLING-3516) Sling Models Resource Child List Injector
[ https://issues.apache.org/jira/browse/SLING-3516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13993732#comment-13993732 ] Igor Sechyn commented on SLING-3516: Hi Konrad, Thanks for your feedback. {quote}I would rather go for a separate injector, which also supports some kind of filtering expression (a regexp) against the child node names, to only adapt some of the children (and leave out others).{quote} I had the same idea. Although in this case i do not want to filter child nodes based on their names, but on the values, which they may contain, similar to the Filter annotation used for the injection of the OSGI services. I ended up with the following approach: - defined a new annotation PropertyFilter similar to DefaultValue annotation, since Filter annotation is hard wired with the OSGI injector - extended the ValueMapInjector to return null, if the property filter value is not equal the value from the node for the current field The filtering happens as follows: - i actually do consider the name, as i pointed out in the description. If I am adapting the {{dealer}} node, I use the name of the field addresses to get child resource {{addresses}} - then the injector is iterating over the child nodes of the {{addresses}} node and tries to adapt it to the actual type of the collection, in this case {{AddressModel}} - if the {{AddressModel}} class defines a mandatory property {{active}} with {{PropertyFilter}} annotation set to true, all nodes with this property set to false will not be included in the resulting list, because the adapter factory will return null for this node. The only catch here is, that the property must be mandatory. I decided to extend the existing Resource child injector to keep the analogy to the OSGI injector, which also handles the injection of a single service, as well as the list. Can you think of any scenarios, where the name of the item node is important? Usually the wrapping node (in this case {{addresses}}) already defines the semantics of the child nodes. But I definitely agree with you, that some sort of filtering/validation is needed. Cheers, Igor. Sling Models Resource Child List Injector - Key: SLING-3516 URL: https://issues.apache.org/jira/browse/SLING-3516 Project: Sling Issue Type: New Feature Components: Extensions Affects Versions: Sling Models Implementation 1.0.2 Reporter: Igor Sechyn Priority: Minor Attachments: ChildResourceInjectorPatch.txt Hi All, We have decided to use the sling models to process some hierarchical data in our project and are facing the following issue right now. Our content structure looks as follows: {code} +- dealer | +- addresses | + -address1 | +- address2 {code} Dealer and address nodes have attributes, that can be injected through the ValueMapInjector, so everything works fine here. Our goal however is also to inject the List of AddressModel objects into the DealerModel object, something like this: {code} @Inject ListAddressModel addresses {code} The desired behavior would be: - the injector resolves addresses as a child resource of the adaptable object - iterates over the children of this resource (in this case „addresses) - adapts each child to the actual type argument of the parameterized list type - returns the list of adapted model objects I have tried to play around with @Named but could not get it to work. The only way of making it work, was to write a custom injector, which worked out pretty fine. But I was still wondering, if there might be an OOTB functionality, which can be used for this use case Cheers, Igor. -- This message was sent by Atlassian JIRA (v6.2#6252)