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

Provide methods to perform document transfer functionalities.
Inheritance: IUploadHelperFunctionsUtility
Datei anzeigen Open project: Microsoft/mattercenter

Public Methods

Method Description
CheckDuplicateDocument ( ClientContext clientContext, string documentLibraryName, bool isMailUpload, string folderPath, ContentCheckDetails contentCheck, string uploadFileName, bool allowContentCheck, string &message ) : GenericResponseVM

Check if duplicate document exists

GetAttachmentID ( XmlDocument xmlDocument, string fileName ) : string

Get the Attachment ID from the web response

GetStream ( XmlDocument xmlDocument, XmlNamespaceManager nsmgr, bool isMailUpload, string extension, bool isMsg ) : byte[]

returns stream from exchange

GetWebResponse ( Uri ewsUrl, string attachmentToken, string soapRequest, string attachmentOrMailID ) : HttpWebResponse

Make the request to the Exchange server and get the response.

PerformContentCheckUtility ( bool isMailUpload, string folderPath, bool isMsg, XmlDocument xmlDocument, XmlNamespaceManager nsmgr, string extension, string uploadFileName, ClientContext clientContext ) : GenericResponseVM

Performs content check

RemoveSpecialChar ( string filename ) : string

Removes not allowed characters from SharePoint file name.

UploadHelperFunctionsUtility ( IOptions mailSettings, IOptions errorSettings, IDocumentRepository documentRepository, IOptions generalSettings ) : Microsoft.Legal.MatterCenter.Utility

Handle the upload functionality.

Method Details

CheckDuplicateDocument() public method

Check if duplicate document exists
public CheckDuplicateDocument ( ClientContext clientContext, string documentLibraryName, bool isMailUpload, string folderPath, ContentCheckDetails contentCheck, string uploadFileName, bool allowContentCheck, string &message ) : GenericResponseVM
clientContext ClientContext SP client context
documentLibraryName string Name of the document library
isMailUpload bool Mail upload check
folderPath string The folder path.
contentCheck ContentCheckDetails Content check object
uploadFileName string Name of the file.
allowContentCheck bool
message string
return GenericResponseVM

GetAttachmentID() public method

Get the Attachment ID from the web response
public GetAttachmentID ( XmlDocument xmlDocument, string fileName ) : string
xmlDocument System.Xml.XmlDocument XML document object having information for mail contents
fileName string Name of the file.
return string

GetStream() public method

returns stream from exchange
public GetStream ( XmlDocument xmlDocument, XmlNamespaceManager nsmgr, bool isMailUpload, string extension, bool isMsg ) : byte[]
xmlDocument System.Xml.XmlDocument XML document object having information for the attachment
nsmgr System.Xml.XmlNamespaceManager XML Namespace object
isMailUpload bool Mail upload check
extension string File extension
isMsg bool Is .msg file
return byte[]

GetWebResponse() public method

Make the request to the Exchange server and get the response.
public GetWebResponse ( Uri ewsUrl, string attachmentToken, string soapRequest, string attachmentOrMailID ) : HttpWebResponse
ewsUrl System.Uri Exchange Web Service URL.
attachmentToken string The attachment token.
soapRequest string The SOAP request.
attachmentOrMailID string The attachment or mail identifier.
return System.Net.HttpWebResponse

PerformContentCheckUtility() public method

Performs content check
public PerformContentCheckUtility ( bool isMailUpload, string folderPath, bool isMsg, XmlDocument xmlDocument, XmlNamespaceManager nsmgr, string extension, string uploadFileName, ClientContext clientContext ) : GenericResponseVM
isMailUpload bool Mail upload check
folderPath string The folder path.
isMsg bool Is .msg file
xmlDocument System.Xml.XmlDocument XML document object having information for the attachment
nsmgr System.Xml.XmlNamespaceManager XML Namespace object
extension string File extension
uploadFileName string Name of the file.
clientContext ClientContext SP client context
return GenericResponseVM

RemoveSpecialChar() public method

Removes not allowed characters from SharePoint file name.
public RemoveSpecialChar ( string filename ) : string
filename string file name to be updated
return string

UploadHelperFunctionsUtility() public method

Handle the upload functionality.
public UploadHelperFunctionsUtility ( IOptions mailSettings, IOptions errorSettings, IDocumentRepository documentRepository, IOptions generalSettings ) : Microsoft.Legal.MatterCenter.Utility
mailSettings IOptions
errorSettings IOptions
documentRepository IDocumentRepository
generalSettings IOptions
return Microsoft.Legal.MatterCenter.Utility