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

com.sas.swing.models.remotefileselector.informationservices.InformationServicesSearchModel
All Implemented Interfaces:
RemoteFileSearchModelInterface, RemoteFileServiceModelInterface

public class InformationServicesSearchModel
implements RemoteFileSearchModelInterface

InformationServicesSearchModel class probivides the additional functionality to perform searches on the file system data.

Since:
3.1

Field Summary
static int CREATEDDATE
          used to specify the created date when searching on datetime values
static int MODIFIEDDATE
          used to specify the modified date when searching on datetime values
static java.lang.String RB_KEY
          a resource attribute
 
Fields inherited from class com.sas.swing.models.remotefileselector.informationservices.InformationServicesModel
actionProvider, allFileList, currentPath, endDate, filterComp, filteredFolder, filterValues, GMT, INFOMAP, remoteFileServerModel, REPORTS, repository, searchFilter, startDate, startFolder, STPROC
 
Constructor Summary
InformationServicesSearchModel(com.sas.services.information.RepositoryInterface repository)
          Constructor that allows setting of the repository to be searched.
InformationServicesSearchModel(com.sas.services.user.UserContextInterface user)
           
 
Method Summary
 int getDateSearchType()
           
 int getFilterMatchType()
          Returns the currently set filter match type.
 boolean getRecursive()
          Returns the current recursive search setting.
 void setDateRange(java.util.Date startDate, java.util.Date endDate)
          Allows setting of a date range used to search for items by date.
 void setDateSearchType(int dateType)
          Allows configuration of created vs. modified dates used when searching for datetime values
 void setFilterMatchType(int filterMatch)
          Allows setting of a constant value for the filterRelation value.
 void setRecursive(boolean recursive)
          Specifies whether to recursively search file system sub folders for results that match the other search criteria.
 void setSearchAttributes(java.util.Map searchAttributes)
          Allows setting of all search attributes with one call.
 void setSearchContext(java.lang.String context)
          Specifies the attribute containing the values to be searched.
 void setSearchText(java.lang.String text)
          Sets the text to be searched.
 void setStartingLocation(java.lang.String startingPath)
          Sets the file system path used as a starting location for the search.
 void startSearch(RemoteFileServerModelInterface model, BaseActionProvider actionProvider)
          Starts the search process once the search criteria have been set.
 void stopSearch()
          Allows stopping of the search.
 
Methods inherited from class com.sas.swing.models.remotefileselector.informationservices.InformationServicesModel
addPropertyChangeListener, combineDirectoryPathAndFileName, filterData, getDirectoryPath, getFiles, getFilterValues, getFolderInterfaceFiles, getFullyQualifiedPath, getRepository, getRepositoryList, getTopLevelName, removePropertyChangeListener, setFilterValues, setRepository, splitDirectoryPathAndFileName
 
Methods inherited from interface com.sas.swing.models.remotefileselector.RemoteFileServiceModelInterface
addPropertyChangeListener, combineDirectoryPathAndFileName, getDirectoryPath, getFiles, getFilterValues, getFullyQualifiedPath, getTopLevelName, removePropertyChangeListener, setFilterValues, splitDirectoryPathAndFileName
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
a resource attribute

See Also:
Constant Field Values

MODIFIEDDATE

public static final int MODIFIEDDATE
used to specify the modified date when searching on datetime values

See Also:
Constant Field Values

CREATEDDATE

public static final int CREATEDDATE
used to specify the created date when searching on datetime values

See Also:
Constant Field Values
Constructor Detail

InformationServicesSearchModel

public InformationServicesSearchModel(com.sas.services.information.RepositoryInterface repository)
Constructor that allows setting of the repository to be searched.

Parameters:
repository - the repository to be searched

InformationServicesSearchModel

public InformationServicesSearchModel(com.sas.services.user.UserContextInterface user)
Parameters:
user -
Method Detail

startSearch

public void startSearch(RemoteFileServerModelInterface model,
                        BaseActionProvider actionProvider)
Starts the search process once the search criteria have been set.

Specified by:
startSearch in interface RemoteFileSearchModelInterface
Parameters:
model - the remote file selector data model that will update when search is finished
actionProvider - the action provider framework object

stopSearch

public void stopSearch()
Allows stopping of the search. No default implementation.

Specified by:
stopSearch in interface RemoteFileSearchModelInterface

setSearchText

public void setSearchText(java.lang.String text)
Sets the text to be searched. The search model performs a contains search by default (i.e. wildcard characters are not needed to perform a search on *text*. Specifying *text or text* also reverts to a contains search for this version.

Specified by:
setSearchText in interface RemoteFileSearchModelInterface
Parameters:
text - the text to search for

setSearchContext

public void setSearchContext(java.lang.String context)
Specifies the attribute containing the values to be searched. E.g. "Name" would search an attribute, called "Name", for the specified text string.

Specified by:
setSearchContext in interface RemoteFileSearchModelInterface
Parameters:
context - the attribute name

setStartingLocation

public void setStartingLocation(java.lang.String startingPath)
Sets the file system path used as a starting location for the search.

Specified by:
setStartingLocation in interface RemoteFileSearchModelInterface
Parameters:
startingPath - a file system path

setRecursive

public void setRecursive(boolean recursive)
Specifies whether to recursively search file system sub folders for results that match the other search criteria.

Specified by:
setRecursive in interface RemoteFileSearchModelInterface
Parameters:
recursive - true = yes search sub folders, false = no search just the specified folder
See Also:
getRecursive()

getRecursive

public boolean getRecursive()
Returns the current recursive search setting.

Returns:
the recursive search setting
See Also:
setRecursive(boolean)

setDateRange

public void setDateRange(java.util.Date startDate,
                         java.util.Date endDate)
Allows setting of a date range used to search for items by date.

Specified by:
setDateRange in interface RemoteFileSearchModelInterface
Parameters:
startDate - the beginning of the range (inclusive)
endDate - the end of the range (inclusive)

setDateSearchType

public void setDateSearchType(int dateType)
Allows configuration of created vs. modified dates used when searching for datetime values

Parameters:
dateType - the date type

getDateSearchType

public int getDateSearchType()

setFilterMatchType

public void setFilterMatchType(int filterMatch)
Allows setting of a constant value for the filterRelation value. If not set then the filterRelation is based on the inclusion of asterix wildcards.

Specified by:
setFilterMatchType in interface RemoteFileSearchModelInterface
Parameters:
filterMatch - the value from FilterComponent.EQUALS, CONTAINS, etc.
See Also:
RemoteFileSearchModelInterface.getFilterMatchType(), FilterComponent

getFilterMatchType

public int getFilterMatchType()
Returns the currently set filter match type.

Specified by:
getFilterMatchType in interface RemoteFileSearchModelInterface
Returns:
the filter type
See Also:
setFilterMatchType(int)

setSearchAttributes

public void setSearchAttributes(java.util.Map searchAttributes)
Allows setting of all search attributes with one call. No default implementation.

Specified by:
setSearchAttributes in interface RemoteFileSearchModelInterface
Parameters:
searchAttributes - a map of the search attributes



Copyright © 2009 SAS Institute Inc. All Rights Reserved.