C# Class GSoft.Dynamite.Taxonomy.TaxonomyService

Helper class for interacting with the Managed Metadata Service
For all methods: if a term or a term set is not found by its default label in the term store's default working language, the other alternate available languages should be attempted.
Inheritance: ITaxonomyService
Show file Open project: GSoft-SharePoint/Dynamite-2010

Public Methods

Method Description
GetTaxonomyValueForLabel ( SPSite site, string termSetName, string termLabel ) : TaxonomyValue

Retrieves a TaxonomyValue corresponding to a term label within the default term store in the site collection's reserved group

Use other overloads and specify a group name to fetch from farm-global term sets instead of being limited to the site collection's associated term group

GetTaxonomyValueForLabel ( SPSite site, string termStoreGroupName, string termSetName, string termLabel ) : TaxonomyValue

Retrieves a TaxonomyValue corresponding to a term label within the default term store

GetTaxonomyValueForLabel ( SPSite site, string termStoreName, string termStoreGroupName, string termSetName, string termLabel ) : TaxonomyValue

Retrieves a TaxonomyValue corresponding to a term label within a desired term store

GetTaxonomyValuesForLabel ( SPSite site, string termSetName, string termLabel ) : IList

Retrieves all TaxonomyValues corresponding to a term label within the default term store in the site collection's reserved group

Use other overloads and specify a group name to fetch from farm-global term sets instead of being limited to the site collection's associated term group

GetTaxonomyValuesForLabel ( SPSite site, string termStoreGroupName, string termSetName, string termLabel ) : IList

Retrieves all TaxonomyValues corresponding to a term label within the default term store

GetTaxonomyValuesForLabel ( SPSite site, string termStoreName, string termStoreGroupName, string termSetName, string termLabel ) : IList

Retrieves all TaxonomyValues corresponding to a term label within a desired term store

GetTaxonomyValuesForTermSet ( SPSite site, string termSetName ) : IList

Retrieves all TaxonomyValues corresponding to a term set in the default term store from the site collection's reserved group

Use other overloads and specify a group name to fetch from farm-global term sets instead of being limited to the site collection's associated term group

GetTaxonomyValuesForTermSet ( SPSite site, string termStoreGroupName, string termSetName ) : IList

Retrieves all TaxonomyValues corresponding to a term store term set

GetTaxonomyValuesForTermSet ( SPSite site, string termStoreName, string termStoreGroupName, string termSetName ) : IList

Retrieves all TaxonomyValues corresponding to a term store term set

GetTermForId ( SPSite site, System.Guid id ) : Term

Gets the term for identifier.

GetTermForId ( SPSite site, string termStoreName, System.Guid id ) : Term

Gets the term for identifier.

GetTermForLabel ( SPSite site, string termSetName, string termLabel ) : Term

Retrieves a Term corresponding to a term label within the default term store in the site collection's reserved group

Use other overloads and specify a group name to fetch from farm-global term sets instead of being limited to the site collection's associated term group

GetTermForLabel ( SPSite site, string termStoreGroupName, string termSetName, string termLabel ) : Term

Retrieves a Term corresponding to a term label within the default term store

GetTermForLabel ( SPSite site, string termStoreName, string termStoreGroupName, string termSetName, string termLabel ) : Term

Retrieves a Term corresponding to a term label within a desired term store

GetTermSetFromGroup ( TermStore termStore, Group group, string termSetName ) : TermSet

Gets the term set from group.

GetTermsForLabel ( SPSite site, string termSetName, string termLabel ) : IList

Retrieves a Term corresponding to a term label within the default term store in the site collection's reserved group

Use other overloads and specify a group name to fetch from farm-global term sets instead of being limited to the site collection's associated term group

GetTermsForLabel ( SPSite site, string termStoreGroupName, string termSetName, string termLabel ) : IList

Retrieves a Term corresponding to a term label within the default term store

If many terms are found with the corresponding label, a root term is returned if found.

GetTermsForLabel ( SPSite site, string termStoreName, string termStoreGroupName, string termSetName, string termLabel ) : IList

Retrieves all terms corresponding to a term label within a desired term store

GetTermsForTermSet ( SPSite site, string termSetName ) : IList

Retrieves all Terms corresponding to a term set in the default term store from the site collection's reserved group

Use other overloads and specify a group name to fetch from farm-global term sets instead of being limited to the site collection's associated term group

GetTermsForTermSet ( SPSite site, string termStoreGroupName, string termSetName ) : IList

Retrieves all terms corresponding to a term label within a desired term store

GetTermsForTermSet ( SPSite site, string termStoreName, string termStoreGroupName, string termSetName ) : IList

Retrieves all terms corresponding to a term label within a desired term store

TaxonomyService ( ILogger logger, ISiteTaxonomyCacheManager taxManager ) : System

Initializes a new instance of the TaxonomyService class.

Private Methods

Method Description
GetGroupFromTermStore ( TermStore termStore, string groupName ) : Group
GetTaxonomyValueForLabelInternal ( TermStore termStore, Group termStoreGroup, TermSet termSet, string termLabel ) : TaxonomyValue
GetTaxonomyValueForLabelInternal ( TermStore termStore, string termStoreGroupName, string termSetName, string termLabel ) : TaxonomyValue
GetTaxonomyValuesForLabelInternal ( TermStore termStore, Group termStoreGroup, TermSet termSet, string termLabel ) : IList
GetTaxonomyValuesForLabelInternal ( TermStore termStore, string termStoreGroupName, string termSetName, string termLabel ) : IList
GetTaxonomyValuesForTermSetInternal ( TermStore termStore, Group termStoreGroup, TermSet termSet ) : IList
GetTaxonomyValuesForTermSetInternal ( TermStore termStore, string termStoreGroupName, string termSetName ) : IList
GetTermForLabelInternal ( TermStore termStore, Group termStoreGroup, TermSet termSet, string termLabel ) : Term
GetTermForLabelInternal ( TermStore termStore, string termStoreGroupName, string termSetName, string termLabel ) : Term
GetTermsForLabelInternal ( TermStore termStore, Group termStoreGroup, TermSet termSet, string termLabel ) : IList
GetTermsForLabelInternal ( TermStore termStore, string termStoreGroupName, string termSetName, string termLabel ) : IList
GetTermsForTermSetInternal ( TermStore termStore, Group termStoreGroup, TermSet termSet ) : IList
GetTermsForTermSetInternal ( TermStore termStore, string termStoreGroupName, string termSetName ) : IList

Method Details

GetTaxonomyValueForLabel() public method

Retrieves a TaxonomyValue corresponding to a term label within the default term store in the site collection's reserved group
Use other overloads and specify a group name to fetch from farm-global term sets instead of being limited to the site collection's associated term group
public GetTaxonomyValueForLabel ( SPSite site, string termSetName, string termLabel ) : TaxonomyValue
site SPSite The current site
termSetName string The term set name
termLabel string The default label of the term
return GSoft.Dynamite.ValueTypes.TaxonomyValue

GetTaxonomyValueForLabel() public method

Retrieves a TaxonomyValue corresponding to a term label within the default term store
public GetTaxonomyValueForLabel ( SPSite site, string termStoreGroupName, string termSetName, string termLabel ) : TaxonomyValue
site SPSite The current site
termStoreGroupName string The group name
termSetName string The term set name
termLabel string The default label of the term
return GSoft.Dynamite.ValueTypes.TaxonomyValue

GetTaxonomyValueForLabel() public method

Retrieves a TaxonomyValue corresponding to a term label within a desired term store
public GetTaxonomyValueForLabel ( SPSite site, string termStoreName, string termStoreGroupName, string termSetName, string termLabel ) : TaxonomyValue
site SPSite The current site
termStoreName string The term store name
termStoreGroupName string The group name
termSetName string The term set name
termLabel string The default label of the term
return GSoft.Dynamite.ValueTypes.TaxonomyValue

GetTaxonomyValuesForLabel() public method

Retrieves all TaxonomyValues corresponding to a term label within the default term store in the site collection's reserved group
Use other overloads and specify a group name to fetch from farm-global term sets instead of being limited to the site collection's associated term group
public GetTaxonomyValuesForLabel ( SPSite site, string termSetName, string termLabel ) : IList
site SPSite The current site
termSetName string The term set name
termLabel string The default label of the term
return IList

GetTaxonomyValuesForLabel() public method

Retrieves all TaxonomyValues corresponding to a term label within the default term store
public GetTaxonomyValuesForLabel ( SPSite site, string termStoreGroupName, string termSetName, string termLabel ) : IList
site SPSite The current site
termStoreGroupName string The group name
termSetName string The term set name
termLabel string The default label of the term
return IList

GetTaxonomyValuesForLabel() public method

Retrieves all TaxonomyValues corresponding to a term label within a desired term store
public GetTaxonomyValuesForLabel ( SPSite site, string termStoreName, string termStoreGroupName, string termSetName, string termLabel ) : IList
site SPSite The current site
termStoreName string The term store name
termStoreGroupName string The group name
termSetName string The term set name
termLabel string The default label of the term
return IList

GetTaxonomyValuesForTermSet() public method

Retrieves all TaxonomyValues corresponding to a term set in the default term store from the site collection's reserved group
Use other overloads and specify a group name to fetch from farm-global term sets instead of being limited to the site collection's associated term group
public GetTaxonomyValuesForTermSet ( SPSite site, string termSetName ) : IList
site SPSite The current site
termSetName string The term set name
return IList

GetTaxonomyValuesForTermSet() public method

