This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 85551

Summary: Please create an API to access common directories
Product: platform Reporter: Tim Lebedkov <lebedkov>
Component: -- Other --Assignee: issues@platform <issues>
Status: NEW ---    
Severity: blocker Keywords: API
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Tim Lebedkov 2006-09-22 13:04:16 UTC

the interface I talk about here could look like this one:

public class CommonDirectories {
    /** settings */
    public static final int SETTINGS = 0;

    /* settings that cannot be moved to another computer (for example 
       if they depend on installed printers
    public static final int LOCAL_SETTINGS = 1;

    /* temporary data that are valid between sessions */
    public static final int TEMPORARY = 2;

    /* temporary data that are valid during a session */
    public static final int SESSION_TEMPORARY = 3;

    public static CommonDirectories getDefault();
    public FileObject getDirectory(String plugin, int type);

the files would be then placed under the user directory like this:


Using this approach it would be possible to:
1. delete temporary session data during NB shutdown
2. delete settings and temporary data of a plugin
   after it is deinstalled
3. write generic code to move settings from one
   computer to another
4. avoid usage of the same file name by two different plugins
5. deny reading/writing settings of another plugin

Thank You
Comment 1 Quality Engineering 2008-12-23 14:22:09 UTC
This issue had *1 votes* before move to platform component