Package de.hybris.platform.catalog
Interface CatalogService
- All Known Implementing Classes:
DefaultCatalogService
public interface CatalogService
Provides access to Catalogs, CatalogVersions and Session CatalogVersions
- Spring Bean ID:
- catalogService
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddSessionCatalogVersion(String catalogId, String catalogVersionName) Deprecated, for removal: This API element is subject to removal in a future version.Returns allCatalogModels.<T extends CatalogModel>
Collection<T>getAllCatalogsOfType(Class<T> catalogType) Returns for the givenT(upper bound CatalogModel) all catalogs ofTdefined in the systemReturns the catalog with the specifiedid.getCatalogVersion(String catalogId, String catalogVersionName) Deprecated, for removal: This API element is subject to removal in a future version.since ages - UseCatalogVersionService.getCatalogVersion(String, String)Returns the default catalog basing onCatalogModel.DEFAULTCATALOGproperty.voidsetSessionCatalogVersion(String catalogId, String catalogVersionName) Deprecated, for removal: This API element is subject to removal in a future version.since ages - useCatalogVersionService.setSessionCatalogVersion(String, String)instead.
-
Method Details
-
setSessionCatalogVersion
@Deprecated(since="ages", forRemoval=true) void setSessionCatalogVersion(String catalogId, String catalogVersionName) Deprecated, for removal: This API element is subject to removal in a future version.since ages - useCatalogVersionService.setSessionCatalogVersion(String, String)instead.Sets theCatalogVersionModelspecified bycatalogIdandcatalogVersionNameas the active CatalogVersion of the current session. Previous set active CatalogVersions are replaced.- Parameters:
catalogId- the id of the Catalog the CatalogVersion belongs tocatalogVersionName- the version of the Catalog version- Throws:
UnknownIdentifierException- if no CatalogVersion with the specified catalog id and version existsAmbiguousIdentifierException- if more than one CatalogVersion is found with the specified catalog id and versionIllegalArgumentException- ifcatalogIdorcatalogVersionNameisnull
-
addSessionCatalogVersion
@Deprecated(since="ages", forRemoval=true) void addSessionCatalogVersion(String catalogId, String catalogVersionName) Deprecated, for removal: This API element is subject to removal in a future version.Adds theCatalogVersionModelspecified bycatalogIdandcatalogVersionNameto the current active Session CatalogVersions.- Parameters:
catalogId- the id of the Catalog the CatalogVersion belongs tocatalogVersionName- the version of the Catalog version- Throws:
UnknownIdentifierException- if no CatalogVersion with the specified catalog id and version existsAmbiguousIdentifierException- if more than one CatalogVersion is found with the specified catalog id and versionIllegalArgumentException- ifcatalogIdorcatalogVersionNameisnull
-
getCatalogVersion
@Deprecated(since="ages", forRemoval=true) CatalogVersionModel getCatalogVersion(String catalogId, String catalogVersionName) Deprecated, for removal: This API element is subject to removal in a future version.since ages - UseCatalogVersionService.getCatalogVersion(String, String)- Parameters:
catalogId- the id for the catalogcatalogVersionName- the version string for the catalog version- Returns:
- the CatalogVersion with the specified catalog id and version
- Throws:
UnknownIdentifierException- if no CatalogVersion with the specified catalog id and version existsAmbiguousIdentifierException- if more than one CatalogVersion is found with the specified catalog id and versionIllegalArgumentException- ifcatalogIdorcatalogVersionNameisnull
-
getAllCatalogs
Collection<CatalogModel> getAllCatalogs()Returns allCatalogModels.- Returns:
- an empty collection if no CatalogModel were found.
-
getAllCatalogsOfType
Returns for the givenT(upper bound CatalogModel) all catalogs ofTdefined in the system- Type Parameters:
T- This could be aClassificationSystemModelor aCatalogModel- Returns:
- an empty collection if no
ClassificationSystemModels orCatalogModelwere found. - Throws:
IllegalArgumentException- ifcatalogTypeisnull
-
getCatalogForId
Returns the catalog with the specifiedid.- Returns:
- the catalog with the specified id.
- Throws:
UnknownIdentifierException- if no Catalog with the specifiedidis foundAmbiguousIdentifierException- if more than one Catalog is found with the specifiedidIllegalArgumentException- ifidisnull
-
getDefaultCatalog
CatalogModel getDefaultCatalog()Returns the default catalog basing onCatalogModel.DEFAULTCATALOGproperty. If multiple catalogs the one created the latest will be returned.- Returns:
- default
CatalogModel, or null in case no default catalog was found.
-
CatalogVersionService.addSessionCatalogVersion(CatalogVersionModel)