C# Class Microsoft.Legal.MatterCenter.Repository.Search

This class contains all the methods which are related to spo search
Inheritance: ISearch
ファイルを表示 Open project: Microsoft/mattercenter

Public Methods

Method Description
FetchContextualHelpContentUtility ( ClientContext clientContext, ListItemCollection contextualHelpSectionListItems ) : List

Fetches contextual help content from SPList.

GetConfigurations ( string siteCollectionUrl, string listName ) : GenericResponseVM
GetDocuments ( SearchRequestVM searchRequestVM ) : SearchResponseVM

Gets the matters based on search criteria.

GetMatterHelp ( Client client, string selectedPage, string listName ) : List

GetMatters ( SearchRequestVM searchRequestVM ) : SearchResponseVM

Gets the matters based on search criteria.

GetPinnedData ( SearchRequestVM searchRequestVM, string listName, string listColumnName, bool isShowDocument ) : SearchResponseVM

GetWebRoleDefinitions ( Client client ) : List
IsFileExists ( ClientContext clientContext, string pageUrl ) : bool

Checks the file at the specified location and return the file existence status.

PageExists ( Client client, string requestedUrl ) : bool

Checks if the requested page exists or not.

PinDocument ( PinRequestDocumentVM pinRequestDocumentVM ) : bool

Add a new pin document to the user pinned document list

PinMatter ( PinRequestMatterVM pinRequestMatterVM ) : bool

Add a new pin item to the user pinned matter list

Search ( ISPOAuthorization spoAuthorization, IConfigurationRoot configuration, ICustomLogger customLogger, IUsersDetails userDetails, ISPList spList, IOptions generalSettings, IOptions sharedSettings, IOptions logTables, IOptions searchSettings, IOptions camlQueries, IOptions listNames, IOptions errorSettings ) : Microsoft.Extensions.Options

SearchUsers ( SearchRequestVM searchRequestVM ) : IList

UnPinDocument ( PinRequestDocumentVM pinRequestDocumentVM ) : bool

Removes pinned item from user pinned document list.

UnPinMatter ( PinRequestMatterVM pinRequestMatterVM ) : bool

Removes pinned item from user pinned details.

Private Methods

Method Description
AddDateRefinementFilter ( KeywordQuery keywordQuery, string fromDate, string toDate, string managedProperty ) : KeywordQuery

Adds date refinement filter to the keyword query object

AddSortingRefiner ( KeywordQuery keywordQuery, string sortByProperty, int sortDirection ) : KeywordQuery

Returns the Keyword query object with refiners added for sorting

AssignKeywordQueryValues ( KeywordQuery keywordQuery, List managedProperties ) : KeywordQuery

Assigns the keyword query values.

DecodeMatterProperties ( object>.IDictionary matterMetadata ) : void

Decodes matter properties before sending them to UI

DecodeValues ( object value ) : string

Provides the required matter properties

FillResultData ( ClientContext clientContext, KeywordQuery keywordQuery, SearchRequestVM searchRequestVM, System.Boolean isMatterSearch, List managedProperties ) : SearchResponseVM

Fires query on SharePoint Search and fills the result data.

FilterCommonDetails ( SearchObject searchObject, KeywordQuery keywordQuery, bool isMatterView ) : KeywordQuery

Returns the query to filter the matters/ documents for common filters.

FilterDocuments ( SearchObject searchObject, KeywordQuery keywordQuery ) : KeywordQuery

Prepares and returns the query to filter the documents.

FilterMatters ( SearchObject searchObject, KeywordQuery keywordQuery ) : KeywordQuery

Returns the query to filter the matters.

FilterMattersUtility ( SearchObject searchObject, KeywordQuery keywordQuery ) : KeywordQuery

Returns the query to filter the matters.

FormFilterQuery ( string propertyName, IList dataList ) : string

Forms filter query for the specified property and data list.

GetCurrentUserPinnedDetails ( bool isMatterView, object getUserPinnedDetails ) : PinUnpinDetails

Gets the current user pinned details.

GetFilteredPinnedDocumentList ( SearchRequestVM searchRequestVM, IList docList ) : IList
GetFilteredPinnedMatterList ( SearchRequestVM searchRequestVM, IList matterList ) : IList
GetFirstPinnedDocument ( PinUnpinDetails userPinnedDetails ) : string

Gets the first pinned document serialized JSON object

GetFirstPinnedMatter ( PinUnpinDetails userPinnedDetails ) : string

Gets the first pinned matter serialized JSON object

GetPinDocsFilteredResult ( SearchRequestVM searchRequestVM, DocumentData>.Dictionary searchResultsVM ) : IList
GetPinMattersFilteredResult ( SearchRequestVM searchRequestVM, MatterData>.Dictionary searchResultsVM ) : IList
GetSortByProperty ( KeywordQuery keywordQuery, SearchObject searchObject, System.Boolean isMatterSearch ) : KeywordQuery

Defines the sorting property and direction for querying SharePoint Search.

GetUniqueDocumentColumnName ( string uniueColumnName ) : string

to get column name

GetuniqueMatterColumnName ( string uniueColumnName ) : string
IsUserReadOnlyForMatter ( System.Boolean isReadOnly, string currentLoggedInUser, string currentLoggedInUserEmail, string readOnlyUsers ) : bool

Checks if logged-in user has read permission on matter.

KeywordQueryMetrics ( Client client, SearchObject searchObject, KeywordQuery keywordQuery, string filterCondition, string managedProperty, bool isMatterView ) : KeywordQuery

Prepares and returns the keyword query to get data from SharePoint Search based on filtering condition.

NoDataRow ( List managedProperties ) : SearchResponseVM

Function to return no data row

PinThisRecord ( ClientContext clientContext, Client client, object getUserPinnedDetails, bool isMatterView ) : bool

Pins the record and associate to logged-in user.

UnPinThisRecord ( ClientContext clientContext, Client client, object getUserPinnedDetails, bool isMatterView ) : bool

Removes the record and dissociate from logged-in user.

UppercaseFirst ( string s ) : string

Method Details

FetchContextualHelpContentUtility() public method

Fetches contextual help content from SPList.
public FetchContextualHelpContentUtility ( ClientContext clientContext, ListItemCollection contextualHelpSectionListItems ) : List
clientContext ClientContext ClientContext for SharePoint
contextualHelpSectionListItems ListItemCollection List collection object for contextual help section list
return List

GetConfigurations() public method

public GetConfigurations ( string siteCollectionUrl, string listName ) : GenericResponseVM
siteCollectionUrl string
listName string
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM

GetDocuments() public method

Gets the matters based on search criteria.
public GetDocuments ( SearchRequestVM searchRequestVM ) : SearchResponseVM
searchRequestVM Microsoft.Legal.MatterCenter.Models.SearchRequestVM
return Microsoft.Legal.MatterCenter.Models.SearchResponseVM

GetMatterHelp() public method

public GetMatterHelp ( Client client, string selectedPage, string listName ) : List
client Microsoft.Legal.MatterCenter.Models.Client
selectedPage string
listName string
return List

GetMatters() public method

Gets the matters based on search criteria.
public GetMatters ( SearchRequestVM searchRequestVM ) : SearchResponseVM
searchRequestVM Microsoft.Legal.MatterCenter.Models.SearchRequestVM
return Microsoft.Legal.MatterCenter.Models.SearchResponseVM

GetPinnedData() public method

public GetPinnedData ( SearchRequestVM searchRequestVM, string listName, string listColumnName, bool isShowDocument ) : SearchResponseVM
searchRequestVM Microsoft.Legal.MatterCenter.Models.SearchRequestVM
listName string
listColumnName string
isShowDocument bool
return Microsoft.Legal.MatterCenter.Models.SearchResponseVM

GetWebRoleDefinitions() public method

public GetWebRoleDefinitions ( Client client ) : List
client Microsoft.Legal.MatterCenter.Models.Client
return List

IsFileExists() public static method

Checks the file at the specified location and return the file existence status.
public static IsFileExists ( ClientContext clientContext, string pageUrl ) : bool
clientContext ClientContext Client Context
pageUrl string File URL
return bool

PageExists() public method

Checks if the requested page exists or not.
public PageExists ( Client client, string requestedUrl ) : bool
client Client
requestedUrl string URL of the page, for which check is to be performed
return bool

PinDocument() public method

Add a new pin document to the user pinned document list
public PinDocument ( PinRequestDocumentVM pinRequestDocumentVM ) : bool
pinRequestDocumentVM PinRequestDocumentVM
return bool

PinMatter() public method

Add a new pin item to the user pinned matter list
public PinMatter ( PinRequestMatterVM pinRequestMatterVM ) : bool
pinRequestMatterVM PinRequestMatterVM
return bool

Search() public method

public Search ( ISPOAuthorization spoAuthorization, IConfigurationRoot configuration, ICustomLogger customLogger, IUsersDetails userDetails, ISPList spList, IOptions generalSettings, IOptions sharedSettings, IOptions logTables, IOptions searchSettings, IOptions camlQueries, IOptions listNames, IOptions errorSettings ) : Microsoft.Extensions.Options
spoAuthorization ISPOAuthorization
configuration IConfigurationRoot
customLogger ICustomLogger
userDetails IUsersDetails
spList ISPList
generalSettings IOptions
sharedSettings IOptions
logTables IOptions
searchSettings IOptions
camlQueries IOptions
listNames IOptions
errorSettings IOptions
return Microsoft.Extensions.Options

SearchUsers() public method

public SearchUsers ( SearchRequestVM searchRequestVM ) : IList
searchRequestVM SearchRequestVM
return IList

UnPinDocument() public method

Removes pinned item from user pinned document list.
public UnPinDocument ( PinRequestDocumentVM pinRequestDocumentVM ) : bool
pinRequestDocumentVM PinRequestDocumentVM
return bool

UnPinMatter() public method

Removes pinned item from user pinned details.
public UnPinMatter ( PinRequestMatterVM pinRequestMatterVM ) : bool
pinRequestMatterVM PinRequestMatterVM
return bool