rs.sol.soloist.server.guiconfiguration.components
Class GUICommandComponent

java.lang.Object
  extended by rs.sol.soloist.server.uml.commonimplementation.runtime._ClassifierInstance
      extended by rs.sol.soloist.server.uml.commonimplementation.runtime._ClassInstance
          extended by rs.sol.soloist.server.javaimpl.runtime.SOLoistClassInstance
              extended by rs.sol.soloist.server.builtindomains.common.ObjectOfClass
                  extended by rs.sol.soloist.server.guiconfiguration.construction.GUIComponent
                      extended by rs.sol.soloist.server.guiconfiguration.components.GUICommandComponent
All Implemented Interfaces:
IElementPresentationProvider, IUpdatable, rs.sol.soloist.server.uml.concepts.IElement, IClassifierInstance, IClassInstance, IRTElement
Direct Known Subclasses:
GUIButtonComponent, GUIMenuItemComponent

public class GUICommandComponent
extends GUIComponent

Invisible widget used to trigger server-side actions. Actions are specified with a Command object assigned to this widget. The assigned Command instance will be executed after an event on other widget's output pin explicitely bound (using the widget binding mechanism) to this widget's click input pin ( ipClick() method). Using the widget binding mechanism, this widget is able collect required parameters for command execution, and also, using the same mecahnism, to provide command execution results to other widgets in the GUI (which can be used to trigger client-side effects as well).

Class PerformImmediately defines more complex execution scenarios. Applying specific execution scenario can be done with setPerformImmediately(PerformImmediately) method.

Despite this widget's invisibility, it must have its parent assigned either explicitely or using the create method.

The code example that creates server-side action (command) instance for deletion of object (of the domain class Person), this widget to trigger the action and collect parameters, command assignment (via the factory create method), parameter binding, and event-action binding is shown bellow:

 CmdDestroyObject cmd = new CmdDestroyObject();
 cmd.setType(Person.CLASSIFIER);
 GUICommandComponent delete = GUICommandComponent.create(parent, cmd);
 GUIComponentBinding.create(
     personsList.opSelection(), delete, CmdDestroyObject.PROPERTIES.input);
 GUIComponentBinding.create(link.opClick(), delete.ipClick());
 
 

Author:
SOL Expert Group

Nested Class Summary
static class GUICommandComponent.FQPropertyNames
          Deprecated. Not for public use.
static class GUICommandComponent.PROPERTIES
          Deprecated. Not for public use.
 
Field Summary
static IClass CLASSIFIER
          UML class reference
 IAttributeValue<Text> click
          Deprecated. Not for public use.
 IAssociationEndInstance<rs.sol.soloist.server.builtindomains.commands.Command> command
          Deprecated. Not for public use.
 IAttributeValue<Text> commandExecuted
          Deprecated. Not for public use.
 IAttributeValue<Text> confirmationMessage
          Deprecated. Not for public use.
 IAttributeValue<Boolean> confirmationRequired
          Deprecated. Not for public use.
 IAttributeValue<Text> firstParam
          Deprecated. Not for public use.
static java.lang.String FQ_TYPE_NAME
          Fully qualified UML class name
 IAttributeValue<PerformImmediately> performImmediately
          Deprecated. Not for public use.
 IAttributeValue<Text> redo
          Deprecated. Not for public use.
 IAttributeValue<Text> result
          Deprecated. Not for public use.
 IAttributeValue<Text> secondParam
          Deprecated. Not for public use.
 IAttributeValue<Text> text
          Deprecated. Not for public use.
 
Fields inherited from class rs.sol.soloist.server.guiconfiguration.construction.GUIComponent
addStyle, context, description, enabled, init, inputBindings, layoutData, logger, name, outputBindings, ownerTable, parent, removeStyle, show, showInParent, styleName, tooltip, visible
 
Constructor Summary
GUICommandComponent()
           
 
Method Summary
 void constructor()
          The domain-specific constructor of the Classifier.
static GUICommandComponent create(GUIContainerComponent parent, rs.sol.soloist.server.builtindomains.commands.Command cmd)
          Deprecated. Not for public use.
