Class XItemConditionProcessor

java.lang.Object
de.xima.fc.form.common.condition.XItemConditionProcessor

public class XItemConditionProcessor extends Object
Wrapper to check evaluate the render and read-only conditions of items. Note that when a parent is read-only / not rendered, all children are also read-only / not rendered. This is taken care of by this class, the methods isItemReadOnly(XItem) and isItemRenderable(XItem) take into account the item and all its parents.

Note: you must not call isItemReadOnly(XItem) and isItemRenderable(XItem) with any item that is not included in the form passed to the constructor.

Author:
XIMA MEDIA GmbH
  • Constructor Details

    • XItemConditionProcessor

      public XItemConditionProcessor()
      Creates a new item conditions processor without any conditions.
    • XItemConditionProcessor

      public XItemConditionProcessor(IXForm form, XItemConditionsWrapper conditionsWrapper)
      Parameters:
      form - The form with all items.
      conditionsWrapper - Conditions indicating whether the items are read-only / not rendered.
  • Method Details

    • isItemReadOnly

      public boolean isItemReadOnly(IXItemPropertiesData item)
      Parameters:
      item - The item to check.
      Returns:
      true when the given item is set to read-only (cannot be edited), or false otherwise.
    • isItemReadOnly

      @Deprecated public boolean isItemReadOnly(XItem item)
      Parameters:
      item - The item to check.
      Returns:
      true when the given item is set to read-only (cannot be edited), or false otherwise.
    • isItemRenderable

      public boolean isItemRenderable(IXItemPropertiesData item)
      Parameters:
      item - The item to check.
      Returns:
      true when the given item is allowed to be rendered, or false otherwise.
    • isItemRenderable

      @Deprecated public boolean isItemRenderable(XItem item)
      Parameters:
      item - The item to check.
      Returns:
      true when the given item is allowed to be rendered, or false otherwise.