com.sas.swing.models.remotefileselector2
Class BaseRemoteFileServerModel

com.sas.swing.models.remotefileselector2.BaseRemoteFileServerModel
All Implemented Interfaces:
com.sas.swing.models.remotefileselector2.MutableFileFilterInterface, com.sas.swing.models.remotefileselector2.RemoteFileModelDirectoriesOnlyInterface, java.io.Serializable, javax.swing.table.TableModel
Direct Known Subclasses:
BaseInformationServicesModel

public abstract class BaseRemoteFileServerModel
implements com.sas.swing.models.remotefileselector2.RemoteFileModelDirectoriesOnlyInterface, com.sas.swing.models.remotefileselector2.MutableFileFilterInterface

RemoteFileServerModel defines the abstract model that communicates between the service model and the user interface.

Since:
9.1.4
See Also:
Serialized Form

Field Summary
protected  java.lang.String currentPath
           
protected  boolean directoriesOnly
           
protected  java.util.List filterValues
           
protected  java.util.List infoList
           
protected  boolean modelNeedsRefresh
           
protected  boolean readingFromCache
           
protected  java.lang.String rootLocation
           
protected  boolean showDirectoriesOnly
           
protected  javax.swing.event.SwingPropertyChangeSupport spcs
           
protected  boolean tableEditable
           
 
Constructor Summary
BaseRemoteFileServerModel()
           
 
Method Summary
 void addToPasteBuffer(java.lang.Object node)
          Add the given metadata node to the paste buffer.
 void cancelLoadFileInfo()
          
 void clearPasteBuffer()
          Clears the buffer of all metadata items.
 java.lang.String getBasePath()
          Returns the file system path used as the base for all navigation.
 java.lang.String[] getFileInfo(java.lang.String folderLocation, java.lang.String fileName, java.lang.String fileType)
           
 java.lang.String getLocation()
          Returns the file system path currently being viewed.
 RemoteFileMetadataInterface getNodeAt(int rowIndex)
          Returns a RemoteFileMetadataInterface for specified index.
 java.util.List getPasteBuffer()
          Returns the contents of the paste buffer.
 int getPasteBufferCommandType()
          Returns the command type.
 int getRowCount()
          Provides the current number of rows available to be displayed.
 boolean isRefreshNeeded()
          Returns the status of the model's refresh flag.
 boolean isTableEditable()
          Determine if the table is editable.
 void setLocation(java.lang.String path)
          Sets the file system path to be viewed.
 void setPasteBufferCommandType(int commandType)
          Sets the paste buffer command type so it know's if we are copying or cutting the items.
 void setRefreshNeeded(boolean refresh)
          Sets a dirty flag that can be queried to determine if the model needs to ask for more file information.
 void setTableEditable(boolean editable)
          Set the table to state defined by editable.
 

Field Detail

readingFromCache

protected boolean readingFromCache

directoriesOnly

protected boolean directoriesOnly

tableEditable

protected boolean tableEditable

currentPath

protected java.lang.String currentPath

infoList

protected java.util.List infoList

modelNeedsRefresh

protected boolean modelNeedsRefresh

spcs

protected javax.swing.event.SwingPropertyChangeSupport spcs

filterValues

protected java.util.List filterValues

rootLocation

protected java.lang.String rootLocation

showDirectoriesOnly

protected boolean showDirectoriesOnly
Constructor Detail

BaseRemoteFileServerModel

public BaseRemoteFileServerModel()
Method Detail

setLocation

public void setLocation(java.lang.String path)
Sets the file system path to be viewed.

Parameters:
path - the file system path
See Also:
getLocation()

getLocation

public java.lang.String getLocation()
Returns the file system path currently being viewed.

Returns:
the file system path
See Also:
setLocation(String)

cancelLoadFileInfo

public void cancelLoadFileInfo()
Not currently used... Cancels the gathering of file information initiated by a call to loadFileInfo()


setRefreshNeeded

public void setRefreshNeeded(boolean refresh)
Sets a dirty flag that can be queried to determine if the model needs to ask for more file information.

Parameters:
refresh - the dirty flag

isRefreshNeeded

public boolean isRefreshNeeded()
Returns the status of the model's refresh flag.

Returns:
returns true if refresh is needed and false if refresh is not needed.

getBasePath

public java.lang.String getBasePath()
Returns the file system path used as the base for all navigation.

Returns:
the base file system path

getNodeAt

public RemoteFileMetadataInterface getNodeAt(int rowIndex)
Returns a RemoteFileMetadataInterface for specified index.

Parameters:
rowIndex - the specified table row
Returns:
the RemoteFileMetadataInterface

isTableEditable

public boolean isTableEditable()
Determine if the table is editable. If the table is not editable, then none of the cells will be editable. This value is false by default.

Returns:
the table editable status
See Also:
setTableEditable(boolean)

setTableEditable

public void setTableEditable(boolean editable)
Set the table to state defined by editable. Even though the table may be editable, the cell may not be editable.

Parameters:
editable - the editable status
See Also:
isTableEditable()

getRowCount

public int getRowCount()
Provides the current number of rows available to be displayed.

Specified by:
getRowCount in interface javax.swing.table.TableModel
Returns:
the number of rows

addToPasteBuffer

public void addToPasteBuffer(java.lang.Object node)
Add the given metadata node to the paste buffer.

Parameters:
node - the node to be added.

clearPasteBuffer

public void clearPasteBuffer()
Clears the buffer of all metadata items.


getPasteBuffer

public java.util.List getPasteBuffer()
Returns the contents of the paste buffer.

Returns:
a list of RemoteFileMetadataInterface nodes

setPasteBufferCommandType

public void setPasteBufferCommandType(int commandType)
Sets the paste buffer command type so it know's if we are copying or cutting the items.

Parameters:
commandType - the command type, copy = 0 and cut = 1
See Also:
getPasteBufferCommandType()

getPasteBufferCommandType

public int getPasteBufferCommandType()
Returns the command type.

Returns:
the command type
See Also:
setPasteBufferCommandType(int)

getFileInfo

public java.lang.String[] getFileInfo(java.lang.String folderLocation,
                                      java.lang.String fileName,
                                      java.lang.String fileType)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.