templates.model
Interface TemplateLink

All Superinterfaces:
ides.api.core.Annotable, ides.api.plugin.model.DESElement
All Known Implementing Classes:
Link

public interface TemplateLink
extends ides.api.plugin.model.DESElement

Describes a link between two components in a template design. A link is symmetric so it makes no difference which TemplateComponent is added to the "left" or to the "right". "Left" and "right" are used only to enable addressing the two TemplateComponents separately.

Author:
Lenko Grigorov

Field Summary
 
Fields inherited from interface ides.api.core.Annotable
COMPOSED_OF, COMPOSED_OF_NAMES, CONTROL_MAP, FILE, LAYOUT, TEXT_ANNOTATION
 
Method Summary
 boolean existsLeftEvent()
          Checks if the FSAModel of the first TemplateComponent contains the linked event.
 boolean existsRightEvent()
          Checks if the FSAModel of the second TemplateComponent contains the linked event.
 TemplateComponent getChannel()
          Retrieve the channel linked by the link, if any.
 TemplateComponent[] getComponents()
          Retrieve the two TemplateComponents linked by the link.
 TemplateComponent getLeftComponent()
          Retrieve the first TemplateComponent linked by the link.
 ides.api.plugin.model.DESEvent getLeftEvent()
          Retrieves the linked DESEvent from the first TemplateComponent.
 java.lang.String getLeftEventName()
          Retrieve the name of the linked event from the first TemplateComponent.
 TemplateComponent getModule()
          Retrieve the module linked by the link, if any.
 TemplateComponent getRightComponent()
          Retrieve the second TemplateComponent linked by the link.
 ides.api.plugin.model.DESEvent getRightEvent()
          Retrieves the linked DESEvent from the second TemplateComponent.
 java.lang.String getRightEventName()
          Retrieve the name of the linked event from the second TemplateComponent.
 void setLeftEventName(java.lang.String name)
          Set the name of the linked event from the first TemplateComponent .
 void setRightEventName(java.lang.String name)
          Set the name of the linked event from the second TemplateComponent.
 
Methods inherited from interface ides.api.plugin.model.DESElement
getId, setId
 
Methods inherited from interface ides.api.core.Annotable
getAnnotation, hasAnnotation, removeAnnotation, setAnnotation
 

Method Detail

getLeftComponent

TemplateComponent getLeftComponent()
Retrieve the first TemplateComponent linked by the link.

A link is symmetric. "Left" and "right" are used only to enable addressing the two TemplateComponents separately.

Returns:
the first TemplateComponent linked by the link

getRightComponent

TemplateComponent getRightComponent()
Retrieve the second TemplateComponent linked by the link.

A link is symmetric. "Left" and "right" are used only to enable addressing the two TemplateComponents separately.

Returns:
the second TemplateComponent linked by the link

getComponents

TemplateComponent[] getComponents()
Retrieve the two TemplateComponents linked by the link.

Returns:
the two TemplateComponents linked by the link

getModule

TemplateComponent getModule()
Retrieve the module linked by the link, if any.

Returns:
the module linked by the link (if both TemplateComponents are modules, returns arbitrarily one of them); null if no module is linked

getChannel

TemplateComponent getChannel()
Retrieve the channel linked by the link, if any.

Returns:
the channel linked by the link (if both TemplateComponents are channels, returns arbitrarily one of them); null if no channel is linked

getLeftEventName

java.lang.String getLeftEventName()
Retrieve the name of the linked event from the first TemplateComponent.

A link is symmetric. "Left" and "right" are used only to enable addressing the two TemplateComponents separately.

Returns:
the name of the linked event from the first TemplateComponent

existsLeftEvent

boolean existsLeftEvent()
Checks if the FSAModel of the first TemplateComponent contains the linked event.

A link is symmetric. "Left" and "right" are used only to enable addressing the two TemplateComponents separately.

Returns:
true if the first linked TemplateComponent has an assigned FSAModel and if this FSAModel contains the linked event; false otherwise

getLeftEvent

ides.api.plugin.model.DESEvent getLeftEvent()
Retrieves the linked DESEvent from the first TemplateComponent.

A link is symmetric. "Left" and "right" are used only to enable addressing the two TemplateComponents separately.

Returns:
the linked DESEvent from the FSAModel of the first TemplateComponent, if the TemplateComponent has an assigned FSAModel and if this FSAModel contains the linked event; null otherwise

getRightEventName

java.lang.String getRightEventName()
Retrieve the name of the linked event from the second TemplateComponent.

A link is symmetric. "Left" and "right" are used only to enable addressing the two TemplateComponents separately.

Returns:
the name of the linked event from the second TemplateComponent

existsRightEvent

boolean existsRightEvent()
Checks if the FSAModel of the second TemplateComponent contains the linked event.

A link is symmetric. "Left" and "right" are used only to enable addressing the two TemplateComponents separately.

Returns:
true if the second linked TemplateComponent has an assigned FSAModel and if this FSAModel contains the linked event; false otherwise

getRightEvent

ides.api.plugin.model.DESEvent getRightEvent()
Retrieves the linked DESEvent from the second TemplateComponent.

A link is symmetric. "Left" and "right" are used only to enable addressing the two TemplateComponents separately.

Returns:
the linked DESEvent from the FSAModel of the second TemplateComponent, if the TemplateComponent has an assigned FSAModel and if this FSAModel contains the linked event; null otherwise

setLeftEventName

void setLeftEventName(java.lang.String name)
Set the name of the linked event from the first TemplateComponent .

A link is symmetric. "Left" and "right" are used only to enable addressing the two TemplateComponents separately.

Parameters:
name - the name of the linked event from the first TemplateComponent

setRightEventName

void setRightEventName(java.lang.String name)
Set the name of the linked event from the second TemplateComponent.

A link is symmetric. "Left" and "right" are used only to enable addressing the two TemplateComponents separately.

Parameters:
name - the name of the linked event from the second TemplateComponent