C# Class GSoft.Dynamite.Taxonomy.TaxonomyHelper

Helper class for managing Taxonomy.
显示文件 Open project: GSoft-SharePoint/Dynamite-2010 Class Usage Examples

Public Methods

Method Description
EnsureTaxonomyEventReceivers ( SPEventReceiverDefinitionCollection eventReceivers ) : void

Ensures the taxonomy event receivers.

GetTaxonomyFieldValueValidatedString ( SPWeb web, string fieldName, string termGroup, string termSet, string termLabel ) : string

Get the validated string for a Taxonomy Field

SetDefaultTaxonomyMultiValue ( SPWeb web, SPField field, string termGroupName, string termSetName, string terms ) : void

Set default value for a multi valued taxonomy site column

SetDefaultTaxonomyValue ( SPWeb web, SPField field, string termGroupName, string termSetName, string termLabel ) : void

Set default value for a taxonomy site column

SetTaxonomyFieldValue ( SPWeb web, SPListItem item, string fieldName, string termGroupName, string termSetName, string termLabel ) : void

Set a taxonomy value for a SPListItem

TaxonomyHelper ( EventReceiverHelper eventReceiverHelper, ITaxonomyService taxonomyService ) : System

Creates a taxonomy helper

Private Methods

Method Description
AssignTermSetToAllListUsagesOfSiteColumn ( SPSite site, TermStore termStore, System.Guid fieldId, string termStoreGroupName, string termSetName, string termSubsetName ) : void
AssignTermSetToSiteColumn ( SPWeb web, System.Guid fieldId, string termSetName, string termSubsetName ) : void
AssignTermSetToSiteColumn ( SPWeb web, System.Guid fieldId, string termStoreGroupName, string termSetName, string termSubsetName ) : void
AssignTermSetToSiteColumn ( SPWeb web, System.Guid fieldId, string termStoreName, string termStoreGroupName, string termSetName, string termSubsetName ) : void
AssignTermSetToTaxonomyField ( TermStore termStore, TaxonomyField field, string termStoreGroupName, string termSetName, string termSubsetName ) : void
EnableListEnterpriseKeywordsSetting ( SPList list, bool keywordsAsSocialTags ) : void

Method Details

EnsureTaxonomyEventReceivers() public method

Ensures the taxonomy event receivers.
All null parameters.
public EnsureTaxonomyEventReceivers ( SPEventReceiverDefinitionCollection eventReceivers ) : void
eventReceivers SPEventReceiverDefinitionCollection The event receivers definition collection.
return void

GetTaxonomyFieldValueValidatedString() public method

Get the validated string for a Taxonomy Field
public GetTaxonomyFieldValueValidatedString ( SPWeb web, string fieldName, string termGroup, string termSet, string termLabel ) : string
web SPWeb Web to look for
fieldName string Field to search
termGroup string The term group
termSet string The term set
termLabel string The term label
return string

SetDefaultTaxonomyMultiValue() public method

Set default value for a multi valued taxonomy site column
public SetDefaultTaxonomyMultiValue ( SPWeb web, SPField field, string termGroupName, string termSetName, string terms ) : void
web SPWeb The web.
field SPField The field.
termGroupName string Term group name
termSetName string Term set name
terms string Term label
return void

SetDefaultTaxonomyValue() public method

Set default value for a taxonomy site column
public SetDefaultTaxonomyValue ( SPWeb web, SPField field, string termGroupName, string termSetName, string termLabel ) : void
web SPWeb The web.
field SPField The field.
termGroupName string The term group name.
termSetName string the term set name.
termLabel string The term label.
return void

SetTaxonomyFieldValue() public method

Set a taxonomy value for a SPListItem
public SetTaxonomyFieldValue ( SPWeb web, SPListItem item, string fieldName, string termGroupName, string termSetName, string termLabel ) : void
web SPWeb The web.
item SPListItem The SPListItem.
fieldName string Field name to update.
termGroupName string Term group name.
termSetName string Term Set Name.
termLabel string Term Label.
return void

TaxonomyHelper() public method

Creates a taxonomy helper
public TaxonomyHelper ( EventReceiverHelper eventReceiverHelper, ITaxonomyService taxonomyService ) : System
eventReceiverHelper GSoft.Dynamite.Utils.EventReceiverHelper An event receiver helper
taxonomyService ITaxonomyService
return System