Class actuate.reportexplorer.FileSearch
Description
Searches the contents of files according to one or more file conditions. FileSearch represents a JavaScript version of com.actuate.schemas.FileSearch.
Constructor
Syntax
actuate.reportexplorer.FileSearch( )
Constructs a new FileSearch object.
Function summary
Table 4-43 lists actuate.reportexplorer.FileSearch functions.
actuate.reportexplorer.FileSearch.getAccessType
Syntax
string FileSearch.getAccessType( )
Gets the access type.
Returns
String. Either "private" or "shared" according to whether the FileSearch has been shared or not.
Example
To halt a script if a FileSearch is private, use code similar to the following:
if(fsearch.getAccessType( ) == "private"){ return;}
actuate.reportexplorer.FileSearch.getCondition
Syntax
actuate.reportexplorer.FileCondition FileSearch.getCondition( )
Gets the condition from the FileSearch.
Returns
actuate.reportexplorer.FileCondition object. A condition to apply in a search.
Example
To halt a script if a FileSearch does not have a condition, use code similar to the following:
if(fsearch.getCondition( ) == null){ return;}
actuate.reportexplorer.FileSearch.getConditionArray
Syntax
actuate.reportexplorer.FileCondition[ ] FileSearch.getConditionArray( )
Gets the file condition array for this FileSearch.
Returns
Array of actuate.reportexplorer.FileCondition objects. Multiple conditions to apply in a search.
Example
To retrieve the array of file conditions from the FileSearch object fsearch, use code similar to the following:
var conditions = new Array( );
conditions = fsearch.getConditionArray( );
actuate.reportexplorer.FileSearch.getCountLimit
Syntax
integer FileSearch.getCountLimit( )
Gets the maximum number of match results to display set for this file search.
Returns
Integer. The maximum number of match results to display. 0 indicates unlimited.
Example
To retrieve the count limit from the FileSearch object fsearch, use code similar to the following:
var limit = fsearch.getCountLimit( );
actuate.reportexplorer.FileSearch.getDependentFileId
Syntax
string FileSearch.getDependentFileId( )
Gets the file ID of the FileSearch, identifying the file it is set to search.
Returns
String. The file ID.
Example
To retrieve the file Id from the FileSearch object fsearch, use code similar to the following:
var id = fsearch.getDependantFileId( );
actuate.reportexplorer.FileSearch.getDependentFileName
Syntax
string FileSearch.getDependentFileName( )
Gets the file name of the FileSearch.
Returns
String. The file name.
Example
To retrieve the file name from the FileSearch object fsearch, use code similar to the following:
var name = fsearch.getDependantFileName( );
actuate.reportexplorer.FileSearch.getFetchDirection
Syntax
boolean FileSearch.getFetchDirection( )
Gets the fetch direction of the FileSearch.
Returns
Boolean. True indicates ascending order.
Example
To switch the fetch direction for the FileSearch object fsearch, use code similar to the following:
fsearch.setFetchDirection(!fsearch.getFetchDirection( ));
actuate.reportexplorer.FileSearch.getFetchHandle
Syntax
string FileSearch.getFetchHandle( )
Gets the fetch handle.
Returns
String. The fetch handle.
Example
To retrieve the fetch handle from the FileSearch object fsearch, use code similar to the following:
var handle = fsearch.getFetchHandle( );
actuate.reportexplorer.FileSearch.getFetchSize
Syntax
integer FileSearch.getFetchSize( )
Gets the fetch size.
Returns
Integer. The fetch size.
Example
To halt a script if a FileSearch has a fetch size of 0, use code similar to the following:
if(fsearch.getFetchSize( ) == 0){ return;}
actuate.reportexplorer.FileSearch.getIncludeHiddenObject
Syntax
boolean FileSearch.getIncludeHiddenObject( )
Gets the includeHiddenObject value for this FileSearch.
Returns
Boolean. True includes hidden object.
Example
To alert the user that hidden objects are enabled for a FileSearch, use code similar to the following:
if(fsearch.getIncludeHiddenObejct( )){
  alert("Hidden objects are enabled.");
}
actuate.reportexplorer.FileSearch.getOwner
Syntax
string FileSearch.getOwner( )
Gets the owner’s name.
Returns
String. The owner’s user name.
Example
To retrieve the owner of fsearch, use code similar to the following:
var owner = fsearch.getOwner( );
actuate.reportexplorer.FileSearch.getPrivilegeFilter
Syntax
actuate.reportexplorer.PrivilegeFilter FileSearch.getPrivilegeFilter( )
Gets the privilege filter.
Returns
actuate.reportexplorer.PrivilegeFilter object. A privilege filter.
Example
To retrieve the privilege filter for fsearch, use code similar to the following:
var privileges = fsearch.getPrivilegeFilter( );
actuate.reportexplorer.FileSearch.getRequiredFileId
Syntax
integer FileSearch.getRequiredFileId( )
Gets the requiredFileId of FileSearch.
Returns
Integer. A field ID.
Example
To retrieve the required field ID assigned to fsearch, use code similar to the following:
var id = fsearch.getRequiredFileId( );
actuate.reportexplorer.FileSearch.getRequiredFileName
Syntax
string FileSearch.getRequiredFileName( )
Gets the requiredFileName name.
Returns
String. A file name.
Example
To retrieve the file name assigned to fsearch, use code similar to the following:
var id = fsearch.getRequiredFileName( );
actuate.reportexplorer.FileSearch.setAccessType
Syntax
void FileSearch.setAccessType(string accessType)
Sets the access type.
Parameters
accessType
String. Either "private" or "shared" according to whether FileSearch has been shared or not.
Example
To make a FileSearch fsearch private, use code similar to the following:
fsearch.setAccessType("private");
actuate.reportexplorer.FileSearch.setCondition
Syntax
void FileSearch.setCondition(actuate.reportExplorer.FileCondition condition)
Sets a search condition for this FileSearch.
Parameters
condition
actuate.reportexplorer.FileCondition object. A condition to apply to this search.
Example
To clear FileSearch fsearch’s condition, use code similar to the following:
fsearch.setCondition(null);
actuate.reportexplorer.FileSearch.setConditionArray
Syntax
void FileSearch.setConditionArray(actuate.reportExplorer.FileCondition[ ] ConditionArray)
Sets multiple search conditions for this FileSearch.
Parameters
ConditionArray
Array of actuate.reportexplorer.FileCondition objects. Conditions to apply to this search.
Example
To clear FileSearch fsearch’s condition array, use code similar to the following:
fsearch.setConditionArray(null);
actuate.reportexplorer.FileSearch.setCountLimit
Syntax
void FileSearch.setCountLimit(integer countlimit)
Sets the maximum number of match results to display.
Parameters
countlimit
Integer. The maximum number of match results to display. 0 indicates unlimited.
Example
To set FileSearch fsearch to stop searching after finding 100 matches, use code similar to the following:
fsearch.setCountLimit(100);
actuate.reportexplorer.FileSearch.setDependentFileId
Syntax
void FileSearch.setDependentFileId(string dependentFileId)
Sets the file ID of the FileSearch.
Parameters
dependentFileId
String. A file ID.
Example
To set FileSearch fsearch’s File ID to current, use code similar to the following:
fsearch.setDependentFileId("current");
actuate.reportexplorer.FileSearch.setDependentFileName
Syntax
void FileSearch.setDependentFileName(string dependentFileName)
Sets the file name of FileSearch.
Parameters
dependentFileName
String. A file name.
Example
To set FileSearch fsearch’s file name to current, use code similar to the following:
fsearch.setDependentFileName("current");
actuate.reportexplorer.FileSearch.setFetchDirection
Syntax
void FileSearch.setFetchDirection(boolean fetchDirection)
Sets the fetch direction for this FileSearch.
Parameters
fetchDirection
Boolean. True indicates ascending order.
Example
To switch the fetch direction for the FileSearch object fsearch, use code similar to the following:
fsearch.setFetchDirection(!fsearch.getFetchDirection( ));
actuate.reportexplorer.FileSearch.setFetchHandle
Syntax
void FileSearch.setFetchHandle(string fetchHandle)
Sets the fetch handle for FileSearch.
Parameters
fetchHandle
String. A fetch handle.
Example
To set FileSearch fsearch’s fetch handle to ezsearch, use code similar to the following:
fsearch.setFetchHandle("ezsearch");
actuate.reportexplorer.FileSearch.setFetchSize
Syntax
void FileSearch.setFetchSize(integer fetchSize)
Sets the fetch size.
Parameters
fetchSize
Integer. The fetch size.
Example
To set FileSearch fsearch’s fetch size to 12, use code similar to the following:
fsearch.setFetchSize(12);
actuate.reportexplorer.FileSearch.setIncludeHiddenObject
Syntax
void FileSearch.setIncludeHiddenObject(boolean includeHiddenObject)
Sets the includeHiddenObject value for this FileSearch.
Parameters
includeHiddenObject
Boolean. True includes hidden object.
Example
To prohibit FileSearch fsearch from including hidden objects, use code similar to the following:
fsearch.setIncludeHiddenObject(false);
actuate.reportexplorer.FileSearch.setOwner
Syntax
void FileSearch.setOwner(string owner)
Sets the owner for this FileSearch.
Parameters
owner
String. The owner’s user name.
Example
To set FileSearch fsearch’s owner to administrator, use code similar to the following:
fsearch.setOwner("administrator");
actuate.reportexplorer.FileSearch.setPrivilegeFilter
Syntax
void FileSearch.setPrivilegeFilter(actuate.reportexplorer.PrivilegeFilter privilegeFilter)
Sets the privilege filter.
Parameters
privilegeFilter
actuate.reportexplorer.PrivilegeFilter object. The privilege filter.
Example
To assign the privilege filter pfilter to the FileSearch fsearch, use code similar to the following:
fsearch.setPrivilegeFilter(pfilter);
actuate.reportexplorer.FileSearch.setRequiredFileId
Syntax
void FileSearch.setRequiredFileId(string requiredFileId)
Sets the requiredFileId for this FileSearch.
Parameters
requiredFileId
String. A file ID.
Example
To set FileSearch fsearch’s File Id to permanent, use code similar to the following:
fsearch.setRequiredFileId("permanent");
actuate.reportexplorer.FileSearch.setRequiredFileName
Syntax
void FileSearch.setRequiredFileName(string requiredFileName)
Sets the required file name.
Parameters
requiredFileName
String. A file name.
Example
To set FileSearch fsearch’s file name to permanent, use code similar to the following:
fsearch.setRequiredFileName("permanent");

Additional Links:

Copyright Actuate Corporation 2012