|
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 FormField 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 RemoteFileServerModelInterface
public java.lang.String getBasePath()
getBasePath
in interface RemoteFileServerModelInterface
setBasePath(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 RemoteFileServerModelInterface
path
- the file system path
java.lang.IllegalArgumentException
getPath()
public void setPath(java.lang.String path, boolean search) throws java.lang.IllegalArgumentException
setPath
in interface RemoteFileServerModelInterface
path
- the file system pathsearch
- specifies if this is a call from the search model
java.lang.IllegalArgumentException
getPath()
public java.lang.String combineDirectoryPathAndFileName(java.lang.String path, java.lang.String name)
combineDirectoryPathAndFileName
in interface RemoteFileServerModelInterface
path
- the existing file system pathname
- the folder/directory name
splitDirectoryPathAndFileName(String)
public java.lang.String[] splitDirectoryPathAndFileName(java.lang.String path)
splitDirectoryPathAndFileName
in interface RemoteFileServerModelInterface
path
- the existing path
combineDirectoryPathAndFileName(String, String)
public java.lang.String getServerName()
getServerName
in interface RemoteFileServerModelInterface
public void setModel(RemoteFileServiceModelInterface newServiceModel)
setModel
in interface RemoteFileServerModelInterface
newServiceModel
- the model that communicates with the file system.getModel()
public RemoteFileServiceModelInterface getModel()
getModel
in interface RemoteFileServerModelInterface
setModel(RemoteFileServiceModelInterface)
public java.lang.String getPath()
getPath
in interface RemoteFileServerModelInterface
setPath(String)
public java.util.List parseIntoPathElements(java.lang.String path)
parseIntoPathElements
in interface RemoteFileServerModelInterface
path
- the path
public java.lang.String createPathFromArray(java.lang.Object[] namesArray)
createPathFromArray
in interface RemoteFileServerModelInterface
namesArray
- the array of folder names
public void updateFilteredValues(java.util.List newFilterValues)
updateFilteredValues
in interface RemoteFileServerModelInterface
newFilterValues
- the list of new filter type valuespublic void refresh()
refresh
in interface RemoteFileServerModelInterface
public void setCacheEnabled(boolean enabled)
setCacheEnabled
in interface RemoteFileServerModelInterface
enabled
- the status of cacheing, by default set to true = cache results, false = don't cacheisCacheEnabled()
public boolean isCacheEnabled()
isCacheEnabled
in interface RemoteFileServerModelInterface
setCacheEnabled(boolean)
public CacheModel getCacheModel()
getCacheModel
in interface RemoteFileServerModelInterface
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
e
- the PropertyChangeEventpublic int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface javax.swing.table.TableModel
rowIndex
- the row whose value is to be queriedcolumnIndex
- the column whose value is to be queriedpublic RemoteFileMetadataInterface getNodeAt(int rowIndex)
getNodeAt
in interface RemoteFileServerModelInterface
rowIndex
- the specified table row
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
aValue
- the new valuerowIndex
- the row whose value is to be changedcolumnIndex
- the column whose value is to be changedpublic boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
rowIndex
- the row whose value to be queriedcolumnIndex
- the column whose value to be queried
public void setColumnNames(java.lang.String[] columnNames)
setColumnNames
in interface RemoteFileServerModelInterface
columnNames
- the column namesgetColumnNames()
public java.lang.String[] getColumnNames()
getColumnNames
in interface RemoteFileServerModelInterface
setColumnNames(String[])
public void setColumnName(java.lang.String columnName, int columnIndex)
setColumnName
in interface RemoteFileServerModelInterface
columnName
- the new name of the columncolumnIndex
- the index of the columnpublic java.lang.String getColumnName(int columnIndex)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
columnIndex
- the index of the column
public void setTransforms(com.sas.util.transforms.TransformInterface[] transforms)
setTransforms
in interface RemoteFileServerModelInterface
transforms
- the transformsgetTransforms()
public com.sas.util.transforms.TransformInterface[] getTransforms()
getTransforms
in interface RemoteFileServerModelInterface
setTransforms(TransformInterface[])
public void setTransform(com.sas.util.transforms.TransformInterface transform, int columnIndex)
setTransform
in interface RemoteFileServerModelInterface
transform
- the transform classcolumnIndex
- the column to associate the transformpublic boolean isTableEditable()
isTableEditable
in interface RemoteFileServerModelInterface
setTableEditable(boolean)
public void setTableEditable(boolean editable)
setTableEditable
in interface RemoteFileServerModelInterface
editable
- the editable valueisTableEditable()
public void addToPasteBuffer(RemoteFileMetadataInterface node)
addToPasteBuffer
in interface RemoteFileServerModelInterface
node
- the node to be added.public void clearPasteBuffer()
clearPasteBuffer
in interface RemoteFileServerModelInterface
public java.util.List getPasteBuffer()
getPasteBuffer
in interface RemoteFileServerModelInterface
public void setPasteBufferCommandType(int commandType)
setPasteBufferCommandType
in interface RemoteFileServerModelInterface
commandType
- the command type, copy = 0 and cut = 1getPasteBufferCommandType()
public int getPasteBufferCommandType()
getPasteBufferCommandType
in interface RemoteFileServerModelInterface
setPasteBufferCommandType(int)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |