Package de.hybris.platform.catalog.jalo
Class CatalogVersion
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable
- Direct Known Subclasses:
GeneratedClassificationSystemVersion
public class CatalogVersion extends GeneratedCatalogVersion
ACatalogVersion
represents one specified version of aCatalog
. ACatalogVersion
is always part of aCatalog
which can be accessed throughGeneratedCatalogVersion.getCatalog()
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.GenericItem
GenericItem.GenericItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LocalizableItem.LocalizableItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.ExtensibleItem
ExtensibleItem.ExtensibleItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.Item
Item.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException
-
-
Field Summary
Fields Modifier and Type Field Description static int
ERROR
-
Fields inherited from class de.hybris.platform.catalog.jalo.GeneratedCatalogVersion
ACTIVE, AGREEMENTS, AGREEMENTSHANDLER, CATALOG, CATALOGHANDLER, CATEGORYSYSTEMDESCRIPTION, CATEGORYSYSTEMID, CATEGORYSYSTEMNAME, DEFAULT_INITIAL_ATTRIBUTES, DEFAULTCURRENCY, GENERATIONDATE, GENERATORINFO, INCLASSURANCE, INCLDUTY, INCLFREIGHT, INCLPACKING, INCOMINGSYNCHRONIZATIONS, INCOMINGSYNCHRONIZATIONSHANDLER, LANGUAGES, MIMEROOTDIRECTORY, PREVIOUSUPDATEVERSION, PRINCIPAL2READABLECATALOGVERSIONRELATION_MARKMODIFIED, PRINCIPAL2READABLECATALOGVERSIONRELATION_SRC_ORDERED, PRINCIPAL2READABLECATALOGVERSIONRELATION_TGT_ORDERED, PRINCIPAL2WRITEABLECATALOGVERSIONRELATION_MARKMODIFIED, PRINCIPAL2WRITEABLECATALOGVERSIONRELATION_SRC_ORDERED, PRINCIPAL2WRITEABLECATALOGVERSIONRELATION_TGT_ORDERED, READPRINCIPALS, SYNCHRONIZATIONS, SYNCHRONIZATIONSHANDLER, TERRITORIES, VERSION, WRITEPRINCIPALS
-
Fields inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LANGUAGE_FALLBACK_ENABLED
-
Fields inherited from class de.hybris.platform.jalo.Item
_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, HJMPTS, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPE
-
Fields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant
-
-
Constructor Summary
Constructors Constructor Description CatalogVersion()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addLanguage(Language language)
Adds the specifiedLanguage
to theCollection
of imported languages.protected void
checkRemovable(SessionContext ctx)
Checks whether or not this it may be removed or not.protected Item
createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes)
Has to be implemented for each concrete subtype of item.java.util.Collection<Category>
getAllCategories()
Returns all categories of thisCatalogVersion
as aCollection
ignoring the category structure.java.util.Collection<Category>
getAllCategories(int start, int count)
Returns a range of all categories of thisCatalogVersion
as aCollection
ignoring the category structure.int
getAllCategoryCount()
Returns the number ofCategory
s which are assigned to thisCatalogCategory
.int
getAllCategoryCount(SessionContext ctx)
Returns the number ofCategory
s which are assigned to thisCatalogCategory
.int
getAllKeywordCount()
Returns the number ofKeyword
s which are assigned to thisCatalogVersion
.int
getAllKeywordCount(SessionContext ctx)
Returns the number ofKeyword
s which are assigned to thisCatalogVersion
.java.util.Collection<Keyword>
getAllKeywords()
java.util.Collection<Keyword>
getAllKeywords(int start, int count)
Returns a range of allKeyword
s, which are assigned to thisCatalogVersion
.int
getAllMediaCount()
Returns the number ofMedia
s which are assigned to thisCatalogCategory
.java.util.Collection<Media>
getAllMedias()
java.util.Collection<Media>
getAllMedias(int start, int count)
Returns a range of all medias of thisCatalogVersion
as aCollection
.int
getAllProductCount()
Returns the number ofProduct
s which are assigned to thisCatalogVersion
.int
getAllProductCount(SessionContext ctx)
Returns the number ofProduct
s which are assigned to thisCatalogVersion
.java.util.Collection<Product>
getAllProducts()
java.util.Collection<Product>
getAllProducts(int start, int count)
Returns a range of allProduct
s, which are assigned to thisCatalogVersion
.java.util.Collection
getAllVisibleCategories(int start, int count)
Returns all categories which are visible to the current session user within this catalog version in a specified range.int
getAllVisibleCategoryCount()
Returns the amount of all categories which are visible for the current session user within this catalog version.int
getAllVisibleProductCount()
Returns the number ofProduct
s which are visible for the current session user within this catalog version.java.util.Collection
getAllVisibleProducts(int start, int count)
Returns all products which are visible to the current session user within this catalog version in a specified range.SearchResult
getCatalogVersionItems(SessionContext ctx, java.lang.Class itemclass, int start, int count)
SearchResult
getCatalogVersionItems(java.lang.Class itemclass, int start, int count)
java.util.Collection<Category>
getCategories(SessionContext ctx, java.lang.String code)
java.util.Collection<Category>
getCategories(java.lang.String code)
Category
getCategory(SessionContext ctx, java.lang.String code)
Returns theCategory
with the specified code which is assigned to thisCatalogVersion
ornull
if noCatalogCategory
exists with this code.Category
getCategory(java.lang.String code)
Returns theCategory
with the specified code which is assigned to thisCatalogVersion
ornull
if noCatalogCategory
exists with this code.java.util.Set
getDuplicateCatalogItemIDs(SessionContext ctx, java.lang.String itemTypeCode, java.lang.String versionAttr, java.lang.String idAttribute)
Located duplicate catalog item ids.java.util.Set
getDuplicateCategoryIDs(SessionContext ctx)
Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)
with the ComposedType 'Category' for checking/counting for duplicated entries.long
getDuplicatedCatalogItemsCount(SessionContext ctx, ComposedType type)
Counts the duplicated items for the given CatalogVersion and ComposedType.java.util.Set
getDuplicateKeywords(SessionContext ctx)
Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)
with the ComposedType 'Keyword' for checking/counting for duplicated entries.java.util.Set
getDuplicateMediaIDs(SessionContext ctx)
Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)
with the ComposedType 'Media' for checking/counting for duplicated entries.java.util.Set
getDuplicateProductIDs(SessionContext ctx)
Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)
with the ComposedType 'Product' for checking/counting for duplicated entries.java.util.Collection
getKeywords(java.lang.String keyword)
Returns aCollection
of allKeyword
s with the specified keyword valueGeneratedKeyword.getKeyword()
which are assigned to thisCatalogVersion
.Media
getMedia(SessionContext ctx, java.lang.String code)
Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.Media
getMedia(java.lang.String code)
Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.java.util.Collection<Media>
getMedias(SessionContext ctx, java.lang.String code)
Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.java.util.Collection<Media>
getMedias(java.lang.String code)
Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.Product
getProduct(SessionContext ctx, java.lang.String code)
Deprecated.since ages - Use ProductService.getProduct(CatalogVersionModel, String) instead.Product
getProduct(java.lang.String code)
Deprecated.since ages - Use ProductService.getProduct(CatalogVersionModel, String) instead.java.util.Collection<Product>
getProducts(SessionContext ctx, java.lang.String code)
Deprecated.since ages - Code should be unique within catalogVersion.java.util.Collection<Product>
getProducts(java.lang.String code)
Deprecated.since ages - Code should be unique within catalogVersion.java.util.List<Category>
getRootCategories()
java.util.List<Category>
getRootCategories(SessionContext ctx)
Returns aCollection
of all root categories of thisCatalogVersion
.int
getRootCategoriesCount()
int
getRootCategoriesCount(SessionContext ctx)
java.util.Collection
getSameCategories(Category category)
Deprecated.since ages - Categories should have unique codes within catalog versions.java.util.Collection
getSameCategories(SessionContext ctx, Category category)
Deprecated.since ages - Categories should have unique codes within catalog versions.java.util.Collection
getSameKeywords(Keyword keyword)
java.util.Collection
getSameMedias(Media media)
java.util.Collection
getSameProducts(Product product)
Deprecated.since ages - Products should have unique codes within catalog versions.java.util.Collection
getSameProducts(SessionContext ctx, Product product)
Deprecated.since ages - Products should have unique codes within catalog versions.protected java.util.List
getSyncJobs(boolean asSource)
protected java.util.List
getSyncJobs(SessionContext ctx, boolean asSource)
boolean
hasAgreement(java.lang.String id)
Deprecated.since ages - Check CatalogVersionModel.getAgreements() insteadboolean
hasSynchronizations()
boolean
isImportedLanguage(java.lang.String isoCode)
Deprecated.since ages - Check if languagesCatalogVersionModel.getLanguages()
contain the target language instead.protected boolean
isRemovable(SessionContext ctx, boolean throwException)
protected boolean
owns(CatalogManager catalogManager, Category cat)
protected boolean
owns(Category cat)
protected boolean
ownsCategories(CatalogManager catalogManager, java.util.Collection categories)
void
remove(SessionContext ctx)
Removing a category version is denied if it's the active catalog version, it still owns categories, it still owns product or it still owns keywords.void
setActive(SessionContext ctx, java.lang.Boolean param)
Deprecated.since ages - Use CatalogVersionModel.setActive(Boolean).protected void
setActiveInternal(SessionContext ctx, java.lang.Boolean param)
Used byCatalog.setActiveCatalogVersion(SessionContext, CatalogVersion)
to make sure the version is having the correct active flag when the catalog changes its active version.protected void
setCatalog(SessionContext ctx, Catalog param)
Deprecated.since ages - Handled by Catalog-CatalogVersion relation modifiers (init=true, write=false).void
setLanguages(SessionContext ctx, java.util.Collection value)
Generated method - Setter of theCatalogVersion.languages
attribute.void
setReadPrincipals(SessionContext ctx, java.util.List<Principal> param)
Generated method - Setter of theCatalogVersion.readPrincipals
attribute.void
setRootCategories(SessionContext ctx, java.util.List<Category> categories)
Changes this catalog version's root categories.void
setRootCategories(java.util.List<Category> value)
void
setWritePrincipals(SessionContext ctx, java.util.List<Principal> param)
Generated method - Setter of theCatalogVersion.writePrincipals
attribute.java.lang.String
toString()
Returns theString
representation of this item.-
Methods inherited from class de.hybris.platform.catalog.jalo.GeneratedCatalogVersion
addToAgreements, addToAgreements, addToReadPrincipals, addToReadPrincipals, addToSynchronizations, addToSynchronizations, addToWritePrincipals, addToWritePrincipals, getAgreements, getAgreements, getAllCategorySystemDescription, getAllCategorySystemDescription, getAllCategorySystemName, getAllCategorySystemName, getCatalog, getCatalog, getCategorySystemDescription, getCategorySystemDescription, getCategorySystemID, getCategorySystemID, getCategorySystemName, getCategorySystemName, getDefaultAttributeModes, getDefaultCurrency, getDefaultCurrency, getGenerationDate, getGenerationDate, getGeneratorInfo, getGeneratorInfo, getIncomingSynchronizations, getIncomingSynchronizations, getLanguages, getLanguages, getMimeRootDirectory, getMimeRootDirectory, getPreviousUpdateVersion, getPreviousUpdateVersion, getPreviousUpdateVersionAsPrimitive, getPreviousUpdateVersionAsPrimitive, getReadPrincipals, getReadPrincipals, getReadPrincipalsCount, getReadPrincipalsCount, getSynchronizations, getSynchronizations, getTerritories, getTerritories, getVersion, getVersion, getWritePrincipals, getWritePrincipals, getWritePrincipalsCount, getWritePrincipalsCount, isActive, isActive, isActiveAsPrimitive, isActiveAsPrimitive, isInclAssurance, isInclAssurance, isInclAssuranceAsPrimitive, isInclAssuranceAsPrimitive, isInclDuty, isInclDuty, isInclDutyAsPrimitive, isInclDutyAsPrimitive, isInclFreight, isInclFreight, isInclFreightAsPrimitive, isInclFreightAsPrimitive, isInclPacking, isInclPacking, isInclPackingAsPrimitive, isInclPackingAsPrimitive, isMarkModifiedDisabled, removeFromAgreements, removeFromAgreements, removeFromReadPrincipals, removeFromReadPrincipals, removeFromSynchronizations, removeFromSynchronizations, removeFromWritePrincipals, removeFromWritePrincipals, setActive, setActive, setActive, setAgreements, setAgreements, setAllCategorySystemDescription, setAllCategorySystemDescription, setAllCategorySystemName, setAllCategorySystemName, setCatalog, setCategorySystemDescription, setCategorySystemDescription, setCategorySystemID, setCategorySystemID, setCategorySystemName, setCategorySystemName, setDefaultCurrency, setDefaultCurrency, setGenerationDate, setGenerationDate, setGeneratorInfo, setGeneratorInfo, setInclAssurance, setInclAssurance, setInclAssurance, setInclAssurance, setInclDuty, setInclDuty, setInclDuty, setInclDuty, setInclFreight, setInclFreight, setInclFreight, setInclFreight, setInclPacking, setInclPacking, setInclPacking, setInclPacking, setLanguages, setMimeRootDirectory, setMimeRootDirectory, setPreviousUpdateVersion, setPreviousUpdateVersion, setPreviousUpdateVersion, setPreviousUpdateVersion, setReadPrincipals, setSynchronizations, setSynchronizations, setTerritories, setTerritories, setVersion, setVersion, setWritePrincipals
-
Methods inherited from class de.hybris.platform.jalo.GenericItem
getImplementation, getInitialProperties, getNonInitialAttributes, getRelatedItems, setRelatedItems
-
Methods inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedProperty
-
Methods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setProperty
-
Methods inherited from class de.hybris.platform.jalo.Item
addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, clearPermission, compareTo, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, notifyManagerAboutItemRemoval, readResolve, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, useTA, writeReplace
-
Methods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
-
-
-
Field Detail
-
ERROR
public static final int ERROR
- See Also:
- Constant Field Values
-
-
Method Detail
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
Description copied from class:Item
Has to be implemented for each concrete subtype of item. This method is responsible for creating a new item instance ( by calling managers, ejb homes, etc. ) duringComposedType.newInstance(Map)
.In case this method uses any of the attribute values during creation it is required to override
Item.getNonInitialAttributes(SessionContext, ItemAttributeMap)
too.
Sn example:public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) ); // here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes( SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret = super.getNonInitialAttributes( ctx, allAttributes ); // remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }
- Overrides:
createItem
in classGeneratedCatalogVersion
- Parameters:
ctx
- the current session context which this item is created withintype
- the actual item type ( since subtypes may not provide a own jalo class this may be different from the type which this method was implemented for )- Returns:
- the new item instance
- Throws:
JaloBusinessException
- indicates an error during creation - any changes will be rollbacked
-
remove
public void remove(SessionContext ctx) throws ConsistencyCheckException
Removing a category version is denied if- it's the active catalog version,
- it still owns categories,
- it still owns product or
- it still owns keywords.
- Overrides:
remove
in classItem
- Parameters:
ctx
- A SessionContext object- Throws:
ConsistencyCheckException
- if this item could not be removed for some reason
-
setCatalog
@Deprecated protected void setCatalog(SessionContext ctx, Catalog param)
Deprecated.since ages - Handled by Catalog-CatalogVersion relation modifiers (init=true, write=false).Description copied from class:GeneratedCatalogVersion
Generated method - Setter of theCatalogVersion.catalog
attribute.- Overrides:
setCatalog
in classGeneratedCatalogVersion
param
- the catalog
-
checkRemovable
protected void checkRemovable(SessionContext ctx) throws ConsistencyCheckException
Description copied from class:Item
Checks whether or not this it may be removed or not. Called before the actual removal process.- Overrides:
checkRemovable
in classItem
- Throws:
ConsistencyCheckException
- to indicate that the item cannot be removed
-
isRemovable
protected boolean isRemovable(SessionContext ctx, boolean throwException) throws ConsistencyCheckException
- Throws:
ConsistencyCheckException
-
setActive
@Deprecated public void setActive(SessionContext ctx, java.lang.Boolean param)
Deprecated.since ages - Use CatalogVersionModel.setActive(Boolean). CatalogVersionPrepareInterceptor will handle the corresponding logic.Superclass method overridden to make sure only one catalog version may be active within one catalog.- Overrides:
setActive
in classGeneratedCatalogVersion
param
- the active - active flag
-
setActiveInternal
protected void setActiveInternal(SessionContext ctx, java.lang.Boolean param)
Used byCatalog.setActiveCatalogVersion(SessionContext, CatalogVersion)
to make sure the version is having the correct active flag when the catalog changes its active version.For internal use only!
-
hasAgreement
@Deprecated public boolean hasAgreement(java.lang.String id)
Deprecated.since ages - Check CatalogVersionModel.getAgreements() insteadReturnstrue
if there exists anAgreement
with the specified id for thisCatalogVersion
, otherwisefalse
is returned.
-
isImportedLanguage
@Deprecated public boolean isImportedLanguage(java.lang.String isoCode)
Deprecated.since ages - Check if languagesCatalogVersionModel.getLanguages()
contain the target language instead.Ifnull
is passed as isoCode,false
is returned, otherwisetrue
is returned, if the language with the submitted isocode is already imported for thisCatalogVersion
.- Parameters:
isoCode
- the isocode of the language, for which it should be tested, if it is already imported.- Returns:
- If
null
is passed as isoCode,false
is returned, otherwisetrue
is returned, if the language with the submitted isocode is already imported for thisCatalogVersion
-
addLanguage
public void addLanguage(Language language)
Adds the specifiedLanguage
to theCollection
of imported languages.- Parameters:
language
- the new language
-
getAllKeywords
public java.util.Collection<Keyword> getAllKeywords()
- Returns:
- a
Collection
of allKeyword
s, which are assigned to thisCatalogVersion
-
getAllKeywords
public java.util.Collection<Keyword> getAllKeywords(int start, int count)
Returns a range of allKeyword
s, which are assigned to thisCatalogVersion
.- Parameters:
start
- start index of rangecount
- number of elements in the range- Returns:
- a
Collection
of allKeyword
s, which are assigned to thisCatalogVersion
-
getAllKeywordCount
public int getAllKeywordCount()
Returns the number ofKeyword
s which are assigned to thisCatalogVersion
.- Returns:
- the number of
Keyword
s which are assigned to thisCatalogVersion
-
getAllKeywordCount
public int getAllKeywordCount(SessionContext ctx)
Returns the number ofKeyword
s which are assigned to thisCatalogVersion
.- Returns:
- the number of
Keyword
s which are assigned to thisCatalogVersion
-
getKeywords
public java.util.Collection getKeywords(java.lang.String keyword)
Returns aCollection
of allKeyword
s with the specified keyword valueGeneratedKeyword.getKeyword()
which are assigned to thisCatalogVersion
.- Parameters:
keyword
- the keyword value- Returns:
- a
Collection
of allKeyword
s with the specified keyword valueGeneratedKeyword.getKeyword()
which are assigned to thisCatalogVersion
-
getAllProducts
public java.util.Collection<Product> getAllProducts()
- Returns:
- a
Collection
of allProduct
s, which are part of thisCatalogVersion
-
getAllProducts
public java.util.Collection<Product> getAllProducts(int start, int count)
Returns a range of allProduct
s, which are assigned to thisCatalogVersion
.- Parameters:
start
- start index of rangecount
- number of elements in the range- Returns:
- a
Collection
of allProduct
s, which are assigned to thisCatalogVersion
-
getAllVisibleProducts
public java.util.Collection getAllVisibleProducts(int start, int count)
Returns all products which are visible to the current session user within this catalog version in a specified range.- Parameters:
start
- the range startcount
- the range count
-
getAllProductCount
public int getAllProductCount()
Returns the number ofProduct
s which are assigned to thisCatalogVersion
.- Returns:
- the number of
Product
s which are assigned to thisCatalogVersion
-
getAllProductCount
public int getAllProductCount(SessionContext ctx)
Returns the number ofProduct
s which are assigned to thisCatalogVersion
.- Parameters:
ctx
- theSessionContext
- Returns:
- the number of
Product
s which are assigned to thisCatalogVersion
-
getAllVisibleProductCount
public int getAllVisibleProductCount()
Returns the number ofProduct
s which are visible for the current session user within this catalog version.
-
getProducts
@Deprecated public java.util.Collection<Product> getProducts(java.lang.String code)
Deprecated.since ages - Code should be unique within catalogVersion. Use ProductService.getProduct(CatalogVersionModel, String) instead.Returns aCollection
of allProduct
s, which are part of thisCatalogVersion
and whose code (GeneratedProduct.getCode()
) matches the specified code.- Parameters:
code
- the code- Returns:
- a
Collection
of allProduct
s, which are part of thisCatalogVersion
and whose code (GeneratedProduct.getCode()
) matches the specified code
-
getProducts
@Deprecated public java.util.Collection<Product> getProducts(SessionContext ctx, java.lang.String code)
Deprecated.since ages - Code should be unique within catalogVersion. Use ProductService.getProduct(CatalogVersionModel, String) instead.Returns aCollection
of allProduct
s, which are part of thisCatalogVersion
and whose code (GeneratedProduct.getCode()
) matches the specified code.- Parameters:
ctx
- theSessionContext
code
- the code- Returns:
- a
Collection
of allProduct
s, which are part of thisCatalogVersion
and whose code (GeneratedProduct.getCode()
) matches the specified code
-
getProduct
@Deprecated public Product getProduct(java.lang.String code)
Deprecated.since ages - Use ProductService.getProduct(CatalogVersionModel, String) instead.Returns theProduct
with the specified code which is assigned to thisCatalogVersion
ornull
if noProduct
exists with this code. !Caution! This method should only be used if the product codes are unique within theCatalogVersion
, because this method simply returns the first element of theCollection
returned by the methodgetProducts(SessionContext, String)
.- Parameters:
code
- the product code- Returns:
- the
Product
with the specified code which is assigned to thisCatalogVersion
ornull
if noProduct
exists with this code.
-
getProduct
@Deprecated public Product getProduct(SessionContext ctx, java.lang.String code)
Deprecated.since ages - Use ProductService.getProduct(CatalogVersionModel, String) instead.Returns theProduct
with the specified code which is assigned to thisCatalogVersion
ornull
if noProduct
exists with this code. !Caution! This method should only be used if the product codes are unique within theCatalogVersion
, because this method simply returns the first element of theCollection
returned by the methodgetProducts(SessionContext, String)
.- Parameters:
ctx
- theSessionContext
code
- the product code- Returns:
- the
Product
with the specified code which is assigned to thisCatalogVersion
ornull
if noProduct
exists with this code.
-
getRootCategories
public java.util.List<Category> getRootCategories(SessionContext ctx)
Returns aCollection
of all root categories of thisCatalogVersion
.- Parameters:
ctx
- theSessionContext
- Returns:
- a
Collection
of all root categories of thisCatalogVersion
.
-
getRootCategories
public java.util.List<Category> getRootCategories()
-
getRootCategoriesCount
public int getRootCategoriesCount()
- Returns:
- the amount of root categories owned by this version
-
getRootCategoriesCount
public int getRootCategoriesCount(SessionContext ctx)
- Parameters:
ctx
- theSessionContext
- Returns:
- the amount of root categories owned by this version
-
getCategories
public java.util.Collection<Category> getCategories(java.lang.String code)
Returns aCollection
of allCategory
s with the specified code, which belong to thisCatalogVersion
. The hierarchy of theCatalogCategory
s will not be considered!
-
getCategories
public java.util.Collection<Category> getCategories(SessionContext ctx, java.lang.String code)
Returns aCollection
of allCategory
s with the specified code, which belong to thisCatalogVersion
. The hierarchy of theCatalogCategory
s will not be considered!- Parameters:
ctx
- theSessionContext
code
- the code of theCategory
- Returns:
- a
Collection
of allCategory
s with the specified code, which belong to thisCatalogVersion
-
getCategory
public Category getCategory(java.lang.String code)
Returns theCategory
with the specified code which is assigned to thisCatalogVersion
ornull
if noCatalogCategory
exists with this code. !Caution! This method should only be used if the category codes are unique within theCatalogVersion
, because this method simply returns the first element of theCollection
returned by the methodgetCategories(SessionContext, String)
.- Parameters:
code
- the category code- Returns:
- the
Category
with the specified code which is assigned to thisCatalogVersion
ornull
if noCatalogCategory
exists with this code.
-
getCategory
public Category getCategory(SessionContext ctx, java.lang.String code)
Returns theCategory
with the specified code which is assigned to thisCatalogVersion
ornull
if noCatalogCategory
exists with this code. !Caution! This method should only be used if the category codes are unique within theCatalogVersion
, because this method simply returns the first element of theCollection
returned by the methodgetCategories(SessionContext, String)
.- Parameters:
ctx
- theSessionContext
code
- the category code- Returns:
- the
Category
with the specified code which is assigned to thisCatalogVersion
ornull
if noCatalogCategory
exists with this code.
-
setRootCategories
public void setRootCategories(SessionContext ctx, java.util.List<Category> categories) throws JaloInvalidParameterException
Changes this catalog version's root categories. All previous root categories which are missing in the new category set are removed.- Parameters:
ctx
- theSessionContext
categories
- the new root categories of this catalog version- Throws:
JaloInvalidParameterException
- if at least one category is no root category, does not belong to this catalog version or a previous category could not be removed
-
setRootCategories
public void setRootCategories(java.util.List<Category> value)
-
ownsCategories
protected boolean ownsCategories(CatalogManager catalogManager, java.util.Collection categories)
-
owns
protected boolean owns(Category cat)
-
owns
protected boolean owns(CatalogManager catalogManager, Category cat)
-
getAllCategories
public java.util.Collection<Category> getAllCategories()
Returns all categories of thisCatalogVersion
as aCollection
ignoring the category structure.- Returns:
- all categories of this
CatalogVersion
as aCollection
ignoring the category structure
-
getAllCategories
public java.util.Collection<Category> getAllCategories(int start, int count)
Returns a range of all categories of thisCatalogVersion
as aCollection
ignoring the category structure.- Parameters:
start
- start index of rangecount
- number of elements in the range- Returns:
- a range of all categories of this
CatalogVersion
as aCollection
ignoring the category structure
-
getAllVisibleCategories
public java.util.Collection getAllVisibleCategories(int start, int count)
Returns all categories which are visible to the current session user within this catalog version in a specified range.- Parameters:
start
- the range startcount
- the range count
-
getAllCategoryCount
public int getAllCategoryCount()
Returns the number ofCategory
s which are assigned to thisCatalogCategory
.- Returns:
- the number of
Category
s which are assigned to thisCatalogCategory
-
getAllCategoryCount
public int getAllCategoryCount(SessionContext ctx)
Returns the number ofCategory
s which are assigned to thisCatalogCategory
.- Parameters:
ctx
- theSessionContext
- Returns:
- the number of
Category
s which are assigned to thisCatalogCategory
-
getAllVisibleCategoryCount
public int getAllVisibleCategoryCount()
Returns the amount of all categories which are visible for the current session user within this catalog version.
-
getMedias
@Deprecated public java.util.Collection<Media> getMedias(java.lang.String code)
Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.Returns aCollection
of allMedia
s with the specified code which are assigned to thisCatalogVersion
.- Parameters:
code
- the code of the media- Returns:
- a
Collection
of allMedia
s with the specified code which are assigned to thisCatalogVersion
.
-
getMedias
@Deprecated public java.util.Collection<Media> getMedias(SessionContext ctx, java.lang.String code)
Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.Returns aCollection
of allMedia
s with the specified code which are assigned to thisCatalogVersion
.- Parameters:
ctx
- theSessionContext
code
- the code of the media- Returns:
- a
Collection
of allMedia
s with the specified code which are assigned to thisCatalogVersion
.
-
getMedia
@Deprecated public Media getMedia(java.lang.String code)
Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.Returns theMedia
with the specified code which is assigned to thisCatalogVersion
ornull
if noMedia
with this code exists. !Caution! This method should only be used if the media codes are unique within theCatalogVersion
, because this method simply returns the first element of theCollection
returned by the methodgetMedias(SessionContext, String)
.- Parameters:
code
- the product code- Returns:
- the
Media
with the specified code which is assigned to thisCatalogVersion
ornull
if noMedia
with this code exists.
-
getMedia
@Deprecated public Media getMedia(SessionContext ctx, java.lang.String code)
Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.Returns theMedia
with the specified code which is assigned to thisCatalogVersion
ornull
if noMedia
with this code exists. !Caution! This method should only be used if the media codes are unique within theCatalogVersion
, because this method simply returns the first element of theCollection
returned by the methodgetMedias(SessionContext, String)
.- Parameters:
ctx
- theSessionContext
code
- the product code- Returns:
- the
Media
with the specified code which is assigned to thisCatalogVersion
ornull
if noMedia
with this code exists.
-
getAllMedias
public java.util.Collection<Media> getAllMedias()
- Returns:
- a
Collection
of allMedia
s with the specified code which are assigned to thisCatalogVersion
.
-
getAllMedias
public java.util.Collection<Media> getAllMedias(int start, int count)
Returns a range of all medias of thisCatalogVersion
as aCollection
.- Parameters:
start
- start index of rangecount
- number of elements in the range- Returns:
- a range of all medias of this
CatalogVersion
as aCollection
-
getAllMediaCount
public int getAllMediaCount()
Returns the number ofMedia
s which are assigned to thisCatalogCategory
.- Returns:
- the number of
Media
s which are assigned to thisCatalogCategory
-
getCatalogVersionItems
public SearchResult getCatalogVersionItems(java.lang.Class itemclass, int start, int count)
-
getCatalogVersionItems
public SearchResult getCatalogVersionItems(SessionContext ctx, java.lang.Class itemclass, int start, int count)
-
getSameProducts
@Deprecated public java.util.Collection getSameProducts(Product product)
Deprecated.since ages - Products should have unique codes within catalog versions.
-
getSameProducts
@Deprecated public java.util.Collection getSameProducts(SessionContext ctx, Product product)
Deprecated.since ages - Products should have unique codes within catalog versions.
-
getSameCategories
@Deprecated public java.util.Collection getSameCategories(Category category)
Deprecated.since ages - Categories should have unique codes within catalog versions.
-
getSameCategories
@Deprecated public java.util.Collection getSameCategories(SessionContext ctx, Category category)
Deprecated.since ages - Categories should have unique codes within catalog versions.
-
getSameKeywords
public java.util.Collection getSameKeywords(Keyword keyword)
-
getSameMedias
public java.util.Collection getSameMedias(Media media)
-
toString
public java.lang.String toString()
Description copied from class:Item
Returns theString
representation of this item. This is by default the representation of the primary key of this item.
-
getSyncJobs
protected java.util.List getSyncJobs(boolean asSource)
-
getSyncJobs
protected java.util.List getSyncJobs(SessionContext ctx, boolean asSource)
-
hasSynchronizations
public boolean hasSynchronizations()
-
getDuplicateCatalogItemIDs
public java.util.Set getDuplicateCatalogItemIDs(SessionContext ctx, java.lang.String itemTypeCode, java.lang.String versionAttr, java.lang.String idAttribute) throws JaloItemNotFoundException
Located duplicate catalog item ids. The method uses the item type, a id attribute and the catalog version attribute which binds it to this catalog version.- Parameters:
ctx
- theSessionContext
itemTypeCode
-versionAttr
-idAttribute
-- Returns:
- a Set with duplicated catalog item IDs
- Throws:
JaloItemNotFoundException
-
getDuplicatedCatalogItemsCount
public long getDuplicatedCatalogItemsCount(SessionContext ctx, ComposedType type)
Counts the duplicated items for the given CatalogVersion and ComposedType.- Parameters:
ctx
- theSessionContext
type
- the ComposedType to look for duplicates- Returns:
- 0 if in the CatalogVersion for the given ComposedType no items exists which share the same unique identifier values
- Since:
- 3.1-u7
-
setReadPrincipals
public void setReadPrincipals(SessionContext ctx, java.util.List<Principal> param)
Description copied from class:GeneratedCatalogVersion
Generated method - Setter of theCatalogVersion.readPrincipals
attribute.- Overrides:
setReadPrincipals
in classGeneratedCatalogVersion
param
- the readPrincipals
-
setWritePrincipals
public void setWritePrincipals(SessionContext ctx, java.util.List<Principal> param)
Description copied from class:GeneratedCatalogVersion
Generated method - Setter of theCatalogVersion.writePrincipals
attribute.- Overrides:
setWritePrincipals
in classGeneratedCatalogVersion
param
- the writePrincipals
-
setLanguages
public void setLanguages(SessionContext ctx, java.util.Collection value)
Description copied from class:GeneratedCatalogVersion
Generated method - Setter of theCatalogVersion.languages
attribute.- Overrides:
setLanguages
in classGeneratedCatalogVersion
value
- the languages - languages- See Also:
GeneratedCatalogVersion.setLanguages(de.hybris.platform.jalo.SessionContext, java.util.Collection)
-
getDuplicateKeywords
@Deprecated public java.util.Set getDuplicateKeywords(SessionContext ctx)
Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)
with the ComposedType 'Keyword' for checking/counting for duplicated entries.
-
getDuplicateMediaIDs
@Deprecated public java.util.Set getDuplicateMediaIDs(SessionContext ctx)
Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)
with the ComposedType 'Media' for checking/counting for duplicated entries.
-
getDuplicateCategoryIDs
@Deprecated public java.util.Set getDuplicateCategoryIDs(SessionContext ctx)
Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)
with the ComposedType 'Category' for checking/counting for duplicated entries.
-
getDuplicateProductIDs
@Deprecated public java.util.Set getDuplicateProductIDs(SessionContext ctx)
Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)
with the ComposedType 'Product' for checking/counting for duplicated entries.
-
-