public abstract class MultiDataObject.Entry extends Object implements Serializable
group data object
.Modifier | Constructor and Description |
---|---|
protected |
Entry(FileObject file) |
Modifier and Type | Method and Description |
---|---|
abstract FileObject |
copy(FileObject f,
String suffix)
Called when the entry is to be copied.
|
FileObject |
copyRename(FileObject f,
String name,
String ext)
Called when the entry is to be copied and renamed.
|
abstract FileObject |
createFromTemplate(FileObject f,
String name)
Called when the entry is to be created from a template.
|
abstract void |
delete()
Called when the entry is to be deleted.
|
boolean |
equals(Object o) |
MultiDataObject |
getDataObject()
Get the multi data object this entry is assigned to.
|
FileObject |
getFile()
Get the file this entry works with.
|
int |
hashCode() |
boolean |
isImportant()
Method that allows to check whether an entry is important or is not.
|
boolean |
isLocked()
Tests whether the entry is locked.
|
abstract FileObject |
move(FileObject f,
String suffix)
Called when the entry is to be moved.
|
abstract FileObject |
rename(String name)
Called when the entry is to be renamed.
|
FileLock |
takeLock()
Try to lock this file entry.
|
protected Object |
writeReplace()
Make a Serialization replacement.
|
protected Entry(FileObject file)
public final FileObject getFile()
public final MultiDataObject getDataObject()
public boolean isImportant()
public abstract FileObject copy(FileObject f, String suffix) throws IOException
FileObject
,
or do nothing (if it cannot be copied).f
- the folder to create this entry insuffix
- the suffix to add to the name of original fileFileObject
or null
if it cannot be copiedIOException
- when the operation failspublic abstract FileObject rename(String name) throws IOException
FileObject
,
or delete it (if it cannot be renamed).name
- the new nameFileObject
or null
if it has been deletedIOException
- when the operation failspublic abstract FileObject move(FileObject f, String suffix) throws IOException
FileObject
,
or delete it (if it cannot be moved).f
- the folder to move this entry tosuffix
- the suffix to useFileObject
or null
if it has been deletedIOException
- when the operation failspublic abstract void delete() throws IOException
IOException
- when the operation failspublic abstract FileObject createFromTemplate(FileObject f, String name) throws IOException
FileObject
,
or do nothing (if it cannot be copied).f
- the folder to create this entry inname
- the new name to useFileObject
or null
if it cannot be copiedIOException
- when the operation failspublic FileObject copyRename(FileObject f, String name, String ext) throws IOException
f
- the folder to create this entry inname
- new file nameext
- new file extensionFileObject
, never nullIOException
- when the operation failspublic FileLock takeLock() throws IOException
null
IOException
- if the lock could not be takenpublic boolean isLocked()
true
if soprotected Object writeReplace()