public class CatalogVersion extends GeneratedCatalogVersion
CatalogVersion represents one specified version of a Catalog. A
CatalogVersion is always part of a Catalog which can be accessed through
GeneratedCatalogVersion.getCatalog().GenericItem.GenericItemImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException| Modifier and Type | Field and Description |
|---|---|
static int |
ERROR |
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, WRITEPRINCIPALSLANGUAGE_FALLBACK_ENABLED_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEimpl, tenant| Constructor and Description |
|---|
CatalogVersion() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLanguage(Language language)
Adds the specified
Languageto the Collectionof 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 this
CatalogVersion as a Collectionignoring the category structure. |
java.util.Collection<Category> |
getAllCategories(int start,
int count)
Returns a range of all categories of this
CatalogVersion as a Collectionignoring the category
structure. |
int |
getAllCategoryCount()
Returns the number of
Categorys which are assigned to this CatalogCategory. |
int |
getAllCategoryCount(SessionContext ctx)
Returns the number of
Categorys which are assigned to this CatalogCategory. |
int |
getAllKeywordCount()
Returns the number of
Keywords which are assigned to this CatalogVersion. |
int |
getAllKeywordCount(SessionContext ctx)
Returns the number of
Keywords which are assigned to this CatalogVersion. |
java.util.Collection<Keyword> |
getAllKeywords()
|
java.util.Collection<Keyword> |
getAllKeywords(int start,
int count)
Returns a range of all
Keywords, which are assigned to this CatalogVersion. |
int |
getAllMediaCount()
Returns the number of
Medias which are assigned to this CatalogCategory. |
java.util.Collection<Media> |
getAllMedias()
|
java.util.Collection<Media> |
getAllMedias(int start,
int count)
Returns a range of all medias of this
CatalogVersion as a Collection. |
int |
getAllProductCount()
Returns the number of
Products which are assigned to this CatalogVersion. |
int |
getAllProductCount(SessionContext ctx)
Returns the number of
Products which are assigned to this CatalogVersion. |
java.util.Collection<Product> |
getAllProducts()
|
java.util.Collection<Product> |
getAllProducts(int start,
int count)
Returns a range of all
Products, which are assigned to this CatalogVersion. |
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 of
Products 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(java.lang.Class itemclass,
int start,
int count) |
SearchResult |
getCatalogVersionItems(SessionContext ctx,
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 the
Categorywith the specified code which is assigned to this CatalogVersion or
null if no CatalogCategory exists with this code. |
Category |
getCategory(java.lang.String code)
Returns the
Categorywith the specified code which is assigned to this CatalogVersion or
null if no CatalogCategory 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 - use
getDuplicatedCatalogItemsCount(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 - use
getDuplicatedCatalogItemsCount(SessionContext, ComposedType) with the ComposedType
'Keyword' for checking/counting for duplicated entries. |
java.util.Set |
getDuplicateMediaIDs(SessionContext ctx)
Deprecated.
since ages - use
getDuplicatedCatalogItemsCount(SessionContext, ComposedType) with the ComposedType
'Media' for checking/counting for duplicated entries. |
java.util.Set |
getDuplicateProductIDs(SessionContext ctx)
Deprecated.
since ages - use
getDuplicatedCatalogItemsCount(SessionContext, ComposedType) with the ComposedType
'Product' for checking/counting for duplicated entries. |
java.util.Collection |
getKeywords(java.lang.String keyword)
Returns a
Collectionof all Keywords with the specified keyword value GeneratedKeyword.getKeyword()
which are assigned to this CatalogVersion. |
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. Use ProductService.getProduct(CatalogVersionModel,
String) instead.
|
java.util.Collection<Product> |
getProducts(java.lang.String code)
Deprecated.
since ages - Code should be unique within catalogVersion. Use ProductService.getProduct(CatalogVersionModel,
String) instead.
|
java.util.List<Category> |
getRootCategories() |
java.util.List<Category> |
getRootCategories(SessionContext ctx)
Returns a
Collectionof all root categories of this CatalogVersion. |
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() instead
|
boolean |
hasSynchronizations() |
boolean |
isImportedLanguage(java.lang.String isoCode)
Deprecated.
since ages - Check if languages
CatalogVersionModel.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). CatalogVersionPrepareInterceptor will handle the
corresponding logic.
|
protected void |
setActiveInternal(SessionContext ctx,
java.lang.Boolean param)
Used by
Catalog.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 the
CatalogVersion.languages attribute. |
void |
setReadPrincipals(SessionContext ctx,
java.util.List<Principal> param)
Generated method - Setter of the
CatalogVersion.readPrincipals attribute. |
void |
setRootCategories(java.util.List<Category> value) |
void |
setRootCategories(SessionContext ctx,
java.util.List<Category> categories)
Changes this catalog version's root categories.
|
void |
setWritePrincipals(SessionContext ctx,
java.util.List<Principal> param)
Generated method - Setter of the
CatalogVersion.writePrincipals attribute. |
java.lang.String |
toString()
Returns the
String representation of this item. |
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, setWritePrincipalsgetInitialProperties, getNonInitialAttributesgetAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertycreateNonClassAccessor, getAllProperties, getAllProperties, getImplementation, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyaddLinkedItems, 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, writeReplacesetTenantpublic static final int ERROR
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
ItemComposedType.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; }
createItem in class GeneratedCatalogVersionctx - 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 )JaloBusinessException - indicates an error during creation - any changes will be rollbackedpublic void remove(SessionContext ctx) throws ConsistencyCheckException
remove in class Itemctx - A SessionContext objectConsistencyCheckException - if this item could not be removed for some reason@Deprecated protected void setCatalog(SessionContext ctx, Catalog param)
GeneratedCatalogVersionCatalogVersion.catalog attribute.setCatalog in class GeneratedCatalogVersionparam - the catalogprotected void checkRemovable(SessionContext ctx) throws ConsistencyCheckException
ItemcheckRemovable in class ItemConsistencyCheckException - to indicate that the item cannot be removedprotected boolean isRemovable(SessionContext ctx, boolean throwException) throws ConsistencyCheckException
ConsistencyCheckException@Deprecated public void setActive(SessionContext ctx, java.lang.Boolean param)
setActive in class GeneratedCatalogVersionparam - the active - active flagprotected void setActiveInternal(SessionContext ctx, java.lang.Boolean param)
Catalog.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!
@Deprecated public boolean hasAgreement(java.lang.String id)
true if there exists an Agreementwith the specified id for this
CatalogVersion, otherwise false is returned.@Deprecated public boolean isImportedLanguage(java.lang.String isoCode)
CatalogVersionModel.getLanguages() contain the target language instead.null is passed as isoCode, false is returned, otherwise true is
returned, if the language with the submitted isocode is already imported for this CatalogVersion.isoCode - the isocode of the language, for which it should be tested, if it is already imported.null is passed as isoCode, false is returned, otherwise true is
returned, if the language with the submitted isocode is already imported for this
CatalogVersionpublic void addLanguage(Language language)
Languageto the Collectionof imported languages.language - the new languagepublic java.util.Collection<Keyword> getAllKeywords()
Collectionof all Keywords, which are assigned to this CatalogVersionpublic java.util.Collection<Keyword> getAllKeywords(int start, int count)
Keywords, which are assigned to this CatalogVersion.start - start index of rangecount - number of elements in the rangeCollectionof all Keywords, which are assigned to this CatalogVersionpublic int getAllKeywordCount()
Keywords which are assigned to this CatalogVersion.Keywords which are assigned to this CatalogVersionpublic int getAllKeywordCount(SessionContext ctx)
Keywords which are assigned to this CatalogVersion.Keywords which are assigned to this CatalogVersionpublic java.util.Collection getKeywords(java.lang.String keyword)
Collectionof all Keywords with the specified keyword value GeneratedKeyword.getKeyword()
which are assigned to this CatalogVersion.keyword - the keyword valueCollectionof all Keywords with the specified keyword value GeneratedKeyword.getKeyword()
which are assigned to this CatalogVersionpublic java.util.Collection<Product> getAllProducts()
Collectionof all Products, which are part of this CatalogVersionpublic java.util.Collection<Product> getAllProducts(int start, int count)
Products, which are assigned to this CatalogVersion.start - start index of rangecount - number of elements in the rangeCollectionof all Products, which are assigned to this CatalogVersionpublic java.util.Collection getAllVisibleProducts(int start,
int count)
start - the range startcount - the range countpublic int getAllProductCount()
Products which are assigned to this CatalogVersion.Products which are assigned to this CatalogVersionpublic int getAllProductCount(SessionContext ctx)
Products which are assigned to this CatalogVersion.ctx - the SessionContextProducts which are assigned to this CatalogVersionpublic int getAllVisibleProductCount()
Products which are visible for the current session user within this catalog version.@Deprecated public java.util.Collection<Product> getProducts(java.lang.String code)
Collectionof all Products, which are part of this CatalogVersion and whose
code ( GeneratedProduct.getCode()) matches the specified code.code - the codeCollectionof all Products, which are part of this CatalogVersion and whose
code ( GeneratedProduct.getCode()) matches the specified code@Deprecated public java.util.Collection<Product> getProducts(SessionContext ctx, java.lang.String code)
Collectionof all Products, which are part of this CatalogVersion and whose
code ( GeneratedProduct.getCode()) matches the specified code.ctx - the SessionContextcode - the codeCollectionof all Products, which are part of this CatalogVersion and whose
code ( GeneratedProduct.getCode()) matches the specified code@Deprecated public Product getProduct(java.lang.String code)
Product with the specified code which is assigned to this CatalogVersion or
null if no Product exists with this code. !Caution! This method should only be used
if the product codes are unique within the CatalogVersion, because this method simply returns the
first element of the Collection returned by the method getProducts(SessionContext, String)
. code - the product codeProductwith the specified code which is assigned to this CatalogVersion or
null if no Product exists with this code.@Deprecated public Product getProduct(SessionContext ctx, java.lang.String code)
Productwith the specified code which is assigned to this CatalogVersion or
null if no Product exists with this code. !Caution! This method should only be used
if the product codes are unique within the CatalogVersion, because this method simply returns the
first element of the Collection returned by the method getProducts(SessionContext, String)
. ctx - the SessionContextcode - the product codeProductwith the specified code which is assigned to this CatalogVersion or
null if no Product exists with this code.public java.util.List<Category> getRootCategories(SessionContext ctx)
Collectionof all root categories of this CatalogVersion.ctx - the SessionContextCollectionof all root categories of this CatalogVersion.public java.util.List<Category> getRootCategories()
public int getRootCategoriesCount()
public int getRootCategoriesCount(SessionContext ctx)
ctx - the SessionContextpublic java.util.Collection<Category> getCategories(java.lang.String code)
Collectionof all Categorys with the specified code, which belong to this
CatalogVersion. The hierarchy of the CatalogCategory s will not be considered!public java.util.Collection<Category> getCategories(SessionContext ctx, java.lang.String code)
Collectionof all Categorys with the specified code, which belong to this
CatalogVersion. The hierarchy of the CatalogCategory s will not be considered!ctx - the SessionContextcode - the code of the CategoryCollectionof all Categorys with the specified code, which belong to this
CatalogVersionpublic Category getCategory(java.lang.String code)
Categorywith the specified code which is assigned to this CatalogVersion or
null if no CatalogCategory exists with this code. !Caution! This method should only
be used if the category codes are unique within the CatalogVersion, because this method simply
returns the first element of the Collection returned by the method
getCategories(SessionContext, String). code - the category codeCategorywith the specified code which is assigned to this CatalogVersion or
null if no CatalogCategory exists with this code.public Category getCategory(SessionContext ctx, java.lang.String code)
Categorywith the specified code which is assigned to this CatalogVersion or
null if no CatalogCategory exists with this code. !Caution! This method should only
be used if the category codes are unique within the CatalogVersion, because this method simply
returns the first element of the Collection returned by the method
getCategories(SessionContext, String). ctx - the SessionContextcode - the category codeCategorywith the specified code which is assigned to this CatalogVersion or
null if no CatalogCategory exists with this code.public void setRootCategories(SessionContext ctx, java.util.List<Category> categories) throws JaloInvalidParameterException
ctx - the SessionContextcategories - the new root categories of this catalog versionJaloInvalidParameterException - if at least one category is no root category, does not belong to this catalog version or a previous
category could not be removedpublic void setRootCategories(java.util.List<Category> value)
protected boolean ownsCategories(CatalogManager catalogManager, java.util.Collection categories)
protected boolean owns(Category cat)
protected boolean owns(CatalogManager catalogManager, Category cat)
public java.util.Collection<Category> getAllCategories()
CatalogVersion as a Collectionignoring the category structure.CatalogVersion as a Collectionignoring the category structurepublic java.util.Collection<Category> getAllCategories(int start, int count)
CatalogVersion as a Collectionignoring the category
structure.start - start index of rangecount - number of elements in the rangeCatalogVersion as a Collectionignoring the category
structurepublic java.util.Collection getAllVisibleCategories(int start,
int count)
start - the range startcount - the range countpublic int getAllCategoryCount()
Categorys which are assigned to this CatalogCategory.Categorys which are assigned to this CatalogCategorypublic int getAllCategoryCount(SessionContext ctx)
Categorys which are assigned to this CatalogCategory.ctx - the SessionContextCategorys which are assigned to this CatalogCategorypublic int getAllVisibleCategoryCount()
@Deprecated public java.util.Collection<Media> getMedias(java.lang.String code)
Collectionof all Medias with the specified code which are assigned to this
CatalogVersion.code - the code of the mediaCollectionof all Medias with the specified code which are assigned to this
CatalogVersion.@Deprecated public java.util.Collection<Media> getMedias(SessionContext ctx, java.lang.String code)
Collectionof all Medias with the specified code which are assigned to this
CatalogVersion.ctx - the SessionContextcode - the code of the mediaCollectionof all Medias with the specified code which are assigned to this
CatalogVersion.@Deprecated public Media getMedia(java.lang.String code)
Mediawith the specified code which is assigned to this CatalogVersion or
null if no Media with this code exists. !Caution! This method should only be used if
the media codes are unique within the CatalogVersion, because this method simply returns the first
element of the Collection returned by the method getMedias(SessionContext, String). code - the product codeMediawith the specified code which is assigned to this CatalogVersion or
null if no Media with this code exists.@Deprecated public Media getMedia(SessionContext ctx, java.lang.String code)
Mediawith the specified code which is assigned to this CatalogVersion or
null if no Media with this code exists. !Caution! This method should only be used if
the media codes are unique within the CatalogVersion, because this method simply returns the first
element of the Collection returned by the method getMedias(SessionContext, String). ctx - the SessionContextcode - the product codeMediawith the specified code which is assigned to this CatalogVersion or
null if no Media with this code exists.public java.util.Collection<Media> getAllMedias()
Collectionof all Medias with the specified code which are assigned to this
CatalogVersion.public java.util.Collection<Media> getAllMedias(int start, int count)
CatalogVersion as a Collection.start - start index of rangecount - number of elements in the rangeCatalogVersion as a Collectionpublic int getAllMediaCount()
Medias which are assigned to this CatalogCategory.Medias which are assigned to this CatalogCategorypublic SearchResult getCatalogVersionItems(java.lang.Class itemclass, int start, int count)
public SearchResult getCatalogVersionItems(SessionContext ctx, java.lang.Class itemclass, int start, int count)
@Deprecated public java.util.Collection getSameProducts(Product product)
@Deprecated public java.util.Collection getSameProducts(SessionContext ctx, Product product)
@Deprecated public java.util.Collection getSameCategories(Category category)
@Deprecated public java.util.Collection getSameCategories(SessionContext ctx, Category category)
public java.util.Collection getSameKeywords(Keyword keyword)
public java.util.Collection getSameMedias(Media media)
public java.lang.String toString()
ItemString representation of this item. This is by default the representation of the primary
key of this item.protected java.util.List getSyncJobs(boolean asSource)
protected java.util.List getSyncJobs(SessionContext ctx, boolean asSource)
public boolean hasSynchronizations()
public java.util.Set getDuplicateCatalogItemIDs(SessionContext ctx, java.lang.String itemTypeCode, java.lang.String versionAttr, java.lang.String idAttribute) throws JaloItemNotFoundException
ctx - the SessionContextitemTypeCode - versionAttr - idAttribute - JaloItemNotFoundExceptionpublic long getDuplicatedCatalogItemsCount(SessionContext ctx, ComposedType type)
ctx - the SessionContexttype - the ComposedType to look for duplicatespublic void setReadPrincipals(SessionContext ctx, java.util.List<Principal> param)
GeneratedCatalogVersionCatalogVersion.readPrincipals attribute.setReadPrincipals in class GeneratedCatalogVersionparam - the readPrincipalspublic void setWritePrincipals(SessionContext ctx, java.util.List<Principal> param)
GeneratedCatalogVersionCatalogVersion.writePrincipals attribute.setWritePrincipals in class GeneratedCatalogVersionparam - the writePrincipalspublic void setLanguages(SessionContext ctx, java.util.Collection value)
GeneratedCatalogVersionCatalogVersion.languages attribute.setLanguages in class GeneratedCatalogVersionvalue - the languages - languagesGeneratedCatalogVersion.setLanguages(de.hybris.platform.jalo.SessionContext,
java.util.Collection)@Deprecated public java.util.Set getDuplicateKeywords(SessionContext ctx)
getDuplicatedCatalogItemsCount(SessionContext, ComposedType) with the ComposedType
'Keyword' for checking/counting for duplicated entries.@Deprecated public java.util.Set getDuplicateMediaIDs(SessionContext ctx)
getDuplicatedCatalogItemsCount(SessionContext, ComposedType) with the ComposedType
'Media' for checking/counting for duplicated entries.@Deprecated public java.util.Set getDuplicateCategoryIDs(SessionContext ctx)
getDuplicatedCatalogItemsCount(SessionContext, ComposedType) with the ComposedType
'Category' for checking/counting for duplicated entries.@Deprecated public java.util.Set getDuplicateProductIDs(SessionContext ctx)
getDuplicatedCatalogItemsCount(SessionContext, ComposedType) with the ComposedType
'Product' for checking/counting for duplicated entries.Copyright © 2018 SAP SE. All Rights Reserved.