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

Inheritance: ISPPage
Exibir arquivo Open project: Microsoft/mattercenter

Public Methods

Method Description
AddWebPart ( ClientContext clientContext, LimitedWebPartManager limitedWebPartManager, WebPartDefinition webPartDefinition, string webParts, string zones ) : bool

Adds all web parts on matter landing page.

ConfigureXMLCodeOfWebParts ( Client client, Matter matter, ClientContext clientContext, string pageName, Uri uri, Web web, MatterConfigurations matterConfigurations ) : string[]

Configures XML of web parts.

CreateWebPartPage ( ClientContext clientContext, string pageName, string layout, string masterpagelistName, string listName, string pageTitle ) : int
Delete ( ClientContext clientContext, string pageUrl ) : void

Deletes the page

IsFileExists ( ClientContext clientContext, string pageUrl ) : bool

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

PageExists ( string requestedUrl, ClientContext clientContext ) : bool

Checks if the requested page exists or not.

SPPage ( ISPOAuthorization spoAuthorization, IOptions generalSettings, IOptions logTables, ICustomLogger customLogger, ISPList spList, IOptions matterSettings ) : Microsoft.Extensions.Options

All the dependencies are injected

UrlExists ( Client client, string pageUrl ) : bool

Will check whether a url exists in the current site collection or not

Private Methods

Method Description
ConfigureListViewWebPart ( List sitePageLib, ClientContext clientContext, string pageName, Client client, Matter matter, string titleUrl ) : string

Configures XML code of List View web part.

Method Details

AddWebPart() public method

Adds all web parts on matter landing page.
public AddWebPart ( ClientContext clientContext, LimitedWebPartManager limitedWebPartManager, WebPartDefinition webPartDefinition, string webParts, string zones ) : bool
clientContext ClientContext Client Context
limitedWebPartManager LimitedWebPartManager LimitedWebPartManager object to import web parts
webPartDefinition WebPartDefinition WebPartDefinition object to add web parts on page
webParts string Array of web parts that should be added on Matter Landing Page
zones string Array of Zone IDs
return bool

ConfigureXMLCodeOfWebParts() public method

Configures XML of web parts.
public ConfigureXMLCodeOfWebParts ( Client client, Matter matter, ClientContext clientContext, string pageName, Uri uri, Web web, MatterConfigurations matterConfigurations ) : string[]
client Microsoft.Legal.MatterCenter.Models.Client Client object containing Client data
matter Microsoft.Legal.MatterCenter.Models.Matter Matter object containing Matter data
clientContext ClientContext SharePoint Client Context
pageName string
uri System.Uri To get URL segments
web Web Web object of the current context
matterConfigurations Microsoft.Legal.MatterCenter.Models.MatterConfigurations
return string[]

CreateWebPartPage() public method

public CreateWebPartPage ( ClientContext clientContext, string pageName, string layout, string masterpagelistName, string listName, string pageTitle ) : int
clientContext ClientContext
pageName string
layout string
masterpagelistName string
listName string
pageTitle string
return int

Delete() public method

Deletes the page
public Delete ( ClientContext clientContext, string pageUrl ) : void
clientContext ClientContext Client Context
pageUrl string Page URL
return void

IsFileExists() public method

Checks the file at the specified location and return the file existence status.
public 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 ( string requestedUrl, ClientContext clientContext ) : bool
requestedUrl string URL of the page, for which check is to be performed
clientContext ClientContext ClientContext for SharePoint
return bool

SPPage() public method

All the dependencies are injected
public SPPage ( ISPOAuthorization spoAuthorization, IOptions generalSettings, IOptions logTables, ICustomLogger customLogger, ISPList spList, IOptions matterSettings ) : Microsoft.Extensions.Options
spoAuthorization ISPOAuthorization
generalSettings IOptions
logTables IOptions
customLogger ICustomLogger
spList ISPList
matterSettings IOptions
return Microsoft.Extensions.Options

UrlExists() public method

Will check whether a url exists in the current site collection or not
public UrlExists ( Client client, string pageUrl ) : bool
client Microsoft.Legal.MatterCenter.Models.Client Contains the url in which we need to check whether a page exists or not
pageUrl string The page
return bool