Package com._1c.g5.v8.dt.dcs.dataset
Class DataSetWrapperBase<T extends DataSet>
java.lang.Object
com._1c.g5.v8.dt.dcs.dataset.DataSetWrapperBase<T>
- All Implemented Interfaces:
IDataSetWrapper
- Direct Known Subclasses:
DataSetsWrapperBase
,EmptyQueryDataSetWrapperBase
public abstract class DataSetWrapperBase<T extends DataSet>
extends Object
implements IDataSetWrapper
Base implementation of
IDataSetWrapper
-
Nested Class Summary
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.dcs.dataset.IDataSetWrapper
IDataSetWrapper.FieldRestriction, IDataSetWrapper.FieldSynonym
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final T
protected DataSetsFieldsTree
protected Map<DataSetField,
IDataSetFieldsWrapper> protected Map<String,
IDataSetFieldsWrapper> protected final boolean
protected Map<String,
IDataSetWrapper.FieldSynonym> protected Map<String,
IDataSetWrapper.FieldRestriction> protected Map<String,
IDataSetWrapper.FieldRestriction> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DataSetWrapperBase
(T dataSet, boolean isDynamicList) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addField
(DataSetField currentField, DataSetField dataSetField) Add fieldprotected void
addFieldWrapper
(IDataSetFieldsWrapper fieldWrapper) Add field wrapperprotected IDataSetFieldsWrapper
createFieldWrapper
(DataSetField field) Create field wrappercreatePath
(String path) Create path from stringfillDataSetFields
(List<DcsDataSetInfoAvailableFieldInfo> avialableFields) FillsDataSet.getFields()
fromDcsDataSetInfoAvailableFieldInfo
fieldsprotected void
fillFieldsWrappers
(List<DataSetField> fields) Fills wrapper fieldsgetAncestorField
(DataSetField field) Get ancestor for fieldgetChildFields
(DataSetField parentField) Get child fields or root fieldsGet fieldgetFieldName
(DataSetField field) Get 'Field' property of fieldgetFieldParentPath
(DataSetField field) Get path of field parentgetFieldPath
(DataSetField field) Get 'Data path' property of fieldGet fields wrappersgetFieldSynonym
(String path) Get field synonymgetFieldUseRestriction
(String path) Get field use restrictionGet field visibility restrictionvoid
init()
Initializevoid
moveField
(DataSetField field, String parentPathNew) Move fieldMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com._1c.g5.v8.dt.dcs.dataset.IDataSetWrapper
copyField, getCurrentAlias, getCurrentLanguageCode, removeField, setFieldAttrUseRestiction, setFieldName, setFieldPath, setFieldTitle, setFieldUseRestiction
-
Field Details
-
dataSet
-
isDynamicList
protected final boolean isDynamicList -
fieldsTree
-
fieldsWrappers
-
fieldsWrappersByName
-
synonyms
-
useRestrictions
-
visibilityRestrictions
-
-
Constructor Details
-
DataSetWrapperBase
Constructor- Parameters:
dataSet
- wrapsDataSet
, can't benull
isDynamicList
-true
if dynamic list context,false
otherwise
-
-
Method Details
-
init
public void init()Description copied from interface:IDataSetWrapper
Initialize- Specified by:
init
in interfaceIDataSetWrapper
-
addField
Description copied from interface:IDataSetWrapper
Add field- Specified by:
addField
in interfaceIDataSetWrapper
- Parameters:
currentField
- current field, can benull
dataSetField
- field, can't benull
- Throws:
DcsPathException
-
fillDataSetFields
public V8Commands.CompoundV8Command fillDataSetFields(List<DcsDataSetInfoAvailableFieldInfo> avialableFields) FillsDataSet.getFields()
fromDcsDataSetInfoAvailableFieldInfo
fields- Parameters:
avialableFields
-DcsDataSetInfoAvailableFieldInfo
fields for creating DataSetField by them, can't benull
- Returns:
V8Commands.CompoundV8Command
with information of changing ofDataSet
, nevernull
-
moveField
Description copied from interface:IDataSetWrapper
Move field- Specified by:
moveField
in interfaceIDataSetWrapper
- Parameters:
field
- field, can't benull
parentPathNew
- destination folder path ornull
(empty) for root
-
getFieldsWrappers
Description copied from interface:IDataSetWrapper
Get fields wrappers- Specified by:
getFieldsWrappers
in interfaceIDataSetWrapper
- Returns:
- collection of fields wrappers, never
null
-
getChildFields
Description copied from interface:IDataSetWrapper
Get child fields or root fields- Specified by:
getChildFields
in interfaceIDataSetWrapper
- Parameters:
parentField
- parent field, can't benull
- Returns:
- list of fields, never
null
-
getFieldName
Description copied from interface:IDataSetWrapper
Get 'Field' property of field- Specified by:
getFieldName
in interfaceIDataSetWrapper
- Parameters:
field
- field, can't benull
- Returns:
- value of 'Field' property
name from source, never
null
, empty for folder
-
getFieldParentPath
Description copied from interface:IDataSetWrapper
Get path of field parent- Specified by:
getFieldParentPath
in interfaceIDataSetWrapper
- Parameters:
field
- field, can't benull
- Returns:
- path of field parent, can be
null
-
getAncestorField
Description copied from interface:IDataSetWrapper
Get ancestor for field- Specified by:
getAncestorField
in interfaceIDataSetWrapper
- Parameters:
field
- field, can't benull
- Returns:
- ancestor if exists or
null
-
getFieldSynonym
Description copied from interface:IDataSetWrapper
Get field synonym- Specified by:
getFieldSynonym
in interfaceIDataSetWrapper
- Parameters:
path
- path of field, can't benull
- Returns:
- synonym or
null
-
getFieldUseRestriction
Description copied from interface:IDataSetWrapper
Get field use restriction- Specified by:
getFieldUseRestriction
in interfaceIDataSetWrapper
- Parameters:
path
- path of field, can't benull
- Returns:
- restriction or
null
-
getFieldVisibilityRestriction
Description copied from interface:IDataSetWrapper
Get field visibility restriction- Specified by:
getFieldVisibilityRestriction
in interfaceIDataSetWrapper
- Parameters:
path
- path of field, can't benull
- Returns:
- restriction or
null
if no restrictions present
-
getField
Description copied from interface:IDataSetWrapper
Get field- Specified by:
getField
in interfaceIDataSetWrapper
- Parameters:
path
- field path, can't benull
- Returns:
- field or
null
if field not found
-
getFieldPath
Description copied from interface:IDataSetWrapper
Get 'Data path' property of field- Specified by:
getFieldPath
in interfaceIDataSetWrapper
- Parameters:
field
- field, can't benull
- Returns:
- value of 'Data path' property, never
null
-
createPath
Description copied from interface:IDataSetWrapper
Create path from string- Specified by:
createPath
in interfaceIDataSetWrapper
- Parameters:
path
- string path, nevernull
- Returns:
- DCS path, never
null
- Throws:
IDataSetFieldsWrapper.FieldRenameException
- if path is not valid
-
createFieldWrapper
Create field wrapper- Parameters:
field
- field, can't benull
- Returns:
- wrapper or
null
if field type unknown
-
fillFieldsWrappers
Fills wrapper fields- Parameters:
fields
- fields for wrapping, can't benull
-
addFieldWrapper
Add field wrapper- Parameters:
fieldWrapper
- wrapper, can't benull
-