Package net.officefloor.gef.activity
Class ActivitySectionItem
- 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.AbstractSectionItem<ActivityModel,ActivityModel.ActivityEvent,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,ActivitySectionItem>
-
- net.officefloor.gef.activity.ActivitySectionItem
-
- All Implemented Interfaces:
ConfigurableItem<ActivitySectionItem>
public class ActivitySectionItem extends AbstractSectionItem<ActivityModel,ActivityModel.ActivityEvent,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,ActivitySectionItem>
Configuration for theActivitySectionModel
.- 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 inherited from class net.officefloor.gef.item.AbstractSectionItem
choice, inputNameMapping, location, name, outputNameMapping, properties, sectionType, sourceClassName
-
Fields inherited from class net.officefloor.gef.ide.editor.AbstractItem
builder
-
-
Constructor Summary
Constructors Constructor Description ActivitySectionItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Change<ActivitySectionModel>
addSection(ActivityChanges operations, java.lang.String name, java.lang.String sourceClassName, java.lang.String location, PropertyList properties, SectionType sectionType)
protected AbstractItem<ActivityModel,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,?,?>
createInputItem()
Creates theSectionInput
AbstractItem
implementation.protected ActivitySectionItem
createItem()
Creates theAbstractSectionItem
implementation.protected AbstractItem<ActivityModel,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,?,?>
createOutputItem()
Creates theSectionOutput
AbstractItem
implementation.AbstractItem.IdeExtractor
extract()
protected java.lang.String
getSectionLocation(ActivitySectionModel model)
Obtains the location from theModel
.protected java.lang.String
getSectionName(ActivitySectionModel model)
Obtains the name from theModel
.protected PropertyList
getSectionProperties(ActivitySectionModel model)
Obtains thePropertyList
from theModel
.protected java.lang.String
getSectionSourceClassName(ActivitySectionModel model)
AbstractItem.IdeLabeller
label()
Obtains theAbstractItem.IdeLabeller
for theModel
.void
loadToParent(ActivityModel parentModel, ActivitySectionModel itemModel)
ActivitySectionModel
prototype()
Creates the prototype for the item.protected Change<ActivitySectionModel>
refactorSection(ActivityChanges operations, ActivitySectionModel model, java.lang.String name, java.lang.String sourceClassName, java.lang.String location, PropertyList properties, SectionType sectionType, java.util.Map<java.lang.String,java.lang.String> inputNameMapping, java.util.Map<java.lang.String,java.lang.String> outputNameMapping)
protected Change<ActivitySectionModel>
removeSection(ActivityChanges operations, ActivitySectionModel model)
-
Methods inherited from class net.officefloor.gef.item.AbstractSectionItem
children, configure, item, loadSectionType, loadStyles, visual
-
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, furtherAdapt, getBuilder, getChildrenGroups, getConfigurableContext, getConnections, getPreferenceStyleId, init, style, translateFromCommaSeparatedList, translateToCommaSeparateList, translateToNameMappings, translateToPropertyList
-
-
-
-
Method Detail
-
prototype
public ActivitySectionModel prototype()
Description copied from class:AbstractItem
Creates the prototype for the item.- Specified by:
prototype
in classAbstractItem<ActivityModel,ActivityChanges,ActivityModel,ActivityModel.ActivityEvent,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent>
- Returns:
- Prototype.
-
extract
public AbstractItem.IdeExtractor extract()
Description copied from class:AbstractItem
- Specified by:
extract
in classAbstractItem<ActivityModel,ActivityChanges,ActivityModel,ActivityModel.ActivityEvent,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent>
- Returns:
AbstractItem.IdeExtractor
.
-
loadToParent
public void loadToParent(ActivityModel parentModel, ActivitySectionModel itemModel)
Description copied from class:AbstractItem
Loads theModel
to the parentModel
. This allows for constructing a prototype model for editing preferences of theAbstractAdaptedIdeEditor
.- Specified by:
loadToParent
in classAbstractItem<ActivityModel,ActivityChanges,ActivityModel,ActivityModel.ActivityEvent,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent>
- Parameters:
parentModel
- ParentModel
.itemModel
- ItemModel
.
-
label
public AbstractItem.IdeLabeller label()
Description copied from class:AbstractItem
Obtains theAbstractItem.IdeLabeller
for theModel
.- Specified by:
label
in classAbstractItem<ActivityModel,ActivityChanges,ActivityModel,ActivityModel.ActivityEvent,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent>
- Returns:
AbstractItem.IdeLabeller
.
-
createItem
protected ActivitySectionItem createItem()
Description copied from class:AbstractSectionItem
Creates theAbstractSectionItem
implementation.- Specified by:
createItem
in classAbstractSectionItem<ActivityModel,ActivityModel.ActivityEvent,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,ActivitySectionItem>
- Returns:
AbstractSectionItem
implementation.
-
getSectionName
protected java.lang.String getSectionName(ActivitySectionModel model)
Description copied from class:AbstractSectionItem
Obtains the name from theModel
.- Specified by:
getSectionName
in classAbstractSectionItem<ActivityModel,ActivityModel.ActivityEvent,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,ActivitySectionItem>
- Parameters:
model
-Model
.- Returns:
- Name.
-
getSectionSourceClassName
protected java.lang.String getSectionSourceClassName(ActivitySectionModel model)
Description copied from class:AbstractSectionItem
- Specified by:
getSectionSourceClassName
in classAbstractSectionItem<ActivityModel,ActivityModel.ActivityEvent,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,ActivitySectionItem>
- Parameters:
model
-Model
.- Returns:
SectionSource
Class
name.
-
getSectionLocation
protected java.lang.String getSectionLocation(ActivitySectionModel model)
Description copied from class:AbstractSectionItem
Obtains the location from theModel
.- Specified by:
getSectionLocation
in classAbstractSectionItem<ActivityModel,ActivityModel.ActivityEvent,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,ActivitySectionItem>
- Parameters:
model
-Model
.- Returns:
- Location.
-
getSectionProperties
protected PropertyList getSectionProperties(ActivitySectionModel model)
Description copied from class:AbstractSectionItem
Obtains thePropertyList
from theModel
.- Specified by:
getSectionProperties
in classAbstractSectionItem<ActivityModel,ActivityModel.ActivityEvent,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,ActivitySectionItem>
- Parameters:
model
-Model
.- Returns:
PropertyList
from theModel
.
-
createInputItem
protected AbstractItem<ActivityModel,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,?,?> createInputItem()
Description copied from class:AbstractSectionItem
Creates theSectionInput
AbstractItem
implementation.- Specified by:
createInputItem
in classAbstractSectionItem<ActivityModel,ActivityModel.ActivityEvent,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,ActivitySectionItem>
- Returns:
SectionInput
AbstractItem
implementation.
-
createOutputItem
protected AbstractItem<ActivityModel,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,?,?> createOutputItem()
Description copied from class:AbstractSectionItem
Creates theSectionOutput
AbstractItem
implementation.- Specified by:
createOutputItem
in classAbstractSectionItem<ActivityModel,ActivityModel.ActivityEvent,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,ActivitySectionItem>
- Returns:
SectionOutput
AbstractItem
implementation.
-
addSection
protected Change<ActivitySectionModel> addSection(ActivityChanges operations, java.lang.String name, java.lang.String sourceClassName, java.lang.String location, PropertyList properties, SectionType sectionType)
Description copied from class:AbstractSectionItem
- Specified by:
addSection
in classAbstractSectionItem<ActivityModel,ActivityModel.ActivityEvent,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,ActivitySectionItem>
- Parameters:
operations
- Operations.name
- Name.sourceClassName
-SectionSource
Class
name.location
- Location.properties
-PropertyList
.sectionType
-SectionType
.- Returns:
Change
to addSubSection
/OfficeSection
.
-
refactorSection
protected Change<ActivitySectionModel> refactorSection(ActivityChanges operations, ActivitySectionModel model, java.lang.String name, java.lang.String sourceClassName, java.lang.String location, PropertyList properties, SectionType sectionType, java.util.Map<java.lang.String,java.lang.String> inputNameMapping, java.util.Map<java.lang.String,java.lang.String> outputNameMapping)
Description copied from class:AbstractSectionItem
- Specified by:
refactorSection
in classAbstractSectionItem<ActivityModel,ActivityModel.ActivityEvent,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,ActivitySectionItem>
- Parameters:
operations
- Operations.model
-Model
to refactor.name
- Name.sourceClassName
-SectionSource
Class
name.location
- Location.properties
-PropertyList
.sectionType
-SectionType
.inputNameMapping
-SectionInput
name mapping.outputNameMapping
-SectionOutput
name mapping.- Returns:
Change
to refactorSubSection
/OfficeSection
.
-
removeSection
protected Change<ActivitySectionModel> removeSection(ActivityChanges operations, ActivitySectionModel model)
Description copied from class:AbstractSectionItem
- Specified by:
removeSection
in classAbstractSectionItem<ActivityModel,ActivityModel.ActivityEvent,ActivityChanges,ActivitySectionModel,ActivitySectionModel.ActivitySectionEvent,ActivitySectionItem>
- Parameters:
operations
- Operations.model
-Model
to remove.- Returns:
Change
to removeSubSection
/OfficeSection
.
-
-