Interface CollectionGroup

All Superinterfaces:
Cloneable, Component, Container, Copyable, DataBinding, DictionaryBean, Group, Helpable, LifecycleElement, Ordered, org.springframework.core.Ordered, ScriptEventSupport, Serializable, UifDictionaryBean
All Known Implementing Classes:
CollectionGroupBase

public interface CollectionGroup extends Group, DataBinding
Interface representing an editable collection within a view.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Method Details

    • pushCollectionGroupToReference

      void pushCollectionGroupToReference()
      Sets a reference in the context map for all nested components in the collection group instance, and sets selected collection path and id data attributes on nested actions of this group.
    • initializeNewCollectionLine

      void initializeNewCollectionLine(View view, Object model, CollectionGroup collectionGroup, boolean clearExistingLine)
      New collection lines are handled in the framework by maintaining a map on the form. The map contains as a key the collection name, and as value an instance of the collection type. An entry is created here for the collection represented by the CollectionGroup if an instance is not available (clearExistingLine will force a new instance). The given model must be a subclass of UifFormBase in order to find the Map.
      Parameters:
      model - Model instance that contains the new collection lines Map
      clearExistingLine - boolean that indicates whether the line should be set to a new instance if it already exists
    • getCollectionObjectClass

      Class<?> getCollectionObjectClass()
      Object class the collection maintains. Used to get dictionary information in addition to creating new instances for the collection when necessary
      Returns:
      collection object class
    • setCollectionObjectClass

      void setCollectionObjectClass(Class<?> collectionObjectClass)
      Setter for the collection object class
      Parameters:
      collectionObjectClass -
    • setPropertyName

      void setPropertyName(String propertyName)
      Setter for the collections property name
      Parameters:
      propertyName -
    • getLineActions

      List<? extends Component> getLineActions()
      Action fields that should be rendered for each collection line. Example line action is the delete action
      Returns:
      line action fields
    • setLineActions

      void setLineActions(List<? extends Component> lineActions)
      Setter for the line action fields list
      Parameters:
      lineActions -
    • isRenderLineActions

      boolean isRenderLineActions()
      Indicates whether the action column for the collection should be rendered
      Returns:
      true if the actions should be rendered, false if not
      See Also:
    • setRenderLineActions

      void setRenderLineActions(boolean renderLineActions)
      Setter for the render line actions indicator
      Parameters:
      renderLineActions -
    • isRenderAddLine

      boolean isRenderAddLine()
      Indicates whether an add line should be rendered for the collection
      Returns:
      true if add line should be rendered, false if it should not be
    • setRenderAddLine

      void setRenderAddLine(boolean renderAddLine)
      Setter for the render add line indicator
      Parameters:
      renderAddLine -
    • getAddLineEnterKeyAction

      String getAddLineEnterKeyAction()
      Get the id of the add line action to invoke when the enter key is pressed.

      Use '@DEFAULT' if supposed to use first action where 'defaultEnterKeyAction' property is set to true.

      Returns:
      id or '@DEFAULT'
    • setAddLineEnterKeyAction

      void setAddLineEnterKeyAction(String addLineEnterKeyAction)
      See Also:
    • getLineEnterKeyAction

      String getLineEnterKeyAction()
      Get the id of the nonAdd line action to invoke when the enter key is pressed.

      Use '@DEFAULT' if supposed to use first action where 'defaultEnterKeyAction' property is set to true. In a collection may have to use SpringEL to identify line ID values. Here is a sample value: DemoButton@{#lineSuffix}. Notice the use of '@{#lineSuffix}' to help append line suffix information.

      Returns:
      id or '@DEFAULT'
    • setLineEnterKeyAction

      void setLineEnterKeyAction(String lineEnterKeyAction)
      See Also:
    • getAddLabel

      String getAddLabel()
      Convenience getter for the add line label field text. The text is used to label the add line when rendered and its placement depends on the LayoutManager

      For the TableLayoutManager the label appears in the sequence column to the left of the add line fields. For the StackedLayoutManager the label is placed into the group header for the line.

      Returns:
      add line label
    • setAddLabel

      void setAddLabel(String addLabelText)
      Setter for the add line label text
      Parameters:
      addLabelText -
    • getAddLineLabel

      Message getAddLineLabel()
      Message instance for the add line label
      Returns:
      add line Message
      See Also:
    • setAddLineLabel

      void setAddLineLabel(Message addLineLabel)
      Setter for the Message instance for the add line label
      Parameters:
      addLineLabel -
      See Also:
    • getAddLinePropertyName

      String getAddLinePropertyName()
      Name of the property that contains an instance for the add line. If set this is used with the binding info to create the path to the add line. Can be left blank in which case the framework will manage the add line instance in a generic map.
      Returns:
      add line property name
    • setAddLinePropertyName

      void setAddLinePropertyName(String addLinePropertyName)
      Setter for the add line property name
      Parameters:
      addLinePropertyName -
    • getAddLineBindingInfo

      BindingInfo getAddLineBindingInfo()
      BindingInfo instance for the add line property used to determine the full binding path. If add line name given getAddLabel() then it is set as the binding name on the binding info. Add line label and binding info are not required, in which case the framework will manage the new add line instances through a generic map (model must extend UifFormBase)
      Returns:
      BindingInfo add line binding info
    • setAddLineBindingInfo

      void setAddLineBindingInfo(BindingInfo addLineBindingInfo)
      Setter for the add line binding info
      Parameters:
      addLineBindingInfo -
    • getAddLineItems

      List<? extends Component> getAddLineItems()
      List of Component instances that should be rendered for the collection add line (if enabled). If not set, the default group's items list will be used
      Returns:
      add line field list
      See Also:
    • setAddLineItems

      void setAddLineItems(List<? extends Component> addLineItems)
      Setter for the add line field list
      Parameters:
      addLineItems -
    • getAddLineActions

      List<? extends Component> getAddLineActions()
      Component fields that should be rendered for the add line.

      This is generally the add action (button) but can be configured to contain additional components

      Returns:
      add line action fields
    • setAddLineActions

      void setAddLineActions(List<? extends Component> addLineActions)
      Setter for the add line action components fields
      Parameters:
      addLineActions -
    • isIncludeLineSelectionField

      boolean isIncludeLineSelectionField()
      Indicates whether lines of the collection group should be selected by rendering a field for each line that will allow selection

      For example, having the select field enabled could allow selecting multiple lines from a search to return (multi-value lookup)

      Returns:
      true if select field should be rendered, false if not
    • setIncludeLineSelectionField

      void setIncludeLineSelectionField(boolean includeLineSelectionField)
      Setter for the render selected field indicator
      Parameters:
      includeLineSelectionField -
    • getLineSelectPropertyName

      String getLineSelectPropertyName()
      When isIncludeLineSelectionField() is true, gives the name of the property the select field should bind to

      Note if no prefix is given in the property name, such as 'form.', it is assumed the property is contained on the collection line. In this case the binding path to the collection line will be appended. In other cases, it is assumed the property is a list or set of String that will hold the selected identifier strings

      This property is not required. If not the set the framework will use a property contained on UifFormBase

      Returns:
      property name for select field
    • setLineSelectPropertyName

      void setLineSelectPropertyName(String lineSelectPropertyName)
      Setter for the property name that will bind to the select field
      Parameters:
      lineSelectPropertyName -
    • getCollectionLookup

      QuickFinder getCollectionLookup()
      Instance of the QuickFinder widget that configures a multi-value lookup for the collection

      If the collection lookup is enabled (by the render property of the quick finder), getCollectionObjectClass() will be used as the data object class for the lookup (if not set). Field conversions need to be set as usual and will be applied for each line returned

      Returns:
      instance configured for the collection lookup
    • setCollectionLookup

      void setCollectionLookup(QuickFinder collectionLookup)
      Setter for the collection lookup quickfinder instance
      Parameters:
      collectionLookup -
    • isShowInactiveLines

      boolean isShowInactiveLines()
      Indicates whether inactive collections lines should be displayed

      Setting only applies when the collection line type implements the Inactivatable interface. If true and showInactive is set to false, the collection will be filtered to remove any items whose active status returns false

      Returns:
      true to show inactive records, false to not render inactive records
    • setShowInactiveLines

      void setShowInactiveLines(boolean showInactiveLines)
      Setter for the show inactive indicator
      Parameters:
      showInactiveLines - boolean show inactive
    • getActiveCollectionFilter

      CollectionFilter getActiveCollectionFilter()
      Collection filter instance for filtering the collection data when the showInactive flag is set to false
      Returns:
      CollectionFilter
    • setActiveCollectionFilter

      void setActiveCollectionFilter(CollectionFilter activeCollectionFilter)
      Setter for the collection filter to use for filter inactive records from the collection
      Parameters:
      activeCollectionFilter - CollectionFilter instance
    • getFilters

      List<CollectionFilter> getFilters()
      List of CollectionFilter instances that should be invoked to filter the collection before displaying
      Returns:
      List<CollectionFilter>
    • setFilters

      void setFilters(List<CollectionFilter> filters)
      Setter for the List of collection filters for which the collection will be filtered against
    • getDuplicateLinePropertyNames

      List<String> getDuplicateLinePropertyNames()
      List of property names that should be checked for duplicates in the collection.
      Returns:
      the list of property names that should be checked for duplicates in the collection
    • setDuplicateLinePropertyNames

      void setDuplicateLinePropertyNames(List<String> duplicateLinePropertyNames)
      See Also:
    • getUnauthorizedLineBindingInfos

      List<BindingInfo> getUnauthorizedLineBindingInfos()
      List of BindingInfo instances that represent lines not authorized to be viewed or edited by the user.
    • setUnauthorizedLineBindingInfos

      void setUnauthorizedLineBindingInfos(List<BindingInfo> unauthorizedLineBindingInfos)
      See Also:
    • getSubCollections

      List<CollectionGroup> getSubCollections()
      List of CollectionGroup instances that are sub-collections of the collection represented by this collection group
      Returns:
      sub collections
    • setSubCollections

      void setSubCollections(List<CollectionGroup> subCollections)
      Setter for the sub collection list
    • getCollectionGroupSecurity

      CollectionGroupSecurity getCollectionGroupSecurity()
      Collection Security object that indicates what authorization (permissions) exist for the collection
      Returns:
      CollectionGroupSecurity instance
    • setComponentSecurity

      void setComponentSecurity(ComponentSecurity componentSecurity)
      Override to assert a CollectionGroupSecurity instance is set
      Specified by:
      setComponentSecurity in interface Component
      Parameters:
      componentSecurity - instance of CollectionGroupSecurity
    • isEditLineAuthz

      boolean isEditLineAuthz()
      See Also:
    • setEditLineAuthz

      void setEditLineAuthz(boolean editLineAuthz)
      See Also:
    • isViewLineAuthz

      boolean isViewLineAuthz()
      See Also:
    • setViewLineAuthz

      void setViewLineAuthz(boolean viewLineAuthz)
      See Also:
    • getCollectionGroupBuilder

      CollectionGroupBuilder getCollectionGroupBuilder()
      CollectionGroupBuilder instance that will build the components dynamically for the collection instance
      Returns:
      CollectionGroupBuilder instance
    • setCollectionGroupBuilder

      void setCollectionGroupBuilder(CollectionGroupBuilder collectionGroupBuilder)
      Setter for the collection group building instance
      Parameters:
      collectionGroupBuilder -
    • setRenderInactiveToggleButton

      void setRenderInactiveToggleButton(boolean renderInactiveToggleButton)
      Parameters:
      renderInactiveToggleButton - the showHideInactiveButton to set
    • isRenderInactiveToggleButton

      boolean isRenderInactiveToggleButton()
      Returns:
      the showHideInactiveButton
    • getDisplayCollectionSize

      int getDisplayCollectionSize()
      The number of records to display for a collection
      Returns:
      int
    • setDisplayCollectionSize

      void setDisplayCollectionSize(int displayCollectionSize)
      Setter for the display collection size
      Parameters:
      displayCollectionSize -
    • isHighlightNewItems

      boolean isHighlightNewItems()
      Indicates whether new items should be styled with the #newItemsCssClass
      Returns:
      true if new items must be highlighted
    • setHighlightNewItems

      void setHighlightNewItems(boolean highlightNewItems)
      Setter for the flag that allows for different styling of new items
      Parameters:
      highlightNewItems -
    • getNewItemsCssClass

      String getNewItemsCssClass()
      The css style class that will be added on new items
      Returns:
      the new items css style class
    • setNewItemsCssClass

      void setNewItemsCssClass(String newItemsCssClass)
      Setter for the new items css style class
      Parameters:
      newItemsCssClass -
    • getAddItemCssClass

      String getAddItemCssClass()
      The css style class that will be added on the add item group or row
      Returns:
      the add item group or row css style class
    • setAddItemCssClass

      void setAddItemCssClass(String addItemCssClass)
      Setter for the add item css style class
      Parameters:
      addItemCssClass -
    • isHighlightAddItem

      boolean isHighlightAddItem()
      Indicates whether the add item group or row should be styled with the #addItemCssClass
      Returns:
      true if add item group or row must be highlighted
    • setHighlightAddItem

      void setHighlightAddItem(boolean highlightAddItem)
      Setter for the flag that allows for different styling of the add item group or row
      Parameters:
      highlightAddItem -
    • isRenderAddBlankLineButton

      boolean isRenderAddBlankLineButton()
      Indicates that a button will be rendered that allows the user to add blank lines to the collection

      The button will be added separately from the collection items. The default add line wil not be rendered. The action of the button will call the controller, add the blank line to the collection and do a component refresh.

      Returns:
      boolean
    • setRenderAddBlankLineButton

      void setRenderAddBlankLineButton(boolean renderAddBlankLineButton)
      Setter for the flag indicating that the add blank line button must be rendered
      Parameters:
      renderAddBlankLineButton -
    • getAddBlankLineAction

      Action getAddBlankLineAction()
      The add blank line Action field rendered when renderAddBlankLineButton is true
      Returns:
      boolean
    • setAddBlankLineAction

      void setAddBlankLineAction(Action addBlankLineAction)
      Setter for the add blank line Action field
      Parameters:
      addBlankLineAction -
    • getAddLinePlacement

      String getAddLinePlacement()
      Indicates the add line placement

      Valid values are 'TOP' or 'BOTTOM'. The default is 'TOP'. When the value is 'BOTTOM' the blank line will be added to the end of the collection.

      Returns:
      the add blank line action placement
    • setAddLinePlacement

      void setAddLinePlacement(String addLinePlacement)
      Setter for the add line placement
      Parameters:
      addLinePlacement - add line placement string
    • isRenderSaveLineActions

      boolean isRenderSaveLineActions()
      Indicates whether the save line actions should be rendered
      Returns:
      boolean
    • setRenderSaveLineActions

      void setRenderSaveLineActions(boolean renderSaveLineActions)
      Setter for the flag indicating whether the save actions should be rendered
      Parameters:
      renderSaveLineActions -
    • isAddWithDialog

      boolean isAddWithDialog()
      Indicates that a add action should be rendered and that the add group be displayed in a model dialog.
      Returns:
      boolean true if add should be through model dialog, false if not
    • setAddWithDialog

      void setAddWithDialog(boolean addWithDialog)
      See Also:
    • getAddWithDialogAction

      Action getAddWithDialogAction()
      The Action that will be displayed that will open the add line group in a dialog.
      Returns:
      Action
    • setAddWithDialogAction

      void setAddWithDialogAction(Action addViaLightBoxAction)
      See Also:
    • getAddLineDialog

      DialogGroup getAddLineDialog()
      Dialog group to use for the add line when isAddWithDialog() is true.

      If dialog group is not set by add with dialog is true, a default dialog group will be created.

      The add line items and actions are still used as usual, unless the items and footer items have been explicity set in the dialog group

      Returns:
      dialog group instance for add line
    • setAddLineDialog

      void setAddLineDialog(DialogGroup addLineDialog)
      See Also:
    • isUseServerPaging

      boolean isUseServerPaging()
      Gets useServerPaging, the flag that indicates whether server side paging is enabled. Defaults to false.
      Returns:
      true if server side paging is enabled.
    • setUseServerPaging

      void setUseServerPaging(boolean useServerPaging)
      Sets useServerPaging, the flag indicating whether server side paging is enabled.
      Parameters:
      useServerPaging - the useServerPaging value to set
    • getPageSize

      int getPageSize()
    • setPageSize

      void setPageSize(int pageSize)
    • getDisplayStart

      int getDisplayStart()
      Gets the displayStart, the index of the first item to display on the page (assuming useServerPaging is enabled).

      if this field has not been set, the returned value will be -1

      Returns:
      the index of the first item to display, or -1 if unset
    • setDisplayStart

      void setDisplayStart(int displayStart)
      Sets the displayStart, the index of the first item to display on the page (assuming useServerPaging is enabled).
      Parameters:
      displayStart - the displayStart to set
    • getDisplayLength

      int getDisplayLength()
      Gets the displayLength, the number of items to display on the page (assuming useServerPaging is enabled).

      if this field has not been set, the returned value will be -1

      Returns:
      the number of items to display on the page, or -1 if unset
    • setDisplayLength

      void setDisplayLength(int displayLength)
      Sets the displayLength, the number of items to display on the page (assuming useServerPaging is enabled).
      Parameters:
      displayLength - the displayLength to set
    • getFilteredCollectionSize

      int getFilteredCollectionSize()
      Gets the number of un-filtered elements from the model collection.

      if this field has not been set, the returned value will be -1

      Returns:
      the filtered collection size, or -1 if unset
    • setFilteredCollectionSize

      void setFilteredCollectionSize(int filteredCollectionSize)
      Sets the number of un-filtered elements from the model collection.

      This value is used for display and rendering purposes, it has no effect on the model collection

      Parameters:
      filteredCollectionSize - the filtered collection size
    • completeValidation

      void completeValidation(ValidationTrace tracer)
      Description copied from interface: Component
      Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.
      Specified by:
      completeValidation in interface Component
      Parameters:
      tracer - Record of component's location
      See Also:
    • isEditWithDialog

      boolean isEditWithDialog()
      Indicates that an edit action should be rendered and that the edit group be displayed in a model dialog.
      Returns:
      boolean true if edit should be through model dialog, false if not
    • setEditWithDialog

      void setEditWithDialog(boolean editWithDialog)
      See Also:
    • isCustomEditLineDialog

      boolean isCustomEditLineDialog()
      Indicates that a custom edit line dialog is provided by the user.
      Returns:
      boolean true if custom edit line dialog
    • setCustomEditLineDialog

      void setCustomEditLineDialog(boolean customEditLineDialog)
      See Also:
    • getEditLineDialogPrototype

      DialogGroup getEditLineDialogPrototype()
      Dialog group prototype to use to create the edit line dialog when isEditWithDialog() is true.

      If not specified a default prototype edit line dialog will be created with the items from the collection.

      Returns:
      dialog group prototype for edit line
    • setEditLineDialogPrototype

      void setEditLineDialogPrototype(DialogGroup editLineDialogPrototype)
      See Also:
    • getEditWithDialogActionPrototype

      Action getEditWithDialogActionPrototype()
      The Action that will be displayed that will open the edit line group in a dialog.
      Returns:
      Action
    • setEditWithDialogActionPrototype

      void setEditWithDialogActionPrototype(Action editWithDialogActionPrototype)
      See Also:
    • getEditInDialogSaveActionPrototype

      Action getEditInDialogSaveActionPrototype()
      The Action that will be displayed within the edit line group in a dialog.
      Returns:
      Action
    • setEditInDialogSaveActionPrototype

      void setEditInDialogSaveActionPrototype(Action editInDialogSaveActionPrototype)
      See Also:
    • getLineDialogs

      List<DialogGroup> getLineDialogs()
      List of dialog groups that are configured for a line in the collection.
      Returns:
      list of dialog group instances
    • setLineDialogs

      void setLineDialogs(List<DialogGroup> dialogGroups)
      See Also: