public class EntityDefinitionServiceUndoSupport extends EntityDefinitionServiceDecorator
entityDefinitionService
Constructor and Description |
---|
EntityDefinitionServiceUndoSupport(EntityDefinitionService entityDefinitionService)
Create undo/redo support for the given entity definition service
|
Modifier and Type | Method and Description |
---|---|
EntityDefinition |
addConditionContext(EntityDefinition sibling,
Filter filter)
Add a new condition context for the given entity definition and create a
new sibling associated to the new context.
|
EntityDefinition |
addIndexContext(EntityDefinition sibling,
Integer index)
Add a new index context for the given entity definition and create a new
sibling associated to the new context.
|
EntityDefinition |
addNamedContext(EntityDefinition sibling)
Add a new named instance context for the given entity definition and
create a new sibling associated to the new context.
|
EntityDefinition |
editConditionContext(EntityDefinition sibling,
Filter filter)
Creates a new sibling for the given entity definition with a new
condition context using the given filter.
All cells using the given entity definition are changed to use the new one. |
protected void |
executeOperation(org.eclipse.core.commands.operations.IUndoableOperation operation)
Execute an operation.
|
void |
removeContext(EntityDefinition entity)
Remove the instance context associated with the given entity definition
(if possible).
|
addListener, getChildren, getParent, getTypeEntities, removeListener
public EntityDefinitionServiceUndoSupport(EntityDefinitionService entityDefinitionService)
entityDefinitionService
- the entity definition servicepublic EntityDefinition addConditionContext(EntityDefinition sibling, Filter filter)
EntityDefinitionService
addConditionContext
in interface EntityDefinitionService
addConditionContext
in class EntityDefinitionServiceDecorator
sibling
- the entity definition which is a sibling of the entity
definition to createfilter
- the condition filterEntityDefinitionServiceDecorator.addConditionContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition,
eu.esdihumboldt.hale.common.instance.model.Filter)
public EntityDefinition addIndexContext(EntityDefinition sibling, Integer index)
EntityDefinitionService
addIndexContext
in interface EntityDefinitionService
addIndexContext
in class EntityDefinitionServiceDecorator
sibling
- the entity definition which is a sibling of the entity
definition to createindex
- the property index associated to the context, if
null
will be determined automaticallyEntityDefinitionServiceDecorator.addIndexContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition,
java.lang.Integer)
public EntityDefinition addNamedContext(EntityDefinition sibling)
EntityDefinitionService
addNamedContext
in interface EntityDefinitionService
addNamedContext
in class EntityDefinitionServiceDecorator
sibling
- the entity definition which is a sibling of the entity
definition to createEntityDefinitionServiceDecorator.addNamedContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition)
public void removeContext(EntityDefinition entity)
EntityDefinitionService
removeContext
in interface EntityDefinitionService
removeContext
in class EntityDefinitionServiceDecorator
entity
- the entity definition or null
if creating an
instance context is not possible FIXME report success/failure?EntityDefinitionServiceDecorator.removeContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition)
public EntityDefinition editConditionContext(EntityDefinition sibling, Filter filter)
EntityDefinitionService
editConditionContext
in interface EntityDefinitionService
editConditionContext
in class EntityDefinitionServiceDecorator
sibling
- the entity definition which is a sibling of the entity
definition to createfilter
- the condition filternull
if the operation failedEntityDefinitionServiceDecorator.editConditionContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition,
eu.esdihumboldt.hale.common.instance.model.Filter)
protected void executeOperation(org.eclipse.core.commands.operations.IUndoableOperation operation)
operation
- the operation to executeBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a