Class FormAttributeManagementService
- java.lang.Object
-
- com._1c.g5.v8.dt.form.service.attribute.FormAttributeManagementService
-
public class FormAttributeManagementService extends Object
The service of management for a form attribute. Any manipulations has to happen to attributes of a form through this service.
-
-
Constructor Summary
Constructors Constructor Description FormAttributeManagementService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttribute(Form form, FormAttribute attribute)
Adds an attribute to the form.void
addAttributeColumn(IBmTransaction transaction, Form form, AbstractDataPath path, FormAttributeColumn column)
Adds an column attribute to the form.void
attachAttributesExtInfoObjects(IBmTransaction transaction, Form form)
Attaches allExtInfo
objects of form attributes to the given transaction.void
cloneAttributeAdditionalColumns(IBmTransaction transaction, AbstractDataPath clonedColumnPath, FormAttributeColumn originalColumn, FormAttributeColumn clonedColumn, boolean isCopyingAttribute)
ClonesFormAttributeAdditionalColumns
related withFormAttributeColumn
void
cloneAttributeExtInfo(IBmTransaction transaction, Form form, TypeDescription type, FormAttribute sourceAttribute, FormAttribute clonedAttribute)
Clones attributeExtInfo
.void
deleteAttribute(IBmTransaction transaction, AbstractFormAttribute attribute, boolean removeItems)
Remove the form attribute from a form which contains it.boolean
isSupportingColumn(PropertyInfo checked)
Whether checks addition of a column supports this attribute.boolean
isSupportingColumn(TypeDescription typeDescription)
Whether checks addition of a column supports this attribute.void
replaceFormExtensionAttribute(IBmTransaction transaction, FormAttribute srcAttribute, Form form)
Replaces borrowed attribute in extension form with base (inherited) attribute
-
-
-
Method Detail
-
isSupportingColumn
public boolean isSupportingColumn(PropertyInfo checked)
Whether checks addition of a column supports this attribute.- Parameters:
checked
- the checked object- Returns:
- returns
true
if you can adds column attribute for checked attribute,false
if not support.
-
isSupportingColumn
public boolean isSupportingColumn(TypeDescription typeDescription)
Whether checks addition of a column supports this attribute.- Parameters:
typeDescription
- the type description of the checked object- Returns:
- returns
true
if you can adds column attribute for checked attribute,false
if not support
-
addAttribute
public void addAttribute(Form form, FormAttribute attribute)
Adds an attribute to the form. In time addition the unique name and id will be set to the attribute.- Parameters:
form
- the form in which is added an new attributeattribute
- it is the added attribute- Throws:
IllegalArgumentException
- if attribute has not value type
-
addAttributeColumn
public void addAttributeColumn(IBmTransaction transaction, Form form, AbstractDataPath path, FormAttributeColumn column)
Adds an column attribute to the form. In time addition the unique name and id will be set to the column attribute.- Parameters:
transaction
- the transaction to perform changes in.form
- the form in which is added an new attributepath
- the path to an attribute in which the column will be addedcolumn
- it is the added column attribute- Throws:
IllegalArgumentException
- if attribute has not a value type or the path does not support addition a column.
-
cloneAttributeAdditionalColumns
public void cloneAttributeAdditionalColumns(IBmTransaction transaction, AbstractDataPath clonedColumnPath, FormAttributeColumn originalColumn, FormAttributeColumn clonedColumn, boolean isCopyingAttribute)
ClonesFormAttributeAdditionalColumns
related withFormAttributeColumn
- Parameters:
transaction
- bm transaction, cannot benull
clonedColumnPath
- path of the cloned column, cannot benull
originalColumn
- originalFormAttributeColumn
, cannot benull
clonedColumn
- clonedFormAttributeColumn
, cannot benull
isCopyingAttribute
- should betrue
in case of copying entireFormAttribute
-
replaceFormExtensionAttribute
public void replaceFormExtensionAttribute(IBmTransaction transaction, FormAttribute srcAttribute, Form form)
Replaces borrowed attribute in extension form with base (inherited) attribute- Parameters:
transaction
- bm transaction, cannot benull
srcAttribute
- source attribute to be replaced, cannot benull
destAttribute
- destination attribute to replace with, cannot benull
form
- model, cannot benull
-
deleteAttribute
public void deleteAttribute(IBmTransaction transaction, AbstractFormAttribute attribute, boolean removeItems)
Remove the form attribute from a form which contains it.- Parameters:
transaction
- the transaction to perform changes inattribute
- the removal attributeremoveItems
- the flag setting rules removal of related objects. If it istrue
all related items will be removed, iffalse
then at all related items the reference to this attribute will be cleared
-
attachAttributesExtInfoObjects
public void attachAttributesExtInfoObjects(IBmTransaction transaction, Form form)
Attaches allExtInfo
objects of form attributes to the given transaction.- Parameters:
transaction
- the transaction to perform changes in, cannot benull
form
- the form which attributes'ExtInfo
objects to attach, cannot benull
-
cloneAttributeExtInfo
public void cloneAttributeExtInfo(IBmTransaction transaction, Form form, TypeDescription type, FormAttribute sourceAttribute, FormAttribute clonedAttribute)
Clones attributeExtInfo
.- Parameters:
transaction
- the transaction to perform changes in, cannot benull
form
- the form in which is added a cloned attributetype
- the attribute typesourceAttribute
- the main attributeclonedAttribute
- the cloned attribute
-
-