Package com._1c.g5.v8.dt.form.util
Class DatapathUtil
java.lang.Object
com._1c.g5.v8.dt.form.util.DatapathUtil
The utility class for a data path object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AbstractDataPathReturnsTableHolder's parent path for auto-table which has no data path itself (e.g.static AbstractDataPathgetDataPathForCurrentScriptVariant(AbstractDataPath sourceDataPath, Form form, ScriptVariant scriptVariant, IDataSourceInfoAssociationService associationService) static Integer[]Gets indexes data for segmentsstatic booleanhasIndex(AbstractDataPath path) The method checks aAbstractDataPathcontains indexes datastatic booleanChecks the data path is a data path of form elementstatic booleanisEqualDataPath(AbstractDataPath path1, AbstractDataPath path2) Compares twoAbstractDataPathobject each other.static booleanCompares twoAbstractFormDataSource#getDataPath(ScriptVariant)object each other.static voidsetIndexForSegment(AbstractDataPath path, Integer[] indexes) Sets indexes data for segments of the data pathstatic booleanstartsWith(AbstractDataPath verifiable, AbstractDataPath prefix) Tests if the verifiable data path starts with the specified prefix data path.
-
Constructor Details
-
DatapathUtil
public DatapathUtil()
-
-
Method Details
-
isEqualDataPath
Compares twoAbstractDataPathobject each other. The result istrueif and only if they represents the same sequence of segments.- Parameters:
path1- - a first pathpath2- - a second path- Returns:
trueif the given paths represents the same sequence of segments,falseotherwise.- Throws:
NullPointerException- in case one from the specified paths isnull
-
isEqualDataPath
public static boolean isEqualDataPath(AbstractFormDataSourceInfo info1, AbstractFormDataSourceInfo info2) Compares twoAbstractFormDataSource#getDataPath(ScriptVariant)object each other.- Parameters:
info1- the first property infoinfo2- the second property info- Returns:
trueif the given paths represents the same sequence of segments,falseotherwise.- Throws:
NullPointerException- in case one from the specified paths isnull
-
startsWith
Tests if the verifiable data path starts with the specified prefix data path.- Parameters:
verifiable- the verifiableprefix- the prefix- Returns:
trueif the verifiable data path starts with a prefix data path;falseotherwise.
-
isElementDataPath
Checks the data path is a data path of form element- Parameters:
path- the data path- Returns:
- return
trueif is data path of form element.
-
hasIndex
The method checks aAbstractDataPathcontains indexes data- Parameters:
path- the checking path- Returns:
trueif path contains any indexes data;falsethe otherways
-
getIndexForSegment
Gets indexes data for segments- Parameters:
path- the path for gets indexes data- Returns:
- returns the array with values of indexes for the corresponding segments.
Length of returning array equals size of path segments.
If segments not contains index then array value equals
null
-
setIndexForSegment
Sets indexes data for segments of the data pathImportant: the indexes will be set to current data path, do not forget using the copy data path. </p
- Parameters:
path- the data path to which it will be set indexes.indexes- the setting indexes- See Also:
-
EcoreUtil.copy(org.eclipse.emf.ecore.EObject)
-
getDataPathForCurrentScriptVariant
public static AbstractDataPath getDataPathForCurrentScriptVariant(AbstractDataPath sourceDataPath, Form form, ScriptVariant scriptVariant, IDataSourceInfoAssociationService associationService) -
getDataPathForAutoTable
ReturnsTableHolder's parent path for auto-table which has no data path itself (e.g. GanttChart's embedded table in 8.3.21+)- Parameters:
item- the auto-table candidate, cannot benull- Returns:
- path of the parent of
TableHolder, can benull
-