Class DefaultLabelService

  • All Implemented Interfaces:
    LabelService, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
    Direct Known Subclasses:
    TypeAwareLabelService

    public class DefaultLabelService
    extends java.lang.Object
    implements LabelService, org.springframework.context.ApplicationContextAware
    Default implementation of LabelService that uses Base configuration.
    • Constructor Detail

      • DefaultLabelService

        public DefaultLabelService()
    • Method Detail

      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
      • getApplicationContext

        protected org.springframework.context.ApplicationContext getApplicationContext()
      • getObjectLabel

        public java.lang.String getObjectLabel​(java.lang.Object object)
        Description copied from interface: LabelService
        Returns label for a given Object.
        Specified by:
        getObjectLabel in interface LabelService
        Parameters:
        object - target object
        Returns:
        label for a given object
      • getLabelInternal

        protected java.lang.String getLabelInternal​(java.lang.Object object,
                                                    java.util.function.Function<LabelProvider,​java.lang.String> provider,
                                                    java.util.function.Function<Labels,​java.lang.String> handler)
      • getFallbackLabel

        protected java.lang.String getFallbackLabel​(java.lang.Object object)
      • getObjectDescription

        public java.lang.String getObjectDescription​(java.lang.Object object)
        Description copied from interface: LabelService
        Returns text description for a given Object.
        Specified by:
        getObjectDescription in interface LabelService
        Parameters:
        object - target object
        Returns:
        description for a given object
      • getDescriptionInternal

        protected java.lang.String getDescriptionInternal​(java.lang.Object object)
      • getObjectIconPath

        public java.lang.String getObjectIconPath​(java.lang.Object object)
        Description copied from interface: LabelService
        Returns icon path for a given Object.
        Specified by:
        getObjectIconPath in interface LabelService
        Parameters:
        object - target object
        Returns:
        icon path for a given object
      • getIconPathInternal

        protected java.lang.String getIconPathInternal​(java.lang.Object object)
      • getLabelConfiguration

        protected Labels getLabelConfiguration​(java.lang.Object object)
      • buildConfigurationContext

        @Deprecated(since="6.7",
                    forRemoval=true)
        protected <CONFIG> ConfigContext buildConfigurationContext​(ConfigContext additionalContext,
                                                                   java.lang.Class<CONFIG> configurationType)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 6.7 this method has no replacement. If you need to decorate the context for the label service subclass from this class and implement the decorating logic. This method will be removed along with the complementary setContextDecorators(List) method.
      • getType

        protected java.lang.String getType​(java.lang.Object object)
      • getLabelProvider

        protected LabelProvider<java.lang.Object> getLabelProvider​(java.lang.Object object,
                                                                   Labels labelConfig)
      • setCockpitConfigurationService

        public void setCockpitConfigurationService​(CockpitConfigurationService cockpitConfigurationService)
      • setModelValueHandlerFactory

        public void setModelValueHandlerFactory​(ModelValueHandlerFactory modelValueHandlerFactory)
      • setContextDecorators

        @Deprecated(since="6.7",
                    forRemoval=true)
        public void setContextDecorators​(java.util.List<WidgetConfigurationContextDecorator> contextDecorators)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 6.7 this method has no replacement. If you need to decorate the context for the label service subclass from this class and implement the decorating logic. This method will be removed along with the complementary buildConfigurationContext(ConfigContext, Class) method.
      • setLabelStringObjectHandler

        public void setLabelStringObjectHandler​(LabelStringObjectHandler labelStringObjectHandler)
      • setLabelServiceCache

        public void setLabelServiceCache​(LabelServiceCache labelServiceCache)