com.sas.swing.models.remotefileselector.informationservices
Class InformationServicesModel

com.sas.swing.models.remotefileselector.informationservices.InformationServicesModel
All Implemented Interfaces:
RemoteFileServiceModelInterface
Direct Known Subclasses:
InformationServicesSearchModel

public class InformationServicesModel
implements RemoteFileServiceModelInterface

InformationServicesModel defines the model that communicates with the Information Service.

Since:
3.1
See Also:
RemoteFileServerModel,

Field Summary
protected  BaseActionProvider actionProvider
          the action provider framework class
protected  java.util.List allFileList
          stores all of the individual files and any sub folders
protected  java.lang.String currentPath
          the file system path currently being displayed
protected  java.util.Date endDate
          the end of a date range used for searching
protected  com.sas.services.information.FilterComponent filterComp
          holds a piece of the filter to be specified
protected  com.sas.services.information.metadata.FilteredFolderInterface filteredFolder
          stores the results of a call to get a list of files
protected  java.util.List filterValues
          the values used to filter the file types
static java.util.TimeZone GMT
          prepresents the GMT time zone
static java.lang.String INFOMAP
          the value for information map types
static java.lang.String RB_KEY
          the resource key string
protected  RemoteFileServerModelInterface remoteFileServerModel
          the model associates with the remote file selector
static java.lang.String REPORTS
          the value for report types
protected  com.sas.services.information.RepositoryInterface repository
          the repository used to communicat with the file system
protected  com.sas.services.information.FilterInterface searchFilter
          a filter specified to use when searching for files
protected  java.util.Date startDate
          the beginning of a date range used for searching
protected  com.sas.services.information.metadata.FolderInterface startFolder
          the folder location to start a search or retrieval of files
static java.lang.String STPROC
          the value for stored process types
 
Constructor Summary
InformationServicesModel(com.sas.services.information.RepositoryInterface repository)
          Allows specification of the repository used to communicate with the file system.
InformationServicesModel(com.sas.services.user.UserContextInterface user)
          Allows specification of a UserContext to communicate with the file system.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds a PropertyChangeListener
 java.lang.String combineDirectoryPathAndFileName(java.lang.String path, java.lang.String name)
          Concatenates a path and a folder or file name.
protected  boolean filterData(com.sas.services.information.metadata.MetadataInterface item)
          The method that does the actual filtering of metadata items.
 java.lang.String getDirectoryPath(java.lang.String path)
          Returns a path for the file locations.
 java.util.List getFiles(java.lang.String path)
          Returns the collection of files for file system path that is to be viewed.
 java.util.List getFilterValues()
          Returns the currently set values to filter on.
 java.util.List getFolderInterfaceFiles(com.sas.services.information.metadata.FolderInterface folder)
          Returns the collection of files for FolderInterface object that is to be viewed.
 java.lang.String getFullyQualifiedPath(java.lang.String currentPath, java.lang.String fileName)
          Returns the file system path.
 com.sas.services.information.RepositoryInterface getRepository()
          Returns the information service repository being used.
 java.util.List getRepositoryList()
           
 java.lang.String getTopLevelName()
          Returns a name used to identify the top level in the view.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes a PropertyChangeListener
 void setFilterValues(java.util.List filterValues)
          Sets a list of values to be used for filtering file types or extensions.
 void setRepository(com.sas.services.information.RepositoryInterface repository)
          Sets the information service repository to be queried.
 java.lang.String[] splitDirectoryPathAndFileName(java.lang.String path)
          Parses a given path into the parent directory and the folder name.
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
the resource key string

See Also:
Constant Field Values

GMT

public static final java.util.TimeZone GMT
prepresents the GMT time zone


REPORTS

public static final java.lang.String REPORTS
the value for report types

See Also:
Constant Field Values

INFOMAP

public static final java.lang.String INFOMAP
the value for information map types

See Also:
Constant Field Values

STPROC

public static final java.lang.String STPROC
the value for stored process types

See Also:
Constant Field Values

repository

protected com.sas.services.information.RepositoryInterface repository
the repository used to communicat with the file system


filterValues

protected java.util.List filterValues
the values used to filter the file types


searchFilter

protected com.sas.services.information.FilterInterface searchFilter
a filter specified to use when searching for files


filteredFolder

protected com.sas.services.information.metadata.FilteredFolderInterface filteredFolder
stores the results of a call to get a list of files


allFileList

protected java.util.List allFileList
stores all of the individual files and any sub folders


filterComp

protected com.sas.services.information.FilterComponent filterComp
holds a piece of the filter to be specified


startFolder

protected com.sas.services.information.metadata.FolderInterface startFolder
the folder location to start a search or retrieval of files


currentPath

protected java.lang.String currentPath
the file system path currently being displayed


remoteFileServerModel

protected RemoteFileServerModelInterface remoteFileServerModel
the model associates with the remote file selector


actionProvider

protected BaseActionProvider actionProvider
the action provider framework class


startDate

protected java.util.Date startDate
the beginning of a date range used for searching


endDate

