Class ApplicationEditorDescriptor

  • All Implemented Interfaces:
    IApplicationEditorDescriptor

    public abstract class ApplicationEditorDescriptor
    extends Object
    implements IApplicationEditorDescriptor
    The abstract application editor descriptor.

    It simplifies the building of the IManagingDefinition and allows to construct the editor in a descriptive manner.

    Override the build() method to provide the descriptor content, e.g.:

      
          section("General")
              .element("Name", "nameId")
                  .componentFactory(obj -> new TextComponent())
              .element("Email", "emailId")
                  .componentFactory(obj -> new EmailComponent())
          .endSection();
    
          section("Addition")
              .element("Assurance", "assuranceId")
                  .componentFactory(obj -> new CheckboxComponent())
          .endSection();
      
     

    The specified identifiers in the example above ("nameId", "emailId", etc.) is required to identify the component/control within the IModelFactory.

    Since:
    1.0.0
    • Constructor Detail

      • ApplicationEditorDescriptor

        public ApplicationEditorDescriptor()
    • Method Detail

      • getBuilder

        protected final ManagingDefinitionBuilder<?> getBuilder()
        Returns the application editor descriptor builder.
        Returns:
        the application editor descriptor builder, never null.
      • section

        protected SectionDefinitionBuilder<Void,​?> section​(String title,
                                                                 String toolbarId)
        Creates a new section and returns its builder.
        Parameters:
        title - the section title, cannot be null.
        toolbarId - the toolbar id to poputale contributed actions with, can be null.
        Returns:
        a section builder instance, never null.
      • section

        protected SectionDefinitionBuilder<Void,​?> section​(String title)
        Creates a new section and returns its builder.
        Parameters:
        title - the section title, cannot be null.
        Returns:
        a section builder instance, never null.
      • rule

        protected ManagingDefinitionBuilder<?> rule​(IRule rule)
        Sets the IRule.
        Parameters:
        rule - the rule, cannot be null.
        Returns:
        the appropriate builder instance, never null.
      • build

        protected abstract void build()
        Builds the descriptor.