Package de.hybris.platform.jalo.type
Interface AttributeAccess
-
- All Known Implementing Classes:
AbstractNonChangeableAttributeAccess
,ConstantAttributeAccess
,LocalizableFeatureAccess
,OneToManyRelationAttributeAccess
,PropertyAccess
,ReflectionAttributeAccess
,RelationAttributeAccess
public interface AttributeAccess
The attribute access implementation interface. Any attribute which cannot be mapped to a property or relation must be provided ( viaItem.registerAccessFor(Class, String, AttributeAccess)
) a object implementing this interface.The access implements generic data storage and retrieval. It is legal to throw an
JaloInvalidParameterException
to indicate that some functionality is not available.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
getValue(SessionContext ctx, Item item)
Retrieves the attribute data from a given item.void
setValue(SessionContext ctx, Item item, java.lang.Object value)
Stores the attribute data for a given item.
-
-
-
Method Detail
-
setValue
void setValue(SessionContext ctx, Item item, java.lang.Object value) throws JaloTypeException, JaloInvalidParameterException, JaloSecurityException, JaloBusinessException
Stores the attribute data for a given item.- Parameters:
ctx
- the current session context - e.g. specifies the session languageitem
- the item to store data forvalue
- the value to store- Throws:
JaloTypeException
- in case the attribute type does not allow storing this valueJaloInvalidParameterException
- in case the value is not compatible with this attributeJaloSecurityException
- in case there are security constraints which do not allow this value to be writtenJaloBusinessException
- any other error
-
getValue
java.lang.Object getValue(SessionContext ctx, Item item) throws JaloTypeException, JaloInvalidParameterException, JaloSecurityException
Retrieves the attribute data from a given item. Primitive data types likeint
are wrapped into their object instances.- Parameters:
ctx
- the current session context - e.g. specifies the session languageitem
- the item to get data from- Returns:
- the data value
- Throws:
JaloTypeException
- in case the attribute type does not allow reading this valueJaloInvalidParameterException
- in some data required for reading the value is missing or not as expected ( like missing session language )JaloSecurityException
- in case there are security constraints which do not allow reding this value
-
-