Class ProductFieldService
- Namespace
- Dynamicweb.Ecommerce.Products
- Assembly
- Dynamicweb.Ecommerce.dll
Provides access to product field data and related operations.
public abstract class ProductFieldService : ICacheStorage<string, ProductField>, ICacheStorage<string>, ICacheStorage
- Inheritance
-
ProductFieldService
- Implements
- Inherited Members
Properties
Info
Information about the object cache
public abstract CacheInformation Info { get; }
Property Value
Methods
ClearCache()
Resets all keys to the default value for objects stored in the object cache
public abstract void ClearCache()
ClearCache(IEnumerable<string>)
Resets the specified keys to the default value for objects stored in the object cache
public abstract void ClearCache(IEnumerable<string> keys)
Parameters
keysIEnumerable<string>Keys to reset
ClearCache(string)
Resets the specified key to the default value for objects stored in the object cache
public abstract void ClearCache(string key)
Parameters
keystringKey to reset
GetAll()
Retrieves all product fields.
public abstract IEnumerable<ProductField> GetAll()
Returns
GetById(string)
Retrieves a product field by its unique identifier.
public abstract ProductField? GetById(string fieldId)
Parameters
fieldIdstringThe unique identifier of the product field to retrieve. Cannot be null or empty.
Returns
- ProductField
A ProductField instance that matches the specified identifier, or null if no matching field is found.
GetBySystemName(string)
Retrieves a product field by its system-defined name.
public abstract ProductField? GetBySystemName(string systemName)
Parameters
systemNamestringThe system name of the product field to retrieve. Cannot be null or empty.
Returns
- ProductField
A ProductField instance that matches the specified system name, or null if no matching field is found.
GetTranslatedField(ProductField, string)
Retrieves the translation for a specified product field in a given language.
public abstract ProductFieldTranslation? GetTranslatedField(ProductField field, string languageId)
Parameters
fieldProductFieldThe identifier of the product field for which to retrieve the translation.
languageIdstringThe identifier of the language in which the translation is requested.
Returns
SetCacheType<TObjectCache>()
Changes the storage container
public abstract void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<string, ProductField>
Type Parameters
TObjectCache