|
|||||||||
| Home >> All >> com >> flexstor >> common >> gui >> [ imprt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.flexstor.common.gui.imprt
Class FileViewerModel

java.lang.Objectjava.util.Observable
com.flexstor.common.gui.imprt.FileViewerModel
- All Implemented Interfaces:
- ConfigFileModelI, java.util.Observer
- public class FileViewerModel
- extends java.util.Observable
- implements ConfigFileModelI
- extends java.util.Observable
| Field Summary | |
protected com.flexstor.common.io.xfile.FlexXFile[] |
array
|
protected boolean |
bIsCtlChanged
|
protected java.lang.String |
currFile
|
protected java.lang.String |
location
|
static java.lang.String |
SEPARATOR
|
| Fields inherited from class java.util.Observable |
|
| Constructor Summary | |
FileViewerModel(java.lang.String location)
|
|
| Method Summary | |
private boolean |
checkDestination(com.flexstor.common.io.xfile.FlexXFile destination)
|
void |
deleteFile(com.flexstor.common.io.xfile.FlexXFile xFile)
Deletes the specified file. |
void |
deleteFile(java.lang.String fileName)
Deletes the specified file. |
private void |
dumpBufferIntoFile(byte[] buffer,
com.flexstor.common.io.xfile.FlexXFile dest)
|
void |
enableInput(boolean mode)
Enables or disables the input on the UI. |
java.lang.String |
getCurrentFile()
Returns the current file viwed or changed by the user. |
private com.flexstor.common.io.xfile.FlexXFile |
getFile(java.lang.String fileName)
|
com.flexstor.common.io.xfile.FlexXFile[] |
getFileList()
Returns the list of files under the initial location (dir) provided. |
java.lang.String |
getInitialLocation()
Returns the initial location (dir) from where the files are browsed. |
boolean |
isControlFileChanged()
Among all the config files we expect that there would be a file with extension .ctl, which is the control file for the import. |
private boolean |
isLocalPath(java.lang.String loc)
|
java.lang.StringBuffer |
loadBufferFromFile(com.flexstor.common.io.xfile.FlexXFile file)
Returns the string buffer of the file specified as parameter. |
java.lang.StringBuffer |
loadBufferFromFile(java.lang.String fileName)
Returns the string buffer of the file specified as parameter. |
private void |
notifyAllObservers(Notification notification)
|
private void |
parsePath()
|
void |
saveFile(java.lang.String fileName,
byte[] buffer)
|
void |
saveFile(java.lang.String fileName,
java.lang.String buffer)
Saves the string into the file. |
void |
saveFile(java.lang.String fileName,
java.lang.StringBuffer buffer)
Saves the buffer into the file |
void |
setCtlChanged(boolean bool)
|
void |
setCurrentFile(java.lang.String fName)
Sets the current file viwed or changed by the user. |
void |
setInitialLocation(java.lang.String loc)
Sets the initial location (dir) from where the files are browsed. |
void |
update(java.util.Observable obs,
java.lang.Object notification)
This method is called whenever the observable object changes, and has called notifyObservers. |
| Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.flexstor.common.gui.imprt.ConfigFileModelI |
addObserver, deleteObserver |
| Field Detail |
location
protected java.lang.String location
currFile
protected java.lang.String currFile
array
protected com.flexstor.common.io.xfile.FlexXFile[] array
SEPARATOR
public static java.lang.String SEPARATOR
bIsCtlChanged
protected boolean bIsCtlChanged
| Constructor Detail |
FileViewerModel
public FileViewerModel(java.lang.String location)
| Method Detail |
getInitialLocation
public java.lang.String getInitialLocation()
- Description copied from interface:
ConfigFileModelI - Returns the initial location (dir) from where the files are browsed.
- Specified by:
getInitialLocationin interfaceConfigFileModelI
setInitialLocation
public void setInitialLocation(java.lang.String loc)
- Description copied from interface:
ConfigFileModelI - Sets the initial location (dir) from where the files are browsed.
- Specified by:
setInitialLocationin interfaceConfigFileModelI
setCurrentFile
public void setCurrentFile(java.lang.String fName)
- Description copied from interface:
ConfigFileModelI - Sets the current file viwed or changed by the user.
- Specified by:
setCurrentFilein interfaceConfigFileModelI
getCurrentFile
public java.lang.String getCurrentFile()
- Description copied from interface:
ConfigFileModelI - Returns the current file viwed or changed by the user.
- Specified by:
getCurrentFilein interfaceConfigFileModelI
isControlFileChanged
public boolean isControlFileChanged()
- Description copied from interface:
ConfigFileModelI - Among all the config files we expect that there would be a file with extension
.ctl, which is the control file for the import. If this changes, a reloading is
necessary on the GUI, hence the function.
- Specified by:
isControlFileChangedin interfaceConfigFileModelI
setCtlChanged
public void setCtlChanged(boolean bool)
saveFile
public void saveFile(java.lang.String fileName, java.lang.StringBuffer buffer) throws com.flexstor.common.exceptions.FileOperationFailedException
- Description copied from interface:
ConfigFileModelI - Saves the buffer into the file
- Specified by:
saveFilein interfaceConfigFileModelI
saveFile
public void saveFile(java.lang.String fileName, java.lang.String buffer) throws com.flexstor.common.exceptions.FileOperationFailedException
- Description copied from interface:
ConfigFileModelI - Saves the string into the file.
- Specified by:
saveFilein interfaceConfigFileModelI
saveFile
public void saveFile(java.lang.String fileName, byte[] buffer) throws com.flexstor.common.exceptions.FileOperationFailedException
deleteFile
public void deleteFile(java.lang.String fileName) throws com.flexstor.common.exceptions.FileOperationFailedException
- Description copied from interface:
ConfigFileModelI - Deletes the specified file. Returns the status.
- Specified by:
deleteFilein interfaceConfigFileModelI
deleteFile
public void deleteFile(com.flexstor.common.io.xfile.FlexXFile xFile) throws com.flexstor.common.exceptions.FileOperationFailedException
- Description copied from interface:
ConfigFileModelI - Deletes the specified file. Returns the status.
- Specified by:
deleteFilein interfaceConfigFileModelI
getFileList
public com.flexstor.common.io.xfile.FlexXFile[] getFileList() throws com.flexstor.common.exceptions.FileOperationFailedException
- Description copied from interface:
ConfigFileModelI - Returns the list of files under the initial location (dir) provided.
- Specified by:
getFileListin interfaceConfigFileModelI
loadBufferFromFile
public java.lang.StringBuffer loadBufferFromFile(java.lang.String fileName) throws com.flexstor.common.exceptions.FileOperationFailedException
- Description copied from interface:
ConfigFileModelI - Returns the string buffer of the file specified as parameter.
- Specified by:
loadBufferFromFilein interfaceConfigFileModelI
loadBufferFromFile
public java.lang.StringBuffer loadBufferFromFile(com.flexstor.common.io.xfile.FlexXFile file) throws com.flexstor.common.exceptions.FileOperationFailedException
- Description copied from interface:
ConfigFileModelI - Returns the string buffer of the file specified as parameter.
- Specified by:
loadBufferFromFilein interfaceConfigFileModelI
enableInput
public void enableInput(boolean mode)
- Description copied from interface:
ConfigFileModelI - Enables or disables the input on the UI.
- Specified by:
enableInputin interfaceConfigFileModelI
update
public void update(java.util.Observable obs, java.lang.Object notification)
- Description copied from interface:
java.util.Observer - This method is called whenever the observable object changes, and has
called
notifyObservers. The Observable object can pass arbitrary information in the second parameter.- Specified by:
updatein interfacejava.util.Observer
getFile
private com.flexstor.common.io.xfile.FlexXFile getFile(java.lang.String fileName) throws com.flexstor.common.exceptions.FileOperationFailedException
parsePath
private void parsePath()
dumpBufferIntoFile
private void dumpBufferIntoFile(byte[] buffer,
com.flexstor.common.io.xfile.FlexXFile dest)
throws com.flexstor.common.exceptions.FileOperationFailedException
checkDestination
private boolean checkDestination(com.flexstor.common.io.xfile.FlexXFile destination)
isLocalPath
private boolean isLocalPath(java.lang.String loc)
notifyAllObservers
private void notifyAllObservers(Notification notification)
|
|||||||||
| Home >> All >> com >> flexstor >> common >> gui >> [ imprt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC