C# Class Microsoft.Legal.MatterCenter.Web.Common.MatterProvision

Matter Provision is a helper class which contains all methods related to matter such as matter search, matter provision, document upload to matter functionality
Inheritance: IMatterProvision
Datei anzeigen Open project: Microsoft/mattercenter

Public Methods

Method Description
AssignContentType ( MatterMetadata matterMetadata ) : GenericResponseVM
AssignUserPermissions ( MatterMetdataVM matterMetadataVM ) : GenericResponseVM
CanCreateMatter ( Client client ) : bool

This method will check whether login user can create matter or not

CheckMatterExists ( MatterMetdataVM matterMetadataVM ) : GenericResponseVM
CheckSecurityGroupExists ( MatterInformationVM matterInformationVM ) : GenericResponseVM
CreateMatter ( MatterMetdataVM matterMetadataVM ) : GenericResponseVM
CreateMatterLandingPage ( MatterMetdataVM matterMetadataVM ) : GenericResponseVM
DeleteMatter ( MatterVM matterVM ) : GenericResponseVM
GetAllCounts ( SearchRequestVM searchRequestVM ) : Task
GetMatters ( SearchRequestVM searchRequestVM ) : Task
GetMyCounts ( SearchRequestVM searchRequestVM ) : Task
GetPinnedCounts ( SearchRequestVM searchRequestVM ) : Task
GetStampedProperties ( MatterVM matterVM ) : MatterStampedDetails
GetUniqueColumnName ( string uniueColumnName ) : string

to get column name

GetUniqueResults ( SearchRequestVM searchRequestVM, dynamic searchResultsVM ) : dynamic

getting unique results for this.

MatterProvision ( IMatterRepository matterRepositoy, IOptions matterSettings, IOptions errorSettings, ISPOAuthorization spoAuthorization, IEditFunctions editFunctions, IValidationFunctions validationFunctions, ICustomLogger customLogger, IOptions logTables, IOptions mailSettings, IOptions camlQueries, IOptions listNames, IOptions generalSettings, IOptions searchSettings, IUserRepository userRepositoy, IExternalSharing externalSharing, IConfigurationRoot configuration, IUsersDetails userDetails ) : Microsoft.Extensions.Configuration

Constructor where all the dependencies are injected

SavConfigurations ( MatterConfigurations matterConfiguration ) : GenericResponseVM
SaveConfigurations ( MatterConfigurations matterConfigurations ) : GenericResponseVM

This method will save matter configurations in sharepoint list

ShareMatterToExternalUser ( MatterInformationVM matterInformation ) : GenericResponseVM
UpdateMatter ( MatterInformationVM matterInformation ) : GenericResponseVM
UpdateMatterMetadata ( MatterMetdataVM matterMetadata ) : GenericResponseVM

Private Methods

Method Description
CopyRoleAssignment ( string conflictIdentified, string matterSecured ) : bool

Checks whether to retain previous users while breaking permission

CreateMatter ( ClientContext clientContext, MatterMetdataVM matterMetadataVM ) : GenericResponseVM
ExtractMatterDetails ( object>.Dictionary stampedPropertyValues ) : MatterDetails

Extracts matter details from matter library property bag.

GenerateMailList ( Matter matter, Client client, List &userList ) : List

Generates list of users for sending email.

GetMatterAssignedUsers ( string matterCenterUsers ) : List>

Retrieves the users assigned to matter.

GetStampPropertyValue ( object>.Dictionary stampedPropertyValues, string key ) : string

Checks if the property exists in property bag. Returns the value for the property from property bag.

GetUserList ( string matterUsers ) : IList>

Gets the user list from the data sent in Matter Configurations

SerializeMatterToTableStorage ( MatterInformationVM matterInformation ) : void

This method will store external requests information in Azure Table Storage

SetStampProperty ( MatterMetdataVM matterMetadata ) : string>.Dictionary

Function to create dictionary object for stamp property

ShareMatter ( MatterMetdataVM matterMetadata, string matterLandingFlag ) : GenericResponseVM

Creates an item in the specific list with the list of users to whom the matter will be shared.

ShareMatterToExtUser ( MatterInformationVM matterInformation ) : void

This method will loop for all external users in the matterinformation object and will send notification to that external user

ShareMatterUtility ( Client client, Matter matter, MatterDetails matterDetails, string mailSiteURL, string centralMailListURL, string matterLandingFlag, MatterConfigurations matterConfigurations ) : GenericResponseVM

Function to share the matter.

TeamMembersPermissionInformation ( MatterDetails matterDetails, string mailBodyTeamInformation ) : string

Provides the team members and their respective permission details.

TrimMatterNameForOneNoteTitle ( string matterName ) : string

Function to prepare OneNote URL based on threshold set for OneNote title

Method Details

AssignContentType() public method

public AssignContentType ( MatterMetadata matterMetadata ) : GenericResponseVM
matterMetadata Microsoft.Legal.MatterCenter.Models.MatterMetadata
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM

AssignUserPermissions() public method

public AssignUserPermissions ( MatterMetdataVM matterMetadataVM ) : GenericResponseVM
matterMetadataVM Microsoft.Legal.MatterCenter.Models.MatterMetdataVM
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM

CanCreateMatter() public method

This method will check whether login user can create matter or not
public CanCreateMatter ( Client client ) : bool
client Microsoft.Legal.MatterCenter.Models.Client The sharepoint site collection in which we need to check whether the login user is present in the sharepoint group or not
return bool

CheckMatterExists() public method

public CheckMatterExists ( MatterMetdataVM matterMetadataVM ) : GenericResponseVM
matterMetadataVM Microsoft.Legal.MatterCenter.Models.MatterMetdataVM
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM

CheckSecurityGroupExists() public method

public CheckSecurityGroupExists ( MatterInformationVM matterInformationVM ) : GenericResponseVM
matterInformationVM Microsoft.Legal.MatterCenter.Models.MatterInformationVM
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM

CreateMatter() public method

public CreateMatter ( MatterMetdataVM matterMetadataVM ) : GenericResponseVM
matterMetadataVM Microsoft.Legal.MatterCenter.Models.MatterMetdataVM
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM

CreateMatterLandingPage() public method

public CreateMatterLandingPage ( MatterMetdataVM matterMetadataVM ) : GenericResponseVM
matterMetadataVM Microsoft.Legal.MatterCenter.Models.MatterMetdataVM
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM

DeleteMatter() public method

public DeleteMatter ( MatterVM matterVM ) : GenericResponseVM
matterVM Microsoft.Legal.MatterCenter.Models.MatterVM
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM

GetAllCounts() public method

public GetAllCounts ( SearchRequestVM searchRequestVM ) : Task
searchRequestVM Microsoft.Legal.MatterCenter.Models.SearchRequestVM
return Task

GetMatters() public method

public GetMatters ( SearchRequestVM searchRequestVM ) : Task
searchRequestVM Microsoft.Legal.MatterCenter.Models.SearchRequestVM
return Task

GetMyCounts() public method

public GetMyCounts ( SearchRequestVM searchRequestVM ) : Task
searchRequestVM Microsoft.Legal.MatterCenter.Models.SearchRequestVM
return Task

GetPinnedCounts() public method

public GetPinnedCounts ( SearchRequestVM searchRequestVM ) : Task
searchRequestVM Microsoft.Legal.MatterCenter.Models.SearchRequestVM
return Task

GetStampedProperties() public method

public GetStampedProperties ( MatterVM matterVM ) : MatterStampedDetails
matterVM Microsoft.Legal.MatterCenter.Models.MatterVM
return Microsoft.Legal.MatterCenter.Models.MatterStampedDetails

GetUniqueColumnName() public method

to get column name
public GetUniqueColumnName ( string uniueColumnName ) : string
uniueColumnName string
return string

GetUniqueResults() public method

getting unique results for this.
public GetUniqueResults ( SearchRequestVM searchRequestVM, dynamic searchResultsVM ) : dynamic
searchRequestVM Microsoft.Legal.MatterCenter.Models.SearchRequestVM
searchResultsVM dynamic
return dynamic

MatterProvision() public method

Constructor where all the dependencies are injected
public MatterProvision ( IMatterRepository matterRepositoy, IOptions matterSettings, IOptions errorSettings, ISPOAuthorization spoAuthorization, IEditFunctions editFunctions, IValidationFunctions validationFunctions, ICustomLogger customLogger, IOptions logTables, IOptions mailSettings, IOptions camlQueries, IOptions listNames, IOptions generalSettings, IOptions searchSettings, IUserRepository userRepositoy, IExternalSharing externalSharing, IConfigurationRoot configuration, IUsersDetails userDetails ) : Microsoft.Extensions.Configuration
matterRepositoy IMatterRepository
matterSettings IOptions
errorSettings IOptions
spoAuthorization ISPOAuthorization
editFunctions IEditFunctions
validationFunctions IValidationFunctions
customLogger ICustomLogger
logTables IOptions
mailSettings IOptions
camlQueries IOptions
listNames IOptions
generalSettings IOptions
searchSettings IOptions
userRepositoy IUserRepository
externalSharing IExternalSharing
configuration IConfigurationRoot
userDetails IUsersDetails
return Microsoft.Extensions.Configuration

SavConfigurations() public method

public SavConfigurations ( MatterConfigurations matterConfiguration ) : GenericResponseVM
matterConfiguration Microsoft.Legal.MatterCenter.Models.MatterConfigurations
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM

SaveConfigurations() public method

This method will save matter configurations in sharepoint list
public SaveConfigurations ( MatterConfigurations matterConfigurations ) : GenericResponseVM
matterConfigurations Microsoft.Legal.MatterCenter.Models.MatterConfigurations
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM

ShareMatterToExternalUser() public method

public ShareMatterToExternalUser ( MatterInformationVM matterInformation ) : GenericResponseVM
matterInformation Microsoft.Legal.MatterCenter.Models.MatterInformationVM
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM

UpdateMatter() public method

public UpdateMatter ( MatterInformationVM matterInformation ) : GenericResponseVM
matterInformation Microsoft.Legal.MatterCenter.Models.MatterInformationVM
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM

UpdateMatterMetadata() public method

public UpdateMatterMetadata ( MatterMetdataVM matterMetadata ) : GenericResponseVM
matterMetadata Microsoft.Legal.MatterCenter.Models.MatterMetdataVM
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM