Class DefaultWidgetRenderingUtils

    • Constructor Detail

      • DefaultWidgetRenderingUtils

        public DefaultWidgetRenderingUtils()
    • Method Detail

      • getAttributeLabel

        public QualifierLabel getAttributeLabel​(java.lang.Object object,
                                                DataType dataType,
                                                java.lang.String qualifier)
        Description copied from interface: WidgetRenderingUtils
        Checks how a attribute's value should be shown to end user.

        An attribute may be qualified with a SpEL expression regarding provided object. On basis of provided qualifier and object, a value of attribute is extracted and its String representation is prepared.

        Specified by:
        getAttributeLabel in interface WidgetRenderingUtils
        Parameters:
        object - item which attribute id to be rendered
        dataType - item's type description or null if an object does not belong do hybris Platform domain
        qualifier - full attribute qualifier or SpEL expression
        Returns:
        evaluation result
      • getAttributeLabel

        public QualifierLabel getAttributeLabel​(java.lang.Object value,
                                                DataAttribute attribute)
        Description copied from interface: WidgetRenderingUtils
        Checks how particular value of an attribute should be shown to end user.
        Specified by:
        getAttributeLabel in interface WidgetRenderingUtils
        Parameters:
        value - value of an attribute
        attribute - attribute which value is to presented
        Returns:
        end user representation of attribute value
      • computeLabel

        protected QualifierLabel computeLabel​(java.lang.String qualifier,
                                              DataAttribute attribute,
                                              PropertyReadResult readResult)
        Computes label for property described by qualifier, attribute and read result.
        Parameters:
        qualifier - the property qualifier.
        attribute - the attribute (can be null).
        readResult - the property read result (must be successful - see PropertyReadResult.isSuccessful()).
        Returns:
        computed label.
      • createEncryptedLabel

        protected QualifierLabel createEncryptedLabel()
      • getDataAttribute

        protected DataAttribute getDataAttribute​(java.lang.Object object,
                                                 DataType dataType,
                                                 java.lang.String qualifier)
      • setPropertyValueService

        public void setPropertyValueService​(PropertyValueService propertyValueService)
      • getLabelService

        protected LabelService getLabelService()
      • setLabelService

        public void setLabelService​(LabelService labelService)
      • setCockpitLocaleService

        public void setCockpitLocaleService​(CockpitLocaleService cockpitLocaleService)
      • getTypeFacade

        protected TypeFacade getTypeFacade()
      • setTypeFacade

        public void setTypeFacade​(TypeFacade typeFacade)