|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.netbeans.modules.vcscore.turbo.local.FileAttributeQuery
Extensible support for file attributes. It delegates
to registered FileAttributeProviders and if no
one matches it uses default attribute database.
| Method Summary | |
void |
addFileAttributeListener(FileAttributeListener l)
|
protected void |
fireAttributeChange(FileObject fo,
String name,
Object value)
|
static FileAttributeQuery |
getDefault()
Returns default instance. |
boolean |
isPrepared(FileObject fo,
String name)
Checks attribute instant availability. |
boolean |
prepareAttribute(FileObject fo,
String name)
Checks attribute instant availability and schedules its loading. |
Object |
readAttribute(FileObject fo,
String name)
Reads given attribute for given fileobject. |
void |
removeFileAttributeListener(FileAttributeListener l)
|
String |
toString()
|
boolean |
writeAttribute(FileObject fo,
String name,
Object value)
Writes given attribute and notifies all listeners. |
void |
writeAttribute(File file,
String id,
Object value)
Deprecated. Internal contract: it allows the VCSFS to address FileObject prenatal situations. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public static FileAttributeQuery getDefault()
public Object readAttribute(FileObject fo, String name)
fo - identifies source FileObject, never nullname - identifies requested attribute, never null
null if it does not exist.public boolean writeAttribute(FileObject fo, String name, Object value)
A client calling this method is reponsible for passing valid attribute value that is accepted by providers. It's not an issue in typical case when the caller is often the provider itself. In other cases the caller must be provider friend and it should be assured by invoking this method using following code snippet:
boolean success = faq.writeAttribute(fo, name, value);
assert success : "Unexpected attribute[" + name + "] value[" + value + "] denial for " + fo + "!";
fo - identifies target file object, never nullname - identifies attribute, never nullvalue - actual attribute value that should be stored, null behaviour
is defined specificaly for each attribute, commonly it invalidates the value
false on write failure if provider denies the value. On I/O error it
returns true.public void writeAttribute(File file, String id, Object value)
FileObject prenatal situations.
public boolean prepareAttribute(FileObject fo, String name)
false if not ready and providers must be consulted. It'll
fire event on completion if attribute exists. If true it's
ready and stays ready until fo reference released.public boolean isPrepared(FileObject fo, String name)
null.
public void addFileAttributeListener(FileAttributeListener l)
public void removeFileAttributeListener(FileAttributeListener l)
protected void fireAttributeChange(FileObject fo, String name, Object value)
public String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||