Class EnumerationType
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable
@Deprecated public class EnumerationType extends ComposedType
Deprecated.since ages - please use {see de.hybris.platform.core.model.enumeration.EnumerationMetaTypeModel} instead.A special composed type describing enumeration types.Enumeration types may have sorted and resortable instances. Mostly enumeration types describe
EnumerationValueitem instances but any item type may be value type of a enumeration type too.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.type.ComposedType
ComposedType.ComposedTypeImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.type.Type
Type.TypeImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.type.TypeManagerManaged
TypeManagerManaged.TypeManagerManagedImpl
-
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.StringCOMPARATION_ATTRIBUTEDeprecated.For sorted enumerations: the comparation attribute attribute string constant.static java.lang.StringIS_RESORTABLEDeprecated.The resortable attribute string constant.static java.lang.StringIS_SORTEDDeprecated.The sorted attribute string constant.static java.lang.StringVALUE_TYPEDeprecated.The value type attribute string constant.static java.lang.StringVALUESDeprecated.The enumeration values attribute string constant.-
Fields inherited from class de.hybris.platform.jalo.type.ComposedType
ABSTRACT, ALLSUBTYPES, ALLSUPERTYPES, ATTRIBUTEDESCRIPTORS, DECLAREDATTRIBUTEDESCRIPTORS, DUMPPROPERTYTABLE, DYNAMIC, INHERITANCEPATH, INHERITEDATTRIBUTEDESCRIPTORS, JALOCLASS, JALOONLY, JNDINAME, SINGLETON, SUBTYPES, SUPERTYPE, TABLE
-
Fields inherited from class de.hybris.platform.jalo.type.Type
CODE, DEFAULTVALUE, DESCRIPTION, XMLDEFINITION
-
Fields inherited from class de.hybris.platform.jalo.type.TypeManagerManaged
AUTOCREATE, DEPRECATED, EXTENSION_NAME, GENERATE, NAME
-
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 EnumerationType()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected ItemchangeTypeIfNecessary(Item newOne, ComposedType requestedType)Deprecated.Redefined to skip type changing since all enumtypes have to have the EnumerationMetaType as type.protected voidcheckValues(java.util.List values)Deprecated.Helper forsetValues(List): checks if every item of the value list is instance of this type.protected ItemcreateItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes)Deprecated.The generic creation method for enumeration types.java.lang.StringexportXMLDefinition(org.znerd.xmlenc.XMLOutputter xout, java.lang.String forExtension)Deprecated.AttributeDescriptorgetComparationAttribute()Deprecated.Returns the comparation attribute to sort values by ingetValues().protected Item.ItemAttributeMapgetNonInitialAttributes(SessionContext ctx, Item.ItemAttributeMap allAttributes)Deprecated.CutsType.CODEandVALUE_TYPEfrom attributes since these values have been set during creation.java.util.List<EnumerationValue>getValues()Deprecated.Returns all enum values.protected java.util.List<EnumerationValue>getValues(boolean ordered)Deprecated.ComposedTypegetValueType()Deprecated.The item type of this enum type's values.java.lang.StringgetXMLDefinition()Deprecated.Assembles the XML definition text to put insideitems.xml.booleanisDefaultEnum()Deprecated.Returns true if this type holds instances ofEnumerationValue, false for any other kind of item.booleanisResortable()Deprecated.Tells if this enum type is able to change the order of its values (seesortValues(List)).booleanisSorted()Deprecated.Returns true if the values of this enum type are sorted.java.lang.ObjectparseValue(SessionContext ctx, java.lang.String value)Deprecated.ReadsEnumerationValueinstances fromCode of type '.' Code of enumstrings.voidsetComparationAttribute(AttributeDescriptor descr)Deprecated.Changes the ordering attribute of this enumeration type.voidsetExtensionName(java.lang.String extName)Deprecated.Changes the name of the extension which this type system item belongs to.protected voidsetValues(java.util.List values)Deprecated.For generic access to value list.voidsortValues(java.util.List values)Deprecated.Changes the order of this enum type's values.java.lang.StringtoString(SessionContext ctx, java.lang.Object value)Deprecated.ConvertsEnumerationValueinstances intoCode of type '.' Code of enum.-
Methods inherited from class de.hybris.platform.jalo.type.ComposedType
_sortAttributesByQualifier, checkItemPermission, checkTypePermission, checkTypePermission, createAttributeDescriptor, createAttributeDescriptor, createJaloOnlyInstance, exportXMLDefinition, getAllConcreteItemTypeCodes, getAllDefaultValues, getAllDefaultValues, getAllInstances, getAllInstances, getAllInstancesCount, getAllSubTypes, getAllSuperTypes, getAttributeDescriptor, getAttributeDescriptorIncludingPrivate, getAttributeDescriptors, getAttributeDescriptorsIncludingPrivate, getAttributeDescriptorsIncludingPrivate, getComposedTypeImpl, getCreatorInstance, getDeclaredAttributeDescriptor, getDeclaredAttributeDescriptors, getDeclaredJaloClass, getDefaultValues, getDefaultValues, getDumpPropertyTable, getEveryAttributeDescriptor, getInheritancePathString, getInheritedAttributeDescriptors, getInitialAttributeDescriptors, getItemTypeCode, getJaloClass, getJNDIName, getPartOfAutoRemovalAttributeDescriptors, getRelations, getSingletonInstance, getSubTypes, getSuperType, getTable, getXMLCustomProperties, getXMLDefinition, hasAttribute, hasOwnDeployment, isAbstract, isAssignableFrom, isDynamic, isInstance, isJaloClassAbstract, isJaloOnly, isSameOrSuperTypeOf, isSingleton, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, setDeclaredAttributeDescriptors, setJaloClass, setJaloOnly, setSingleton, setTypeSearchSessionContex, toString, unsetTypeSearchContext
-
Methods inherited from class de.hybris.platform.jalo.type.Type
compareTo, getAllDescriptions, getAllDescriptions, getCode, getDefaultValue, getDefaultValue, getDescription, getDescription, getTypeImpl, setAllDescriptions, setAllDescriptions, setDefaultValue, setDefaultValue, setDescription, setDescription
-
Methods inherited from class de.hybris.platform.jalo.type.TypeManagerManaged
getAllNames, getAllNames, getExtensionName, getImpl, getName, getName, isAutocreate, isDeprecated, isGenerate, setAllNames, setAllNames, setAutocreate, setGenerate, setName, setName
-
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, getImplementation, 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, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, checkRemovable, clearPermission, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getDefaultAttributeModes, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRelatedItems, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isMarkModifiedDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, notifyManagerAboutItemRemoval, readResolve, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, 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, setRelatedItems, setTransientObject, setUseTA, useTA, writeReplace
-
Methods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
-
-
-
Field Detail
-
COMPARATION_ATTRIBUTE
public static final java.lang.String COMPARATION_ATTRIBUTE
Deprecated.For sorted enumerations: the comparation attribute attribute string constant.- See Also:
- Constant Field Values
-
IS_SORTED
public static final java.lang.String IS_SORTED
Deprecated.The sorted attribute string constant.- See Also:
- Constant Field Values
-
IS_RESORTABLE
public static final java.lang.String IS_RESORTABLE
Deprecated.The resortable attribute string constant.- See Also:
- Constant Field Values
-
VALUES
public static final java.lang.String VALUES
Deprecated.The enumeration values attribute string constant.- See Also:
- Constant Field Values
-
VALUE_TYPE
public static final java.lang.String VALUE_TYPE
Deprecated.The value type attribute string constant.- See Also:
- Constant Field Values
-
-
Method Detail
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
Deprecated.The generic creation method for enumeration types. Required isType.CODE, optionallyVALUE_TYPEmay be specified. Please note thatComposedType.SUPERTYPEcannot be specified!- Overrides:
createItemin classComposedType- 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
-
getNonInitialAttributes
protected Item.ItemAttributeMap getNonInitialAttributes(SessionContext ctx, Item.ItemAttributeMap allAttributes)
Deprecated.CutsType.CODEandVALUE_TYPEfrom attributes since these values have been set during creation.- Overrides:
getNonInitialAttributesin classComposedType- Parameters:
ctx- session context with language = NULLallAttributes- aItemAttributeMapcontaning attribute values.- Returns:
- a
ItemAttributeMapcontaining all attribute values, which belong to non-initial attributes.
-
changeTypeIfNecessary
protected Item changeTypeIfNecessary(Item newOne, ComposedType requestedType) throws JaloInvalidParameterException
Deprecated.Redefined to skip type changing since all enumtypes have to have the EnumerationMetaType as type.- Throws:
JaloInvalidParameterException
-
toString
public java.lang.String toString(SessionContext ctx, java.lang.Object value) throws JaloInvalidParameterException
Deprecated.ConvertsEnumerationValueinstances intoCode of type '.' Code of enum.- Overrides:
toStringin classComposedType- Throws:
JaloInvalidParameterException- Since:
- 2.10
-
parseValue
public java.lang.Object parseValue(SessionContext ctx, java.lang.String value) throws JaloInvalidParameterException
Deprecated.ReadsEnumerationValueinstances fromCode of type '.' Code of enumstrings.- Overrides:
parseValuein classComposedType- Throws:
JaloInvalidParameterException- Since:
- 2.10
-
getXMLDefinition
public java.lang.String getXMLDefinition()
Deprecated.Assembles the XML definition text to put insideitems.xml.- Overrides:
getXMLDefinitionin classComposedType- See Also:
ComposedType.getXMLDefinition(String)
-
exportXMLDefinition
public java.lang.String exportXMLDefinition(org.znerd.xmlenc.XMLOutputter xout, java.lang.String forExtension)Deprecated.- Overrides:
exportXMLDefinitionin classComposedType
-
getValueType
public ComposedType getValueType()
Deprecated.The item type of this enum type's values.
-
isSorted
public boolean isSorted()
Deprecated.Returns true if the values of this enum type are sorted. This is either the case if it is a default enum type (seeisDefaultEnum()) or if it holds a comparation attribute which allows ordering of values (seegetComparationAttribute()).
-
isResortable
public boolean isResortable()
Deprecated.Tells if this enum type is able to change the order of its values (seesortValues(List)). This is either the case if it is a default enum type (seeisDefaultEnum()) or if it holds a comparation attribute of atomic Integer type (seegetComparationAttribute()).
-
getValues
public java.util.List<EnumerationValue> getValues()
Deprecated.Returns all enum values. If the type issortablethe values are sorted.
-
getValues
protected java.util.List<EnumerationValue> getValues(boolean ordered)
Deprecated.
-
setValues
protected void setValues(java.util.List values) throws JaloInvalidParameterExceptionDeprecated.For generic access to value list. Removes all of its values which are not contained inside the new value list. If the type is resortable the value are put in list order.- Parameters:
values- the new enum value list- Throws:
JaloInvalidParameterException- case a value doesnt belong to this type - means which is no instance of this type
-
checkValues
protected void checkValues(java.util.List values) throws JaloInvalidParameterExceptionDeprecated.Helper forsetValues(List): checks if every item of the value list is instance of this type.- Throws:
JaloInvalidParameterException- in case there are items which are not instance of this type
-
sortValues
public void sortValues(java.util.List values) throws JaloInvalidParameterExceptionDeprecated.Changes the order of this enum type's values.- Throws:
JaloInvalidParameterException- if the type is not resortable, the list doesnt contain all values of this type or a item of the list is not instance of this type
-
isDefaultEnum
public boolean isDefaultEnum()
Deprecated.Returns true if this type holds instances ofEnumerationValue, false for any other kind of item.
-
setComparationAttribute
public void setComparationAttribute(AttributeDescriptor descr) throws JaloInvalidParameterException
Deprecated.Changes the ordering attribute of this enumeration type. This affects directlyisSorted()andisResortable()so be careful.- Parameters:
descr- the attribute descriptor to order values by- Throws:
JaloInvalidParameterException- in case the type is a defaul enum type ( has built-in ordering), the attribute descriptor doesnt belong to this enum type or the attribute is not searchable
-
getComparationAttribute
public AttributeDescriptor getComparationAttribute()
Deprecated.Returns the comparation attribute to sort values by ingetValues().
-
setExtensionName
public void setExtensionName(java.lang.String extName)
Deprecated.Description copied from class:TypeManagerManagedChanges the name of the extension which this type system item belongs to.Any type or decriptor declared by an extension's
items.xmlowns the name of this extension. Types or descriptors created after initialization do not have an extension name automatically.- Overrides:
setExtensionNamein classTypeManagerManaged
-
-