|
org.openide.filesystems 7.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openide.filesystems.Repository
public class Repository
Holder for system filesystem, used for most of NetBeans' runtime configuration. There is only one useful thing to do with this class:
FileSystem sfs = Repository.getDefault().getDefaultFileSystem(); // now use somehow, e.g. FileObject menus = sfs.findResource("Menu"); // ...Formerly (NB 3.x) contained a list of mounted filesystems. This functionality is no longer used and is now deprecated.
Constructor Summary | |
---|---|
Repository(FileSystem def)
Creates new instance of filesystem pool and registers it as the default one. |
Method Summary | |
---|---|
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()
Gets the NetBeans default (system, configuration) filesystem. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Repository(FileSystem def)
def
- the default filesystemMethod Detail |
---|
public static Repository getDefault()
org.openide.util.Lookup.getDefault ().lookup (Repository.class)
or (if the lookup query returns null) a default instance is created.
public final FileSystem getDefaultFileSystem()
@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)
FileSystem
s by given permutation.
For example, if there are three filesystems, new int[] {2, 0, 1}
cycles the filesystems forwards.
perm
- an array of integers
IllegalArgumentException
- 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 filesystem
null
if there is no such
filesystem@Deprecated public final void writeExternal(ObjectOutput oos) throws IOException
oos
- object output stream
IOException
- if an error occures@Deprecated public final void readExternal(ObjectInput ois) throws IOException, ClassNotFoundException
ois
- object input stream
IOException
- if an error occures
ClassNotFoundException
- 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 name
FileObject
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 resource
null
if the resource can not be foundFileSystem.findResource(java.lang.String)
@Deprecated public final Enumeration<? extends FileObject> findAllResources(String name)
name
- name of the resource
FileObject
s@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 name
FileObject
s@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 listener
|
org.openide.filesystems 7.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |