Class 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 Detail

      • 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 Detail

      • isItemReadOnly

        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​(XItem item)
        Parameters:
        item - The item to check.
        Returns:
        true when the given item is allowed to be rendered, or false otherwise.