Class MetadataSearchUIColumn

    • Method Detail

      • _isSortable

        protected boolean _isSortable​(Configuration configuration,
                                      ModelItem attribute,
                                      boolean multiplePath)
        Computed sortable status of this column from its attribute definition and configuration
        Parameters:
        configuration - the column's configuration
        attribute - the attribute definition
        multiplePath - if path is multiple
        Returns:
        true if this column is sortable
      • _isEditable

        protected boolean _isEditable​(Configuration configuration,
                                      ModelItem attribute,
                                      boolean multiLevelMultiple)
        Computed editable status of this column from its attribute definition and configuration
        Parameters:
        configuration - the column's configuration
        attribute - the attribute definition
        multiLevelMultiple - if path contains a multiple attrbute or a repeater.
        Returns:
        true if this column is editable
      • isEditionAllowed

        protected boolean isEditionAllowed​(ModelItem attribute)
        Determines if the inline edition is allowed
        Parameters:
        attribute - The attribute definition
        Returns:
        true if the attribute is editable
      • configureRenderer

        protected void configureRenderer​(String renderer,
                                         ModelItem attribute)
        Configure the column renderer.
        Parameters:
        renderer - A specific renderer. If null, it will be deduced from the attribute definition.
        attribute - The attribute definition.
      • configureConverter

        protected void configureConverter​(String converter,
                                          ModelItem attribute)
        Configure the column converter.
        Parameters:
        converter - A specific converter. If null, it will be deduced from the metadata definition.
        attribute - The attribute definition.
      • setFieldPath

        public void setFieldPath​(String attributePath)
        Set the attribute path
        Parameters:
        attributePath - the path to attribute
      • getContentTypes

        public Collection<StringgetContentTypes()
        Get the content types of the contents on which this attribute column applies
        Returns:
        the content types
      • setContentTypes

        public void setContentTypes​(Collection<String> contentTypes)
        Set the content types of the contents on which this attribute column applies
        Parameters:
        contentTypes - the content types
      • isJoinedAttribute

        public boolean isJoinedAttribute()
        Determines if this column is a path to a joined attribute
        Returns:
        true if is a joined attribute
      • setJoinedAttribute

        public void setJoinedAttribute​(boolean joinedAttribute)
        Set if this column is a path to a joined attribute
        Parameters:
        joinedAttribute - true if is a joined attribute
      • isTypeContentWithMultilingualTitle

        public boolean isTypeContentWithMultilingualTitle()
        Determines if this column represents a CONTENT attribute with a multilingual title
        Returns:
        true if this column represents a CONTENT attribute with a multilingual title
      • setTypeContentWithMultilingualTitle

        public void setTypeContentWithMultilingualTitle​(boolean multilingual)
        Set if this column represents a CONTENT attribute with a multilingual title
        Parameters:
        multilingual - true if this column represents a CONTENT attribute with a multilingual title
      • getValue

        public Object getValue​(Content content,
                               Locale defaultLocale)
        Description copied from interface: ResultField
        Get the value represented by this field in the given result content.
        Specified by:
        getValue in interface ResultField
        Parameters:
        content - the result content.
        defaultLocale - the default locale for localized value if the content's language is null
        Returns:
        the content field value (cast to the appropriate object).
      • getFullValue

        public Object getFullValue​(Content content,
                                   Locale defaultLocale)
        Description copied from interface: ResultField
        Get the value represented by this field in the given result content.
        Specified by:
        getFullValue in interface ResultField
        Parameters:
        content - the result content.
        defaultLocale - the default locale for localized value if the content's language is null
        Returns:
        the content field value (cast to the appropriate object).
      • _isSortableMetadata

        protected boolean _isSortableMetadata​(ModelItem attribute)
        Determines if the column is sortable according its attribute definition
        Parameters:
        attribute - the attribute definition
        Returns:
        true if type is sortable