C# Класс Microsoft.Legal.MatterCenter.Repository.SPList

This file provide methods to get/update information from/in SP lists
Наследование: ISPList
Показать файл Открыть проект

Открытые методы

Метод Описание
AddItem ( ClientContext clientContext, List list, IList columns, IList values ) : bool
AddOneNote ( ClientContext clientContext, string clientAddressPath, string oneNoteLocation, string listName, string oneNoteTitle ) : string
AddView ( ClientContext clientContext, List matterList, string viewColumnList, string viewName, string strQuery ) : bool

Creates a new view for the list

BreakItemPermission ( ClientContext clientContext, string listName, int listItemId, bool isCopyRoleAssignment ) : bool

Validates and breaks the item level permission for the specified list item under the list/library.

BreakPermission ( ClientContext clientContext, string libraryName, bool isCopyRoleAssignment ) : bool

Breaks the permissions of the list.

CheckItemModified ( ListItemCollection collection, string cachedItemModifiedDate ) : bool

Checks if item is modified after it is loaded on the client side

CheckPermissionOnList ( Client client, string listName, PermissionKind permission ) : bool

Determines whether user has a particular permission on the list

CheckPermissionOnList ( ClientContext clientContext, string listName, PermissionKind permission ) : bool

Determines whether user has a particular permission on the list

CheckPermissionOnList ( string url, string listName, PermissionKind permission ) : bool

Method will check the permission of the list that has been provided

CreateFileInsideFolder ( ClientContext clientContext, string folderPath, FileCreationInformation newFile ) : void
CreateList ( ClientContext clientContext, ListInformation listInfo ) : bool
Delete ( ClientContext clientContext, IList listsNames ) : bool
DownloadAttachments ( string attachmentUrl ) : Stream
Exists ( Client client, ReadOnlyCollection listsNames ) : List

Function to check whether list is present or not.

FetchUserPermissionForLibrary ( ClientContext clientContext, string libraryname ) : IEnumerable

FolderExists ( string folderPath, ClientContext clientContext, string documentLibraryName ) : bool
GetData ( Client client, string listName, string camlQuery = null ) : ListItemCollection

Gets the list items of specified list based on CAML query.

GetData ( ClientContext clientContext, string listName, string camlQuery = null ) : ListItemCollection

Gets the list items of specified list based on CAML query.

GetData ( string url, string listName, string camlQuery = null ) : ListItemCollection
GetDocumentAndClientGUID ( Client client ) : dynamic

Retrieves the document and List GUID

GetFolderHierarchy ( MatterData matterData ) : List

Method which will give matter folder hierarchy

GetListProperties ( ClientContext clientContext, string libraryName ) : PropertyValues
GetMatterAssignedUsersEmail ( ClientContext clientContext, Matter matter ) : string

Converts the project users emails in a form that can be stamped to library.

GetPropertyValueForList ( ClientContext context, string matterName, string propertyList ) : string

Fetches the values of property for specified matter.

MatterAssociatedLists ( ClientContext clientContext, ReadOnlyCollection listsNames ) : List

Function to check whether list is present or not.

PerformContentCheck ( ClientContext context, MemoryStream localMemoryStream, String serverFileURL ) : bool

Check if Content of local file and server file matches.

SPList ( ISPOAuthorization spoAuthorization, IOptions camlQueries, IOptions errorSettings, IOptions searchSettings, IOptions contentTypesConfig, ICustomLogger customLogger, IOptions logTables, IOptions mailSettings, IOptions generalSettings, IHostingEnvironment hostingEnvironment, IUsersDetails userDetails ) : Microsoft.SharePoint.Client

All the dependencies are injected into the constructor

SetItemPermission ( ClientContext clientContext, IList assignUserName, string listName, int listItemId, IList permissions ) : bool

Set permission to the specified list item

SetPermission ( ClientContext clientContext, IList assignUserName, IList permissions, string listName ) : bool

Sets permissions for the list.

SetPropertBagValuesForList ( ClientContext clientContext, PropertyValues props, string matterName, string>.Dictionary propertyList ) : void

Sets the value of the specified property.

SetUploadItemProperties ( ClientContext clientContext, string documentLibraryName, string fileName, string folderPath, string>.Dictionary mailProperties ) : void

Sets the upload item properties.

UploadDocument ( string folderPath, IFormFile uploadedFile, string fileName, string>.Dictionary mailProperties, string clientUrl, string folderName, string documentLibraryName ) : GenericResponseVM

Приватные методы

Метод Описание
AddFolders ( ClientContext clientContext, List list, IList folderNames ) : List

Adds all the folders from Content type in matter library.

DocumentUpload ( string folderPath, IList listResponse, ClientContext clientContext, string documentLibraryName, Web web, string folderName, FileCreationInformation uploadFile ) : GenericResponseVM

Upload helper function for uploading documents to SharePoint library.

