Class ObjectParticipant<PD extends D,PM extends M,D,DA,DR extends D,DP extends D,DC extends D,M,MA,MR extends M,MP extends M,MC extends M,C extends IProjectionContext<D,DA,DR,DP,DC,M,MA,MR,MP,MC>>
- java.lang.Object
-
- com._1c.g5.v8.dt.form.presentation.core.projection.extensible.ObjectParticipant<PD,PM,D,DA,DR,DP,DC,M,MA,MR,MP,MC,C>
-
- Type Parameters:
PD
- the domain modelPM
- the projection modelD
- 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)C
- the context
- All Implemented Interfaces:
IObjectParticipant<PD,PM,D,DA,DR,DP,DC,M,MA,MR,MP,MC,C>
,IProjectionParticipant<PD,PM,D,DA,DR,DP,DC,M,MA,MR,MP,MC,C>
- Direct Known Subclasses:
ClassParticipant
public abstract class ObjectParticipant<PD extends D,PM extends M,D,DA,DR extends D,DP extends D,DC extends D,M,MA,MR extends M,MP extends M,MC extends M,C extends IProjectionContext<D,DA,DR,DP,DC,M,MA,MR,MP,MC>> extends Object implements IObjectParticipant<PD,PM,D,DA,DR,DP,DC,M,MA,MR,MP,MC,C>
The abstract class with base methods implementations ofIObjectParticipant
andIProjectionContext
.- Generics with D prefix are related to tree of domain models.
- Generics with M prefix are related to tree projection models.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ObjectParticipant.AttributeBuilder
class
ObjectParticipant.ListBuilder
class
ObjectParticipant.MapBuilder
protected class
ObjectParticipant.Participant
class
ObjectParticipant.TreeBuilder
-
Constructor Summary
Constructors Constructor Description ObjectParticipant()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
attributeChanged(PD domain, PM model, AttributePath<DA> path, Object oldValue, Object newValue, C context)
void
customMessageSent(IObjectTreeCustomMessage message, C context)
void
dispose()
void
disposeModel(PM model, C context)
ObjectParticipant.AttributeBuilder
fromAttribute(DA... path)
ObjectParticipant.ListBuilder
fromList(DA... path)
ObjectParticipant.MapBuilder
fromMap(DA... path)
ObjectParticipant.TreeBuilder
fromTree(DA... path)
boolean
isProjectionSupported(PD domain)
Determines whether the domain model is supported by the participant or not.boolean
isProjectionValid(PD domain, PM model, C context)
boolean
listItemAdded(PD domain, PM model, AttributePath<DA> path, int index, Object item, C context)
boolean
listItemMoved(PD domain, PM model, AttributePath<DA> path, int oldIndex, int newIndex, Object item, C context)
boolean
listItemRemoved(PD domain, PM model, AttributePath<DA> path, int index, Object item, C context)
boolean
listItemReplaced(PD domain, PM model, AttributePath<DA> path, int index, Object oldItem, Object newItem, C context)
boolean
mapItemAdded(PD domain, PM model, AttributePath<DA> path, Object key, Object value, C context)
boolean
mapItemRemoved(PD domain, PM model, AttributePath<DA> path, Object key, Object value, C context)
<T> void
on(BiConsumer<PM,T> update, DA... path)
void
projectModel(PD domain, PM model, C context)
void
registerParticipant(AttributePath<DA> path, IProjectionParticipant<PD,PM,D,DA,DR,DP,DC,M,MA,MR,MP,MC,C> participant)
void
registerProjectionOnlyParticipant(IProjectionParticipant<PD,PM,D,DA,DR,DP,DC,M,MA,MR,MP,MC,C> participant)
void
registerTreeParticipant(IProjectionParticipant<PD,PM,D,DA,DR,DP,DC,M,MA,MR,MP,MC,C> participant)
void
reprojectOn(DA... path)
void
reprojectWholeTreeOn(DA... path)
void
revalidateOn(DA... path)
void
set(Object value, MA... path)
void
set(BiFunction<PD,C,Object> function, MA... path)
boolean
treeItemAdded(PD domain, PM model, int index, DC item, C context)
boolean
treeItemMoved(PD domain, PM model, int oldIndex, int newIndex, DC item, C context)
boolean
treeItemRemoved(PD parent, PM model, int index, DC item, C context)
boolean
treeItemReplaced(PD domain, PM model, int index, DC oldItem, DC newItem, C context)
-
-
-
Method Detail
-
registerParticipant
public void registerParticipant(AttributePath<DA> path, IProjectionParticipant<PD,PM,D,DA,DR,DP,DC,M,MA,MR,MP,MC,C> participant)
-
registerProjectionOnlyParticipant
public void registerProjectionOnlyParticipant(IProjectionParticipant<PD,PM,D,DA,DR,DP,DC,M,MA,MR,MP,MC,C> participant)
-
registerTreeParticipant
public void registerTreeParticipant(IProjectionParticipant<PD,PM,D,DA,DR,DP,DC,M,MA,MR,MP,MC,C> participant)
-
fromAttribute
public final ObjectParticipant.AttributeBuilder fromAttribute(DA... path)
-
fromList
public final ObjectParticipant.ListBuilder fromList(DA... path)
-
fromTree
public final ObjectParticipant.TreeBuilder fromTree(DA... path)
-
fromMap
public final ObjectParticipant.MapBuilder fromMap(DA... path)
-
set
public final void set(BiFunction<PD,C,Object> function, MA... path)
-
on
public final <T> void on(BiConsumer<PM,T> update, DA... path)
-
revalidateOn
public final void revalidateOn(DA... path)
-
reprojectOn
public final void reprojectOn(DA... path)
-
reprojectWholeTreeOn
public final void reprojectWholeTreeOn(DA... path)
-
customMessageSent
public void customMessageSent(IObjectTreeCustomMessage message, C context)
-
isProjectionSupported
public boolean isProjectionSupported(PD domain)
Description copied from interface:IObjectParticipant
Determines whether the domain model is supported by the participant or not.- Specified by:
isProjectionSupported
in interfaceIObjectParticipant<PD extends D,PM extends M,D,DA,DR extends D,DP extends D,DC extends D,M,MA,MR extends M,MP extends M,MC extends M,C extends IProjectionContext<D,DA,DR,DP,DC,M,MA,MR,MP,MC>>
- Parameters:
domain
- the domain model, cannot benull
- Returns:
true
if it is supported by the participant.
-
attributeChanged
public boolean attributeChanged(PD domain, PM model, AttributePath<DA> path, Object oldValue, Object newValue, C context)
-
listItemAdded
public boolean listItemAdded(PD domain, PM model, AttributePath<DA> path, int index, Object item, C context)
-
listItemMoved
public boolean listItemMoved(PD domain, PM model, AttributePath<DA> path, int oldIndex, int newIndex, Object item, C context)
-
listItemReplaced
public boolean listItemReplaced(PD domain, PM model, AttributePath<DA> path, int index, Object oldItem, Object newItem, C context)
-
listItemRemoved
public boolean listItemRemoved(PD domain, PM model, AttributePath<DA> path, int index, Object item, C context)
-
mapItemAdded
public boolean mapItemAdded(PD domain, PM model, AttributePath<DA> path, Object key, Object value, C context)
-
mapItemRemoved
public boolean mapItemRemoved(PD domain, PM model, AttributePath<DA> path, Object key, Object value, C context)
-
treeItemMoved
public boolean treeItemMoved(PD domain, PM model, int oldIndex, int newIndex, DC item, C context)
-
treeItemReplaced
public boolean treeItemReplaced(PD domain, PM model, int index, DC oldItem, DC newItem, C context)
-
-