You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Justin Edelson (JIRA)" <ji...@apache.org> on 2011/05/26 02:35:47 UTC
[jira] [Created] (SLING-2089) add a getAbsolutePath(String) method
to SlingSettingsService
add a getAbsolutePath(String) method to SlingSettingsService
------------------------------------------------------------
Key: SLING-2089
URL: https://issues.apache.org/jira/browse/SLING-2089
Project: Sling
Issue Type: Improvement
Components: Engine
Reporter: Justin Edelson
We should encourage developers to put state under ${sling.home}. Although there's already a method which can get the sling home path, we can make it even easier by adding a method getAbsolutePath(String) in SlingSettingsService.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (SLING-2089) add a getAbsolutePath(String) method
to SlingSettingsService
Posted by "Carsten Ziegeler (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler closed SLING-2089.
-----------------------------------
> add a getAbsolutePath(String) method to SlingSettingsService
> ------------------------------------------------------------
>
> Key: SLING-2089
> URL: https://issues.apache.org/jira/browse/SLING-2089
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Justin Edelson
> Assignee: Justin Edelson
> Fix For: Extensions Settings 1.1.0
>
>
> We should encourage developers to put state under ${sling.home}. Although there's already a method which can get the sling home path, we can make it even easier by adding a method getAbsolutePath(String) in SlingSettingsService.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (SLING-2089) add a getAbsolutePath(String) method
to SlingSettingsService
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved SLING-2089.
-------------------------------------
Resolution: Fixed
Yes, you're right - setting this to fixed.
> add a getAbsolutePath(String) method to SlingSettingsService
> ------------------------------------------------------------
>
> Key: SLING-2089
> URL: https://issues.apache.org/jira/browse/SLING-2089
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Justin Edelson
> Assignee: Justin Edelson
> Fix For: Extensions Settings 1.1.0
>
>
> We should encourage developers to put state under ${sling.home}. Although there's already a method which can get the sling home path, we can make it even easier by adding a method getAbsolutePath(String) in SlingSettingsService.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2089) add a getAbsolutePath(String)
method to SlingSettingsService
Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047830#comment-13047830 ]
Justin Edelson commented on SLING-2089:
---------------------------------------
in r1134512, created getAbsolutePathWithinSlingHome method
> add a getAbsolutePath(String) method to SlingSettingsService
> ------------------------------------------------------------
>
> Key: SLING-2089
> URL: https://issues.apache.org/jira/browse/SLING-2089
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Justin Edelson
> Fix For: Extensions Settings 1.0.4
>
>
> We should encourage developers to put state under ${sling.home}. Although there's already a method which can get the sling home path, we can make it even easier by adding a method getAbsolutePath(String) in SlingSettingsService.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2089) add a getAbsolutePath(String)
method to SlingSettingsService
Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057505#comment-13057505 ]
Justin Edelson commented on SLING-2089:
---------------------------------------
Carsten - I'm not sure what your actual concern is about this method. SlingSettingService already has getSlingHome and getSlingHomeURL methods. The purpose of this new method is just to make using those existing methods easier. I'm happy to roll this change back, but I don't think that's going to stop people from putting state in the file system directly :)
We should set a good example in the Sling project and use methods like this judiciously and prefer the use of repository-based or bundle data where it makes sense.
> add a getAbsolutePath(String) method to SlingSettingsService
> ------------------------------------------------------------
>
> Key: SLING-2089
> URL: https://issues.apache.org/jira/browse/SLING-2089
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Justin Edelson
> Assignee: Justin Edelson
> Fix For: Extensions Settings 1.0.4
>
>
> We should encourage developers to put state under ${sling.home}. Although there's already a method which can get the sling home path, we can make it even easier by adding a method getAbsolutePath(String) in SlingSettingsService.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: [jira] [Commented] (SLING-2089) add a getAbsolutePath(String) method to SlingSettingsService
Posted by Justin Edelson <ju...@justinedelson.com>.
Taking discussion to the list....
The primary use case is to support the Jackrabbit Server bundle which currently looks at the sling.home framework property with what I think is too much code in the JR bundle.
I agree that the repository should be the primary holder of state. I'm not sure that bundle data will work for something like Jackrabbit or another embedded repository. IIUC, the location of the bundle data directory is based on bundle ID, which seems to fragile - uninstalling and reinstalling the JR bundle shouldn't result in a fresh repository.
Justin
On Jun 23, 2011, at 4:29 AM, "Carsten Ziegeler (JIRA)" <ji...@apache.org> wrote:
>
> [ https://issues.apache.org/jira/browse/SLING-2089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053707#comment-13053707 ]
>
> Carsten Ziegeler commented on SLING-2089:
> -----------------------------------------
>
> What's the use case for this? I think we should encourage devs to not put state into the file system directly :)
> State should either go into the repo (or a Sling resource provider) or bundle data should be used.
>
>> add a getAbsolutePath(String) method to SlingSettingsService
>> ------------------------------------------------------------
>>
>> Key: SLING-2089
>> URL: https://issues.apache.org/jira/browse/SLING-2089
>> Project: Sling
>> Issue Type: Improvement
>> Components: Extensions
>> Reporter: Justin Edelson
>> Assignee: Justin Edelson
>> Fix For: Extensions Settings 1.0.4
>>
>>
>> We should encourage developers to put state under ${sling.home}. Although there's already a method which can get the sling home path, we can make it even easier by adding a method getAbsolutePath(String) in SlingSettingsService.
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
[jira] [Commented] (SLING-2089) add a getAbsolutePath(String)
method to SlingSettingsService
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053707#comment-13053707 ]
Carsten Ziegeler commented on SLING-2089:
-----------------------------------------
What's the use case for this? I think we should encourage devs to not put state into the file system directly :)
State should either go into the repo (or a Sling resource provider) or bundle data should be used.
> add a getAbsolutePath(String) method to SlingSettingsService
> ------------------------------------------------------------
>
> Key: SLING-2089
> URL: https://issues.apache.org/jira/browse/SLING-2089
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Justin Edelson
> Assignee: Justin Edelson
> Fix For: Extensions Settings 1.0.4
>
>
> We should encourage developers to put state under ${sling.home}. Although there's already a method which can get the sling home path, we can make it even easier by adding a method getAbsolutePath(String) in SlingSettingsService.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (SLING-2089) add a getAbsolutePath(String) method
to SlingSettingsService
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler reopened SLING-2089:
-------------------------------------
Assignee: Justin Edelson
> add a getAbsolutePath(String) method to SlingSettingsService
> ------------------------------------------------------------
>
> Key: SLING-2089
> URL: https://issues.apache.org/jira/browse/SLING-2089
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Justin Edelson
> Assignee: Justin Edelson
> Fix For: Extensions Settings 1.0.4
>
>
> We should encourage developers to put state under ${sling.home}. Although there's already a method which can get the sling home path, we can make it even easier by adding a method getAbsolutePath(String) in SlingSettingsService.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SLING-2089) add a getAbsolutePath(String) method
to SlingSettingsService
Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Edelson updated SLING-2089:
----------------------------------
Component/s: (was: Engine)
Extensions
Fix Version/s: Extensions Settings 1.0.4
> add a getAbsolutePath(String) method to SlingSettingsService
> ------------------------------------------------------------
>
> Key: SLING-2089
> URL: https://issues.apache.org/jira/browse/SLING-2089
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Justin Edelson
> Fix For: Extensions Settings 1.0.4
>
>
> We should encourage developers to put state under ${sling.home}. Although there's already a method which can get the sling home path, we can make it even easier by adding a method getAbsolutePath(String) in SlingSettingsService.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (SLING-2089) add a getAbsolutePath(String) method
to SlingSettingsService
Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Edelson resolved SLING-2089.
-----------------------------------
Resolution: Fixed
> add a getAbsolutePath(String) method to SlingSettingsService
> ------------------------------------------------------------
>
> Key: SLING-2089
> URL: https://issues.apache.org/jira/browse/SLING-2089
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Justin Edelson
> Fix For: Extensions Settings 1.0.4
>
>
> We should encourage developers to put state under ${sling.home}. Although there's already a method which can get the sling home path, we can make it even easier by adding a method getAbsolutePath(String) in SlingSettingsService.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2089) add a getAbsolutePath(String)
method to SlingSettingsService
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055522#comment-13055522 ]
Carsten Ziegeler commented on SLING-2089:
-----------------------------------------
Other bundles like the ConfigAdmin or the OSGi installer use a bundle property, e.g. we have in sling.properties:
felix.cm.dir = ${sling.home}/config
sling.installer.dir = ${sling.home}/installer
If the property is available the path is used, if not something inside the bundle data file is created.
> add a getAbsolutePath(String) method to SlingSettingsService
> ------------------------------------------------------------
>
> Key: SLING-2089
> URL: https://issues.apache.org/jira/browse/SLING-2089
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Justin Edelson
> Assignee: Justin Edelson
> Fix For: Extensions Settings 1.0.4
>
>
> We should encourage developers to put state under ${sling.home}. Although there's already a method which can get the sling home path, we can make it even easier by adding a method getAbsolutePath(String) in SlingSettingsService.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira