Bug 85551 - Please create an API to access common directories
Please create an API to access common directories
Status: NEW
Product: platform
Classification: Unclassified
Component: -- Other --
5.x
All All
: P3 (vote)
: TBD
Assigned To: issues@platform
issues@platform
: API
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-22 13:04 UTC by Tim Lebedkov
Modified: 2009-01-06 14:38 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Lebedkov 2006-09-22 13:04:16 UTC
Hi,

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:

/home/user/.netbeans/6.0/
    Settings 
        com.company.plugin/
        org.netbeans.modules.test/
    LocalSettings
        com.company.plugin/
        org.netbeans.modules.test/
    Temporary
        com.company.plugin/
        org.netbeans.modules.test/
    SessionTemporary
        com.company.plugin/
        org.netbeans.modules.test/

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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo