Class ClassificationClass
- java.lang.Object
-
- de.hybris.platform.util.BridgeAbstraction
-
- de.hybris.platform.jalo.Item
-
- de.hybris.platform.jalo.ExtensibleItem
-
- de.hybris.platform.jalo.c2l.LocalizableItem
-
- de.hybris.platform.jalo.GenericItem
-
- de.hybris.platform.category.jalo.GeneratedCategory
-
- de.hybris.platform.category.jalo.Category
-
- de.hybris.platform.catalog.jalo.classification.GeneratedClassificationClass
-
- de.hybris.platform.catalog.jalo.classification.ClassificationClass
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable
public class ClassificationClass extends GeneratedClassificationClass
Represents a classification class. This is a special type ofCategory
which resides within aClassificationSystemVersion
only.It may have multiple
attributes
assigned to it. This relation is backed byClassAttributeAssignment
instances.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.GenericItem
GenericItem.GenericItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LocalizableItem.LocalizableItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.ExtensibleItem
ExtensibleItem.ExtensibleItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.Item
Item.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CATALOGVERSION
-
Fields inherited from class de.hybris.platform.catalog.jalo.classification.GeneratedClassificationClass
CLASSIFICATIONATTRIBUTES, DECLAREDCLASSIFICATIONATTRIBUTEASSIGNMENTS, DECLAREDCLASSIFICATIONATTRIBUTES, DEFAULT_INITIAL_ATTRIBUTES, EXTERNALID, HMCXML, INHERITEDCLASSIFICATIONATTRIBUTES, REVISION, SHOWEMPTYATTRIBUTES
-
Fields inherited from class de.hybris.platform.category.jalo.Category
DISABLE_CYCLIC_CHECKS, DISABLE_SETALLOWEDPRINCIPAL_RECURSIVELY, DISABLE_SUBCATEGORY_REMOVALCHECK
-
Fields 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, THUMBNAILS
-
Fields inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LANGUAGE_FALLBACK_ENABLED
-
Fields inherited from class de.hybris.platform.jalo.Item
_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, HJMPTS, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPE
-
Fields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant
-
-
Constructor Summary
Constructors Constructor Description ClassificationClass()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ClassAttributeAssignment
assignAttribute(ClassificationAttribute attribute)
ClassAttributeAssignment
assignAttribute(ClassificationAttribute attribute, int position)
ClassAttributeAssignment
assignAttribute(ClassificationAttribute attribute, EnumerationValue type, ClassificationAttributeUnit unit, java.util.Collection values, int position)
ClassAttributeAssignment
assignAttribute(ClassificationAttribute attribute, java.lang.String typeCode, ClassificationAttributeUnit unit, java.util.Collection values, int position)
protected ClassAttributeAssignment
assignToMe(ClassificationAttribute attribute, EnumerationValue type, ClassificationAttributeUnit unit, java.util.Collection values, int position)
protected Item
createItem(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 itemjava.util.Collection<ClassificationClass>
getAllSuperClasses()
ClassAttributeAssignment
getAttributeAssignment(ClassificationAttribute attr)
Provides access to the assignment of a given attribute to this class.EnumerationValue
getAttributeType(ClassificationAttribute attribute)
Returns the value type of the given attribute within this class.ClassificationAttributeUnit
getAttributeUnit(ClassificationAttribute attribute)
Returns the classifcation unit belonging to the given attribute within this class.java.util.Map
getAttributeValueMap()
Returns all attributes together with their assigned values as a map { ClassificationAttribute -> [ ClassificationAttributeValue *] }java.util.Collection<ClassificationAttributeValue>
getAttributeValues(ClassAttributeAssignment asgnmt)
Returns the values to choose from for the given attribute within this class.java.util.Collection<ClassificationAttributeValue>
getAttributeValues(ClassificationAttribute attribute)
Returns the values to choose from for the given attribute within this class.ClassificationAttribute
getClassificationAttribute(java.lang.String code)
java.util.Collection<ClassAttributeAssignment>
getClassificationAttributeAssignments()
java.util.Collection<ClassAttributeAssignment>
getClassificationAttributeAssignments(SessionContext ctx)
Deprecated.since ages - useClassificationClassModel.getAllClassificationAttributeAssignments()
instead.java.util.List<ClassificationAttribute>
getClassificationAttributes(SessionContext ctx)
Returns all classification attributes which are available for this class.java.util.Collection<ClassAttributeAssignment>
getComparableAttributeAssignments()
java.util.Collection<ClassAttributeAssignment>
getComparableAttributeAssignments(SessionContext ctx)
protected Language
getContextLanguage(SessionContext ctx)
java.util.List<ClassAttributeAssignment>
getDeclaredClassificationAttributeAssignments(SessionContext ctx)
Generated method - Getter of theClassificationClass.declaredClassificationAttributeAssignments
attribute.java.util.List<ClassificationAttribute>
getDeclaredClassificationAttributes(SessionContext ctx)
Generated method - Getter of theClassificationClass.declaredClassificationAttributes
attribute.java.util.List<ClassificationAttribute>
getInheritedClassificationAttributes(SessionContext ctx)
Returns all classification attributes which are available for this class but are assigned to any of its super classes.java.util.Collection<ClassAttributeAssignment>
getListableAttributeAssignments()
java.util.Collection<ClassAttributeAssignment>
getListableAttributeAssignments(SessionContext ctx)
protected int
getMaxPosition()
protected java.text.NumberFormat
getNumberFormat(SessionContext ctx, java.lang.String formatDefinition)
java.util.Collection<ClassAttributeAssignment>
getSearchableAttributeAssignments()
java.util.Collection<ClassAttributeAssignment>
getSearchableAttributeAssignments(SessionContext ctx)
java.util.Set<ClassificationClass>
getSubClasses()
Returns all subclasses of this class.java.util.Set<ClassificationClass>
getSuperClasses()
ClassificationSystemVersion
getSystemVersion()
EnumerationValue
getVisibility(ClassificationAttribute attribute)
Returns the visibility of a given attribute within this class.boolean
isClassifying(Product product)
Tells whether or not a given product is beeing classified by this class.boolean
isLocalized(ClassificationAttribute atr)
Tells whether or not a given attribute is localized within this class.boolean
isMandatory(ClassificationAttribute attribute)
Tells whether or not the given attribute is mandatory within this class.boolean
isMultiValued(ClassificationAttribute atr)
Tells whether or not multiple values are allowed for a given attribute within this class.boolean
isRange(ClassificationAttribute atr)
Tells whether or not a given attribute describes a range value within this class.void
remove(SessionContext ctx)
Removes this class together with all its attribute assignments.void
setAttributeType(ClassificationAttribute attribute, EnumerationValue valueType)
Changes the value type of the given attribute within this class.void
setAttributeUnit(ClassificationAttribute attribute, ClassificationAttributeUnit unit)
Changes the classifcation unit belonging to the given attribute within this class.void
setAttributeValueMap(java.util.Map attributeValueMappings)
Changes the assigned values of all attributes by providing a map { ClassificationAttribute -> [ ClassificationAttributeValue *] }void
setAttributeValues(ClassificationAttribute attribute, java.util.List<ClassificationAttributeValue> values)
Changes the values to choose from for the given attribute within this class.void
setDeclaredClassificationAttributeAssignments(SessionContext ctx, java.util.List<ClassAttributeAssignment> assignments)
Generated method - Setter of theClassificationClass.declaredClassificationAttributeAssignments
attribute.void
setLocalized(ClassificationAttribute atr, boolean loc)
Changes whether or not a given attribute is localized within this class.void
setMandatory(ClassificationAttribute attribute, boolean mandatory)
Changes whether or not the given attribute is mandatory within this class.void
setMultiValued(ClassificationAttribute atr, boolean multi)
Changes whether or not multiple values are allowed for a given attribute within this class.void
setRange(ClassificationAttribute atr, boolean range)
Changes whether or not a given attribute describes a range value within this class.void
setSuperClass(ClassificationClass superClass)
Sets the super class of this classification class.void
setVisibility(ClassificationAttribute attribute, EnumerationValue vsbl)
Changes the visibility of a given attribute within this class.protected java.util.Collection
translateValue(SessionContext ctx, ClassAttributeAssignment asgnmt, java.lang.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, setShowEmptyAttributes
-
Methods 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, toString
-
Methods 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, setThumbnails
-
Methods inherited from class de.hybris.platform.jalo.GenericItem
getImplementation, getInitialProperties, getNonInitialAttributes, getRelatedItems, setRelatedItems
-
Methods inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedProperty
-
Methods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setProperty
-
Methods inherited from class de.hybris.platform.jalo.Item
addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, clearPermission, compareTo, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, notifyManagerAboutItemRemoval, readResolve, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, useTA, writeReplace
-
Methods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
-
-
-
Method Detail
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
Description copied from class:Category
create the item you can delete this method if you don't want to intercept the creation of this item- Overrides:
createItem
in 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
public void remove(SessionContext ctx) throws ConsistencyCheckException
Removes this class together with all its attribute assignments. The actual attributes are not removed.- Overrides:
remove
in classItem
- Parameters:
ctx
- A SessionContext object- Throws:
ConsistencyCheckException
- if this item could not be removed for some reason
-
getSystemVersion
public ClassificationSystemVersion getSystemVersion()
-
setSuperClass
public void setSuperClass(ClassificationClass superClass)
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
public java.util.Set<ClassificationClass> getSubClasses()
Returns all subclasses of this class. The same asCategory.getSubcategories()
except that onlyClassificationClass
instances are included.
-
getSuperClasses
public java.util.Set<ClassificationClass> getSuperClasses()
-
getAllSuperClasses
public java.util.Collection<ClassificationClass> 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
public java.util.List<ClassificationAttribute> getClassificationAttributes(SessionContext ctx)
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:
getClassificationAttributes
in classGeneratedClassificationClass
- Returns:
- the classificationAttributes - list of all attributes available within this class
-
getClassificationAttribute
public ClassificationAttribute getClassificationAttribute(java.lang.String code)
-
getInheritedClassificationAttributes
public java.util.List<ClassificationAttribute> getInheritedClassificationAttributes(SessionContext ctx)
Returns all classification attributes which are available for this class but are assigned to any of its super classes.- Specified by:
getInheritedClassificationAttributes
in classGeneratedClassificationClass
- Returns:
- the inheritedClassificationAttributes - list of assigned attributes
-
getDeclaredClassificationAttributes
public java.util.List<ClassificationAttribute> getDeclaredClassificationAttributes(SessionContext ctx)
Description copied from class:GeneratedClassificationClass
Generated method - Getter of theClassificationClass.declaredClassificationAttributes
attribute.- Specified by:
getDeclaredClassificationAttributes
in classGeneratedClassificationClass
- Returns:
- the declaredClassificationAttributes - list of assigned attributes
-
getMaxPosition
protected int getMaxPosition()
-
assignAttribute
public ClassAttributeAssignment assignAttribute(ClassificationAttribute attribute)
-
assignAttribute
public ClassAttributeAssignment assignAttribute(ClassificationAttribute attribute, int position)
-
assignAttribute
public ClassAttributeAssignment assignAttribute(ClassificationAttribute attribute, java.lang.String typeCode, ClassificationAttributeUnit unit, java.util.Collection values, int position) throws JaloInvalidParameterException, JaloItemNotFoundException
-
assignAttribute
public ClassAttributeAssignment assignAttribute(ClassificationAttribute attribute, EnumerationValue type, ClassificationAttributeUnit unit, java.util.Collection values, int position)
-
assignToMe
protected ClassAttributeAssignment assignToMe(ClassificationAttribute attribute, EnumerationValue type, ClassificationAttributeUnit unit, java.util.Collection values, int position)
-
getAttributeUnit
public ClassificationAttributeUnit getAttributeUnit(ClassificationAttribute attribute)
Returns the classifcation unit belonging to the given attribute within this class.- Parameters:
attribute
- the attribute to get the unit for
-
setAttributeUnit
public void setAttributeUnit(ClassificationAttribute attribute, ClassificationAttributeUnit unit)
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 java.util.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
ClassAttributeAssignment
this 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
public java.util.Collection<ClassificationAttributeValue> getAttributeValues(ClassAttributeAssignment asgnmt)
Returns the values to choose from for the given attribute within this class.If no values are specified within the underlying
ClassAttributeAssignment
this 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, java.util.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
public java.util.Map getAttributeValueMap()
Returns all attributes together with their assigned values as a map { ClassificationAttribute -> [ ClassificationAttributeValue *] }
-
setAttributeValueMap
public void setAttributeValueMap(java.util.Map attributeValueMappings)
Changes the assigned values of all attributes by providing a map { ClassificationAttribute -> [ ClassificationAttributeValue *] }
-
getVisibility
public EnumerationValue getVisibility(ClassificationAttribute attribute)
Returns the visibility of a given attribute within this class.- Parameters:
attribute
- the attribute to get the visibility for
-
setVisibility
public void setVisibility(ClassificationAttribute attribute, EnumerationValue vsbl)
Changes the visibility of a given attribute within this class.- Parameters:
attribute
- the attribute to set the visibility forvsbl
- the new visibility status
-
getAttributeType
public EnumerationValue getAttributeType(ClassificationAttribute attribute)
Returns the value type of the given attribute within this class.- Parameters:
attribute
- the attribute to get the value type for
-
setAttributeType
public void setAttributeType(ClassificationAttribute attribute, EnumerationValue valueType)
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
public boolean isMandatory(ClassificationAttribute attribute)
Tells whether or not the given attribute is mandatory within this class.- Parameters:
attribute
- the attribute to get mandatory flag for
-
setMandatory
public void setMandatory(ClassificationAttribute attribute, boolean mandatory)
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
public boolean isLocalized(ClassificationAttribute atr)
Tells whether or not a given attribute is localized within this class.
-
setLocalized
public void setLocalized(ClassificationAttribute atr, boolean loc)
Changes whether or not a given attribute is localized within this class.
-
isRange
public boolean isRange(ClassificationAttribute atr)
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
public void setRange(ClassificationAttribute atr, boolean range)
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
public boolean isMultiValued(ClassificationAttribute atr)
Tells whether or not multiple values are allowed for a given attribute within this class.
-
setMultiValued
public void setMultiValued(ClassificationAttribute atr, boolean multi)
Changes whether or not multiple values are allowed for a given attribute within this class.
-
getListableAttributeAssignments
public java.util.Collection<ClassAttributeAssignment> getListableAttributeAssignments()
-
getListableAttributeAssignments
public java.util.Collection<ClassAttributeAssignment> getListableAttributeAssignments(SessionContext ctx)
-
getComparableAttributeAssignments
public java.util.Collection<ClassAttributeAssignment> getComparableAttributeAssignments()
-
getComparableAttributeAssignments
public java.util.Collection<ClassAttributeAssignment> getComparableAttributeAssignments(SessionContext ctx)
-
getSearchableAttributeAssignments
public java.util.Collection<ClassAttributeAssignment> getSearchableAttributeAssignments()
-
getSearchableAttributeAssignments
public java.util.Collection<ClassAttributeAssignment> getSearchableAttributeAssignments(SessionContext ctx)
-
getClassificationAttributeAssignments
public java.util.Collection<ClassAttributeAssignment> getClassificationAttributeAssignments()
-
getClassificationAttributeAssignments
@Deprecated public java.util.Collection<ClassAttributeAssignment> getClassificationAttributeAssignments(SessionContext ctx)
Deprecated.since ages - useClassificationClassModel.getAllClassificationAttributeAssignments()
instead.
-
getDeclaredClassificationAttributeAssignments
public java.util.List<ClassAttributeAssignment> getDeclaredClassificationAttributeAssignments(SessionContext ctx)
Description copied from class:GeneratedClassificationClass
Generated method - Getter of theClassificationClass.declaredClassificationAttributeAssignments
attribute.- Specified by:
getDeclaredClassificationAttributeAssignments
in classGeneratedClassificationClass
- Returns:
- the declaredClassificationAttributeAssignments - list of attribute assignments
-
setDeclaredClassificationAttributeAssignments
public void setDeclaredClassificationAttributeAssignments(SessionContext ctx, java.util.List<ClassAttributeAssignment> assignments)
Description copied from class:GeneratedClassificationClass
Generated method - Setter of theClassificationClass.declaredClassificationAttributeAssignments
attribute.- Specified by:
setDeclaredClassificationAttributeAssignments
in classGeneratedClassificationClass
assignments
- the declaredClassificationAttributeAssignments - list of attribute assignments
-
getContextLanguage
protected Language getContextLanguage(SessionContext ctx)
-
translateValue
protected java.util.Collection translateValue(SessionContext ctx, ClassAttributeAssignment asgnmt, java.lang.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
public boolean isClassifying(Product product)
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
protected java.text.NumberFormat getNumberFormat(SessionContext ctx, java.lang.String formatDefinition)
-
-