|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ide.file.AbstractFileScope
public abstract class AbstractFileScope
Base class for file scope implementations.
Constructor Summary | |
---|---|
AbstractFileScope() |
Method Summary | |
---|---|
protected abstract void |
activate() Activate this scope. |
void |
addFileChangeListener(FileChangeListener listener) Add a file change listener to receive events about the files in this scope. |
boolean |
contains(java.net.URL url) Determine whether this scope contains a URL. |
protected abstract void |
deactivate() Deactivate this scope. |
java.util.Collection<java.net.URL> |
getDirectories() Get the URLs of all directories in this scope. |
java.util.Collection<java.net.URL> |
getFiles() Get the URLs of all files in this scope. |
FileTable |
getFileTable(java.net.URL url) Get the file table in this scope containing a particular URL. |
java.util.Collection<FileTable> |
getFileTables() Get the file tables currently used by this scope. |
protected java.util.logging.Logger |
getLogger() Get the logger to use for this scope. |
protected abstract Path |
getPath() Get the current path of this scope. |
protected abstract Storage |
getStorage() Get the storage where data for this scope should be stored. |
java.net.URL |
locate(java.lang.String relativePath) Locate a file in this scope. |
protected void |
notifyPathChanged() Called by subclasses when the path for this scope has changed. |
void |
refresh() Refresh this scope. |
void |
refresh(FileChangeListener listener) Refresh this scope and invoke a listener with any changes found. |
void |
removeFileChangeListener(FileChangeListener listener) Remove a file change listener from this scope. |
void |
update() Update this scope. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractFileScope()
Method Detail |
---|
protected abstract void activate()
protected abstract void deactivate()
activate()
method.protected abstract Storage getStorage()
protected abstract Path getPath()
protected java.util.logging.Logger getLogger()
protected final void notifyPathChanged()
public void addFileChangeListener(FileChangeListener listener)
FileScope
addFileChangeListener
in interface FileScope
listener
- the listener to be addedpublic void removeFileChangeListener(FileChangeListener listener)
FileScope
removeFileChangeListener
in interface FileScope
listener
- the listener to be removedpublic java.util.Collection<FileTable> getFileTables()
FileScope
getFileTables
in interface FileScope
public FileTable getFileTable(java.net.URL url)
FileScope
getFileTable
in interface FileScope
url
- the URLnull
if no storages contain that URLpublic boolean contains(java.net.URL url)
FileScope
contains
in interface FileScope
url
- the URLtrue
if this scope contains the URL, false
otherwisepublic java.net.URL locate(java.lang.String relativePath) throws java.lang.InterruptedException, java.io.IOException
FileScope
locate
in interface FileScope
relativePath
- the relative path to the filenull
if the file was not found in this scopejava.lang.InterruptedException
- if the calling thread is interruptedjava.io.IOException
public java.util.Collection<java.net.URL> getFiles() throws java.io.IOException, java.lang.InterruptedException
FileScope
getFiles
in interface FileScope
java.io.IOException
- if the list of URLs could not be obtainedjava.lang.InterruptedException
- if the calling thread is interruptedpublic java.util.Collection<java.net.URL> getDirectories() throws java.io.IOException, java.lang.InterruptedException
FileScope
getDirectories
in interface FileScope
java.io.IOException
- if the list of URLs could not be obtainedjava.lang.InterruptedException
- if the calling thread is interruptedpublic void refresh() throws java.lang.InterruptedException, java.io.IOException
FileScope
refresh
in interface FileScope
java.lang.InterruptedException
- if the calling thread is interruptedjava.io.IOException
- if the refresh failspublic void refresh(FileChangeListener listener) throws java.lang.InterruptedException, java.io.IOException
FileScope
refresh
in interface FileScope
java.lang.InterruptedException
- if the calling thread is interruptedjava.io.IOException
- if the refresh failspublic void update() throws java.lang.InterruptedException, java.io.IOException
FileScope
FileScope.refresh()
, the files on disk are only scanned if the file table is known to require a refresh. This is potentially a very time consuming operation, and should never be called on the event thread. This method exists for backward compatibility with older code that requires it. It should rarely, if ever, be necessary to call this method. The file scope is updated automatically whenever any method is called to access its data.update
in interface FileScope
java.lang.InterruptedException
- if the calling thread is interruptedjava.io.IOException
- if the update fails
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |