Class ClassificationClass
- All Implemented Interfaces:
Serializable,Comparable
Category which
resides within a ClassificationSystemVersion only.
It may have multiple attributes
assigned to it. This relation is backed by
ClassAttributeAssignment instances.
- 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.classification.GeneratedClassificationClass
CLASSIFICATIONATTRIBUTES, DECLAREDCLASSIFICATIONATTRIBUTEASSIGNMENTS, DECLAREDCLASSIFICATIONATTRIBUTES, DEFAULT_INITIAL_ATTRIBUTES, EXTERNALID, HMCXML, INHERITEDCLASSIFICATIONATTRIBUTES, REVISION, SHOWEMPTYATTRIBUTESFields inherited from class de.hybris.platform.category.jalo.Category
DISABLE_CYCLIC_CHECKS, DISABLE_SETALLOWEDPRINCIPAL_RECURSIVELY, DISABLE_SUBCATEGORY_REMOVALCHECKFields inherited from class de.hybris.platform.category.jalo.GeneratedCategory
ALLOWEDPRINCIPALS, CATALOG, CATEGORIES, CATEGORY2KEYWORDRELATION_MARKMODIFIED, CATEGORY2KEYWORDRELATION_SRC_ORDERED, CATEGORY2KEYWORDRELATION_TGT_ORDERED, CATEGORY2PRINCIPALRELATION_MARKMODIFIED, CATEGORY2PRINCIPALRELATION_SRC_ORDERED, CATEGORY2PRINCIPALRELATION_TGT_ORDERED, CATEGORYCATEGORYRELATION_MARKMODIFIED, CATEGORYCATEGORYRELATION_SRC_ORDERED, CATEGORYCATEGORYRELATION_TGT_ORDERED, CATEGORYMEDIARELATION_MARKMODIFIED, CATEGORYMEDIARELATION_SRC_ORDERED, CATEGORYMEDIARELATION_TGT_ORDERED, CATEGORYPRODUCTRELATION_MARKMODIFIED, CATEGORYPRODUCTRELATION_SRC_ORDERED, CATEGORYPRODUCTRELATION_TGT_ORDERED, CODE, DATA_SHEET, DESCRIPTION, DETAIL, KEYWORDS, LOGO, MEDIAS, NAME, NORMAL, ORDER, OTHERS, PICTURE, PRODUCTS, SUPERCATEGORIES, THUMBNAIL, THUMBNAILSFields 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 TypeMethodDescriptionassignAttribute(ClassificationAttribute attribute) assignAttribute(ClassificationAttribute attribute, int position) assignAttribute(ClassificationAttribute attribute, EnumerationValue type, ClassificationAttributeUnit unit, Collection values, int position) assignAttribute(ClassificationAttribute attribute, String typeCode, ClassificationAttributeUnit unit, Collection values, int position) protected ClassAttributeAssignmentassignToMe(ClassificationAttribute attribute, EnumerationValue type, ClassificationAttributeUnit unit, Collection values, int position) protected ItemcreateItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) create the item you can delete this method if you don't want to intercept the creation of this itemProvides access to the assignment of a given attribute to this class.getAttributeType(ClassificationAttribute attribute) Returns the value type of the given attribute within this class.getAttributeUnit(ClassificationAttribute attribute) Returns the classifcation unit belonging to the given attribute within this class.Returns all attributes together with their assigned values as a map { ClassificationAttribute -> [ ClassificationAttributeValue *] }Returns the values to choose from for the given attribute within this class.getAttributeValues(ClassificationAttribute attribute) Returns the values to choose from for the given attribute within this class.Deprecated.Returns all classification attributes which are available for this class.protected LanguageGenerated method - Getter of theClassificationClass.declaredClassificationAttributeAssignmentsattribute.Generated method - Getter of theClassificationClass.declaredClassificationAttributesattribute.Returns all classification attributes which are available for this class but are assigned to any of its super classes.protected intprotected NumberFormatgetNumberFormat(SessionContext ctx, String formatDefinition) Returns all subclasses of this class.getVisibility(ClassificationAttribute attribute) Returns the visibility of a given attribute within this class.booleanisClassifying(Product product) Tells whether or not a given product is beeing classified by this class.booleanTells whether or not a given attribute is localized within this class.booleanisMandatory(ClassificationAttribute attribute) Tells whether or not the given attribute is mandatory within this class.booleanTells whether or not multiple values are allowed for a given attribute within this class.booleanTells whether or not a given attribute describes a range value within this class.voidremove(SessionContext ctx) Removes this class together with all its attribute assignments.voidsetAttributeType(ClassificationAttribute attribute, EnumerationValue valueType) Changes the value type of the given attribute within this class.voidsetAttributeUnit(ClassificationAttribute attribute, ClassificationAttributeUnit unit) Changes the classifcation unit belonging to the given attribute within this class.voidsetAttributeValueMap(Map attributeValueMappings) Changes the assigned values of all attributes by providing a map { ClassificationAttribute -> [ ClassificationAttributeValue *] }voidsetAttributeValues(ClassificationAttribute attribute, List<ClassificationAttributeValue> values) Changes the values to choose from for the given attribute within this class.voidsetDeclaredClassificationAttributeAssignments(SessionContext ctx, List<ClassAttributeAssignment> assignments) Generated method - Setter of theClassificationClass.declaredClassificationAttributeAssignmentsattribute.voidsetLocalized(ClassificationAttribute atr, boolean loc) Changes whether or not a given attribute is localized within this class.voidsetMandatory(ClassificationAttribute attribute, boolean mandatory) Changes whether or not the given attribute is mandatory within this class.voidsetMultiValued(ClassificationAttribute atr, boolean multi) Changes whether or not multiple values are allowed for a given attribute within this class.voidsetRange(ClassificationAttribute atr, boolean range) Changes whether or not a given attribute describes a range value within this class.voidsetSuperClass(ClassificationClass superClass) Sets the super class of this classification class.voidsetVisibility(ClassificationAttribute attribute, EnumerationValue vsbl) Changes the visibility of a given attribute within this class.protected CollectiontranslateValue(SessionContext ctx, ClassAttributeAssignment asgnmt, Object value) Ensures that value(s) are set as collection even if there is just a single value object.Methods inherited from class de.hybris.platform.catalog.jalo.classification.GeneratedClassificationClass
getClassificationAttributes, getDeclaredClassificationAttributeAssignments, getDeclaredClassificationAttributes, getDefaultAttributeModes, getExternalID, getExternalID, getHmcXML, getHmcXML, getInheritedClassificationAttributes, getRevision, getRevision, isShowEmptyAttributes, isShowEmptyAttributes, isShowEmptyAttributesAsPrimitive, isShowEmptyAttributesAsPrimitive, setDeclaredClassificationAttributeAssignments, setExternalID, setExternalID, setHmcXML, setHmcXML, setRevision, setRevision, setShowEmptyAttributes, setShowEmptyAttributes, setShowEmptyAttributes, setShowEmptyAttributesMethods inherited from class de.hybris.platform.category.jalo.Category
addProduct, addProduct, addProduct, addProduct, addProducts, addProducts, addSubcategories, addSubcategories, addSubcategory, addSubcategory, addSupercategories, addSupercategories, addSupercategory, addSupercategory, addToCategories, addToSupercategories, assertNoCycle, checkRemovable, containsProducts, disableChecks, getAllProductsCount, getAllSubcategories, getAllSubcategories, getAllSubcategoriesCount, getAllSupercategories, getAllSupercategories, getCode, getPath, getPaths, getProductsCount, getSubcategories, getSubcategories, getSubcategoryCount, getSupercategory, getSupercategory, getSupercategoryCount, isEmpty, isRoot, isRoot, isRootAsPrimitive, isRootAsPrimitive, isSetAllowedPrincipalsRecursivelyDisabled, isSubcategoryRemovalCheckDisabled, pullUpAllowedPrincipalInternals, removeProduct, removeProduct, removeProducts, removeProducts, removeSubcategories, removeSubcategories, removeSubcategory, removeSubcategory, removeSupercategories, removeSupercategories, removeSupercategory, removeSupercategory, setAllowedPrincipals, setAllowedPrincipalsOnlyForPassedCategory, setCategories, setCategories, setCategories, setSubcategories, setSubcategories, setSupercategories, setSupercategories, setSupercategories, toStringMethods inherited from class de.hybris.platform.category.jalo.GeneratedCategory
addToAllowedPrincipals, addToAllowedPrincipals, addToCategories, addToKeywords, addToKeywords, addToMedias, addToMedias, addToProducts, addToProducts, addToSupercategories, getAllDescription, getAllDescription, getAllKeywords, getAllKeywords, getAllName, getAllName, getAllowedPrincipals, getAllowedPrincipals, getAllowedPrincipalsCount, getAllowedPrincipalsCount, getCatalogVersion, getCatalogVersion, getCategories, getCategories, getCategoriesCount, getCategoriesCount, getCode, getData_sheet, getData_sheet, getDescription, getDescription, getDetail, getDetail, getKeywords, getKeywords, getKeywordsCount, getKeywordsCount, getKeywordsCount, getKeywordsCount, getLogo, getLogo, getMedias, getMedias, getMediasCount, getMediasCount, getName, getName, getNormal, getNormal, getOrder, getOrder, getOrderAsPrimitive, getOrderAsPrimitive, getOthers, getOthers, getPicture, getPicture, getProducts, getProducts, getProductsCount, getSupercategories, getSupercategories, getSupercategoriesCount, getSupercategoriesCount, getThumbnail, getThumbnail, getThumbnails, getThumbnails, isMarkModifiedDisabled, removeFromAllowedPrincipals, removeFromAllowedPrincipals, removeFromCategories, removeFromCategories, removeFromKeywords, removeFromKeywords, removeFromMedias, removeFromMedias, removeFromProducts, removeFromProducts, removeFromSupercategories, removeFromSupercategories, setAllDescription, setAllDescription, setAllKeywords, setAllKeywords, setAllName, setAllName, setAllowedPrincipals, setCatalogVersion, setCatalogVersion, setCategories, setCode, setCode, setData_sheet, setData_sheet, setDescription, setDescription, setDetail, setDetail, setKeywords, setKeywords, setLogo, setLogo, setMedias, setMedias, setName, setName, setNormal, setNormal, setOrder, setOrder, setOrder, setOrder, setOthers, setOthers, setPicture, setPicture, setProducts, setProducts, setSupercategories, setThumbnail, setThumbnail, setThumbnails, setThumbnailsMethods 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
-
CATALOGVERSION
-
-
Constructor Details
-
ClassificationClass
public ClassificationClass()
-
-
Method Details
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException Description copied from class:Categorycreate the item you can delete this method if you don't want to intercept the creation of this item- Overrides:
createItemin classCategory- 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
Removes this class together with all its attribute assignments. The actual attributes are not removed.- Overrides:
removein classItem- Parameters:
ctx- A SessionContext object- Throws:
ConsistencyCheckException- if this item could not be removed for some reason
-
getSystemVersion
-
setSuperClass
Sets the super class of this classification class. This is a convenience method intead of usingCategory.setSupercategories(SessionContext, List).Even though classification classes may have more than one parent class (due to beeing subtype of
Category) most systems have a simple tree structure.- Parameters:
superClass-
-
getSubClasses
Returns all subclasses of this class. The same asCategory.getSubcategories()except that onlyClassificationClassinstances are included. -
getSuperClasses
-
getAllSuperClasses
-
getAttributeAssignment
public ClassAttributeAssignment getAttributeAssignment(ClassificationAttribute attr) throws JaloItemNotFoundException Provides access to the assignment of a given attribute to this class.- Parameters:
attr- the attribute to get the assignment for- Throws:
JaloItemNotFoundException- if the attribute is not assigned
-
getClassificationAttributes
Returns all classification attributes which are available for this class. This includes its own attributes and all attributes assigned to any of its super classes.- Specified by:
getClassificationAttributesin classGeneratedClassificationClass- Returns:
- the classificationAttributes - list of all attributes available within this class
-
getClassificationAttribute
-
getInheritedClassificationAttributes
Returns all classification attributes which are available for this class but are assigned to any of its super classes.- Specified by:
getInheritedClassificationAttributesin classGeneratedClassificationClass- Returns:
- the inheritedClassificationAttributes - list of assigned attributes
-
getDeclaredClassificationAttributes
Description copied from class:GeneratedClassificationClassGenerated method - Getter of theClassificationClass.declaredClassificationAttributesattribute.- Specified by:
getDeclaredClassificationAttributesin classGeneratedClassificationClass- Returns:
- the declaredClassificationAttributes - list of assigned attributes
-
getMaxPosition
protected int getMaxPosition() -
assignAttribute
-
assignAttribute
-
assignAttribute
public ClassAttributeAssignment assignAttribute(ClassificationAttribute attribute, String typeCode, ClassificationAttributeUnit unit, Collection values, int position) throws JaloInvalidParameterException, JaloItemNotFoundException -
assignAttribute
public ClassAttributeAssignment assignAttribute(ClassificationAttribute attribute, EnumerationValue type, ClassificationAttributeUnit unit, Collection values, int position) -
assignToMe
protected ClassAttributeAssignment assignToMe(ClassificationAttribute attribute, EnumerationValue type, ClassificationAttributeUnit unit, Collection values, int position) -
getAttributeUnit
Returns the classifcation unit belonging to the given attribute within this class.- Parameters:
attribute- the attribute to get the unit for
-
setAttributeUnit
Changes the classifcation unit belonging to the given attribute within this class.- Parameters:
attribute- the attribute to set the unit forunit- the new classifcation unit
-
getAttributeValues
public Collection<ClassificationAttributeValue> getAttributeValues(ClassificationAttribute attribute) Returns the values to choose from for the given attribute within this class.If no values are specified within the underlying
ClassAttributeAssignmentthis method will return the default attribute values fromClassificationAttribute.getDefaultAttributeValues(SessionContext). This is a read-only fallback -setAttributeValues(ClassificationAttribute, List)does not change the default attribute values!- Parameters:
attribute- the attribute to get values for
-
getAttributeValues
Returns the values to choose from for the given attribute within this class.If no values are specified within the underlying
ClassAttributeAssignmentthis method will return the default attribute values fromClassificationAttribute.getDefaultAttributeValues(SessionContext). This is a read-only fallback -setAttributeValues(ClassificationAttribute, List)does not change the default attribute values!- Parameters:
asgnmt- the attribute assignment to get values for
-
setAttributeValues
public void setAttributeValues(ClassificationAttribute attribute, List<ClassificationAttributeValue> values) Changes the values to choose from for the given attribute within this class.- Parameters:
attribute- the attribute to set values forvalues- the new value list
-
getAttributeValueMap
Returns all attributes together with their assigned values as a map { ClassificationAttribute -> [ ClassificationAttributeValue *] } -
setAttributeValueMap
Changes the assigned values of all attributes by providing a map { ClassificationAttribute -> [ ClassificationAttributeValue *] } -
getVisibility
Returns the visibility of a given attribute within this class.- Parameters:
attribute- the attribute to get the visibility for
-
setVisibility
Changes the visibility of a given attribute within this class.- Parameters:
attribute- the attribute to set the visibility forvsbl- the new visibility status
-
getAttributeType
Returns the value type of the given attribute within this class.- Parameters:
attribute- the attribute to get the value type for
-
setAttributeType
Changes the value type of the given attribute within this class.Please note that this change may render current values useless which was stored for this attribute at products before - they are not being converted!
- Parameters:
attribute- the attribute to set the value type forvalueType- the new value type
-
isMandatory
Tells whether or not the given attribute is mandatory within this class.- Parameters:
attribute- the attribute to get mandatory flag for
-
setMandatory
Changes whether or not the given attribute is mandatory within this class.- Parameters:
attribute- the attribute to set mandatory flag formandatory- the new mandatory flag
-
isLocalized
Tells whether or not a given attribute is localized within this class. -
setLocalized
Changes whether or not a given attribute is localized within this class. -
isRange
Tells whether or not a given attribute describes a range value within this class. Range attributes normally require two actual values to be stored at the classified product for this attribute. -
setRange
Changes whether or not a given attribute describes a range value within this class. Range attributes normally require two actual values to be stored at the classified product for this attribute. -
isMultiValued
Tells whether or not multiple values are allowed for a given attribute within this class. -
setMultiValued
Changes whether or not multiple values are allowed for a given attribute within this class. -
getListableAttributeAssignments
-
getListableAttributeAssignments
-
getComparableAttributeAssignments
-
getComparableAttributeAssignments
-
getSearchableAttributeAssignments
-
getSearchableAttributeAssignments
-
getClassificationAttributeAssignments
-
getClassificationAttributeAssignments
@Deprecated(since="ages", forRemoval=false) public Collection<ClassAttributeAssignment> getClassificationAttributeAssignments(SessionContext ctx) Deprecated.since ages - useClassificationClassModel.getAllClassificationAttributeAssignments()instead. -
getDeclaredClassificationAttributeAssignments
public List<ClassAttributeAssignment> getDeclaredClassificationAttributeAssignments(SessionContext ctx) Description copied from class:GeneratedClassificationClassGenerated method - Getter of theClassificationClass.declaredClassificationAttributeAssignmentsattribute.- Specified by:
getDeclaredClassificationAttributeAssignmentsin classGeneratedClassificationClass- Returns:
- the declaredClassificationAttributeAssignments - list of attribute assignments
-
setDeclaredClassificationAttributeAssignments
public void setDeclaredClassificationAttributeAssignments(SessionContext ctx, List<ClassAttributeAssignment> assignments) Description copied from class:GeneratedClassificationClassGenerated method - Setter of theClassificationClass.declaredClassificationAttributeAssignmentsattribute.- Specified by:
setDeclaredClassificationAttributeAssignmentsin classGeneratedClassificationClassassignments- the declaredClassificationAttributeAssignments - list of attribute assignments
-
getContextLanguage
-
translateValue
protected Collection translateValue(SessionContext ctx, ClassAttributeAssignment asgnmt, Object value) Ensures that value(s) are set as collection even if there is just a single value object. In addition, it tries to translates given string values into possible existing de.hybris.platform.catalog.constants.GeneratedCatalogConstants.Attributes.ClassificationAttributeValue attribute values.- Parameters:
ctx- the session context defining the language to use for comparing attribute value labelsasgnmt- the class attribute assignmentvalue- the value to translate
-
isClassifying
Tells whether or not a given product is beeing classified by this class. This is true if the product is actually assigned to this class or any of its subclasses.- Parameters:
product- the product to check assignment for
-
getNumberFormat
-
ClassificationClassModel.getAllClassificationAttributeAssignments()instead.