Class DataCollectionUtils
java.lang.Object
overit.geocallapp.wfm.mobileforms.bl.utils.DataCollectionUtils
The Class that defines the data collection utils.
Permission:
- Since:
- 12.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic DateTimeRangebuildValidityRange(Date offsetReferenceDate, int dayMinOffset, int dayMaxOffset, int hourMinOffset, int hourMaxOffset) Builds a validity range based on the provided offsets and reference date.static List<DataCollectionEntityExpressions> Returns all expression nodes (including child expressions) in evaluation order.static StringgetNodeDescriptionPath(AbstractTreeModel<DataCollectionNode, ?> treeModelNode) Returns the node description path.static StringgetNodeDescriptionPath(AbstractTreeModel<DataCollectionNode, ?> treeModelNode, String pathDelimiter) Returns the node description path.static StringgetStringContentFromUpFile(UpFile upFile) Returns the string content, reading from the given upfile.static booleanisSheetEditable(Long sheetState) Checks if is sheet editable.static booleanisSheetInFinalState(Long sheetState) Checks if is sheet in final state.
-
Field Details
-
DATA_COLLECTION_ATTACHMENT_PATH
- See Also:
-
DATA_COLLECTION_ATTACHMENT_SHEET_FOLDER
- See Also:
-
DATA_COLLECTION_ATTACHMENT_TEMPLATE_FOLDER
- See Also:
-
PATH_DESCRIPTION_DELIMITER
- See Also:
-
-
Method Details
-
isSheetInFinalState
Checks if is sheet in final state.- Parameters:
sheetState- the sheet state- Returns:
- true, if is sheet in final state
-
getNodeDescriptionPath
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 nodepathDelimiter- 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
Checks if is sheet editable.- Parameters:
sheetState- the sheet state- Returns:
- true, if is sheet editable
-
getStringContentFromUpFile
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 fromdayMinOffset- 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
-