protected java.util.Date endDate
the end of a date range used for searching

Constructor Detail

InformationServicesModel

public InformationServicesModel(com.sas.services.information.RepositoryInterface repository)
Allows specification of the repository used to communicate with the file system.

Parameters:
repository - the information service repository

InformationServicesModel

public InformationServicesModel(com.sas.services.user.UserContextInterface user)
Allows specification of a UserContext to communicate with the file system. The UserContext is used to get all repositories the user is connected to.

Parameters:
user - the UserContext class
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener

Specified by:
addPropertyChangeListener in interface RemoteFileServiceModelInterface
Parameters:
listener - the PropertyChangeListener

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener

Specified by:
removePropertyChangeListener in interface RemoteFileServiceModelInterface
Parameters:
listener - the PropertyChangeListener

getFiles

public java.util.List getFiles(java.lang.String path)
Returns the collection of files for file system path that is to be viewed. Passing an empty or null string is treated as specifying the root directory. Other values need to be formatted for the appropriate host operating system. This method returns a collection of files . Each member of this collection is an instance of com.sas.swing.models.remotefileselector.informationservices.InformationServiceFileMetadata class.

Specified by:
getFiles in interface RemoteFileServiceModelInterface
Parameters:
path - the file system path.
search - set to true if the getFiles() should be run as a separate thread, false if not
Returns:
the collection of files
See Also:
RemoteFileMetadataInterface, com.sas.swing.models.remotefileselector.informationservices.InformationServiceFileMetadata

getFolderInterfaceFiles

public java.util.List getFolderInterfaceFiles(com.sas.services.information.metadata.FolderInterface folder)
Returns the collection of files for FolderInterface object that is to be viewed. This method returns a collection of files . Each member of this collection is an instance of com.sas.swing.visuals.remotefileselector.IFileServiceFileMetadata class.

Parameters:
folder - a FolderInterface object containing the file information to be viewed.
Returns:
the collection of files

filterData

protected boolean filterData(com.sas.services.information.metadata.MetadataInterface item)
The method that does the actual filtering of metadata items. By default this method filters on Transformations and Trees. Filtering on other metadata types may require an override of this method.

Parameters:
item - the metadata item to be filtered
Returns:
returns true if the item meets the filtering criteria

splitDirectoryPathAndFileName

public java.lang.String[] splitDirectoryPathAndFileName(java.lang.String path)
Parses a given path into the parent directory and the folder name.

Specified by:
splitDirectoryPathAndFileName in interface RemoteFileServiceModelInterface
Parameters:
path - the path to be parsed
Returns:
the folder and parent directory

combineDirectoryPathAndFileName

public java.lang.String combineDirectoryPathAndFileName(java.lang.String path,
                                                        java.lang.String name)
Concatenates a path and a folder or file name.

Specified by:
combineDirectoryPathAndFileName in interface RemoteFileServiceModelInterface
Parameters:
path - the parent path
name - the name to be appended
Returns:
the concatenated path

getTopLevelName

public java.lang.String getTopLevelName()
Returns a name used to identify the top level in the view.

Specified by:
getTopLevelName in interface RemoteFileServiceModelInterface
Returns:
the display name of the top level

getFullyQualifiedPath

public java.lang.String getFullyQualifiedPath(java.lang.String currentPath,
                                              java.lang.String fileName)
Returns the file system path. The form of the path is SBIP://///

Specified by:
getFullyQualifiedPath in interface RemoteFileServiceModelInterface
Parameters:
currentPath - the original path that needs to be fully qualified
Returns:
the file system path

getDirectoryPath

public java.lang.String getDirectoryPath(java.lang.String path)
Returns a path for the file locations. Does not include extraneous system information. There are two possible path structures that can be passed into this method. The first, is an SBIP URL pattern. This pattern starts with the string "SBIP://" and contains the name of the repository. With an SBIP URL pattern, the SBIP part and the repository name are stripped off the path. The other pattern starts with just the root folder at the beginning of the string. Nothing is taken away from this pattern.

Specified by:
getDirectoryPath in interface RemoteFileServiceModelInterface
Parameters:
path - the fully qualified path
Returns:
the file locations path

setFilterValues

public void setFilterValues(java.util.List filterValues)
Sets a list of values to be used for filtering file types or extensions.

Specified by:
setFilterValues in interface RemoteFileServiceModelInterface
Parameters:
filterValues - a List of String items with the values
See Also:
getFilterValues()

getFilterValues

public java.util.List getFilterValues()
Returns the currently set values to filter on.

Specified by:
getFilterValues in interface RemoteFileServiceModelInterface
Returns:
List of String items
See Also:
setFilterValues(List)

setRepository

public void setRepository(com.sas.services.information.RepositoryInterface repository)
Sets the information service repository to be queried.

Parameters:
repository - the information service repository
See Also:
getRepository()

getRepository

public com.sas.services.information.RepositoryInterface getRepository()
Returns the information service repository being used.

Returns:
the information service repository
See Also:
setRepository(RepositoryInterface)

getRepositoryList

public java.util.List getRepositoryList()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.