Java Doc for Repository.java in  » IDE-Netbeans » openide » org » openide » filesystems » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » openide » org.openide.filesystems 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openide.filesystems.Repository

Repository
public class Repository implements Serializable(Code)
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.


Field Summary
final static  longserialVersionUID
    

Constructor Summary
public  Repository(FileSystem def)
     Creates new instance of filesystem pool and registers it as the default one.

Method Summary
final public  voidaddFileChangeListener(FileChangeListener fcl)
     Add new listener to this object.
final public  voidaddFileSystem(FileSystem fs)
     Adds new filesystem to the pool. Note that a filesystem cannot be assigned to more than one file system pool at one time (though currently there is only one pool anyway). At any given time, no two filesystems in the pool may share the same FileSystem.getSystemName name (unless all but one are FileSystem.isValid invalid ).
final public  voidaddRepositoryListener(RepositoryListener list)
     Adds new listener.
final public  Enumeration<? extends FileSystem>fileSystems()
     Returns enumeration of all filesystems.
final public  FileObjectfind(String aPackage, String name, String ext)
     Finds file when its name is provided.
final public  Enumeration<? extends FileObject>findAll(String aPackage, String name, String ext)
     Finds all files among all filesystems matching a given name, returning all matches.
final public  Enumeration<? extends FileObject>findAllResources(String name)
     Searches for the given resource among all filesystems, returning all matches.
final public  FileSystemfindFileSystem(String systemName)
     Finds filesystem when only its system name is known.
final public  FileObjectfindResource(String name)
     Searches for the given resource among all filesystems.
public static  RepositorygetDefault()
     Access method to get default instance of repository in the system.
final public  FileSystemgetDefaultFileSystem()
     Gets the NetBeans default (system, configuration) filesystem.
final  FCLSupportgetFCLSupport()
    
final public  Enumeration<? extends FileSystem>getFileSystems()
     Returns enumeration of all filesystems.
final public synchronized  voidreadExternal(ObjectInput ois)
     Reads object from stream. Reads all filesystems.
final public  voidremoveFileChangeListener(FileChangeListener fcl)
     Remove listener from this object.
final public  voidremoveFileSystem(FileSystem fs)
     Removes a filesystem from the pool.
final public  voidremoveRepositoryListener(RepositoryListener list)
     Removes listener.
final public  voidreorder(int[] perm)
     Reorders FileSystem s by given permutation.
final public  FileSystem[]toArray()
     Returns a sorted array of filesystems.
final public synchronized  voidwriteExternal(ObjectOutput oos)
     Saves pool to stream by saving all filesystems.

Field Detail
serialVersionUID
final static long serialVersionUID(Code)




Constructor Detail
Repository
public Repository(FileSystem def)(Code)
Creates new instance of filesystem pool and registers it as the default one. Also registers the default filesystem.
Parameters:
  def - the default filesystem




Method Detail
addFileChangeListener
final public void addFileChangeListener(FileChangeListener fcl)(Code)
Add new listener to this object.
Parameters:
  fcl - the listener
since:
   2.8Repository.getDefaultFileSystem



addFileSystem
final public void addFileSystem(FileSystem fs)(Code)
Adds new filesystem to the pool. Note that a filesystem cannot be assigned to more than one file system pool at one time (though currently there is only one pool anyway). At any given time, no two filesystems in the pool may share the same FileSystem.getSystemName name (unless all but one are FileSystem.isValid invalid ). To be sure, that filesystem was really added in Repository, then test that FileSystem is valid.
Parameters:
  fs - filesystem to add



addRepositoryListener
final public void addRepositoryListener(RepositoryListener list)(Code)
Adds new listener.
Parameters:
  list - the listener



fileSystems
final public Enumeration<? extends FileSystem> fileSystems()(Code)
Returns enumeration of all filesystems. enumeration of type FileSystem



find
final public FileObject find(String aPackage, String name, String ext)(Code)
Finds file when its name is provided. It scans in the list of filesystems and asks them for the specified file by a call to FileSystem.find find . The first object that is found is returned or null if none of the filesystems contain such a file.
Parameters:
  aPackage - package name where each package is separated by a dot
Parameters:
  name - name of the file (without dots) or null ifone wants to obtain the name of a package and not a file in it
Parameters:
  ext - extension of the file or null if one needsa package and not a file name FileObject that represents file with given name ornull if the file does not exist



findAll
final public Enumeration<? extends FileObject> findAll(String aPackage, String name, String ext)(Code)
Finds all files among all filesystems matching a given name, returning all matches. All filesystems are queried with FileSystem.find .
Parameters:
  aPackage - package name where each package is separated by a dot
Parameters:
  name - name of the file (without dots) or null ifone wants to obtain the name of a package and not a file in it
Parameters:
  ext - extension of the file or null if one needsa package and not a file name enumeration of FileObjects



findAllResources
final public Enumeration<? extends FileObject> findAllResources(String name)(Code)
Searches for the given resource among all filesystems, returning all matches.
Parameters:
  name - name of the resource enumeration of FileObjects



findFileSystem
final public FileSystem findFileSystem(String systemName)(Code)
Finds filesystem when only its system name is known.
Parameters:
  systemName - FileSystem.getSystemName name of the filesystem the filesystem or null if there is no suchfilesystem



findResource
final public FileObject findResource(String name)(Code)
Searches for the given resource among all filesystems.
See Also:   FileSystem.findResource
Parameters:
  name - a name of the resource file object or null if the resource can not be found



getDefault
public static Repository getDefault()(Code)
Access method to get default instance of repository in the system. The instance is either taken as a result of org.openide.util.Lookup.getDefault ().lookup (Repository.class) or (if the lookup query returns null) a default instance is created. default repository for the system



getDefaultFileSystem
final public FileSystem getDefaultFileSystem()(Code)
Gets the NetBeans default (system, configuration) filesystem. the default filesystem



getFCLSupport
final FCLSupport getFCLSupport()(Code)



getFileSystems
final public Enumeration<? extends FileSystem> getFileSystems()(Code)
Returns enumeration of all filesystems. enumeration of type FileSystem



readExternal
final public synchronized void readExternal(ObjectInput ois) throws IOException, ClassNotFoundException(Code)
Reads object from stream. Reads all filesystems. Persistent and system filesystems are untouched; all others are removed and possibly reread.
Parameters:
  ois - object input stream
exception:
  IOException - if an error occures
exception:
  ClassNotFoundException - if read class is not found



removeFileChangeListener
final public void removeFileChangeListener(FileChangeListener fcl)(Code)
Remove listener from this object.
Parameters:
  fcl - the listener
since:
   2.8Repository.getDefaultFileSystem



removeFileSystem
final public void removeFileSystem(FileSystem fs)(Code)
Removes a filesystem from the pool.
Parameters:
  fs - filesystem to remove



removeRepositoryListener
final public void removeRepositoryListener(RepositoryListener list)(Code)
Removes listener.
Parameters:
  list - the listener



reorder
final public void reorder(int[] perm)(Code)
Reorders FileSystem s by given permutation. For example, if there are three filesystems, new int[] {2, 0, 1} cycles the filesystems forwards.
Parameters:
  perm - an array of integers
throws:
  IllegalArgumentException - if the array is not a permutation, or is not the same length as the current number of filesystems in the pool



toArray
final public FileSystem[] toArray()(Code)
Returns a sorted array of filesystems. a sorted array of filesystems



writeExternal
final public synchronized void writeExternal(ObjectOutput oos) throws IOException(Code)
Saves pool to stream by saving all filesystems. The default (system) filesystem, or any persistent filesystems, are skipped.
Parameters:
  oos - object output stream
exception:
  IOException - if an error occures



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.