Hello , i really need an idea for this one.
I want to read and edit files that are in jira home directory , using my java plugin
https://docs.atlassian.com/DAC/javadoc/jira/reference/com/atlassian/jira/config/util/JiraHome.html which can be used to get paths or files.
What I'm sceptical of is the need to do anything with homes. Nothing stops you from creating or using the files, but the db is generally the better place to store stuff, and far more performant than working with files, especially large ones.
In one of my plugins I'm caching things with this:
ComponentAccessor.getComponent(JiraHome.class).getHomePath()
I don't remember if I had problems injecting the class to the constructor, but at least this method works for sure.
I'm with Radek on this - it's better to store data in the database.
Scriptrunner does a bit of this though - it can store scripts on the file system. But we tend only to use that when we are doing version control on our scripts (they're kept in a git repo somewhere). We've got an open improvement for integrating git into the UI so that we can stop using files on the disk.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.