Humboldt Alignment Editor 2.5.0

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

java.lang.Object
  extended by eu.esdihumboldt.hale.ui.service.entity.internal.AbstractEntityDefinitionService
All Implemented Interfaces:
EntityDefinitionService
Direct Known Subclasses:
EntityDefinitionServiceImpl

public abstract class AbstractEntityDefinitionService
extends Object
implements EntityDefinitionService

Abstract entity definition service implementation. Manages service listeners.

Author:
Simon Templer

Constructor Summary
AbstractEntityDefinitionService()
           
 
Method Summary
 void addListener(EntityDefinitionServiceListener listener)
          Adds a listener to the service
protected  EntityDefinition createEntity(TypeDefinition type, List<ChildContext> path, SchemaSpaceID schemaSpace, Filter filter)
          Create an entity definition from a type and a child path
 EntityDefinition getParent(EntityDefinition entity)
          Get the parent entity definition for the given entity definition.
 void notifyContextAdded(EntityDefinition contextEntity)
          Called when a new instance context has been added.
 void notifyContextRemoved(EntityDefinition contextEntity)
          Called when an instance context has been removed.
 void notifyContextsAdded(Iterable<EntityDefinition> contextEntities)
          Called when multiple new instance contexts have been added.
 void removeListener(EntityDefinitionServiceListener listener)
          Removes a listener from the service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface eu.esdihumboldt.hale.ui.service.entity.EntityDefinitionService
addConditionContext, addIndexContext, addNamedContext, getChildren, getTypeEntities, removeContext
 

Constructor Detail

AbstractEntityDefinitionService

public AbstractEntityDefinitionService()
Method Detail

addListener

public void addListener(EntityDefinitionServiceListener listener)
Description copied from interface: EntityDefinitionService
Adds a listener to the service

Specified by:
addListener in interface EntityDefinitionService
Parameters:
listener - the listener to add
See Also:
EntityDefinitionService.addListener(EntityDefinitionServiceListener)

removeListener

public void removeListener(EntityDefinitionServiceListener listener)
Description copied from interface: EntityDefinitionService
Removes a listener from the service

Specified by:
removeListener in interface EntityDefinitionService
Parameters:
listener - the listener to remove
See Also:
EntityDefinitionService.removeListener(EntityDefinitionServiceListener)

notifyContextAdded

public void notifyContextAdded(EntityDefinition contextEntity)
Called when a new instance context has been added.

Parameters:
contextEntity - the entity definition representing the instance context

notifyContextsAdded

public void notifyContextsAdded(Iterable<EntityDefinition> contextEntities)
Called when multiple new instance contexts have been added.

Parameters:
contextEntities - the entity definitions representing the instance contexts

notifyContextRemoved

public void notifyContextRemoved(EntityDefinition contextEntity)
Called when an instance context has been removed.

Parameters:
contextEntity - the entity definition representing the instance context

getParent

public EntityDefinition getParent(EntityDefinition entity)
Description copied from interface: EntityDefinitionService
Get the parent entity definition for the given entity definition.

Specified by:
getParent in interface EntityDefinitionService
Parameters:
entity - the entity definition
Returns:
the parent entity definition or null if the given entity definition represents a type
See Also:
EntityDefinitionService.getParent(EntityDefinition)

createEntity

protected EntityDefinition createEntity(TypeDefinition type,
                                        List<ChildContext> path,
                                        SchemaSpaceID schemaSpace,
                                        Filter filter)
Create an entity definition from a type and a child path

Parameters:
type - the path parent
path - the child path
schemaSpace - the associated schema space
filter - the type entity filter
Returns:
the created entity definition

Humboldt Alignment Editor 2.5.0

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