Class EventHandlerCollectionModel
- java.lang.Object
-
- com._1c.g5.aef2.validators.Validable
-
- com._1c.g5.aef2.models.Model
-
- com._1c.g5.aef2.models.EditableModel
-
- com._1c.g5.v8.dt.form.ui.properties.models.EventHandlerCollectionModel
-
- All Implemented Interfaces:
IEditableModel
,IModel
,IValidable
,IModelApiAwareModel
,IHandlerCollectionModel
public class EventHandlerCollectionModel extends EditableModel implements IHandlerCollectionModel, IModelApiAwareModel
The BM aware implementation ofIHandlerCollectionModel
for form event handler collection.
-
-
Constructor Summary
Constructors Constructor Description EventHandlerCollectionModel(Form form, FormVisualEntity object, FormItemInformationService formItemInformationService, IV8Project v8project)
Creates a new model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<IHandlerModel<?>>
createFormEventModels(EventHandlerContainer entity, Event event, List<EventHandler> allHandlers, Form form, Collection<String> possibleHandlers)
Create a list of form event models for the provided event container entity and the allowed event.protected List<IHandlerModel<?>>
createFormEventModels(EventHandlerContainer entity, List<Event> events, List<EventHandler> allHandlers, Form form, com.google.common.collect.Multimap<Event,String> possibleHandlers)
Create a list of form event models for the provided event container entity and the list of allowed events.void
dispose()
Disposes this model.IChange
getChange()
Form
getForm()
Returns the parent form.Iterable<IHandlerModel<?>>
getHandlerModels(Module bslModule)
Returns a collection of underlying handler models.IModelApi
getModelApi()
Returns the model API.FormVisualEntity
getObject()
Returns the parent form model object.ScriptVariant
getScriptVariant()
Retutrns the current script variant.boolean
isMobileApplicationOnly()
Checks that parent configuration is design for only mobile application.void
setModelApi(IModelApi modelApi)
Sets the specified API to the model.-
Methods inherited from class com._1c.g5.aef2.models.EditableModel
isEditable, setEditable
-
Methods inherited from class com._1c.g5.aef2.models.Model
addModelListener, beginExternalUpdate, checkOffline, checkOnline, commit, createWorkingCopy, discard, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setComponent, setOnline, toString
-
Methods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, getValidatorTarget, removeValidator, validate, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, createWorkingCopy, discard, getComponent, isOnline, removeModelListener, setComponent
-
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
-
-
-
Constructor Detail
-
EventHandlerCollectionModel
public EventHandlerCollectionModel(Form form, FormVisualEntity object, FormItemInformationService formItemInformationService, IV8Project v8project)
Creates a new model.- Parameters:
form
- the form model, cannot benull
object
- the form model object, cannot benull
formItemInformationService
- theFormItemInformationService
, cannot benull
v8project
- the V8 project, cannot benull
-
-
Method Detail
-
getObject
public FormVisualEntity getObject()
Description copied from interface:IHandlerCollectionModel
Returns the parent form model object.- Specified by:
getObject
in interfaceIHandlerCollectionModel
- Returns:
- the form model
EObject
object, nevernull
-
getChange
public IChange getChange()
-
getScriptVariant
public ScriptVariant getScriptVariant()
Description copied from interface:IHandlerCollectionModel
Retutrns the current script variant.- Specified by:
getScriptVariant
in interfaceIHandlerCollectionModel
- Returns:
- the current script variant, never
null
-
dispose
public void dispose()
Description copied from interface:IModel
Disposes this model.
-
getHandlerModels
public Iterable<IHandlerModel<?>> getHandlerModels(Module bslModule)
Description copied from interface:IHandlerCollectionModel
Returns a collection of underlying handler models.- Specified by:
getHandlerModels
in interfaceIHandlerCollectionModel
- Parameters:
bslModule
- actualModule
ofForm
, can't benull
- Returns:
- a collection of handler models, never
null
-
isMobileApplicationOnly
public boolean isMobileApplicationOnly()
Description copied from interface:IHandlerCollectionModel
Checks that parent configuration is design for only mobile application.- Specified by:
isMobileApplicationOnly
in interfaceIHandlerCollectionModel
- Returns:
true
if configuration is design for only mobile application,false
otherwise
-
getModelApi
public IModelApi getModelApi()
Description copied from interface:IModelApiAwareModel
Returns the model API.- Specified by:
getModelApi
in interfaceIModelApiAwareModel
- Returns:
- the model API or
null
if it is not set.
-
setModelApi
public void setModelApi(IModelApi modelApi)
Description copied from interface:IModelApiAwareModel
Sets the specified API to the model.- Specified by:
setModelApi
in interfaceIModelApiAwareModel
- Parameters:
modelApi
- the API, can benull
.
-
getForm
public Form getForm()
Returns the parent form.- Returns:
- the parent form, never
null
-
createFormEventModels
protected List<IHandlerModel<?>> createFormEventModels(EventHandlerContainer entity, List<Event> events, List<EventHandler> allHandlers, Form form, com.google.common.collect.Multimap<Event,String> possibleHandlers)
Create a list of form event models for the provided event container entity and the list of allowed events.- Parameters:
entity
- the event container entity, cannot benull
events
- the list of allowed events, cannot benull
allHandlers
- the list of all already existing entity entity form handlers, cannot benull
form
- the parent form, cannot benull
possibleHandlers
- the multi map of found possible BSL module handlers, cannot benull
- Returns:
- a list of form event models for the provided event container entity and the list of allowed
events, never
null
-
createFormEventModels
protected List<IHandlerModel<?>> createFormEventModels(EventHandlerContainer entity, Event event, List<EventHandler> allHandlers, Form form, Collection<String> possibleHandlers)
Create a list of form event models for the provided event container entity and the allowed event.- Parameters:
entity
- the event container entity, cannot benull
event
- the allowed event, cannot benull
allHandlers
- the list of all already existing entity entity form handlers, cannot benull
form
- the parent form, cannot benull
possibleHandlers
- the collection of found possible BSL module handlers, cannot benull
- Returns:
- a list of form event models for the provided event container entity and the allowed event
-
-