Package com._1c.g5.v8.dt.md
Enum Class FieldsSourceUtil
- All Implemented Interfaces:
Serializable
,Comparable<FieldsSourceUtil>
,Constable
Field source util for fields.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetAllFieldsOf
(org.eclipse.emf.ecore.EObject eObject) For aConstant
eObject
returns all the self-fields of all the constants in the configuration, i.e. fields provided byFieldSource
.getCharacteristicsTypesFields
(Field field, List<Field> characteristicFields) Returns fields from characteristic fields those type contains catalog or characteristic types ref type from selected field.getDataPathFields
(MdObject characteristicTypes) Gets possible values for data path field ofCharacteristicsDescription
getDefaultDataPathField
(MdObject characteristicTypes) Gets default value for data pathCharacteristicsDescription
fieldgetDefaultKeyField
(MdObject characteristicTypes) Returns characteristic description key field default value.getDefaultObjectField
(MdObject characteristicValues, MdObject mdObject) Returns characteristic description object field default value for selected md-object.getDefaultTypeField
(MdObject characteristicValues, Field field) Returns characteristic description type field default value for selected field types.getDynamicDataPathFields
(CharacteristicsDescription description) Gets all dynamic fields allowed in data path field ofCharacteristicsDescription
getKeyFields
(MdObject characteristicTypes) Returns characteristic description key field availaible values.getObjectFields
(MdObject characteristicValues, MdObject mdObject) Returns characteristic description object field availaible values for selected md-object.getTypeFields
(MdObject characteristicValues, Field field) Returns characteristic description type field availaible values for selected field types.getTypeFields
(org.eclipse.emf.ecore.EObject eObject) Gets field source type fields.getTypesFilterFields
(MdObject characteristicTypes) Returns characteristic description types filter field availaible values.getUseMultipleValuesFields
(MdObject characteristicTypes) Returns characteristic description use multiple values field availaible values.getValueFields
(MdObject characteristicValues) Returns characteristic description value field availaible values.boolean
hasFieldForCharacteristicsTypes
(Field field, List<Field> characteristicFields) Checks is characteristic fields has field those type contains catalog or characteristic types ref type from selected field.boolean
Checks, if field source types containsSourceType.CHARACTERISTIC_KIND
and field type containsCatalog
,ChartOfCharacteristicTypes
,Table
reference type.boolean
isFieldContainsMdObjectRefType
(MdObject mdObject, Field field) Checks, if field availables for md-object.boolean
isFieldContainsTypeNameType
(String typeName, Field field) Checks, if field availables for md-object.static FieldsSourceUtil
Returns the enum constant of this class with the specified name.static FieldsSourceUtil[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getFields
public Collection<Field> getFields(Object inputElement, com.google.common.base.Predicate<Field> predicate) ForinputElement
that is aFieldSource
returns its fields filtered bypredicate
. For others returns an empty collection.- Parameters:
inputElement
- the field sourcepredicate
- a filter
-
getAllFieldsOf
For aConstant
eObject
returns all the self-fields of all the constants in the configuration, i.e. fields provided byFieldSource
.For
BasicFeature
s orStandardAttribute
s returns self-fields ofeObject
s container. If containerBasicTabularSection
orStandardTabularSectionDescription
also adds all self-fields of grandparent container.For
CommonAttribute
s returns an empty collection.For all the others returns self-fields of the given
eObject
.- Parameters:
eObject
- the field sources- Returns:
- self fields
-
getTypeFields
Gets field source type fields.- Parameters:
context
- the field source- Returns:
- type fields
-
getDefaultTypeField
Returns characteristic description type field default value for selected field types.- Parameters:
characteristicValues
- the characteristic description characteristic values, can benull
field
- the field, can benull
- Returns:
- the field availaible values, cannot be
null
-
getDefaultKeyField
Returns characteristic description key field default value.- Parameters:
characteristicTypes
- the characteristic description characteristic types, can benull
- Returns:
- the field default value or
null
-
getDefaultDataPathField
Gets default value for data pathCharacteristicsDescription
field- Parameters:
characteristicTypes
-CharacteristicsDescription.getCharacteristicTypes()
value, cannot benull
- Returns:
- default value for data path
CharacteristicsDescription
field, can benull
if fields was not found
-
getDefaultObjectField
Returns characteristic description object field default value for selected md-object.- Parameters:
characteristicValues
- the characteristic description characteristic values, can benull
mdObject
- the md-object, cannot benull
- Returns:
- the field default value or
null
-
getValueFields
Returns characteristic description value field availaible values.- Parameters:
characteristicValues
- the characteristic description characteristic values, can benull
- Returns:
- the field availaible values, cannot be
null
-
getTypeFields
Returns characteristic description type field availaible values for selected field types.- Parameters:
characteristicValues
- the characteristic description characteristic values, can benull
field
- the field, can benull
- Returns:
- the field availaible values, cannot be
null
-
getCharacteristicsTypesFields
Returns fields from characteristic fields those type contains catalog or characteristic types ref type from selected field.- Parameters:
field
- the selected field, cannot benull
characteristicFields
- , the characteristic fields collection, cannot benull
- Returns:
true
if has
-
getObjectFields
Returns characteristic description object field availaible values for selected md-object.- Parameters:
characteristicValues
- the characteristic description characteristic values, can benull
mdObject
- the md-object, cannot benull
- Returns:
- the field availaible values, cannot be
null
-
getTypesFilterFields
Returns characteristic description types filter field availaible values.- Parameters:
characteristicTypes
- the characteristic description characteristic types, can benull
- Returns:
- the field availaible values, cannot be
null
-
getKeyFields
Returns characteristic description key field availaible values.- Parameters:
characteristicTypes
- the characteristic description characteristic types, can benull
- Returns:
- the field availaible values, cannot be
null
-
getDataPathFields
Gets possible values for data path field ofCharacteristicsDescription
- Parameters:
characteristicTypes
-CharacteristicsDescription.getCharacteristicTypes()
value, cannot benull
- Returns:
- collection pair of string - the first value of pair is possible value for data path field, the second value of pair
is data path value localized to Russian language, never
null
-
getDynamicDataPathFields
Gets all dynamic fields allowed in data path field ofCharacteristicsDescription
- Parameters:
description
-CharacteristicsDescription
for getting dynamic data path field, cannot benull
- Returns:
- all dynamic fields allowed in data path field of
CharacteristicsDescription
, nevernull
-
hasFieldForCharacteristicsTypes
Checks is characteristic fields has field those type contains catalog or characteristic types ref type from selected field.- Parameters:
field
- the selected field, cannot benull
characteristicFields
- , the characteristic fields collection, cannot benull
- Returns:
true
if has
-
isCharacteristicKindRefefenceField
Checks, if field source types containsSourceType.CHARACTERISTIC_KIND
and field type containsCatalog
,ChartOfCharacteristicTypes
,Table
reference type.- Parameters:
field
- the field, cannot benull
- Returns:
true
if is
-
isFieldContainsTypeNameType
Checks, if field availables for md-object.- Parameters:
typeName
- the type name, cannot benull
field
- the field, cannot benull
- Returns:
true
if contains
-
isFieldContainsMdObjectRefType
Checks, if field availables for md-object.- Parameters:
mdObject
- the md-object, cannot benull
field
- the field, cannot benull
- Returns:
true
is available
-
getUseMultipleValuesFields
Returns characteristic description use multiple values field availaible values.- Parameters:
characteristicTypes
- the characteristic description characteristic types, may benull
- Returns:
- the availaible values, never be
null
-