Package net.officefloor.gef.item
Class AbstractProcedureItem<R extends Model,RE extends java.lang.Enum<RE>,O,M extends Model,E extends java.lang.Enum<E>,I extends AbstractProcedureItem<R,RE,O,M,E,I>>
- java.lang.Object
-
- net.officefloor.gef.ide.editor.AbstractItem<R,O,R,RE,M,E>
-
- net.officefloor.gef.ide.editor.AbstractConfigurableItem<R,RE,O,M,E,I>
-
- net.officefloor.gef.item.AbstractProcedureItem<R,RE,O,M,E,I>
-
- All Implemented Interfaces:
ConfigurableItem<I>
- Direct Known Subclasses:
ActivityProcedureItem
,WoofProcedureItem
public abstract class AbstractProcedureItem<R extends Model,RE extends java.lang.Enum<RE>,O,M extends Model,E extends java.lang.Enum<E>,I extends AbstractProcedureItem<R,RE,O,M,E,I>> extends AbstractConfigurableItem<R,RE,O,M,E,I>
Configuration for the abstractProcedure
.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.gef.ide.editor.AbstractConfigurableItem
AbstractConfigurableItem.ConfigurableModelContext<O,M>, AbstractConfigurableItem.IdeConfiguration<O,M extends Model,I>, AbstractConfigurableItem.IdeConfigurer, AbstractConfigurableItem.ItemActioner<O,M>, AbstractConfigurableItem.ItemConfigurer<O,M,I>
-
Nested classes/interfaces inherited from class net.officefloor.gef.ide.editor.AbstractItem
AbstractItem.ConfigurableContext<R extends Model,O>, AbstractItem.IdeChildrenGroup, AbstractItem.IdeConnection<C extends ConnectionModel>, AbstractItem.IdeConnectionTarget<C extends ConnectionModel,T extends Model,TE extends java.lang.Enum<TE>>, AbstractItem.IdeExtractor, AbstractItem.IdeLabeller, AbstractItem.IdeStyle, AbstractItem.PreferenceListener
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
name
Name.protected java.util.Map<java.lang.String,java.lang.String>
outputNameMapping
ProcedureFlowType
name mapping.protected java.lang.String
procedure
Procedure
name.protected javafx.collections.ObservableList<Procedure>
procedures
Procedure
instances.protected ProcedureType
procedureType
protected PropertyList
properties
protected java.lang.String
resource
Resource.protected java.lang.String
sourceName
Source.-
Fields inherited from class net.officefloor.gef.ide.editor.AbstractItem
builder
-
-
Constructor Summary
Constructors Constructor Description AbstractProcedureItem()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Change<M>
addProcedure(O operations, java.lang.String name, java.lang.String resource, java.lang.String sourceName, java.lang.String procedure, PropertyList properties, ProcedureType procedureType)
protected void
children(java.util.List<AbstractItem.IdeChildrenGroup> childGroups)
Loads theAbstractItem.IdeChildrenGroup
instances.AbstractConfigurableItem.IdeConfigurer
configure()
Obtains the item configuration.protected abstract I
createItem()
Creates theAbstractProcedureItem
implementation.protected abstract AbstractItem<R,O,M,E,?,?>
createNextItem()
Creates theProcedure
nextAbstractItem
implementation.protected abstract AbstractItem<R,O,M,E,?,?>
createOutputItem()
Creates theProcedure
outputAbstractItem
implementation.protected abstract java.lang.Class<? extends ConnectionModel>[]
getInputConnectionClasses()
Obtains the inputConnectionModel
Class
instances.protected abstract java.lang.String
getProcedureName(M model)
Obtains theProcedure
name.protected abstract PropertyList
getProcedureProperties(M model)
Obtains theProcedure
PropertyList
.protected abstract java.lang.String
getResource(M model)
Obtains the resource.protected abstract java.lang.String
getSectionName(M model)
Obtains theSubSection
/OfficeSection
name.protected abstract java.lang.String
getSourceName(M model)
Obtains the source name.I
item(M model)
Creates an item from theModel
.static <R extends Model,RE extends java.lang.Enum<RE>,O,M extends Model,E extends java.lang.Enum<E>,I extends AbstractProcedureItem<R,RE,O,M,E,I>>
voidloadProcedures(ValueValidator.ValueValidatorContext<? extends I,java.lang.String> validatorContext, SelectBuilder<I,Procedure> selectProcedures, EnvironmentBridge envBridge)
Loads the availableProcedure
instances.static ProcedureType
loadProcedureType(AbstractProcedureItem<?,?,?,?,?,?> item, EnvironmentBridge envBridge)
Loads theProcedureType
for theAbstractProcedureItem
.protected void
loadStyles(java.util.List<AbstractItem.IdeStyle> styles)
Default implementation ofAbstractItem.style()
will invoke this to load styles.protected abstract Change<M>
refactorProcedure(O operations, M model, java.lang.String name, java.lang.String resource, java.lang.String sourceName, java.lang.String procedure, PropertyList properties, ProcedureType procedureType, java.util.Map<java.lang.String,java.lang.String> outputNameMapping)
protected abstract Change<M>
removeProcedure(O operations, M model)
javafx.scene.layout.Pane
visual(M model, AdaptedChildVisualFactoryContext<M> context)
Creates the visual for theModel
.-
Methods inherited from class net.officefloor.gef.ide.editor.AbstractConfigurableItem
createAdaptedParent, extractIdeConfiguration, furtherAdapt
-
Methods inherited from class net.officefloor.gef.ide.editor.AbstractItem
connections, createChild, extract, furtherAdapt, getBuilder, getChildrenGroups, getConfigurableContext, getConnections, getPreferenceStyleId, init, label, loadToParent, prototype, style, translateFromCommaSeparatedList, translateToCommaSeparateList, translateToNameMappings, translateToPropertyList
-
-
-
-
Field Detail
-
name
protected java.lang.String name
Name.
-
resource
protected java.lang.String resource
Resource.
-
sourceName
protected java.lang.String sourceName
Source.
-
procedure
protected java.lang.String procedure
Procedure
name.
-
properties
protected PropertyList properties
-
procedureType
protected ProcedureType procedureType
-
outputNameMapping
protected java.util.Map<java.lang.String,java.lang.String> outputNameMapping
ProcedureFlowType
name mapping.
-
-
Method Detail
-
loadProcedures
public static <R extends Model,RE extends java.lang.Enum<RE>,O,M extends Model,E extends java.lang.Enum<E>,I extends AbstractProcedureItem<R,RE,O,M,E,I>> void loadProcedures(ValueValidator.ValueValidatorContext<? extends I,java.lang.String> validatorContext, SelectBuilder<I,Procedure> selectProcedures, EnvironmentBridge envBridge) throws java.lang.Exception
Loads the availableProcedure
instances.- Parameters:
validatorContext
-ValueValidator.ValueValidatorContext
.selectProcedures
-Builder
for selecting theProcedure
.envBridge
-EnvironmentBridge
.- Throws:
java.lang.Exception
- If fails to load availableProcedure
instances.
-
loadProcedureType
public static ProcedureType loadProcedureType(AbstractProcedureItem<?,?,?,?,?,?> item, EnvironmentBridge envBridge) throws java.lang.Exception
Loads theProcedureType
for theAbstractProcedureItem
.- Parameters:
item
-AbstractProcedureItem
.envBridge
-EnvironmentBridge
.- Returns:
ProcedureType
.- Throws:
java.lang.Exception
- If fails to load theProcedureType
.
-
createItem
protected abstract I createItem()
Creates theAbstractProcedureItem
implementation.- Returns:
AbstractProcedureItem
implementation.
-
getSectionName
protected abstract java.lang.String getSectionName(M model)
Obtains theSubSection
/OfficeSection
name.- Parameters:
model
-Model
.- Returns:
SubSection
/OfficeSection
name.
-
getResource
protected abstract java.lang.String getResource(M model)
Obtains the resource.- Parameters:
model
-Model
.- Returns:
- Resource.
-
getSourceName
protected abstract java.lang.String getSourceName(M model)
Obtains the source name.- Parameters:
model
-Model
.- Returns:
- Source name.
-
getProcedureName
protected abstract java.lang.String getProcedureName(M model)
Obtains theProcedure
name.
-
getProcedureProperties
protected abstract PropertyList getProcedureProperties(M model)
Obtains theProcedure
PropertyList
.- Parameters:
model
-Model
.- Returns:
Procedure
PropertyList
.
-
getInputConnectionClasses
protected abstract java.lang.Class<? extends ConnectionModel>[] getInputConnectionClasses()
Obtains the inputConnectionModel
Class
instances.- Returns:
- Input
ConnectionModel
Class
instances.
-
createNextItem
protected abstract AbstractItem<R,O,M,E,?,?> createNextItem()
Creates theProcedure
nextAbstractItem
implementation.- Returns:
Procedure
nextAbstractItem
implementation.
-
createOutputItem
protected abstract AbstractItem<R,O,M,E,?,?> createOutputItem()
Creates theProcedure
outputAbstractItem
implementation.- Returns:
Procedure
outputAbstractItem
implementation.
-
addProcedure
protected abstract Change<M> addProcedure(O operations, java.lang.String name, java.lang.String resource, java.lang.String sourceName, java.lang.String procedure, PropertyList properties, ProcedureType procedureType)
- Parameters:
operations
- Operations.name
-SubSection
/OfficeSection
name.resource
- Resource.sourceName
- Source name.procedure
-Procedure
name.properties
-PropertyList
.procedureType
-ProcedureType
.- Returns:
Change
to addProcedure
.
-
refactorProcedure
protected abstract Change<M> refactorProcedure(O operations, M model, java.lang.String name, java.lang.String resource, java.lang.String sourceName, java.lang.String procedure, PropertyList properties, ProcedureType procedureType, java.util.Map<java.lang.String,java.lang.String> outputNameMapping)
- Parameters:
operations
- Operations.model
-Model
to refactor.name
-SubSection
/OfficeSection
name.resource
- Resource.sourceName
- Source name.procedure
-Procedure
name.properties
-PropertyList
.procedureType
-ProcedureType
.outputNameMapping
-Procedure
output name mapping.- Returns:
Change
to refactorProcedure
.
-
visual
public javafx.scene.layout.Pane visual(M model, AdaptedChildVisualFactoryContext<M> context)
Description copied from class:AbstractItem
Creates the visual for theModel
.
-
loadStyles
protected void loadStyles(java.util.List<AbstractItem.IdeStyle> styles)
Description copied from class:AbstractItem
Default implementation ofAbstractItem.style()
will invoke this to load styles.- Overrides:
loadStyles
in classAbstractItem<R extends Model,O,R extends Model,RE extends java.lang.Enum<RE>,M extends Model,E extends java.lang.Enum<E>>
- Parameters:
styles
-List
to be loaded with theAbstractItem.IdeStyle
instances.
-
item
public I item(M model)
Description copied from class:AbstractConfigurableItem
Creates an item from theModel
.
-
children
protected void children(java.util.List<AbstractItem.IdeChildrenGroup> childGroups)
Description copied from class:AbstractItem
Loads theAbstractItem.IdeChildrenGroup
instances.
-
configure
public AbstractConfigurableItem.IdeConfigurer configure()
Description copied from class:AbstractConfigurableItem
Obtains the item configuration.
-
-