public abstract class AbstractSelectedColumnCommand extends AbstractScenarioGridCommand
Command class which assures that a ScenarioColumn is selected.| Modifier and Type | Field and Description |
|---|---|
protected org.drools.scenariosimulation.api.model.FactMappingValueType |
factMappingValueType |
gridWidgetrestorableStatus| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSelectedColumnCommand(GridWidget gridWidget,
org.drools.scenariosimulation.api.model.FactMappingValueType factMappingValueType) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
executeIfSelectedColumn(ScenarioSimulationContext context,
ScenarioGridColumn selectedColumn) |
protected String |
getFullPackage(ScenarioSimulationContext context)
Returns the full package
String of a ScenarioSimulationContext. |
protected Optional<String> |
getMatchingExpressionAlias(ScenarioSimulationContext context,
List<String> propertyNameElements,
org.drools.scenariosimulation.api.model.FactIdentifier factIdentifier) |
protected String |
getPropertyHeaderTitle(ScenarioSimulationContext context,
List<String> propertyNameElements,
org.drools.scenariosimulation.api.model.FactIdentifier factIdentifier) |
protected Optional<ScenarioGridColumn> |
getSelectedColumn(ScenarioSimulationContext context)
Returns an
Optional for a ScenarioSimulationContext. |
protected ScenarioGridColumn |
insertNewColumn(ScenarioSimulationContext context,
ScenarioGridColumn selectedColumn,
int columnPosition,
boolean cloneInstance)
It inserts a new
ScenarioGridColumn in ScenarioGridModel |
protected void |
internalExecute(ScenarioSimulationContext context) |
protected void |
manageCollectionProperty(ScenarioSimulationContext context,
ScenarioGridColumn selectedColumn,
String className,
int columnIndex,
List<String> fullPropertyPathElements) |
protected FactModelTree |
navigateComplexObject(FactModelTree factModelTree,
List<String> pathElements,
SortedMap<String,FactModelTree> dataObjectFieldsMap) |
protected org.drools.scenariosimulation.api.model.FactIdentifier |
setEditableHeadersAndGetFactIdentifier(ScenarioSimulationContext context,
ScenarioGridColumn selectedColumn,
String aliasName,
String canonicalClassName)
Sets the editable headers on a given
ScenarioGridColumn and returns a FactIdentifier. |
protected void |
setInstanceHeader(ScenarioSimulationContext context,
ScenarioGridColumn selectedColumn,
String alias,
String fullClassName)
Sets the instance header for a
ScenarioSimulationContext. |
protected void |
setInstanceHeaderMetaData(ScenarioGridColumn selectedColumn,
String aliasName,
org.drools.scenariosimulation.api.model.FactIdentifier factIdentifier)
Sets the metadata for an instance header on a given
ScenarioGridColumn. |
protected void |
setPropertyHeader(ScenarioSimulationContext context,
ScenarioGridColumn selectedColumn,
org.drools.scenariosimulation.api.model.FactIdentifier factIdentifier,
List<String> propertyNameElements,
String propertyClass,
String propertyTitle)
It assigns a property to the selected
ScenarioGridColumn |
protected void |
setPropertyHeader(ScenarioSimulationContext context,
ScenarioGridColumn selectedColumn,
List<String> propertyNameElements,
String propertyClass)
It assigns a property to the selected
ScenarioGridColumn |
protected void |
setPropertyHeader(ScenarioSimulationContext context,
ScenarioGridColumn selectedColumn,
List<String> propertyNameElements,
String propertyClass,
String propertyTitle)
It assigns a property to the selected
ScenarioGridColumn |
protected void |
setPropertyMetaData(ScenarioHeaderMetaData propertyHeaderMetaData,
String title,
boolean readOnly,
ScenarioGridColumn selectedColumn,
String placeHolder)
It sets the title and readOnly setting of a property header and sets the place holder on a given
ScenarioGridColumn. |
commonUndoRedoPreExecution, getFactIdentifierByColumnTitle, getScenarioGridColumnLocal, setCurrentContext, setRestorableStatusPreExecutionexecute, redo, undocommonExecution, getIdprotected org.drools.scenariosimulation.api.model.FactMappingValueType factMappingValueType
protected AbstractSelectedColumnCommand(GridWidget gridWidget, org.drools.scenariosimulation.api.model.FactMappingValueType factMappingValueType)
protected abstract void executeIfSelectedColumn(ScenarioSimulationContext context, ScenarioGridColumn selectedColumn)
protected void internalExecute(ScenarioSimulationContext context)
internalExecute in class AbstractScenarioSimulationCommandprotected ScenarioGridColumn insertNewColumn(ScenarioSimulationContext context, ScenarioGridColumn selectedColumn, int columnPosition, boolean cloneInstance)
ScenarioGridColumn in ScenarioGridModelcontext - It contains the Context inside which the commands will be executedselectedColumn - The selected ScenarioGridColumn where the command was launchedcolumnPosition - Used to define in which position the new column should be addedcloneInstance - If true, it create a new column inside the same instance of the selected columnScenarioGridColumnprotected void setInstanceHeader(ScenarioSimulationContext context, ScenarioGridColumn selectedColumn, String alias, String fullClassName)
ScenarioSimulationContext.context - It contains the Context inside which the commands will be executedselectedColumn - The selected ScenarioGridColumn where the command was launchedprotected Optional<ScenarioGridColumn> getSelectedColumn(ScenarioSimulationContext context)
Optional for a ScenarioSimulationContext.context - It contains the Context inside which the commands will be executedprotected String getFullPackage(ScenarioSimulationContext context)
String of a ScenarioSimulationContext.context - protected org.drools.scenariosimulation.api.model.FactIdentifier setEditableHeadersAndGetFactIdentifier(ScenarioSimulationContext context, ScenarioGridColumn selectedColumn, String aliasName, String canonicalClassName)
ScenarioGridColumn and returns a FactIdentifier.context - selectedColumn - aliasName - canonicalClassName - protected void setInstanceHeaderMetaData(ScenarioGridColumn selectedColumn, String aliasName, org.drools.scenariosimulation.api.model.FactIdentifier factIdentifier)
ScenarioGridColumn.selectedColumn - The selected ScenarioGridColumn where the command was launchedaliasName - The title to assign to the selected columnfactIdentifier - The FactIdentifier to assign to the selected columnprotected void setPropertyHeader(ScenarioSimulationContext context, ScenarioGridColumn selectedColumn, List<String> propertyNameElements, String propertyClass)
ScenarioGridColumncontext - It contains the Context inside which the commands will be executedselectedColumn - The selected ScenarioGridColumn where the command was launchedpropertyNameElements - The List with the path instance_name.property.name (eg. Author.isAlive)propertyClass - it contains the full classname of the property (eg. com.Author)protected void setPropertyHeader(ScenarioSimulationContext context, ScenarioGridColumn selectedColumn, List<String> propertyNameElements, String propertyClass, String propertyTitle)
ScenarioGridColumncontext - It contains the Context inside which the commands will be executedselectedColumn - The selected ScenarioGridColumn where the command was launchedpropertyNameElements - The List with the path instance_name.property.name (eg. Author.isAlive)propertyClass - it contains the full classname of the property (eg. com.Author)propertyTitle - The title to assign to this property.protected void setPropertyHeader(ScenarioSimulationContext context, ScenarioGridColumn selectedColumn, org.drools.scenariosimulation.api.model.FactIdentifier factIdentifier, List<String> propertyNameElements, String propertyClass, String propertyTitle)
ScenarioGridColumncontext - It contains the Context inside which the commands will be executedselectedColumn - The selected ScenarioGridColumn where the command was launchedfactIdentifier - The FactIdentifier associated to the selected columnpropertyNameElements - The List with the path instance_name.property.name (eg. Author.isAlive)propertyClass - it contains the full classname of the property (eg. com.Author)propertyTitle - The title to assign to this property.protected void setPropertyMetaData(ScenarioHeaderMetaData propertyHeaderMetaData, String title, boolean readOnly, ScenarioGridColumn selectedColumn, String placeHolder)
ScenarioGridColumn.propertyHeaderMetaData - title - readOnly - selectedColumn - placeHolder - protected void manageCollectionProperty(ScenarioSimulationContext context, ScenarioGridColumn selectedColumn, String className, int columnIndex, List<String> fullPropertyPathElements)
context - selectedColumn - className - The name of the class to be used to retrieve the corresponding FactModelTree, i.e. without the packagecolumnIndex - fullPropertyPathElements - This is the List of all the elements pointing to the final property (ex. Book.author.books)protected FactModelTree navigateComplexObject(FactModelTree factModelTree, List<String> pathElements, SortedMap<String,FactModelTree> dataObjectFieldsMap)
factModelTree - pathElements - This is the List of all the elements pointing to the final property (ex. Book.author.books)dataObjectFieldsMap - protected String getPropertyHeaderTitle(ScenarioSimulationContext context, List<String> propertyNameElements, org.drools.scenariosimulation.api.model.FactIdentifier factIdentifier)
protected Optional<String> getMatchingExpressionAlias(ScenarioSimulationContext context, List<String> propertyNameElements, org.drools.scenariosimulation.api.model.FactIdentifier factIdentifier)
Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.