public class Repository extends Object implements Serializable
config subfolder of the userdir on the user's disk.
If you just want to modify configuration data use e.g.
FileObject menus = FileUtil.getConfigFile("Menu");
// ...
Formerly (NB 3.x) contained a list of mounted filesystems. This functionality
is no longer used and is now deprecated.| Constructor and Description |
|---|
Repository(FileSystem def)
Creates new instance of filesystem pool and
registers it as the default one.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFileChangeListener(FileChangeListener fcl)
Deprecated.
useless because there is no filesystem but only
default filesystem in Repository. Add new listener directly to
default filesystem
getDefaultFileSystem(). |
void |
addFileSystem(FileSystem fs)
Deprecated.
Please use the ClassPath API instead.
|
void |
addRepositoryListener(RepositoryListener list)
Deprecated.
Please use the ClassPath API instead.
|
Enumeration<? extends FileSystem> |
fileSystems()
Deprecated.
Please use the ClassPath API instead.
|
FileObject |
find(String aPackage,
String name,
String ext)
Deprecated.
Please use the ClassPath API instead.
|
Enumeration<? extends FileObject> |
findAll(String aPackage,
String name,
String ext)
Deprecated.
Please use the ClassPath API instead.
|
Enumeration<? extends FileObject> |
findAllResources(String name)
Deprecated.
Please use the ClassPath API instead.
|
FileSystem |
findFileSystem(String systemName)
Deprecated.
Please use the ClassPath API instead.
|
FileObject |
findResource(String name)
Deprecated.
Please use the ClassPath API instead.
|
static Repository |
getDefault()
Access method to get default instance of repository in the system.
|
FileSystem |
getDefaultFileSystem()
Deprecated.
Please use
FileUtil.getConfigFile(String) or
FileUtil.getConfigRoot() instead. |
Enumeration<? extends FileSystem> |
getFileSystems()
Deprecated.
Please use the ClassPath API instead.
|
void |
readExternal(ObjectInput ois)
Deprecated.
Unused.
|
void |
removeFileChangeListener(FileChangeListener fcl)
Deprecated.
useless because there is no filesystem but only
default filesystem in Repository. Add new listener directly to
default filesystem
getDefaultFileSystem(). |
void |
removeFileSystem(FileSystem fs)
Deprecated.
Please use the ClassPath API instead.
|
void |
removeRepositoryListener(RepositoryListener list)
Deprecated.
Please use the ClassPath API instead.
|
void |
reorder(int[] perm)
Deprecated.
Please use the ClassPath API instead.
|
FileSystem[] |
toArray()
Deprecated.
Please use the ClassPath API instead.
|
void |
writeExternal(ObjectOutput oos)
Deprecated.
Unused.
|
public Repository(FileSystem def)
def - the default filesystempublic static Repository getDefault()
org.openide.util.Lookup.getDefault ().lookup (Repository.class)
or (if the lookup query returns null) a default instance is created.@Deprecated public final FileSystem getDefaultFileSystem()
FileUtil.getConfigFile(String) or
FileUtil.getConfigRoot() instead.@Deprecated public final void addFileSystem(FileSystem fs)
name
(unless all but one are invalid). To be sure, that
filesystem was really added in Repository, then test that FileSystem
is valid.fs - filesystem to add@Deprecated public final void removeFileSystem(FileSystem fs)
fs - filesystem to remove@Deprecated public final void reorder(int[] perm)
FileSystems by given permutation.
For example, if there are three filesystems, new int[] {2, 0, 1} cycles the filesystems forwards.perm - an array of integersIllegalArgumentException - if the array is not a permutation, or is not the same length as the current number of filesystems in the pool@Deprecated public final Enumeration<? extends FileSystem> getFileSystems()
FileSystem@Deprecated public final Enumeration<? extends FileSystem> fileSystems()
FileSystem@Deprecated public final FileSystem[] toArray()
@Deprecated public final FileSystem findFileSystem(String systemName)
systemName - name of the filesystemnull if there is no such
filesystem@Deprecated public final void writeExternal(ObjectOutput oos) throws IOException
oos - object output streamIOException - if an error occures@Deprecated public final void readExternal(ObjectInput ois) throws IOException, ClassNotFoundException
ois - object input streamIOException - if an error occuresClassNotFoundException - if read class is not found@Deprecated public final FileObject find(String aPackage, String name, String ext)
find. The first object that is found is returned or null
if none of the filesystems contain such a file.aPackage - package name where each package is separated by a dotname - name of the file (without dots) or null if
one wants to obtain the name of a package and not a file in itext - extension of the file or null if one needs
a package and not a file nameFileObject that represents file with given name or
null if the file does not exist@Deprecated public final FileObject findResource(String name)
name - a name of the resourcenull if the resource can not be foundFileSystem.findResource(java.lang.String)@Deprecated public final Enumeration<? extends FileObject> findAllResources(String name)
name - name of the resourceFileObjects@Deprecated public final Enumeration<? extends FileObject> findAll(String aPackage, String name, String ext)
FileSystem.find(java.lang.String, java.lang.String, java.lang.String).aPackage - package name where each package is separated by a dotname - name of the file (without dots) or null if
one wants to obtain the name of a package and not a file in itext - extension of the file or null if one needs
a package and not a file nameFileObjects@Deprecated public final void addRepositoryListener(RepositoryListener list)
list - the listener@Deprecated public final void removeRepositoryListener(RepositoryListener list)
list - the listener@Deprecated public final void addFileChangeListener(FileChangeListener fcl)
getDefaultFileSystem().fcl - the listener@Deprecated public final void removeFileChangeListener(FileChangeListener fcl)
getDefaultFileSystem().fcl - the listenerBuilt on August 24 2014. | Portions Copyright 1997-2014 Sun Microsystems, Inc. All rights reserved.