Class ComponentGenerationContext

java.lang.Object
io.jmix.ui.component.ComponentGenerationContext
Direct Known Subclasses:
JpqlFilterComponentGenerationContext, PropertyFilterComponentGenerationContext

public class ComponentGenerationContext extends Object
Contains information for ComponentGenerationStrategy when creating components using UiComponentsGenerator.
  • Field Details

    • metaClass

      protected final MetaClass metaClass
    • property

      protected final String property
    • valueSource

      protected ValueSource valueSource
    • options

      protected Options options
    • xmlDescriptor

      protected org.dom4j.Element xmlDescriptor
    • targetClass

      protected Class<?> targetClass
  • Constructor Details

    • ComponentGenerationContext

      public ComponentGenerationContext(MetaClass metaClass, String property)
      Creates an instance of ComponentGenerationContext.
      Parameters:
      metaClass - the entity for which the component is created
      property - the entity attribute for which the component is created
  • Method Details

    • getMetaClass

      public MetaClass getMetaClass()
      Returns:
      the entity for which the component is created
    • getProperty

      public String getProperty()
      Returns:
      the entity attribute for which the component is created
    • getValueSource

      @Nullable public ValueSource getValueSource()
      Returns:
      a value source that can be used to create the component
    • setValueSource

      public ComponentGenerationContext setValueSource(@Nullable ValueSource valueSource)
      Sets a value source, using fluent API method.
      Parameters:
      valueSource - a value source to set
      Returns:
      this object
    • getOptions

      @Nullable public Options getOptions()
      Returns:
      an options object
    • setOptions

      public ComponentGenerationContext setOptions(@Nullable Options options)
      Sets an options object, using fluent API method.
      Parameters:
      options - an options object that can be used as optional to create the component
      Returns:
      this object
    • getXmlDescriptor

      @Nullable public org.dom4j.Element getXmlDescriptor()
      Returns:
      an XML descriptor which contains additional information
    • setXmlDescriptor

      public ComponentGenerationContext setXmlDescriptor(@Nullable org.dom4j.Element xmlDescriptor)
      Sets an XML descriptor which contains additional information, using fluent API method.
      Parameters:
      xmlDescriptor - an XML descriptor which contains additional information
      Returns:
      this object
    • getTargetClass

      @Nullable public Class<?> getTargetClass()
      Returns:
      a target class for which a component is created
    • setTargetClass

      public ComponentGenerationContext setTargetClass(@Nullable Class<?> targetClass)
      Sets a target class for which a component is created, using fluent API method. For instance, a target class can be a component or a screen.
      Parameters:
      targetClass - a target class for which a component is created
      Returns:
      this object