static GUICommandComponent create(GUIContainerComponent parent, rs.sol.soloist.server.builtindomains.commands.Command cmd, PerformImmediately performImmediately)
          Returns new GUICommandComponent with the command instance and execution scenario, and assigns it to the given parent.
 void execute(rs.sol.soloist.server.uml.concepts.IElement el)
          Deprecated. Not for public use.
 rs.sol.soloist.server.builtindomains.commands.Command getCommand()
          Gets the associated command instance.
 java.lang.String getConfirmationMessage()
          Returns the confirmation message.
 boolean getConfirmationRequired()
          Returns whether confirmation is required for command execution on the server.
 PerformImmediately getPerformImmediately()
          Returns the command's execution scenario.
 java.lang.String getText()
          Returns the text (label) of this widget.
 java.lang.String getTextOrCommandName()
          Deprecated. Not for public use.
 ISlot<?> ipClick()
          Returns the click input pin; when event occurs, the command is executed with the current state of the parameter values.
 ISlot<?> ipFirstParam()
          Returns the firstParam input pin; when event occurs, the content of the binding message is stored in this widget internally and used afterwards as a parameter when the assigned command is executed.
 ISlot<?> ipRedo()
          Returns the redo input pin; when event occurs, the action proposed by the execution policy will be performed: check pre-conditions, execute, or nothing.
 ISlot<?> ipSecondParam()
          Returns the secondParam input pin; when event occurs, the content of the binding message is stored in this widget internally and used afterwards as a parameter when the assigned command is executed.
 ISlot<?> ipText()
          Returns the text input pin; when event occurs, the textual binding message content will become new text (label) of this widget.
 boolean isConfirmationRequired()
          Deprecated. Not for public use.
 ISlot<?> opClick()
          Returns the click output pin; when event occurs, the command instance will executed on the server.
 ISlot<?> opCommandExecuted()
          Returns the commandExecuted output pin; when command finishes its execution, the notification empty binding message is provided on this pin to signal other interested widgets.
 ISlot<?> opResult()
          Returns the result output pin; when command finishes its execution, the binding message with the command's resulting value is provided on this pin.
 void setCommand(rs.sol.soloist.server.builtindomains.commands.Command c)
          Sets the command instance that will perform server-side actions.
 void setConfirmationMessage(java.lang.String message)
          Set the confirmation message.
 void setConfirmationRequired(boolean required)
          Sets whether confirmation is required for command execution on the server.
 void setPerformImmediately(PerformImmediately perform)
          Sets the command's execution scenario.
 void setText(java.lang.String text)
          Sets the text (label) of this widget.
 
Methods inherited from class rs.sol.soloist.server.guiconfiguration.construction.GUIComponent
addStyleNames, addValueToSlot, clearSlot, clone, createInfo, createInfoAlreadyValidated, destructor, fillElementInfo, getApplication, getCommands, getCommands, getCommonOwner, getContext, getDescription, getDescrString, getDragIcon, getEnabled, getFeature, getFeature, getInputBindings, getInputPin, getInputPins, getLabelString, getLargeIcon, getLayoutData, getName, getNameString, getOutputPin, getOutputPins, getOwner, getParts, getSetting, getSmallIcon, getStyle, getSubnodes, getTooltip, getTooltipString, getTypeString, getVisible, handle, ipAddStyle, ipEnabled, ipInit, ipRemoveStyle, ipShow, ipShowInParent, ipVisible, isInputPin, isOutputPin, putFeatureInfo, readElement, readElements, readSlot, readSlotAsInfo, readSubnodes, removeValueFromSlot, setCellAlignment, setCellSize, setCellStyle, setCenter, setContext, setDescription, setDirectionAndSize, setEnabled, setLayoutData, setLeftRightWidth, setName, setRowColumn, setRowColumn, setSize, setSlot, setSlot, setStyle, setTooltip, setTopBottomHeight, setVisible, setXY, toTranslateDescriptors, translatePinName, updateInfo, validate, validateParts, validateParts
 
