Class FormItemManagementService

    • Constructor Detail

      • FormItemManagementService

        public FormItemManagementService()
    • Method Detail

      • addButton

        public Button addButton​(FormItemContainer parent,
                                int index,
                                Command command,
                                AbstractDataPath path,
                                Form form,
                                FormNewItemDescriptor itemDescriptor)
        Add button with command and data path to parent index position.
        Specified by:
        addButton in interface IFormItemManagementService
        Parameters:
        parent - in which added a new button, cannot be null
        index - the position of parent
        command - the command for button (Button#getCommandName())
        path - the data path is parameter of command, can be null
        form - the form, cannot be null
        itemDescriptor - the item descriptor, can be null
        Returns:
        the added button
      • addGroup

        public FormGroup addGroup​(FormItemContainer parent,
                                  int index,
                                  ManagedFormGroupType type,
                                  Form form,
                                  FormNewItemDescriptor itemDescriptor)
        The method adds group to the index position of a parental container( FormItemContainer) also the method sets all necessary data( unique id, name and etc.). At addition to the group the type and corresponding the extInfo will be set.
        Specified by:
        addGroup in interface IFormItemManagementService
        Parameters:
        parent - the parental element to which the group will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support group.
        index - of a position of a parental container in which the group will be added. If index out of bound in parental container, then throws IndexOutOfBoundsException.
        type - the type which will be set to group. If type is null then sets the actual for current parameters type. If current type is not support, then throws IllegalArgumentException.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new group with the established actual data.
      • addGroup

        public FormGroup addGroup​(FormItemContainer parent,
                                  Form form,
                                  FormNewItemDescriptor itemDescriptor)
        The method adds group to the end of a parental container( FormItemContainer) also the method sets all necessary data( unique id, name and etc.). At addition to the group the suitable type and ext info will be set.
        Specified by:
        addGroup in interface IFormItemManagementService
        Parameters:
        parent - the parental element to which the group will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support group.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new group with the established actual data.
      • addGroup

        public FormGroup addGroup​(FormItemContainer parent,
                                  ManagedFormGroupType type,
                                  Form form,
                                  FormNewItemDescriptor itemDescriptor)
        The method adds FormGroup to the end of a parental container( FormItemContainer) also the method sets all necessary data( unique id, name and etc.). At addition to the group the type and ext info will be set.
        Specified by:
        addGroup in interface IFormItemManagementService
        Parameters:
        parent - the parental element to which the group will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support group.
        type - the type which will be set to group. If type is null then sets the actual for current parameters type. If current type is not support, then throws IllegalArgumentException.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new group with the established actual data.
      • addField

        public FormField addField​(FormItemContainer parent,
                                  Form form,
                                  FormNewItemDescriptor itemDescriptor)
        The method adds FormField to the end of a parental container( FormItemContainer) also the method sets all necessary data( unique id, name and etc.). At addition to the field the suitable type and ext info will be set.
        Specified by:
        addField in interface IFormItemManagementService
        Parameters:
        parent - the parental element to which the field will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support field.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new field with the established actual data.
      • addField

        public FormField addField​(FormItemContainer parent,
                                  AbstractDataPath path,
                                  Form form,
                                  FormNewItemDescriptor itemDescriptor)
        The method adds FormField to the end of a parental container( FormItemContainer) also the method sets all necessary data( unique id, name and etc.). At addition to the field the suitable type and ext info will be set.
        Specified by:
        addField in interface IFormItemManagementService
        Parameters:
        parent - the parental element to which the field will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support field.
        path - the path to data depends on it form field type and ext info. If path is null sets default type and ext info.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new field with the established actual data.
      • addField

        public FormField addField​(FormItemContainer parent,
                                  int index,
                                  Form form,
                                  FormNewItemDescriptor itemDescriptor)
        The method adds FormField to the index position of a parental container( FormItemContainer) also the method sets all necessary data( unique id, name and etc.). At addition to the field the suitable type and ext info will be set.
        Specified by:
        addField in interface IFormItemManagementService
        Parameters:
        parent - the parental element to which the field will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support field.
        index - of a position of a parental container in which the field will be added. If index out of bound in parental container, then throws IndexOutOfBoundsException.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new field with the established actual data.
      • addField

        public FormField addField​(FormItemContainer parent,
                                  AbstractDataPath path,
                                  int index,
                                  Form form,
                                  FormNewItemDescriptor itemDescriptor)
        The method adds FormField to the index position of a parental container( FormItemContainer) also the method sets all necessary data( unique id, name and etc.). At addition to the field the suitable type and ext info will be set.
        Specified by:
        addField in interface IFormItemManagementService
        Parameters:
        parent - the parental element to which the field will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support field.
        path - the path to data depends on it form field type and ext info. If path is null sets default type and ext info.
        index - of a position of a parental container in which the field will be added. If index out of bound in parental container, then throws IndexOutOfBoundsException.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new field with the established actual data.
      • addTable

        public Table addTable​(FormItemContainer parent,
                              Form form,
                              FormNewItemDescriptor itemDescriptor)
        The method adds Table to the end of a parental container( FormItemContainer) also the method sets all necessary data( unique id, name and etc.). At addition to the table the default type and ext info will be set.
        Specified by:
        addTable in interface IFormItemManagementService
        Parameters:
        parent - the parental container to which the table will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support table.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new table with the established actual data.
      • addTable

        public Table addTable​(FormItemContainer parent,
                              AbstractDataPath path,
                              boolean createColumn,
                              Form form,
                              FormNewItemDescriptor itemDescriptor)
        The method adds Table to the end of a parental container( FormItemContainer) also the method sets all necessary data( unique id, name and etc.). At addition to the table the suitable type and ext info will be set.
        Specified by:
        addTable in interface IFormItemManagementService
        Parameters:
        parent - the parental container to which the table will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support table.
        path - the path to data depends on it form table ext info. If path is null sets default ext info.
        createColumn - the flag for creation of the columns from children PropertyInfo of the path PropertyInfo.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new table with the established actual data.
      • addTable

        public Table addTable​(FormItemContainer parent,
                              int index,
                              Form form,
                              FormNewItemDescriptor itemDescriptor)
        The method adds Table to the index position of a parental container( FormItemContainer) also the method sets all necessary data(unique id, name and etc.). At addition to the table the default type and ext info will be set.
        Specified by:
        addTable in interface IFormItemManagementService
        Parameters:
        parent - the parental container to which the table will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support table.
        index - of a position of a parental container in which the table will be added. If index out of bound in parental container, then throws IndexOutOfBoundsException.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new table with the established actual data.
      • addTable

        public Table addTable​(FormItemContainer parent,
                              AbstractDataPath path,
                              boolean createColumn,
                              int index,
                              Form form,
                              FormNewItemDescriptor itemDescriptor)
        The method adds Table to the index position of a parental container( FormItemContainer) also the method sets all necessary data(unique id, name and etc.). At addition to the table the suitable type and ext info will be set.
        Specified by:
        addTable in interface IFormItemManagementService
        Parameters:
        parent - the parental container to which the table will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support table.
        path - the path to data depends on it form table ext info. If path is null sets default ext info.
        createColumn - the flag for creation of the columns from children PropertyInfo of the path PropertyInfo.
        index - of a position of a parental container in which the table will be added. If index out of bound in parental container, then throws IndexOutOfBoundsException.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new table with the established actual data.
      • addDecoration

        public Decoration addDecoration​(FormItemContainer parent,
                                        Form form,
                                        FormNewItemDescriptor itemDescriptor)
        The method adds Decoration to the end of a parental container( FormItemContainer) also the method sets all necessary data( unique id, name and etc.). At addition to the decoration the suitable type and ext info will be set
        Specified by:
        addDecoration in interface IFormItemManagementService
        Parameters:
        parent - the parental container to which the decoration will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support a decoration.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new decoration with the established actual data.
      • addDecoration

        public Decoration addDecoration​(FormItemContainer parent,
                                        ManagedFormDecorationType type,
                                        Form form,
                                        FormNewItemDescriptor itemDescriptor)
        The method adds Decoration to the end of a parental container( FormItemContainer) also the method sets all necessary data( unique id, name and etc.). At addition to the decoration the type and ext info will be set.
        Specified by:
        addDecoration in interface IFormItemManagementService
        Parameters:
        parent - the parental container to which the decoration will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support a decoration.
        type - the type which will be set to decoration. If type is null then sets the actual for current parameters type. If current type is not support, then throws IllegalArgumentException.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new decoration with the established actual data.
      • addDecoration

        public Decoration addDecoration​(FormItemContainer parent,
                                        int index,
                                        ManagedFormDecorationType type,
                                        Form form,
                                        FormNewItemDescriptor itemDescriptor)
        The method adds Decoration to the index position of a parental container( FormItemContainer) also the method sets all necessary data(unique id, name and etc.). At addition to the decoration the type and a corresponding ext info will be set.
        Specified by:
        addDecoration in interface IFormItemManagementService
        Parameters:
        parent - the parental container to which the decoration will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support a decoration.
        index - of a position of a parental container in which the decoration will be added. If index out of bound in parental container, then throws IndexOutOfBoundsException.
        type - the type which will be set to decoration. If type is null then sets the actual for current parameters type. If current type is not support, then throws IllegalArgumentException.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        a new decoration with the established actual data.
      • addAddition

        public Addition addAddition​(FormItemContainer parent,
                                    Form form,
                                    FormNewItemDescriptor itemDescriptor)
        The method adds Addition to the end of a parental container( FormItemContainer) also the method sets all necessary data( unique id, name and etc.). At addition to the addition the suitable type and ext info will be set
        Specified by:
        addAddition in interface IFormItemManagementService
        Parameters:
        parent - the parental container to which the addition will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support an addition.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        an new addition with the established actual data.
      • addAddition

        public Addition addAddition​(FormItemContainer parent,
                                    int index,
                                    Form form,
                                    FormNewItemDescriptor itemDescriptor)
        The method adds Addition to the index position of a parental container( FormItemContainer) also the method sets all necessary data(unique id, name and etc.). At addition to the addition the default type and ext info will be set.
        Specified by:
        addAddition in interface IFormItemManagementService
        Parameters:
        parent - the parental container to which the addition will be added. The parent can not be null. Throws IllegalArgumentException if the parent does not support an addition.
        index - of a position of a parental container in which the addition will be added. If index out of bound in parental container, then throws IndexOutOfBoundsException.
        form - the form in which there are all objects. The form can not be null.
        itemDescriptor - the item descriptor, can be null
        Returns:
        an new addition with the established actual data.