public class EntityDefinitionServiceDecorator extends Object implements EntityDefinitionService
Modifier and Type | Field and Description |
---|---|
protected EntityDefinitionService |
entityDefinitionService
The decorated entity definition service.
|
Constructor and Description |
---|
EntityDefinitionServiceDecorator(EntityDefinitionService entityDefinitionService)
Create a decorator for the 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.
|
void |
addListener(EntityDefinitionServiceListener listener)
Adds a listener to the service
|
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. |
Collection<? extends EntityDefinition> |
getChildren(EntityDefinition entity)
Get the children of the given entity definition, i.e.
|
EntityDefinition |
getParent(EntityDefinition entity)
Get the parent entity definition for the given entity definition.
|
Collection<? extends TypeEntityDefinition> |
getTypeEntities(TypeDefinition type,
SchemaSpaceID schemaSpace)
Get all available entity definitions for a given type.
|
void |
removeContext(EntityDefinition entity)
Remove the instance context associated with the given entity definition
(if possible).
|
void |
removeListener(EntityDefinitionServiceListener listener)
Removes a listener from the service
|
protected EntityDefinitionService entityDefinitionService
public EntityDefinitionServiceDecorator(EntityDefinitionService entityDefinitionService)
entityDefinitionService
- the entity definition servicepublic Collection<? extends EntityDefinition> getChildren(EntityDefinition entity)
EntityDefinitionService
getChildren
in interface EntityDefinitionService
entity
- the entity definitionEntityDefinitionService.getChildren(eu.esdihumboldt.hale.common.align.model.EntityDefinition)
public Collection<? extends TypeEntityDefinition> getTypeEntities(TypeDefinition type, SchemaSpaceID schemaSpace)
EntityDefinitionService
getTypeEntities
in interface EntityDefinitionService
type
- the type definitionschemaSpace
- the type schema spaceEntityDefinitionService.getTypeEntities(eu.esdihumboldt.hale.common.schema.model.TypeDefinition,
eu.esdihumboldt.hale.common.schema.SchemaSpaceID)
public EntityDefinition getParent(EntityDefinition entity)
EntityDefinitionService
getParent
in interface EntityDefinitionService
entity
- the entity definitionnull
if the given
entity definition represents a typeEntityDefinitionService.getParent(eu.esdihumboldt.hale.common.align.model.EntityDefinition)
public EntityDefinition addNamedContext(EntityDefinition sibling)
EntityDefinitionService
addNamedContext
in interface EntityDefinitionService
sibling
- the entity definition which is a sibling of the entity
definition to createEntityDefinitionService.addNamedContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition)
public EntityDefinition addIndexContext(EntityDefinition sibling, Integer index)
EntityDefinitionService
addIndexContext
in interface EntityDefinitionService
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 automaticallyEntityDefinitionService.addIndexContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition,
java.lang.Integer)
public EntityDefinition addConditionContext(EntityDefinition sibling, Filter filter)
EntityDefinitionService
addConditionContext
in interface EntityDefinitionService
sibling
- the entity definition which is a sibling of the entity
definition to createfilter
- the condition filterEntityDefinitionService.addConditionContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition,
eu.esdihumboldt.hale.common.instance.model.Filter)
public void removeContext(EntityDefinition entity)
EntityDefinitionService
removeContext
in interface EntityDefinitionService
entity
- the entity definition or null
if creating an
instance context is not possible FIXME report success/failure?EntityDefinitionService.removeContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition)
public void addListener(EntityDefinitionServiceListener listener)
EntityDefinitionService
addListener
in interface EntityDefinitionService
listener
- the listener to addEntityDefinitionService.addListener(eu.esdihumboldt.hale.ui.service.entity.EntityDefinitionServiceListener)
public void removeListener(EntityDefinitionServiceListener listener)
EntityDefinitionService
removeListener
in interface EntityDefinitionService
listener
- the listener to removeEntityDefinitionService.removeListener(eu.esdihumboldt.hale.ui.service.entity.EntityDefinitionServiceListener)
public EntityDefinition editConditionContext(EntityDefinition sibling, Filter filter)
EntityDefinitionService
editConditionContext
in interface EntityDefinitionService
sibling
- the entity definition which is a sibling of the entity
definition to createfilter
- the condition filternull
if the operation failedEntityDefinitionService.editConditionContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition,
eu.esdihumboldt.hale.common.instance.model.Filter)
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a