Methods inherited from class rs.sol.soloist.server.javaimpl.runtime.SOLoistClassInstance
destroy, equals, getAssociationEndInstance, getAssociationEndInstances, getAttributeValue, getAttributeValues, getMyClass, getMyID, getSlot, getSlot, getSlots, getUMLClass, hashCode, isMarkedAsDeleted, toString
 
Methods inherited from class rs.sol.soloist.server.uml.commonimplementation.runtime._ClassInstance
accept, accept, exists, getAssociationEndInstance, getAssociationEndInstance, getAssociationEndInstance, getClassifier, hasIdentity, isClassInstance, isDataTypeInstance, isEqualTo, makeClone, markAsDeleted
 
Methods inherited from class rs.sol.soloist.server.uml.commonimplementation.runtime._ClassifierInstance
conformsTo, copySlots, copySlots, getAttributeValue, getAttributeValue, getAttributeValue, getClassifierFQName, getClassifierUQName, getFirstCommonGeneralizer, getFirstCommonGeneralizerFQName, getFirstCommonGeneralizerUQName, getMElement, getSlot, getSlot, isDirectInstanceOf, isDirectInstanceOf, isInstanceOf, isInstanceOf, isKindOf, isModelElement, isRTElement
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.runtime.IClassifierInstance
conformsTo, copySlots, copySlots, getAttributeValue, getAttributeValue, getClassifierFQName, getClassifierUQName, getFirstCommonGeneralizer, getFirstCommonGeneralizerFQName, getFirstCommonGeneralizerUQName, getSlot, getSlot, isDirectInstanceOf, isDirectInstanceOf, isInstanceOf, isInstanceOf
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.runtime.IRTElement
getMElement
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.IElement
isKindOf, isModelElement, isRTElement
 

Field Detail

text

@Deprecated
public IAttributeValue<Text> text
Deprecated. Not for public use.

confirmationRequired

@Deprecated
public IAttributeValue<Boolean> confirmationRequired
Deprecated. Not for public use.

confirmationMessage

@Deprecated
public IAttributeValue<Text> confirmationMessage
Deprecated. Not for public use.

performImmediately

@Deprecated
public IAttributeValue<PerformImmediately> performImmediately
Deprecated. Not for public use.

firstParam

@Deprecated
public IAttributeValue<Text> firstParam
Deprecated. Not for public use.

secondParam

@Deprecated
public IAttributeValue<Text> secondParam
Deprecated. Not for public use.

redo

@Deprecated
public IAttributeValue<Text> redo
Deprecated. Not for public use.

result

@Deprecated
public IAttributeValue<Text> result
Deprecated. Not for public use.

commandExecuted

@Deprecated
public IAttributeValue<Text> commandExecuted
Deprecated. Not for public use.

click

@Deprecated
public IAttributeValue<Text> click
Deprecated. Not for public use.

FQ_TYPE_NAME

public static final java.lang.String FQ_TYPE_NAME
Fully qualified UML class name

See Also:
Constant Field Values

CLASSIFIER

public static final IClass CLASSIFIER
UML class reference


command

@Deprecated
public IAssociationEndInstance<rs.sol.soloist.server.builtindomains.commands.Command> command
Deprecated. Not for public use.
Constructor Detail

GUICommandComponent

public GUICommandComponent()
Method Detail

constructor

public void constructor()
Description copied from interface: IClassifierInstance
The domain-specific constructor of the Classifier.

Specified by:
constructor in interface IClassifierInstance
Overrides:
constructor in class GUIComponent

execute

@Deprecated
public void execute(rs.sol.soloist.server.uml.concepts.IElement el)
Deprecated. Not for public use.


isConfirmationRequired

@Deprecated
public boolean isConfirmationRequired()
Deprecated. Not for public use.


getTextOrCommandName

@Deprecated
public java.lang.String getTextOrCommandName()
Deprecated. Not for public use.


create

public static GUICommandComponent create(GUIContainerComponent parent,
                                         rs.sol.soloist.server.builtindomains.commands.Command cmd,
                                         PerformImmediately performImmediately)
Returns new GUICommandComponent with the command instance and execution scenario, and assigns it to the given parent.

Parameters:
parent - the parent GUIContainerComponent widget
cmd - the command instance for handling server side action
performImmediately - an execution scenario
Returns:
the new GUICommandComponent

ipText

public ISlot<?> ipText()
Returns the text input pin; when event occurs, the textual binding message content will become new text (label) of this widget.

Returns:
the text input pin
See Also:
GUIComponentBinding

ipFirstParam

public ISlot<?> ipFirstParam()
Returns the firstParam input pin; when event occurs, the content of the binding message is stored in this widget internally and used afterwards as a parameter when the assigned command is executed.

Returns:
the firstParam input pin
See Also:
GUIComponentBinding

ipSecondParam

public ISlot<?> ipSecondParam()
Returns the secondParam input pin; when event occurs, the content of the binding message is stored in this widget internally and used afterwards as a parameter when the assigned command is executed.

Returns:
the secondParam input pin
See Also:
GUIComponentBinding

ipRedo

public ISlot<?> ipRedo()
Returns the redo input pin; when event occurs, the action proposed by the execution policy will be performed: check pre-conditions, execute, or nothing.

The content of the binding message accepted on this pin is of no importance. Only event is what matters.

Returns:
the redo input pin
See Also:
setPerformImmediately(PerformImmediately), GUIComponentBinding

ipClick

public ISlot<?> ipClick()
Returns the click input pin; when event occurs, the command is executed with the current state of the parameter values.

The content of the binding message accepted on this pin is of no importance. Only event is what matters.

Returns:
the click input pin
See Also:
GUIComponentBinding

opResult

public ISlot<?> opResult()
Returns the result output pin; when command finishes its execution, the binding message with the command's resulting value is provided on this pin.

Returns:
the result output pin
See Also:
GUIComponentBinding

opCommandExecuted

public ISlot<?> opCommandExecuted()
Returns the commandExecuted output pin; when command finishes its execution, the notification empty binding message is provided on this pin to signal other interested widgets.

Returns:
the commandExecuted output pin
See Also:
GUIComponentBinding

opClick

public ISlot<?> opClick()
Returns the click output pin; when event occurs, the command instance will executed on the server.

Returns:
the click output pin
See Also:
GUIComponentBinding

getText

public java.lang.String getText()
Returns the text (label) of this widget.

Returns:
the text (label) of this widget
See Also:
setText(String)

setText

public void setText(java.lang.String text)
Sets the text (label) of this widget.

Parameters:
text - the new text (label) of this widget

getConfirmationRequired

public boolean getConfirmationRequired()
Returns whether confirmation is required for command execution on the server.

Returns:
whether confirmation is required for command execution
See Also:
setConfirmationRequired(boolean)

setConfirmationRequired

public void setConfirmationRequired(boolean required)
Sets whether confirmation is required for command execution on the server.

Parameters:
required - a boolean that specifies whether confirmation is required for command execution on the server

getConfirmationMessage

public java.lang.String getConfirmationMessage()
Returns the confirmation message.

Returns:
the confirmation message
See Also:
setConfirmationMessage(String)

setConfirmationMessage

public void setConfirmationMessage(java.lang.String message)
Set the confirmation message.

Parameters:
message - the confirmation message

getPerformImmediately

public PerformImmediately getPerformImmediately()
Returns the command's execution scenario.

Returns:
the command's execution scenario
See Also:
setPerformImmediately(PerformImmediately)

setPerformImmediately

public void setPerformImmediately(PerformImmediately perform)
Sets the command's execution scenario.

Parameters:
perform - the command's execution scenario

getCommand

public rs.sol.soloist.server.builtindomains.commands.Command getCommand()
Gets the associated command instance.

Returns:
the associated command instance
See Also:
setCommand(Command)

setCommand

public void setCommand(rs.sol.soloist.server.builtindomains.commands.Command c)
Sets the command instance that will perform server-side actions.

Parameters:
c - the new command instance

create

@Deprecated
public static GUICommandComponent create(GUIContainerComponent parent,
                                                    rs.sol.soloist.server.builtindomains.commands.Command cmd)
Deprecated. Not for public use.