GetCategories ( string categories ) : string

Process the categories and trims the "category" word

GetFolderAssignment ( List list, ListItemCollection listItems, List allFolders ) : List

Retrieves folder hierarchy from document library.

Описание методов

AddItem() публичный Метод

public AddItem ( ClientContext clientContext, List list, IList columns, IList values ) : bool
clientContext ClientContext
list List
columns IList
values IList
Результат bool

AddOneNote() публичный Метод

public AddOneNote ( ClientContext clientContext, string clientAddressPath, string oneNoteLocation, string listName, string oneNoteTitle ) : string
clientContext ClientContext
clientAddressPath string
oneNoteLocation string
listName string
oneNoteTitle string
Результат string

AddView() публичный Метод

Creates a new view for the list
public AddView ( ClientContext clientContext, List matterList, string viewColumnList, string viewName, string strQuery ) : bool
clientContext ClientContext Client Context
matterList List List name
viewColumnList string Name of the columns in view
viewName string View name
strQuery string View query
Результат bool

BreakItemPermission() публичный Метод

Validates and breaks the item level permission for the specified list item under the list/library.
public BreakItemPermission ( ClientContext clientContext, string listName, int listItemId, bool isCopyRoleAssignment ) : bool
clientContext ClientContext Client Context
listName string List name
listItemId int Unique list item id to break item level permission
isCopyRoleAssignment bool Flag to copy permission from parent
Результат bool

BreakPermission() публичный Метод

Breaks the permissions of the list.
public BreakPermission ( ClientContext clientContext, string libraryName, bool isCopyRoleAssignment ) : bool
clientContext ClientContext Client context
libraryName string Name of list
isCopyRoleAssignment bool Flag to copy permission from parent
Результат bool

CheckItemModified() публичный Метод

Checks if item is modified after it is loaded on the client side
public CheckItemModified ( ListItemCollection collection, string cachedItemModifiedDate ) : bool
collection ListItemCollection List item collection
cachedItemModifiedDate string Date time when current user loaded the page to see/update configuration values.
Результат bool

CheckPermissionOnList() публичный Метод

Determines whether user has a particular permission on the list
public CheckPermissionOnList ( Client client, string listName, PermissionKind permission ) : bool
client Microsoft.Legal.MatterCenter.Models.Client
listName string List name
permission PermissionKind Permission to be checked
Результат bool

CheckPermissionOnList() публичный Метод

Determines whether user has a particular permission on the list
public CheckPermissionOnList ( ClientContext clientContext, string listName, PermissionKind permission ) : bool
clientContext ClientContext Client context
listName string List name
permission PermissionKind Permission to be checked
Результат bool

CheckPermissionOnList() публичный Метод

Method will check the permission of the list that has been provided
public CheckPermissionOnList ( string url, string listName, PermissionKind permission ) : bool
url string
listName string
permission PermissionKind
Результат bool

CreateFileInsideFolder() публичный Метод

public CreateFileInsideFolder ( ClientContext clientContext, string folderPath, FileCreationInformation newFile ) : void
clientContext ClientContext
folderPath string
newFile FileCreationInformation
Результат void

CreateList() публичный Метод

public CreateList ( ClientContext clientContext, ListInformation listInfo ) : bool
clientContext ClientContext
listInfo Microsoft.Legal.MatterCenter.Models.ListInformation
Результат bool

Delete() публичный Метод

public Delete ( ClientContext clientContext, IList listsNames ) : bool
clientContext ClientContext
listsNames IList
Результат bool

DownloadAttachments() публичный Метод

public DownloadAttachments ( string attachmentUrl ) : Stream
attachmentUrl string
Результат Stream

Exists() публичный Метод

Function to check whether list is present or not.
public Exists ( Client client, ReadOnlyCollection listsNames ) : List
client Microsoft.Legal.MatterCenter.Models.Client
listsNames ReadOnlyCollection List name
Результат List

FetchUserPermissionForLibrary() публичный Метод

public FetchUserPermissionForLibrary ( ClientContext clientContext, string libraryname ) : IEnumerable
clientContext ClientContext
libraryname string
Результат IEnumerable

FolderExists() публичный Метод

public FolderExists ( string folderPath, ClientContext clientContext, string documentLibraryName ) : bool
folderPath string
clientContext ClientContext
documentLibraryName string
Результат bool

GetData() публичный Метод

Gets the list items of specified list based on CAML query.
public GetData ( Client client, string listName, string camlQuery = null ) : ListItemCollection
client Microsoft.Legal.MatterCenter.Models.Client
listName string Name of the list
camlQuery string CAML Query that need to be executed on list
Результат ListItemCollection

GetData() публичный Метод

Gets the list items of specified list based on CAML query.
public GetData ( ClientContext clientContext, string listName, string camlQuery = null ) : ListItemCollection
clientContext ClientContext Client context
listName string Name of the list
camlQuery string CAML Query that need to be executed on list
Результат ListItemCollection

GetData() публичный Метод

public GetData ( string url, string listName, string camlQuery = null ) : ListItemCollection
url string
listName string
camlQuery string
Результат ListItemCollection

GetDocumentAndClientGUID() публичный Метод

Retrieves the document and List GUID
public GetDocumentAndClientGUID ( Client client ) : dynamic
client Microsoft.Legal.MatterCenter.Models.Client Client object containing list data
Результат dynamic

GetFolderHierarchy() публичный Метод

Method which will give matter folder hierarchy
public GetFolderHierarchy ( MatterData matterData ) : List
matterData Microsoft.Legal.MatterCenter.Models.MatterData
Результат List

GetListProperties() публичный Метод

public GetListProperties ( ClientContext clientContext, string libraryName ) : PropertyValues
clientContext ClientContext
libraryName string
Результат PropertyValues

GetMatterAssignedUsersEmail() публичный Метод

Converts the project users emails in a form that can be stamped to library.
public GetMatterAssignedUsersEmail ( ClientContext clientContext, Matter matter ) : string
clientContext ClientContext ClientContext object
matter Microsoft.Legal.MatterCenter.Models.Matter Matter object
Результат string

GetPropertyValueForList() публичный Метод

Fetches the values of property for specified matter.
public GetPropertyValueForList ( ClientContext context, string matterName, string propertyList ) : string
context ClientContext Client context
matterName string Name of matter
propertyList string List of properties
Результат string

MatterAssociatedLists() публичный Метод

Function to check whether list is present or not.
public MatterAssociatedLists ( ClientContext clientContext, ReadOnlyCollection listsNames ) : List
clientContext ClientContext Client context object for SharePoint
listsNames ReadOnlyCollection List name
Результат List

PerformContentCheck() публичный Метод

Check if Content of local file and server file matches.
public PerformContentCheck ( ClientContext context, MemoryStream localMemoryStream, String serverFileURL ) : bool
context ClientContext SP client context
localMemoryStream System.IO.MemoryStream Memory stream of local file
serverFileURL String Server relative URL of file with filename
Результат bool

SPList() публичный Метод

All the dependencies are injected into the constructor
public SPList ( ISPOAuthorization spoAuthorization, IOptions camlQueries, IOptions errorSettings, IOptions searchSettings, IOptions contentTypesConfig, ICustomLogger customLogger, IOptions logTables, IOptions mailSettings, IOptions generalSettings, IHostingEnvironment hostingEnvironment, IUsersDetails userDetails ) : Microsoft.SharePoint.Client
spoAuthorization ISPOAuthorization
camlQueries IOptions
errorSettings IOptions
searchSettings IOptions
contentTypesConfig IOptions
customLogger ICustomLogger
logTables IOptions
mailSettings IOptions
generalSettings IOptions
hostingEnvironment IHostingEnvironment
userDetails IUsersDetails
Результат Microsoft.SharePoint.Client

SetItemPermission() публичный Метод

Set permission to the specified list item
public SetItemPermission ( ClientContext clientContext, IList assignUserName, string listName, int listItemId, IList permissions ) : bool
clientContext ClientContext Client context object
assignUserName IList Users to give permission
listName string List name
listItemId int Unique list item id to break item level permission
permissions IList Permissions for the users
Результат bool

SetPermission() публичный Метод

Sets permissions for the list.
public SetPermission ( ClientContext clientContext, IList assignUserName, IList permissions, string listName ) : bool
clientContext ClientContext Client Context
assignUserName IList Users to give permission
permissions IList Permissions for the users
listName string List name
Результат bool

SetPropertBagValuesForList() публичный Метод

Sets the value of the specified property.
public SetPropertBagValuesForList ( ClientContext clientContext, PropertyValues props, string matterName, string>.Dictionary propertyList ) : void
clientContext ClientContext Client context
props PropertyValues Property Bag
matterName string Name of matter to which property is to be attached
propertyList string>.Dictionary List of properties
Результат void

SetUploadItemProperties() публичный Метод

Sets the upload item properties.
public SetUploadItemProperties ( ClientContext clientContext, string documentLibraryName, string fileName, string folderPath, string>.Dictionary mailProperties ) : void
clientContext ClientContext The client context.
documentLibraryName string Name of the document library.
fileName string Name of the file.
folderPath string Path of the folder.
mailProperties string>.Dictionary The mail properties.
Результат void

UploadDocument() публичный Метод

public UploadDocument ( string folderPath, IFormFile uploadedFile, string fileName, string>.Dictionary mailProperties, string clientUrl, string folderName, string documentLibraryName ) : GenericResponseVM
folderPath string
uploadedFile IFormFile
fileName string
mailProperties string>.Dictionary
clientUrl string
folderName string
documentLibraryName string
Результат Microsoft.Legal.MatterCenter.Models.GenericResponseVM