|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object se.entitymanager.logic.file.AbstractFile
public abstract class AbstractFile
An entity that represents an file of the file system.
Field Summary | |
---|---|
protected java.lang.String |
fileContents
The contents of this file. |
protected java.lang.String |
lastModified
The date of last modification of this file. |
protected java.lang.String |
name
The name of this file (without path informations). |
protected AbstractFile |
parent
Parent file of this entity. |
protected boolean |
readable
Indicates if file is readable. |
protected java.lang.String |
size
The size of this file. |
protected boolean |
writeable
Indicates if file is writable. |
Constructor Summary | |
---|---|
protected |
AbstractFile(java.lang.String name,
AbstractFile parent)
Constructs a file entity with name and parent . |
Method Summary | |
---|---|
protected abstract void |
copy()
Copy this file. |
protected abstract void |
delete()
Deletes this file. |
protected abstract java.util.List |
getAllChildren()
Returns all direct child files. |
abstract java.lang.String |
getFileContents()
Returns the contents of this file. |
java.lang.String |
getLastModified()
Returns date of modification of this file. |
java.lang.String |
getName()
Returns the name of this file without path informations. |
protected AbstractFile |
getParent()
Returns the parent file. |
java.lang.String |
getSize()
Returns the size of this file. |
protected abstract boolean |
isFolderish()
Returns whether this file is folderish. |
boolean |
isReadable()
Returns if file is readable. |
boolean |
isWriteable()
Returns if file is writable. |
protected abstract void |
paste()
Paste the file from the clipboard. |
protected abstract void |
rename(java.lang.String newName)
Renames this file to newName . |
protected void |
setName(java.lang.String name)
Sets the name of this file. |
java.lang.String |
toString()
Returns the name of this file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected AbstractFile parent
protected java.lang.String name
protected java.lang.String size
protected java.lang.String lastModified
protected java.lang.String fileContents
protected boolean readable
protected boolean writeable
Constructor Detail |
---|
protected AbstractFile(java.lang.String name, AbstractFile parent)
name
and parent
.
name
- name of file (without path information)parent
- parent file of this entityMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
getName()
protected abstract boolean isFolderish()
Folderish files like directories or zip files may contain other files.
protected abstract java.util.List getAllChildren() throws EntityNotFolderishException
The objects within the list are instances derived from AbstractFile
EntityNotFolderishException
- if this file is not folderishprotected abstract void rename(java.lang.String newName) throws EntityRenameFailedException
newName
.
newName
- new name of this file.
EntityRenameFailedException
- if an error occurredprotected abstract void delete() throws EntityDeletionFailedException
EntityDeletionFailedException
- if an error occurredprotected abstract void copy() throws EntityCopyCutFailedException
EntityCopyCutFailedException
- if an error occurredprotected abstract void paste() throws EntityPasteFailedException
EntityPasteFailedException
- if an error occurredpublic abstract java.lang.String getFileContents()
protected AbstractFile getParent()
FileSystemsRootFile
public java.lang.String getName()
public java.lang.String getSize()
public java.lang.String getLastModified()
public boolean isReadable()
public boolean isWriteable()
protected void setName(java.lang.String name)
name
- name of file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |