|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.swing.models.remotefileselector.RemoteFileServerModel
public class RemoteFileServerModel
RemoteFileServerModel defines the model that communicates between the service model and the user interface.
RemoteFileComponentPanel,
,
Serialized Form| Field Summary | |
|---|---|
static java.lang.String |
RB_KEY
the resource location |
| Constructor Summary | |
|---|---|
RemoteFileServerModel(java.lang.String path,
RemoteFileServiceModelInterface serviceModel)
Constructs a RemoteFileServerModel with user supplied path, service model and directory/folder mode. |
|
RemoteFileServerModel(java.lang.String path,
RemoteFileServiceModelInterface serviceModel,
boolean showDirectoriesOnly)
Constructs a RemoteFileServerModel with user supplied path, service model and directory/folder mode. |
|
RemoteFileServerModel(java.lang.String path,
RemoteFileServiceModelInterface serviceModel,
boolean showDirectoriesOnly,
com.sas.util.transforms.TransformInterface[] transforms,
java.lang.String[] columnNames)
Constructs a RemoteFileServerModel with user supplied path, service model and directory/folder mode. |
|
RemoteFileServerModel(java.lang.String path,
RemoteFileServiceModelInterface serviceModel,
com.sas.util.transforms.TransformInterface[] transforms,
java.lang.String[] columnNames)
Constructs a RemoteFileServerModel with user supplied path, service model and directory/folder mode. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds the model as a PropertyChangeListener. |
void |
addToPasteBuffer(RemoteFileMetadataInterface node)
Add the given metadata node to the paste buffer. |
void |
clearPasteBuffer()
Clears the buffer of all metadata items. |
java.lang.String |
combineDirectoryPathAndFileName(java.lang.String path,
java.lang.String name)
Returns a concatenated file system path given an existing path and a folder/directory name. |
java.lang.String |
createPathFromArray(java.lang.Object[] namesArray)
Given an array of folder names, this method returns a file system path. |
java.lang.String |
getBasePath()
Returns the file system path used as the base for all navigation. |
CacheModel |
getCacheModel()
Returns the cache model. |
int |
getColumnCount()
Returns the number of columns in the model. |
java.lang.String |
getColumnName(int columnIndex)
Returns the name of the column at columnIndex. |
java.lang.String[] |
getColumnNames()
Returns the column names. |
RemoteFileServiceModelInterface |
getModel()
Returns the model used to communicate with the file system. |
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. |
java.lang.String |
getPath()
Returns the file system path currently being viewed. |
int |
getRowCount()
Returns the number of rows in the model. |
java.lang.String |
getServerName()
Returns the name of the file system top level. |
com.sas.util.transforms.TransformInterface[] |
getTransforms()
Returns the transforms being used to get the metadata information. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value for the cell at columnIndex and rowIndex. |
boolean |
isCacheEnabled()
Returns the current status of cacheing. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Returns true if the cell at rowIndex and columnIndex is editable and the table is editable. |
boolean |
isTableEditable()
Determine if the table is editable. |
boolean |
isUpwardPathRestricted()
Returns true if the model's current path is at the topmost path of the current server, false otherwise. |
java.util.List |
parseIntoPathElements(java.lang.String path)
Takes a give file system path and breaks it into the component pieces. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Listens for the PropertyChangeEvent serviceModel and triggers a refresh of the model. |
void |
refresh()
Refreshes the currently viewed file system path. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the model as a PropertyChangeListener. |
void |
setBasePath(java.lang.String basePath)
Allows setting of a file system path used as the base for all navigation. |
void |
setCacheEnabled(boolean enabled)
Sets whether to allow cacheing of the file information. |
void |
setColumnName(java.lang.String columnName,
int columnIndex)
Sets the name of the column at columnIndex to columnName. |
void |
setColumnNames(java.lang.String[] columnNames)
Sets the column names used in by the table. |
void |
setModel(RemoteFileServiceModelInterface newServiceModel)
Allows setting of the model to be used to communicate with the file system. |
void |
setPasteBufferCommandType(int commandType)
Sets the paste buffer command type so it know's if we are copying or cutting the items. |
void |
setPath(java.lang.String path)
Sets the file system path to be viewed. |
void |
setPath(java.lang.String path,
boolean search)
Sets the file system path to be viewed. |
void |
setTableEditable(boolean editable)
Set the table to state defined by editable. |
void |
setTransform(com.sas.util.transforms.TransformInterface transform,
int columnIndex)
Sets the transform class for a columnIndex. |
void |
setTransforms(com.sas.util.transforms.TransformInterface[] transforms)
Sets the transforms used to retrieve the metadata information. |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
Sets the value in the cell at columnIndex and rowIndex to aValue. |
java.lang.String[] |
splitDirectoryPathAndFileName(java.lang.String path)
Given a path, this method returns a collection containing a parent path and the child directory/folder name. |
void |
updateFilteredValues(java.util.List newFilterValues)
Method is run when the file type filter is changed. |
| Field Detail |
|---|
public static final java.lang.String RB_KEY
| Constructor Detail |
|---|
public RemoteFileServerModel(java.lang.String path,
RemoteFileServiceModelInterface serviceModel)
path - the starting file system pathserviceModel - the service modelRemoteFileServiceModelInterface
public RemoteFileServerModel(java.lang.String path,
RemoteFileServiceModelInterface serviceModel,
boolean showDirectoriesOnly)
path - the starting file system pathserviceModel - the service modelRemoteFileServiceModelInterface
public RemoteFileServerModel(java.lang.String path,
RemoteFileServiceModelInterface serviceModel,
com.sas.util.transforms.TransformInterface[] transforms,
java.lang.String[] columnNames)
path - the starting file system pathserviceModel - the service modelRemoteFileServiceModelInterface
public RemoteFileServerModel(java.lang.String path,
RemoteFileServiceModelInterface serviceModel,
boolean showDirectoriesOnly,
com.sas.util.transforms.TransformInterface[] transforms,
java.lang.String[] columnNames)
path - the starting file system pathserviceModel - the service modelshowDirectoriesOnly - set to true, if only directories/folders are to be displayedRemoteFileServiceModelInterface| Method Detail |
|---|
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - public boolean isUpwardPathRestricted()
isUpwardPathRestricted in interface RemoteFileServerModelInterfacepublic java.lang.String getBasePath()
getBasePath in interface RemoteFileServerModelInterfacesetBasePath(String)public void setBasePath(java.lang.String basePath)
basePath - the base file system path, default value is blankgetBasePath()
public void setPath(java.lang.String path)
throws java.lang.IllegalArgumentException
setPath in interface RemoteFileServerModelInterfacepath - the file system path
java.lang.IllegalArgumentExceptiongetPath()
public void setPath(java.lang.String path,
boolean search)
throws java.lang.IllegalArgumentException
setPath in interface RemoteFileServerModelInterfacepath - the file system pathsearch - specifies if this is a call from the search model
java.lang.IllegalArgumentExceptiongetPath()
public java.lang.String combineDirectoryPathAndFileName(java.lang.String path,
java.lang.String name)
combineDirectoryPathAndFileName in interface RemoteFileServerModelInterfacepath - the existing file system pathname - the folder/directory name
splitDirectoryPathAndFileName(String)public java.lang.String[] splitDirectoryPathAndFileName(java.lang.String path)
splitDirectoryPathAndFileName in interface RemoteFileServerModelInterfacepath - the existing path
combineDirectoryPathAndFileName(String, String)public java.lang.String getServerName()
getServerName in interface RemoteFileServerModelInterfacepublic void setModel(RemoteFileServiceModelInterface newServiceModel)
setModel in interface RemoteFileServerModelInterfacenewServiceModel - the model that communicates with the file system.getModel()public RemoteFileServiceModelInterface getModel()
getModel in interface RemoteFileServerModelInterfacesetModel(RemoteFileServiceModelInterface)public java.lang.String getPath()
getPath in interface RemoteFileServerModelInterfacesetPath(String)public java.util.List parseIntoPathElements(java.lang.String path)
parseIntoPathElements in interface RemoteFileServerModelInterfacepath - the path
public java.lang.String createPathFromArray(java.lang.Object[] namesArray)
createPathFromArray in interface RemoteFileServerModelInterfacenamesArray - the array of folder names
public void updateFilteredValues(java.util.List newFilterValues)
updateFilteredValues in interface RemoteFileServerModelInterfacenewFilterValues - the list of new filter type valuespublic void refresh()
refresh in interface RemoteFileServerModelInterfacepublic void setCacheEnabled(boolean enabled)
setCacheEnabled in interface RemoteFileServerModelInterfaceenabled - the status of cacheing, by default set to true = cache results, false = don't cacheisCacheEnabled()public boolean isCacheEnabled()
isCacheEnabled in interface RemoteFileServerModelInterfacesetCacheEnabled(boolean)public CacheModel getCacheModel()
getCacheModel in interface RemoteFileServerModelInterfacepublic void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListenere - the PropertyChangeEventpublic int getRowCount()
getRowCount in interface javax.swing.table.TableModelpublic int getColumnCount()
getColumnCount in interface javax.swing.table.TableModel
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface javax.swing.table.TableModelrowIndex - the row whose value is to be queriedcolumnIndex - the column whose value is to be queriedpublic RemoteFileMetadataInterface getNodeAt(int rowIndex)
getNodeAt in interface RemoteFileServerModelInterfacerowIndex - the specified table row
public void setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelaValue - the new valuerowIndex - the row whose value is to be changedcolumnIndex - the column whose value is to be changed
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelrowIndex - the row whose value to be queriedcolumnIndex - the column whose value to be queried
public void setColumnNames(java.lang.String[] columnNames)
setColumnNames in interface RemoteFileServerModelInterfacecolumnNames - the column namesgetColumnNames()public java.lang.String[] getColumnNames()
getColumnNames in interface RemoteFileServerModelInterfacesetColumnNames(String[])
public void setColumnName(java.lang.String columnName,
int columnIndex)
setColumnName in interface RemoteFileServerModelInterfacecolumnName - the new name of the columncolumnIndex - the index of the columnpublic java.lang.String getColumnName(int columnIndex)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelcolumnIndex - the index of the column
public void setTransforms(com.sas.util.transforms.TransformInterface[] transforms)
setTransforms in interface RemoteFileServerModelInterfacetransforms - the transformsgetTransforms()public com.sas.util.transforms.TransformInterface[] getTransforms()
getTransforms in interface RemoteFileServerModelInterfacesetTransforms(TransformInterface[])
public void setTransform(com.sas.util.transforms.TransformInterface transform,
int columnIndex)
setTransform in interface RemoteFileServerModelInterfacetransform - the transform classcolumnIndex - the column to associate the transformpublic boolean isTableEditable()
isTableEditable in interface RemoteFileServerModelInterfacesetTableEditable(boolean)public void setTableEditable(boolean editable)
setTableEditable in interface RemoteFileServerModelInterfaceeditable - the editable valueisTableEditable()public void addToPasteBuffer(RemoteFileMetadataInterface node)
addToPasteBuffer in interface RemoteFileServerModelInterfacenode - the node to be added.public void clearPasteBuffer()
clearPasteBuffer in interface RemoteFileServerModelInterfacepublic java.util.List getPasteBuffer()
getPasteBuffer in interface RemoteFileServerModelInterfacepublic void setPasteBufferCommandType(int commandType)
setPasteBufferCommandType in interface RemoteFileServerModelInterfacecommandType - the command type, copy = 0 and cut = 1getPasteBufferCommandType()public int getPasteBufferCommandType()
getPasteBufferCommandType in interface RemoteFileServerModelInterfacesetPasteBufferCommandType(int)
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||