Class ItemState

java.lang.Object
io.dialob.session.engine.session.model.ItemState
All Implemented Interfaces:
SessionObject, Serializable

public class ItemState extends Object implements SessionObject
See Also:
  • Constructor Details

  • Method Details

    • setBits

      protected void setBits(boolean toValue, int bit)
    • setBits

      protected void setBits(int bit)
    • resetBits

      protected void resetBits(int bit)
    • isBit

      protected boolean isBit(int bit)
    • readFrom

      public static ItemState readFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Throws:
      IOException
    • getId

      @NonNull public ItemId getId()
      Specified by:
      getId in interface SessionObject
    • getPrototypeId

      @Nullable public ItemId getPrototypeId()
    • getType

      @NonNull public String getType()
    • getView

      @Nullable public String getView()
    • isDisplayItem

      public boolean isDisplayItem()
      Specified by:
      isDisplayItem in interface SessionObject
      Returns:
      true if item is not variable or something similar that will not be shown to user.
    • getValueSetId

      public Optional<String> getValueSetId()
    • getValue

      public Object getValue()
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface SessionObject
      Returns:
      true when item is relevant to questionnaire.
    • isAnswered

      public boolean isAnswered()
    • isBlank

      public boolean isBlank()
    • isNull

      public boolean isNull()
    • isInvalidAnswers

      public boolean isInvalidAnswers()
    • isInvalid

      public boolean isInvalid()
    • isDisabled

      public boolean isDisabled()
      Specified by:
      isDisabled in interface SessionObject
      Returns:
      true if item should not be shown to user
    • isRequired

      public boolean isRequired()
    • isRowsCanBeAdded

      public boolean isRowsCanBeAdded()
    • isRowCanBeRemoved

      public boolean isRowCanBeRemoved()
    • hasCustomProps

      public boolean hasCustomProps()
    • getItems

      @NonNull public List<ItemId> getItems()
    • getActivePage

      public Optional<ItemId> getActivePage()
    • withId

      @NonNull public ItemState withId(@NonNull ItemId newId)
    • update

      public ItemState.UpdateBuilder update()