C# Class Transformation.PowerShell.MasterPage.MasterPageHelper

ファイルを表示 Open project: OfficeDev/PnP-Transformation Class Usage Examples

Public Methods

Method Description
ChangeMasterPageForDiscoveryOutPut ( string DiscoveryUsage_OutPutFolder, string MasterPageUsagePath, string New_MasterPageDetails = "N/A", string Old_MasterPageDetails = "N/A", string SharePointOnline_OR_OnPremise = "N/A", string UserName = "N/A", string Password = "N/A", string Domain = "N/A" ) : void
ChangeMasterPageForDiscoveryOutPut_ReadMasterPagesCSV ( string outPutFolder, string MasterPageUsagePath, IEnumerable &objMPInput, string New_MasterPageDetails = "N/A", string Old_MasterPageDetails = "N/A", string SharePointOnline_OR_OnPremise = Constants.OnPremise, string UserName = "N/A", string Password = "N/A", string Domain = "N/A" ) : void
ChangeMasterPageForSiteCollection ( string outPutFolder, string SiteCollectionUrl, string NewMasterPageURL, string OldMasterPageURL = "N/A", bool CustomMasterUrlStatus = true, bool MasterUrlStatus = true, string SharePointOnline_OR_OnPremise = "N/A", string UserName = "N/A", string Password = "N/A", string Domain = "N/A" ) : void
ChangeMasterPageForWeb ( string outPutFolder, string WebUrl, string NewMasterPageURL, string OldMasterPageURL = "N/A", bool CustomMasterUrlStatus = true, bool MasterUrlStatus = true, string ActionType = Constants.ActionType_Web, string SharePointOnline_OR_OnPremise = Constants.OnPremise, string UserName = "N/A", string Password = "N/A", string Domain = "N/A" ) : MasterPageBase
Check_MasterPageExistsINGallery ( ClientContext clientContext, string MasterPageURL ) : bool

Master Pages and Page Layouts Always be Saved in Root Site inside the "_catalogs" folder Function Used For: How to determine if a file exists in a SharePoint SPFolder - True => Exists, False => Not Exists CSOM: File Check in SP Gallary. It would actually throw an exception if the file doesn't exist

Check_MasterPageExistsINGallery ( string WebUrl, string MasterPageURL ) : bool

How to determine if a file exists in a SharePoint SPFolder CSOM: File Check in SP Gallary. It would actually throw an exception if the file doesn't exist

GetMasterPageRelativeURL ( ClientContext clientContext, string MasterPageURL ) : string
MasterPage_Initialization ( string DiscoveryUsage_OutPutFolder ) : void

Initialized of Exception and Logger Class. Deleted the Master Page Replace Usage File

Private Methods

Method Description
DeleteMasterPage_ReplaceOutPutFiles ( string outPutFolder ) : void

This function delete all the existing files from folder

GetPageNameFromURL ( string URL ) : string
GetPageNameWithSuffix ( string PageNameWithExtension, string Suffix ) : string

Method Details

ChangeMasterPageForDiscoveryOutPut() public method

public ChangeMasterPageForDiscoveryOutPut ( string DiscoveryUsage_OutPutFolder, string MasterPageUsagePath, string New_MasterPageDetails = "N/A", string Old_MasterPageDetails = "N/A", string SharePointOnline_OR_OnPremise = "N/A", string UserName = "N/A", string Password = "N/A", string Domain = "N/A" ) : void
DiscoveryUsage_OutPutFolder string
MasterPageUsagePath string
New_MasterPageDetails string
Old_MasterPageDetails string
SharePointOnline_OR_OnPremise string
UserName string
Password string
Domain string
return void

ChangeMasterPageForDiscoveryOutPut_ReadMasterPagesCSV() public method

public ChangeMasterPageForDiscoveryOutPut_ReadMasterPagesCSV ( string outPutFolder, string MasterPageUsagePath, IEnumerable &objMPInput, string New_MasterPageDetails = "N/A", string Old_MasterPageDetails = "N/A", string SharePointOnline_OR_OnPremise = Constants.OnPremise, string UserName = "N/A", string Password = "N/A", string Domain = "N/A" ) : void
outPutFolder string
MasterPageUsagePath string
objMPInput IEnumerable
New_MasterPageDetails string
Old_MasterPageDetails string
SharePointOnline_OR_OnPremise string
UserName string
Password string
Domain string
return void

ChangeMasterPageForSiteCollection() public method

public ChangeMasterPageForSiteCollection ( string outPutFolder, string SiteCollectionUrl, string NewMasterPageURL, string OldMasterPageURL = "N/A", bool CustomMasterUrlStatus = true, bool MasterUrlStatus = true, string SharePointOnline_OR_OnPremise = "N/A", string UserName = "N/A", string Password = "N/A", string Domain = "N/A" ) : void
outPutFolder string
SiteCollectionUrl string
NewMasterPageURL string
OldMasterPageURL string
CustomMasterUrlStatus bool
MasterUrlStatus bool
SharePointOnline_OR_OnPremise string
UserName string
Password string
Domain string
return void

ChangeMasterPageForWeb() public method

public ChangeMasterPageForWeb ( string outPutFolder, string WebUrl, string NewMasterPageURL, string OldMasterPageURL = "N/A", bool CustomMasterUrlStatus = true, bool MasterUrlStatus = true, string ActionType = Constants.ActionType_Web, string SharePointOnline_OR_OnPremise = Constants.OnPremise, string UserName = "N/A", string Password = "N/A", string Domain = "N/A" ) : MasterPageBase
outPutFolder string
WebUrl string
NewMasterPageURL string
OldMasterPageURL string
CustomMasterUrlStatus bool
MasterUrlStatus bool
ActionType string
SharePointOnline_OR_OnPremise string
UserName string
Password string
Domain string
return MasterPageBase

Check_MasterPageExistsINGallery() public method

Master Pages and Page Layouts Always be Saved in Root Site inside the "_catalogs" folder Function Used For: How to determine if a file exists in a SharePoint SPFolder - True => Exists, False => Not Exists CSOM: File Check in SP Gallary. It would actually throw an exception if the file doesn't exist
public Check_MasterPageExistsINGallery ( ClientContext clientContext, string MasterPageURL ) : bool
clientContext ClientContext
MasterPageURL string
return bool

Check_MasterPageExistsINGallery() public method

How to determine if a file exists in a SharePoint SPFolder CSOM: File Check in SP Gallary. It would actually throw an exception if the file doesn't exist
public Check_MasterPageExistsINGallery ( string WebUrl, string MasterPageURL ) : bool
WebUrl string
MasterPageURL string
return bool

GetMasterPageRelativeURL() public method

public GetMasterPageRelativeURL ( ClientContext clientContext, string MasterPageURL ) : string
clientContext ClientContext
MasterPageURL string
return string

MasterPage_Initialization() public method

Initialized of Exception and Logger Class. Deleted the Master Page Replace Usage File
public MasterPage_Initialization ( string DiscoveryUsage_OutPutFolder ) : void
DiscoveryUsage_OutPutFolder string
return void