C# Class OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectHandlerBase

Show file Open project: OfficeDev/PnP-Sites-Core Class Usage Examples

Public Methods

Method Description
ExtractObjects ( Web web, OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate template, OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ProvisioningTemplateCreationInformation creationInfo ) : OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate
ProvisionObjects ( Web web, OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate template, TokenParser parser, OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ProvisioningTemplateApplyingInformation applyingInformation ) : TokenParser
WillExtract ( Web web, OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate template, OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ProvisioningTemplateCreationInformation creationInfo ) : bool
WillProvision ( Web web, OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate template ) : bool

Protected Methods

Method Description
IsFieldXmlValid ( string fieldXml, TokenParser parser, ClientRuntimeContext context ) : bool

Check if all tokens where replaced. If the field is a taxonomy field then we will check for the values of the referenced termstore and termset.

Tokenize ( string url, string webUrl, Web web = null ) : string

Tokenize a template item url based attribute with {themecatalog} or {masterpagecatalog} or {site}+

TokenizeTaxonomyField ( Web web, XElement element ) : string

Tokenizes the taxonomy field.

Private Methods

Method Description
TokenizeFieldFormula ( string fieldXml ) : string
WriteWarning ( string message, ProvisioningMessageType messageType ) : void

Method Details

ExtractObjects() public abstract method

public abstract ExtractObjects ( Web web, OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate template, OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ProvisioningTemplateCreationInformation creationInfo ) : OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate
web Web
template OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate
creationInfo OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ProvisioningTemplateCreationInformation
return OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate

IsFieldXmlValid() protected static method

Check if all tokens where replaced. If the field is a taxonomy field then we will check for the values of the referenced termstore and termset.
protected static IsFieldXmlValid ( string fieldXml, TokenParser parser, ClientRuntimeContext context ) : bool
fieldXml string The xml to parse
parser TokenParser
context ClientRuntimeContext
return bool

ProvisionObjects() public abstract method

public abstract ProvisionObjects ( Web web, OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate template, TokenParser parser, OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ProvisioningTemplateApplyingInformation applyingInformation ) : TokenParser
web Web
template OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate
parser TokenParser
applyingInformation OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ProvisioningTemplateApplyingInformation
return TokenParser

Tokenize() protected method

Tokenize a template item url based attribute with {themecatalog} or {masterpagecatalog} or {site}+
protected Tokenize ( string url, string webUrl, Web web = null ) : string
url string the url to tokenize as String
webUrl string web url of the actual web as String
web Web Web being used
return string

TokenizeTaxonomyField() protected method

Tokenizes the taxonomy field.
protected TokenizeTaxonomyField ( Web web, XElement element ) : string
web Web The web.
element XElement The element.
return string

WillExtract() public abstract method

public abstract WillExtract ( Web web, OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate template, OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ProvisioningTemplateCreationInformation creationInfo ) : bool
web Web
template OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate
creationInfo OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ProvisioningTemplateCreationInformation
return bool

WillProvision() public abstract method

public abstract WillProvision ( Web web, OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate template ) : bool
web Web
template OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate
return bool