Class DataCollectionUtils

java.lang.Object
overit.geocallapp.wfm.mobileforms.bl.utils.DataCollectionUtils

public class DataCollectionUtils extends Object
Since:
12.0
  • Field Details

  • Method Details

    • isSheetInFinalState

      public static boolean isSheetInFinalState(Long sheetState)
      Checks if is sheet in final state.
      Parameters:
      sheetState - the sheet state
      Returns:
      true, if is sheet in final state
    • getNodeDescriptionPath

      public static String getNodeDescriptionPath(AbstractTreeModel<DataCollectionNode,?> treeModelNode)
      Returns the node description path.
      Parameters:
      treeModelNode - the tree model node
      Returns:
      the node description path
    • getNodeDescriptionPath

      public static String getNodeDescriptionPath(AbstractTreeModel<DataCollectionNode,?> treeModelNode, String pathDelimiter)
      Returns the node description path.
      Parameters:
      treeModelNode - the tree model node
      pathDelimiter - the path delimiter
      Returns:
      the node description path
    • getExpressionNodesInEvaluationOrder

      public static List<DataCollectionEntityExpressions> getExpressionNodesInEvaluationOrder(AbstractTreeModel<DataCollectionNode,?> treeModel)
      Returns all expression nodes (including child expressions) in evaluation order. This includes both DataCollectionNode instances and child expressions (e.g., DataCollectionNodeSelectionOption). All expressions are sorted globally by their evaluation order.
      Parameters:
      treeModel - the tree model
      Returns:
      a list of DataCollectionEntityExpressions sorted by evaluation order
      See Also:
    • isSheetEditable

      public static boolean isSheetEditable(Long sheetState)
      Checks if is sheet editable.
      Parameters:
      sheetState - the sheet state
      Returns:
      true, if is sheet editable
    • getStringContentFromUpFile

      public static String getStringContentFromUpFile(UpFile upFile) throws DAValidateException
      Returns the string content, reading from the given upfile.
      Parameters:
      upFile - the upFile
      Returns:
      the string content
      Throws:
      DAValidateException
    • buildValidityRange

      public static DateTimeRange buildValidityRange(Date offsetReferenceDate, int dayMinOffset, int dayMaxOffset, int hourMinOffset, int hourMaxOffset)
      Builds a validity range based on the provided offsets and reference date.
      Parameters:
      offsetReferenceDate - the reference date to start from
      dayMinOffset - the minimum number of days to subtract (can be negative)
      dayMaxOffset - the maximum number of days to add (can be negative)
      hourMinOffset - the minimum number of hours to subtract (can be negative)
      hourMaxOffset - the maximum number of hours to add (can be negative)
      Returns:
      the validity range