Package de.hybris.platform.catalog.jalo
Class CatalogVersion
- All Implemented Interfaces:
Serializable,Comparable
- Direct Known Subclasses:
GeneratedClassificationSystemVersion
A
CatalogVersion represents one specified version of a Catalog. A
CatalogVersion is always part of a Catalog which can be accessed through
GeneratedCatalogVersion.getCatalog().- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.jalo.GenericItem
GenericItem.GenericItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LocalizableItem.LocalizableItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.ExtensibleItem
ExtensibleItem.ExtensibleItemImplNested 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
FieldsFields 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, WRITEPRINCIPALSFields inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LANGUAGE_FALLBACK_ENABLEDFields 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, TYPEFields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLanguage(Language language) Adds the specifiedLanguageto theCollectionof imported languages.protected voidChecks whether or not this it may be removed or not.protected ItemcreateItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) Has to be implemented for each concrete subtype of item.Returns all categories of thisCatalogVersionas aCollectionignoring the category structure.getAllCategories(int start, int count) Returns a range of all categories of thisCatalogVersionas aCollectionignoring the category structure.intReturns the number ofCategorys which are assigned to thisCatalogCategory.intReturns the number ofCategorys which are assigned to thisCatalogCategory.intReturns the number ofKeywords which are assigned to thisCatalogVersion.intReturns the number ofKeywords which are assigned to thisCatalogVersion.getAllKeywords(int start, int count) Returns a range of allKeywords, which are assigned to thisCatalogVersion.intReturns the number ofMedias which are assigned to thisCatalogCategory.getAllMedias(int start, int count) Returns a range of all medias of thisCatalogVersionas aCollection.intReturns the number ofProducts which are assigned to thisCatalogVersion.intReturns the number ofProducts which are assigned to thisCatalogVersion.getAllProducts(int start, int count) Returns a range of allProducts, which are assigned to thisCatalogVersion.getAllVisibleCategories(int start, int count) Returns all categories which are visible to the current session user within this catalog version in a specified range.intReturns the amount of all categories which are visible for the current session user within this catalog version.intReturns the number ofProducts which are visible for the current session user within this catalog version.getAllVisibleProducts(int start, int count) Returns all products which are visible to the current session user within this catalog version in a specified range.getCatalogVersionItems(SessionContext ctx, Class itemclass, int start, int count) getCatalogVersionItems(Class itemclass, int start, int count) getCategories(SessionContext ctx, String code) getCategories(String code) getCategory(SessionContext ctx, String code) Returns theCategorywith the specified code which is assigned to thisCatalogVersionornullif noCatalogCategoryexists with this code.getCategory(String code) Returns theCategorywith the specified code which is assigned to thisCatalogVersionornullif noCatalogCategoryexists with this code.getDuplicateCatalogItemIDs(SessionContext ctx, String itemTypeCode, String versionAttr, String idAttribute) Located duplicate catalog item ids.Deprecated.longCounts the duplicated items for the given CatalogVersion and ComposedType.Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)with the ComposedType 'Keyword' for checking/counting for duplicated entries.Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)with the ComposedType 'Media' for checking/counting for duplicated entries.Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)with the ComposedType 'Product' for checking/counting for duplicated entries.getKeywords(String keyword) Returns aCollectionof allKeywords with the specified keyword valueGeneratedKeyword.getKeyword()which are assigned to thisCatalogVersion.getMedia(SessionContext ctx, String code) Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.getMedias(SessionContext ctx, String code) Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.getProduct(SessionContext ctx, String code) Deprecated.since ages - Use ProductService.getProduct(CatalogVersionModel, String) instead.getProduct(String code) Deprecated.since ages - Use ProductService.getProduct(CatalogVersionModel, String) instead.getProducts(SessionContext ctx, String code) Deprecated.since ages - Code should be unique within catalogVersion.getProducts(String code) Deprecated.since ages - Code should be unique within catalogVersion.Returns aCollectionof all root categories of thisCatalogVersion.intintgetSameCategories(Category category) Deprecated.since ages - Categories should have unique codes within catalog versions.getSameCategories(SessionContext ctx, Category category) Deprecated.since ages - Categories should have unique codes within catalog versions.getSameKeywords(Keyword keyword) getSameMedias(Media media) getSameProducts(Product product) Deprecated.since ages - Products should have unique codes within catalog versions.getSameProducts(SessionContext ctx, Product product) Deprecated.since ages - Products should have unique codes within catalog versions.protected ListgetSyncJobs(boolean asSource) protected ListgetSyncJobs(SessionContext ctx, boolean asSource) booleanhasAgreement(String id) Deprecated.since ages - Check CatalogVersionModel.getAgreements() insteadbooleanbooleanisImportedLanguage(String isoCode) Deprecated.since ages - Check if languagesCatalogVersionModel.getLanguages()contain the target language instead.protected booleanisRemovable(SessionContext ctx, boolean throwException) protected booleanowns(CatalogManager catalogManager, Category cat) protected booleanprotected booleanownsCategories(CatalogManager catalogManager, Collection categories) voidremove(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.voidsetActive(SessionContext ctx, Boolean param) Deprecated.since ages - Use CatalogVersionModel.setActive(Boolean).protected voidsetActiveInternal(SessionContext ctx, 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 voidsetCatalog(SessionContext ctx, Catalog param) Deprecated.since ages - Handled by Catalog-CatalogVersion relation modifiers (init=true, write=false).voidsetLanguages(SessionContext ctx, Collection value) Generated method - Setter of theCatalogVersion.languagesattribute.voidsetReadPrincipals(SessionContext ctx, List<Principal> param) Generated method - Setter of theCatalogVersion.readPrincipalsattribute.voidsetRootCategories(SessionContext ctx, List<Category> categories) Changes this catalog version's root categories.voidsetRootCategories(List<Category> value) voidsetWritePrincipals(SessionContext ctx, List<Principal> param) Generated method - Setter of theCatalogVersion.writePrincipalsattribute.toString()Returns theStringrepresentation 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, setWritePrincipalsMethods inherited from class de.hybris.platform.jalo.GenericItem
getImplementation, getInitialProperties, getNonInitialAttributes, getRelatedItems, getRelatedItems, setRelatedItemsMethods 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, setLocalizedPropertyMethods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyMethods 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, getPartOfRemovedSessionMarker, 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, suppressRelation, useTA, writeReplaceMethods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
Field Details
-
ERROR
public static final int ERROR- See Also:
-
-
Constructor Details
-
CatalogVersion
public CatalogVersion()
-
-
Method Details
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException Description copied from class:ItemHas 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:
createItemin 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
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:
removein classItem- Parameters:
ctx- A SessionContext object- Throws:
ConsistencyCheckException- if this item could not be removed for some reason
-
setCatalog
@Deprecated(since="ages", forRemoval=false) protected void setCatalog(SessionContext ctx, Catalog param) Deprecated.since ages - Handled by Catalog-CatalogVersion relation modifiers (init=true, write=false).Description copied from class:GeneratedCatalogVersionGenerated method - Setter of theCatalogVersion.catalogattribute.- Overrides:
setCatalogin classGeneratedCatalogVersionparam- the catalog
-
checkRemovable
Description copied from class:ItemChecks whether or not this it may be removed or not. Called before the actual removal process.- Overrides:
checkRemovablein 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(since="ages", forRemoval=false) public void setActive(SessionContext ctx, 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:
setActivein classGeneratedCatalogVersionparam- the active - active flag
-
setActiveInternal
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.since ages - Check CatalogVersionModel.getAgreements() insteadReturnstrueif there exists anAgreementwith the specified id for thisCatalogVersion, otherwisefalseis returned. -
isImportedLanguage
Deprecated.since ages - Check if languagesCatalogVersionModel.getLanguages()contain the target language instead.Ifnullis passed as isoCode,falseis returned, otherwisetrueis 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
nullis passed as isoCode,falseis returned, otherwisetrueis returned, if the language with the submitted isocode is already imported for thisCatalogVersion
-
addLanguage
Adds the specifiedLanguageto theCollectionof imported languages.- Parameters:
language- the new language
-
getAllKeywords
- Returns:
- a
Collectionof allKeywords, which are assigned to thisCatalogVersion
-
getAllKeywords
Returns a range of allKeywords, which are assigned to thisCatalogVersion.- Parameters:
start- start index of rangecount- number of elements in the range- Returns:
- a
Collectionof allKeywords, which are assigned to thisCatalogVersion
-
getAllKeywordCount
public int getAllKeywordCount()Returns the number ofKeywords which are assigned to thisCatalogVersion.- Returns:
- the number of
Keywords which are assigned to thisCatalogVersion
-
getAllKeywordCount
Returns the number ofKeywords which are assigned to thisCatalogVersion.- Returns:
- the number of
Keywords which are assigned to thisCatalogVersion
-
getKeywords
Returns aCollectionof allKeywords with the specified keyword valueGeneratedKeyword.getKeyword()which are assigned to thisCatalogVersion.- Parameters:
keyword- the keyword value- Returns:
- a
Collectionof allKeywords with the specified keyword valueGeneratedKeyword.getKeyword()which are assigned to thisCatalogVersion
-
getAllProducts
- Returns:
- a
Collectionof allProducts, which are part of thisCatalogVersion
-
getAllProducts
Returns a range of allProducts, which are assigned to thisCatalogVersion.- Parameters:
start- start index of rangecount- number of elements in the range- Returns:
- a
Collectionof allProducts, which are assigned to thisCatalogVersion
-
getAllVisibleProducts
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 ofProducts which are assigned to thisCatalogVersion.- Returns:
- the number of
Products which are assigned to thisCatalogVersion
-
getAllProductCount
Returns the number ofProducts which are assigned to thisCatalogVersion.- Parameters:
ctx- theSessionContext- Returns:
- the number of
Products which are assigned to thisCatalogVersion
-
getAllVisibleProductCount
public int getAllVisibleProductCount()Returns the number ofProducts which are visible for the current session user within this catalog version. -
getProducts
Deprecated.since ages - Code should be unique within catalogVersion. Use ProductService.getProduct(CatalogVersionModel, String) instead.Returns aCollectionof allProducts, which are part of thisCatalogVersionand whose code (GeneratedProduct.getCode()) matches the specified code.- Parameters:
code- the code- Returns:
- a
Collectionof allProducts, which are part of thisCatalogVersionand whose code (GeneratedProduct.getCode()) matches the specified code
-
getProducts
@Deprecated(since="ages", forRemoval=false) public Collection<Product> getProducts(SessionContext ctx, String code) Deprecated.since ages - Code should be unique within catalogVersion. Use ProductService.getProduct(CatalogVersionModel, String) instead.Returns aCollectionof allProducts, which are part of thisCatalogVersionand whose code (GeneratedProduct.getCode()) matches the specified code.- Parameters:
ctx- theSessionContextcode- the code- Returns:
- a
Collectionof allProducts, which are part of thisCatalogVersionand whose code (GeneratedProduct.getCode()) matches the specified code
-
getProduct
Deprecated.since ages - Use ProductService.getProduct(CatalogVersionModel, String) instead.Returns theProductwith the specified code which is assigned to thisCatalogVersionornullif noProductexists 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 theCollectionreturned by the methodgetProducts(SessionContext, String).- Parameters:
code- the product code- Returns:
- the
Productwith the specified code which is assigned to thisCatalogVersionornullif noProductexists with this code.
-
getProduct
@Deprecated(since="ages", forRemoval=false) public Product getProduct(SessionContext ctx, String code) Deprecated.since ages - Use ProductService.getProduct(CatalogVersionModel, String) instead.Returns theProductwith the specified code which is assigned to thisCatalogVersionornullif noProductexists 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 theCollectionreturned by the methodgetProducts(SessionContext, String).- Parameters:
ctx- theSessionContextcode- the product code- Returns:
- the
Productwith the specified code which is assigned to thisCatalogVersionornullif noProductexists with this code.
-
getRootCategories
Returns aCollectionof all root categories of thisCatalogVersion.- Parameters:
ctx- theSessionContext- Returns:
- a
Collectionof all root categories of thisCatalogVersion.
-
getRootCategories
-
getRootCategoriesCount
public int getRootCategoriesCount()- Returns:
- the amount of root categories owned by this version
-
getRootCategoriesCount
- Parameters:
ctx- theSessionContext- Returns:
- the amount of root categories owned by this version
-
getCategories
Returns aCollectionof allCategorys with the specified code, which belong to thisCatalogVersion. The hierarchy of theCatalogCategorys will not be considered!- Parameters:
code- the code of theCategory- Returns:
- a
Collectionof allCategorys with the specified code, which belong to thisCatalogVersion
-
getCategories
Returns aCollectionof allCategorys with the specified code, which belong to thisCatalogVersion. The hierarchy of theCatalogCategorys will not be considered!- Parameters:
ctx- theSessionContextcode- the code of theCategory- Returns:
- a
Collectionof allCategorys with the specified code, which belong to thisCatalogVersion
-
getCategory
Returns theCategorywith the specified code which is assigned to thisCatalogVersionornullif noCatalogCategoryexists 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 theCollectionreturned by the methodgetCategories(SessionContext, String).- Parameters:
code- the category code- Returns:
- the
Categorywith the specified code which is assigned to thisCatalogVersionornullif noCatalogCategoryexists with this code.
-
getCategory
Returns theCategorywith the specified code which is assigned to thisCatalogVersionornullif noCatalogCategoryexists 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 theCollectionreturned by the methodgetCategories(SessionContext, String).- Parameters:
ctx- theSessionContextcode- the category code- Returns:
- the
Categorywith the specified code which is assigned to thisCatalogVersionornullif noCatalogCategoryexists with this code.
-
setRootCategories
public void setRootCategories(SessionContext ctx, 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- theSessionContextcategories- 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
-
ownsCategories
-
owns
-
owns
-
getAllCategories
Returns all categories of thisCatalogVersionas aCollectionignoring the category structure.- Returns:
- all categories of this
CatalogVersionas aCollectionignoring the category structure
-
getAllCategories
Returns a range of all categories of thisCatalogVersionas aCollectionignoring the category structure.- Parameters:
start- start index of rangecount- number of elements in the range- Returns:
- a range of all categories of this
CatalogVersionas aCollectionignoring the category structure
-
getAllVisibleCategories
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 ofCategorys which are assigned to thisCatalogCategory.- Returns:
- the number of
Categorys which are assigned to thisCatalogCategory
-
getAllCategoryCount
Returns the number ofCategorys which are assigned to thisCatalogCategory.- Parameters:
ctx- theSessionContext- Returns:
- the number of
Categorys 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.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.Returns aCollectionof allMedias with the specified code which are assigned to thisCatalogVersion.- Parameters:
code- the code of the media- Returns:
- a
Collectionof allMedias with the specified code which are assigned to thisCatalogVersion.
-
getMedias
@Deprecated(since="ages", forRemoval=false) public Collection<Media> getMedias(SessionContext ctx, String code) Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.Returns aCollectionof allMedias with the specified code which are assigned to thisCatalogVersion.- Parameters:
ctx- theSessionContextcode- the code of the media- Returns:
- a
Collectionof allMedias with the specified code which are assigned to thisCatalogVersion.
-
getMedia
Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.Returns theMediawith the specified code which is assigned to thisCatalogVersionornullif noMediawith 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 theCollectionreturned by the methodgetMedias(SessionContext, String).- Parameters:
code- the product code- Returns:
- the
Mediawith the specified code which is assigned to thisCatalogVersionornullif noMediawith this code exists.
-
getMedia
Deprecated.since ages - Use MediaService.getMedia(CatalogVersionModel, String) instead.Returns theMediawith the specified code which is assigned to thisCatalogVersionornullif noMediawith 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 theCollectionreturned by the methodgetMedias(SessionContext, String).- Parameters:
ctx- theSessionContextcode- the product code- Returns:
- the
Mediawith the specified code which is assigned to thisCatalogVersionornullif noMediawith this code exists.
-
getAllMedias
- Returns:
- a
Collectionof allMedias with the specified code which are assigned to thisCatalogVersion.
-
getAllMedias
Returns a range of all medias of thisCatalogVersionas aCollection.- Parameters:
start- start index of rangecount- number of elements in the range- Returns:
- a range of all medias of this
CatalogVersionas aCollection
-
getAllMediaCount
public int getAllMediaCount()Returns the number ofMedias which are assigned to thisCatalogCategory.- Returns:
- the number of
Medias which are assigned to thisCatalogCategory
-
getCatalogVersionItems
-
getCatalogVersionItems
public SearchResult getCatalogVersionItems(SessionContext ctx, Class itemclass, int start, int count) -
getSameProducts
Deprecated.since ages - Products should have unique codes within catalog versions. -
getSameProducts
@Deprecated(since="ages", forRemoval=false) public Collection getSameProducts(SessionContext ctx, Product product) Deprecated.since ages - Products should have unique codes within catalog versions. -
getSameCategories
Deprecated.since ages - Categories should have unique codes within catalog versions. -
getSameCategories
@Deprecated(since="ages", forRemoval=false) public Collection getSameCategories(SessionContext ctx, Category category) Deprecated.since ages - Categories should have unique codes within catalog versions. -
getSameKeywords
-
getSameMedias
-
toString
Description copied from class:ItemReturns theStringrepresentation of this item. This is by default the representation of the primary key of this item. -
getSyncJobs
-
getSyncJobs
-
hasSynchronizations
public boolean hasSynchronizations() -
getDuplicateCatalogItemIDs
public Set getDuplicateCatalogItemIDs(SessionContext ctx, String itemTypeCode, String versionAttr, 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- theSessionContextitemTypeCode-versionAttr-idAttribute-- Returns:
- a Set with duplicated catalog item IDs
- Throws:
JaloItemNotFoundException
-
getDuplicatedCatalogItemsCount
Counts the duplicated items for the given CatalogVersion and ComposedType.- Parameters:
ctx- theSessionContexttype- 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
Description copied from class:GeneratedCatalogVersionGenerated method - Setter of theCatalogVersion.readPrincipalsattribute.- Overrides:
setReadPrincipalsin classGeneratedCatalogVersionparam- the readPrincipals
-
setWritePrincipals
Description copied from class:GeneratedCatalogVersionGenerated method - Setter of theCatalogVersion.writePrincipalsattribute.- Overrides:
setWritePrincipalsin classGeneratedCatalogVersionparam- the writePrincipals
-
setLanguages
Description copied from class:GeneratedCatalogVersionGenerated method - Setter of theCatalogVersion.languagesattribute.- Overrides:
setLanguagesin classGeneratedCatalogVersionvalue- the languages - languages- See Also:
-
getDuplicateKeywords
Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)with the ComposedType 'Keyword' for checking/counting for duplicated entries. -
getDuplicateMediaIDs
Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)with the ComposedType 'Media' for checking/counting for duplicated entries. -
getDuplicateCategoryIDs
Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)with the ComposedType 'Category' for checking/counting for duplicated entries. -
getDuplicateProductIDs
Deprecated.since ages - usegetDuplicatedCatalogItemsCount(SessionContext, ComposedType)with the ComposedType 'Product' for checking/counting for duplicated entries.
-
getDuplicatedCatalogItemsCount(SessionContext, ComposedType)with the ComposedType 'Category' for checking/counting for duplicated entries.