Retrieves all TaxonomyValues corresponding to a term store term set
public GetTaxonomyValuesForTermSet ( SPSite site, string termStoreGroupName, string termSetName ) : IList
site SPSite The current site
termStoreGroupName string The group name
termSetName string The term set name
return IList

GetTaxonomyValuesForTermSet() public method

Retrieves all TaxonomyValues corresponding to a term store term set
public GetTaxonomyValuesForTermSet ( SPSite site, string termStoreName, string termStoreGroupName, string termSetName ) : IList
site SPSite The current site
termStoreName string The term store name
termStoreGroupName string The group name
termSetName string The term set name
return IList

GetTermForId() public method

Gets the term for identifier.
public GetTermForId ( SPSite site, System.Guid id ) : Term
site SPSite The site.
id System.Guid The identifier.
return Term

GetTermForId() public method

Gets the term for identifier.
public GetTermForId ( SPSite site, string termStoreName, System.Guid id ) : Term
site SPSite The site.
termStoreName string Name of the term store.
id System.Guid The identifier.
return Term

GetTermForLabel() public method

Retrieves a Term corresponding to a term label within the default term store in the site collection's reserved group
Use other overloads and specify a group name to fetch from farm-global term sets instead of being limited to the site collection's associated term group
public GetTermForLabel ( SPSite site, string termSetName, string termLabel ) : Term
site SPSite The current site
termSetName string The term set name
termLabel string The default label of the term
return Term

GetTermForLabel() public method

Retrieves a Term corresponding to a term label within the default term store
public GetTermForLabel ( SPSite site, string termStoreGroupName, string termSetName, string termLabel ) : Term
site SPSite The current site
termStoreGroupName string The group name
termSetName string The term set name
termLabel string The default label of the term
return Term

GetTermForLabel() public method

Retrieves a Term corresponding to a term label within a desired term store
public GetTermForLabel ( SPSite site, string termStoreName, string termStoreGroupName, string termSetName, string termLabel ) : Term
site SPSite The current site
termStoreName string The term store name
termStoreGroupName string The group name
termSetName string The term set name
termLabel string The default label of the term
return Term

GetTermSetFromGroup() public method

Gets the term set from group.
Could not find term set with name + termSetName + in group + group.Name
public GetTermSetFromGroup ( TermStore termStore, Group group, string termSetName ) : TermSet
termStore TermStore The term store.
group Group The group.
termSetName string Name of the term set.
return TermSet

GetTermsForLabel() public method

Retrieves a Term corresponding to a term label within the default term store in the site collection's reserved group
Use other overloads and specify a group name to fetch from farm-global term sets instead of being limited to the site collection's associated term group
public GetTermsForLabel ( SPSite site, string termSetName, string termLabel ) : IList
site SPSite The current site
termSetName string The term set name
termLabel string The default label of the term
return IList

GetTermsForLabel() public method

Retrieves a Term corresponding to a term label within the default term store
If many terms are found with the corresponding label, a root term is returned if found.
public GetTermsForLabel ( SPSite site, string termStoreGroupName, string termSetName, string termLabel ) : IList
site SPSite The current site
termStoreGroupName string The group name
termSetName string The term set name
termLabel string The default label of the term
return IList

GetTermsForLabel() public method

Retrieves all terms corresponding to a term label within a desired term store
public GetTermsForLabel ( SPSite site, string termStoreName, string termStoreGroupName, string termSetName, string termLabel ) : IList
site SPSite The current site
termStoreName string The term store name
termStoreGroupName string The group name
termSetName string The term set name
termLabel string The default label of the term
return IList

GetTermsForTermSet() public method

Retrieves all Terms corresponding to a term set in the default term store from the site collection's reserved group
Use other overloads and specify a group name to fetch from farm-global term sets instead of being limited to the site collection's associated term group
public GetTermsForTermSet ( SPSite site, string termSetName ) : IList
site SPSite The current site
termSetName string The term set name
return IList

GetTermsForTermSet() public method

Retrieves all terms corresponding to a term label within a desired term store
public GetTermsForTermSet ( SPSite site, string termStoreGroupName, string termSetName ) : IList
site SPSite The current site
termStoreGroupName string The group name
termSetName string The term set name
return IList

GetTermsForTermSet() public method

Retrieves all terms corresponding to a term label within a desired term store
public GetTermsForTermSet ( SPSite site, string termStoreName, string termStoreGroupName, string termSetName ) : IList
site SPSite The current site
termStoreName string The term store name
termStoreGroupName string The group name
termSetName string The term set name
return IList

TaxonomyService() public method

Initializes a new instance of the TaxonomyService class.
public TaxonomyService ( ILogger logger, ISiteTaxonomyCacheManager taxManager ) : System
logger ILogger The logger.
taxManager ISiteTaxonomyCacheManager The taxonomy manager.
return System