|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectse.entitymanager.logic.file.FileLogicFacade
public class FileLogicFacade
A LogicFacade that provides an interface to file systems.
| Field Summary | |
|---|---|
private EntityInterface |
clipboardEntity
The entity of the file to be copied or cutted (to the clipboard). |
private boolean |
deleteAfterPaste
The entity of the file to be copied or cutted (to the clipboard). |
private java.util.List |
entityChangedListeners
List of listeners for changed entities. |
private static FileLogicFacade |
facade
Static instance. |
| Constructor Summary | |
|---|---|
private |
FileLogicFacade()
Änderung: auskommentiert *** |
| Method Summary | |
|---|---|
void |
addEntityChangeListener(EntityChangedListener listener)
Adds listener for changed entites. |
void |
copy(EntityInterface entity)
Copies an entity. |
void |
delete(EntityInterface entity)
Deletes an entity. |
java.util.Collection |
getAllChildren(EntityInterface entity)
Returns sub-entities of folderish entity. |
EntityInterface |
getClipboardEntity()
Returns entity to be pasted. |
java.io.File |
getClipboardFile()
|
java.util.Comparator |
getComparator()
Returns a comparator for entity interfaces. |
boolean |
getDeleteAfterPaste()
|
java.lang.String |
getEntityLastModified(EntityInterface entity)
Returns date of last modification of entity. |
java.lang.String |
getEntityName(EntityInterface entity)
Returns name of entity. |
java.lang.String |
getEntitySize(EntityInterface entity)
Returns size of entity. |
static FileLogicFacade |
getInstance()
Returns the instance of class FileLogicFacade. |
EntityInterface |
getRootEntity()
Returns root entity. |
boolean |
isEntityReadable(EntityInterface entity)
Returns if file is readable. |
boolean |
isEntityWriteable(EntityInterface entity)
Returns if file is writable. |
boolean |
isFolderish(EntityInterface entity)
Returns whether entity is folderish. |
private void |
notifyChangedEntity(EntityInterface entity)
Notifies all listeners for changed entities about a changed entity. |
void |
paste(EntityInterface destinationEntity)
Pastes to an entity. |
void |
removeEntityChangeListener(EntityChangedListener listener)
Removes listener for changed entities. |
void |
rename(EntityInterface entity,
java.lang.String newName)
Renames an entity. |
void |
setDeleteAfterPaste(boolean shouldBeDeleted)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static FileLogicFacade facade
getInstance()private java.util.List entityChangedListeners
private EntityInterface clipboardEntity
private boolean deleteAfterPaste
| Constructor Detail |
|---|
private FileLogicFacade()
getInstance()| Method Detail |
|---|
public static FileLogicFacade getInstance()
FileLogicFacade.
public EntityInterface getRootEntity()
LogicFacadeAll entities must be within a tree like hierarchy. This method returns the root of this hierarchy.
getRootEntity in interface LogicFacadepublic java.io.File getClipboardFile()
public java.lang.String getEntityName(EntityInterface entity)
LogicFacadeAll entities must have name. This method returns the name of the given entity.
getEntityName in interface LogicFacadeentity - the entity
public java.lang.String getEntitySize(EntityInterface entity)
LogicFacadeAll entities must have size. This method returns the size of the given entity.
getEntitySize in interface LogicFacadeentity - the entity
public java.lang.String getEntityLastModified(EntityInterface entity)
LogicFacadeAll entities must have date of last modification. This method returns the date of last modification of the given entity.
getEntityLastModified in interface LogicFacadeentity - the entity
public boolean isEntityReadable(EntityInterface entity)
LogicFacade
isEntityReadable in interface LogicFacadeentity - the entity
public boolean isEntityWriteable(EntityInterface entity)
LogicFacade
isEntityWriteable in interface LogicFacadeentity - the entity
public boolean isFolderish(EntityInterface entity)
LogicFacadeFolderish entities may contain other entities. These may be accessed with method getAllChildren.
isFolderish in interface LogicFacadeentity - the entity
LogicFacade.getAllChildren(EntityInterface)
public java.util.Collection getAllChildren(EntityInterface entity)
throws EntityNotFolderishException
LogicFacade
getAllChildren in interface LogicFacadeentity - the entity
EntityNotFolderishException
public void rename(EntityInterface entity,
java.lang.String newName)
throws EntityRenameFailedException
LogicFacade
rename in interface LogicFacadeentity - the entitynewName - new name for the entity
EntityRenameFailedException - if an error occured
public void delete(EntityInterface entity)
throws EntityDeletionFailedException
LogicFacade
delete in interface LogicFacadeentity - the entity
EntityDeletionFailedException - if an error occuredpublic void setDeleteAfterPaste(boolean shouldBeDeleted)
setDeleteAfterPaste in interface LogicFacadepublic boolean getDeleteAfterPaste()
getDeleteAfterPaste in interface LogicFacade
public void copy(EntityInterface entity)
throws EntityCopyCutFailedException
LogicFacade
copy in interface LogicFacadeentity - the entity
EntityCopyCutFailedException - if an error occuredpublic EntityInterface getClipboardEntity()
LogicFacade
getClipboardEntity in interface LogicFacade
public void paste(EntityInterface destinationEntity)
throws EntityPasteFailedException
LogicFacade
paste in interface LogicFacadeEntityPasteFailedException - if an error occuredpublic java.util.Comparator getComparator()
LogicFacade
getComparator in interface LogicFacadepublic void addEntityChangeListener(EntityChangedListener listener)
LogicFacade
addEntityChangeListener in interface LogicFacadelistener - the listener to addLogicFacade.addEntityChangeListener(se.entitymanager.logic.EntityChangedListener)public void removeEntityChangeListener(EntityChangedListener listener)
LogicFacade
removeEntityChangeListener in interface LogicFacadelistener - the listener to removeLogicFacade.removeEntityChangeListener(se.entitymanager.logic.EntityChangedListener)private void notifyChangedEntity(EntityInterface entity)
entity - the entity that has changed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||