Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.service.entity.internal
Class EntityDefinitionServiceUndoSupport

java.lang.Object
  extended by eu.esdihumboldt.hale.ui.service.entity.internal.EntityDefinitionServiceDecorator
      extended by eu.esdihumboldt.hale.ui.service.entity.internal.EntityDefinitionServiceUndoSupport
All Implemented Interfaces:
EntityDefinitionService

public class EntityDefinitionServiceUndoSupport
extends EntityDefinitionServiceDecorator

Decorator that adds undo/redo support to an entity definition service.

Author:
Kai Schwierczek

Field Summary
 
Fields inherited from class eu.esdihumboldt.hale.ui.service.entity.internal.EntityDefinitionServiceDecorator
entityDefinitionService
 
Constructor Summary
EntityDefinitionServiceUndoSupport(EntityDefinitionService entityDefinitionService)
          Create undo/redo support for the given entity definition service
 
Method Summary
 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.
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).
 
Methods inherited from class eu.esdihumboldt.hale.ui.service.entity.internal.EntityDefinitionServiceDecorator
addListener, getChildren, getParent, getTypeEntities, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityDefinitionServiceUndoSupport

public EntityDefinitionServiceUndoSupport(EntityDefinitionService entityDefinitionService)
Create undo/redo support for the given entity definition service

Parameters:
entityDefinitionService - the entity definition service
Method Detail

addConditionContext

public EntityDefinition addConditionContext(EntityDefinition sibling,
                                            Filter filter)
Description copied from interface: EntityDefinitionService
Add a new condition context for the given entity definition and create a new sibling associated to the new context.

Specified by:
addConditionContext in interface EntityDefinitionService
Overrides:
addConditionContext in class EntityDefinitionServiceDecorator
Parameters:
sibling - the entity definition which is a sibling of the entity definition to create
filter - the condition filter
Returns:
the entity definition associated to the index context
See Also:
EntityDefinitionServiceDecorator.addConditionContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition, eu.esdihumboldt.hale.common.instance.model.Filter)

addIndexContext

public EntityDefinition addIndexContext(EntityDefinition sibling,
                                        Integer index)
Description copied from interface: EntityDefinitionService
Add a new index context for the given entity definition and create a new sibling associated to the new context.

Specified by:
addIndexContext in interface EntityDefinitionService
Overrides:
addIndexContext in class EntityDefinitionServiceDecorator
Parameters:
sibling - the entity definition which is a sibling of the entity definition to create
index - the property index associated to the context, if null will be determined automatically
Returns:
the entity definition associated to the index context
See Also:
EntityDefinitionServiceDecorator.addIndexContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition, java.lang.Integer)

addNamedContext

public EntityDefinition addNamedContext(EntityDefinition sibling)
Description copied from interface: EntityDefinitionService
Add a new named instance context for the given entity definition and create a new sibling associated to the new context.

Specified by:
addNamedContext in interface EntityDefinitionService
Overrides:
addNamedContext in class EntityDefinitionServiceDecorator
Parameters:
sibling - the entity definition which is a sibling of the entity definition to create
Returns:
the entity definition associated to the new instance context
See Also:
EntityDefinitionServiceDecorator.addNamedContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition)

removeContext

public void removeContext(EntityDefinition entity)
Description copied from interface: EntityDefinitionService
Remove the instance context associated with the given entity definition (if possible).

Specified by:
removeContext in interface EntityDefinitionService
Overrides:
removeContext in class EntityDefinitionServiceDecorator
Parameters:
entity - the entity definition or null if creating an instance context is not possible FIXME report success/failure?
See Also:
EntityDefinitionServiceDecorator.removeContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition)

executeOperation

protected void executeOperation(org.eclipse.core.commands.operations.IUndoableOperation operation)
Execute an operation.

Parameters:
operation - the operation to execute

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d