Interface IObjectTreeProjection<D,DA,DR extends D,DP extends D,DC extends D,M,MA,MR extends M,MP extends M,MC extends M>
-
- Type Parameters:
D
- the base class for all domain objects (EObject)DA
- the attribute class, whose instances can be addressed for reading/writeing fields of domain objects of class D (EStructuralFeature)DR
- the root domain object classDP
- the base container class of domain objects, tree node (FormItemContainer)DC
- the base class of children of the domain object container (FormItem)M
- the base class for all projection objects (EObject)MA
- the attribute class, whose instances can be addressed for reading/writeing fields of projection objects of class M (EStructuralFeature)MR
- the root projection object classMP
- the base container class of projection objects, tree node (FormItemContainer)MC
- the base class of children of the projection object container (FormItem)
- All Superinterfaces:
IObjectTreeListener<D,DA,DR,DP,DC>
- All Known Subinterfaces:
IHippoModelProjection
,ILayoutProjection
,IModelProjection
,IThemeProjection
,IViewProjection
- All Known Implementing Classes:
ExtensibleProjection
public interface IObjectTreeProjection<D,DA,DR extends D,DP extends D,DC extends D,M,MA,MR extends M,MP extends M,MC extends M> extends IObjectTreeListener<D,DA,DR,DP,DC>
The object tree projection.In general, the models used in EDT can be represented as a tree. Accordingly, in the most general case, our projection should be able to transform the tree of domain models into a tree of projection models.
The projection tree is partly an internal projection mechanism, in the sense that the functionality of maintaining the tree structure is not required from the projection model itself. For example, the placement of form elements can be described by a set of rectangles, while the coordinates of the rectangles are described relative to the parent of the form.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListener(IObjectTreeListener<M,MA,MR,MP,MC> listener)
Adds the given listener.void
changeRoot(DR newRoot)
Changes the root domain object.void
dispose()
Disposes the model with participants.D
getDomain(M model)
Returns a domain model for the given projection model.DR
getDomainRoot()
Returns the domain model root.M
getModel(D domain)
Returns a projection model for the given domain model.MR
getModelRoot()
Returns the projection model root.MC
getModelTreeNode(DC domain)
Returns a projection model tree node by the given domain.Stream<? extends MC>
getModelTreeNodeChildren(MP model)
Returns children nodes of the given projection model.MP
getModelTreeNodeParent(MC model)
Returns a parent projection model node by the given projection model.void
removeListener(IObjectTreeListener<M,MA,MR,MP,MC> listener)
Removes the given listener.-
Methods inherited from interface com._1c.g5.v8.dt.form.presentation.core.projection.IObjectTreeListener
attributeChanged, listItemAdded, listItemMoved, listItemRemoved, listItemReplaced, mapItemAdded, mapItemRemoved, mapItemReplaced, messageSent, rootChanged, rootSet, rootUnset, setItemAdded, setItemRemoved, treeItemAdded, treeItemMoved, treeItemRemoved, treeItemReplaced
-
-
-
-
Method Detail
-
getDomainRoot
DR getDomainRoot()
Returns the domain model root.Projections are available root models of the domain and projection tree, these are the objects from which all work begins on creating a projection tree. In case of change of the root domain object, the projection tree is completely reconstructed and it is necessary to get a new root of the projection tree.
- Returns:
- the domain model root, can be
null
-
getModelRoot
MR getModelRoot()
Returns the projection model root.Projections are available root models of the domain and projection tree, these are the objects from which all work begins on creating a projection tree. In case of change of the root domain object, the projection tree is completely reconstructed and it is necessary to get a new root of the projection tree.
- Returns:
- the projection model root, can be
null
-
getModel
M getModel(D domain)
Returns a projection model for the given domain model.Projections support the correspondence between domain models and projection models. By the model always possible to get the other and vice versa. This correspondence is unambiguous, i.e. the models correspond to 1-to-1, but not necessarily. Not every domain model has a projection and not every projection model has a domain model.
- Parameters:
domain
- the domain model, cannot benull
- Returns:
- a projection model, can be
null
-
getDomain
D getDomain(M model)
Returns a domain model for the given projection model.Projections support the correspondence between domain models and projection models. By the model always possible to get the other and vice versa. This correspondence is unambiguous, i.e. the models correspond to 1-to-1, but not necessarily. Not every domain model has a projection and not every projection model has a domain model.
- Parameters:
model
-- Returns:
- a domain model, can be
null
-
changeRoot
void changeRoot(DR newRoot)
Changes the root domain object.In case of change of the root domain object, the projection tree is completely reconstructed and it is necessary to get a new root of the projection tree.
- Parameters:
newRoot
- the new root domain object, can benull
-
getModelTreeNode
MC getModelTreeNode(DC domain)
Returns a projection model tree node by the given domain.- Parameters:
domain
- the domain, cannot benull
- Returns:
- projection model, can be
null
-
getModelTreeNodeParent
MP getModelTreeNodeParent(MC model)
Returns a parent projection model node by the given projection model.- Parameters:
model
- the projection model, cannot benull
- Returns:
- parent projection model, can be
null
-
getModelTreeNodeChildren
Stream<? extends MC> getModelTreeNodeChildren(MP model)
Returns children nodes of the given projection model.- Parameters:
model
- the projection model, cannot benull
- Returns:
- children nodes, cannot be
null
-
addListener
void addListener(IObjectTreeListener<M,MA,MR,MP,MC> listener)
Adds the given listener.- Parameters:
listener
- the listener, cannot benull
-
removeListener
void removeListener(IObjectTreeListener<M,MA,MR,MP,MC> listener)
Removes the given listener.- Parameters:
listener
- the listener, cannot benull
-
dispose
void dispose()
Disposes the model with participants.
-
-