Class CommandActionModel
- java.lang.Object
-
- com._1c.g5.aef2.validators.Validable
-
- com._1c.g5.aef2.models.Model
-
- com._1c.g5.aef2.models.EditableModel
-
- com._1c.g5.aef2.models.value.Value<T>
-
- com._1c.g5.aef2.models.pojo.PojoValue<String>
-
- com._1c.g5.v8.dt.form.ui.properties.models.CommandActionModel
-
- All Implemented Interfaces:
IEditableModel
,IModel
,IValue<String>
,IValidable
,IModelApiAwareModel
,com._1c.g5.v8.dt.form.internal.ui.properties.models.IFormValue<String,FormCommand>
,IHandlerModel<FormCommand>
public class CommandActionModel extends PojoValue<String> implements IHandlerModel<FormCommand>
TheIHandlerModel
implementation for form command.
-
-
Constructor Summary
Constructors Constructor Description CommandActionModel(Form form, FormCommand command)
Constructor.CommandActionModel(Form form, FormCommand command, String handler)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
clearCommandHandler(FormCommand command)
Clears a form command handler.protected void
executeCommand(String commandId, Map<String,String> commandParameters)
Executes the provided command in the Eclipse command service with the provided command parameters.IChange
getChange()
Event
getEvent()
Returns the form model object event for this handler.Form
getForm()
Gets form model.Collection<String>
getHanlders()
Returns a collection of possible event handlers.IModelApi
getModelApi()
Returns the model API.FormCommand
getSelection()
Return the selected object of form model.void
processHandlerInBslModule()
Processes current method selection in the BSL module.protected void
setCommandHandler(String handlerName, FormCommand command)
Sets a form command handler with the provided handler name.void
setModelApi(IModelApi modelApi)
Sets the specified API to the model.-
Methods inherited from class com._1c.g5.aef2.models.value.Value
addValueListener, createWorkingCopy, discard, dispose, get, getCommittedValue, getUncommittedValue, getValidatorTarget, isEqual, notifyValueChanged, queueNotifyValueChanged, removeValueListener, set, setCommittedValue, setUncommittedValue, setValue, toString
-
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, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setComponent, setOnline
-
Methods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, 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, discard, dispose, getComponent, isOnline, removeModelListener, setComponent
-
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
Methods inherited from interface com._1c.g5.aef2.models.value.IValue
addValueListener, createWorkingCopy, get, isEqual, removeValueListener, set
-
-
-
-
Constructor Detail
-
CommandActionModel
public CommandActionModel(Form form, FormCommand command)
Constructor.- Parameters:
form
- the parent form, cannot benull
command
- the form command, cannot benull
-
CommandActionModel
public CommandActionModel(Form form, FormCommand command, String handler)
Constructor.- Parameters:
form
- the parent form, cannot benull
command
- the form command, cannot benull
handler
- the command actual action handler ornull of none
-
-
Method Detail
-
getChange
public IChange getChange()
-
getForm
public Form getForm()
Description copied from interface:com._1c.g5.v8.dt.form.internal.ui.properties.models.IFormValue
Gets form model.- Specified by:
getForm
in interfacecom._1c.g5.v8.dt.form.internal.ui.properties.models.IFormValue<String,FormCommand>
- Returns:
- the form model.
-
getSelection
public FormCommand getSelection()
Description copied from interface:com._1c.g5.v8.dt.form.internal.ui.properties.models.IFormValue
Return the selected object of form model.- Specified by:
getSelection
in interfacecom._1c.g5.v8.dt.form.internal.ui.properties.models.IFormValue<String,FormCommand>
- Returns:
- the selected object.
-
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
.
-
getHanlders
public Collection<String> getHanlders()
Description copied from interface:IHandlerModel
Returns a collection of possible event handlers.- Specified by:
getHanlders
in interfaceIHandlerModel<FormCommand>
- Returns:
- the collection of handlers for current
event
, nevernull
-
getEvent
public Event getEvent()
Description copied from interface:IHandlerModel
Returns the form model object event for this handler.- Specified by:
getEvent
in interfaceIHandlerModel<FormCommand>
- Returns:
- the
Event
, nevernull
-
processHandlerInBslModule
public void processHandlerInBslModule()
Description copied from interface:IHandlerModel
Processes current method selection in the BSL module.- Specified by:
processHandlerInBslModule
in interfaceIHandlerModel<FormCommand>
-
setCommandHandler
protected void setCommandHandler(String handlerName, FormCommand command)
Sets a form command handler with the provided handler name.- Parameters:
handlerName
- a handler name, cannot benull
command
- a form command to set handler, cannot benull
-
clearCommandHandler
protected void clearCommandHandler(FormCommand command)
Clears a form command handler.- Parameters:
command
- a form command to clear handler, cannot benull
-
executeCommand
protected void executeCommand(String commandId, Map<String,String> commandParameters)
Executes the provided command in the Eclipse command service with the provided command parameters.- Parameters:
commandId
- the command identifier, cannot benull
commandParameters
- a map of command parameters, cannot benull
-
-