|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TemplateModel
Describes a template design (which includes modules, channels and links).
| Field Summary | |
|---|---|
static java.lang.String |
FSA_NAME_PREFIX
Prefix for the names of the FSA models contained in TemplateComponents. |
| Fields inherited from interface ides.api.core.Annotable |
|---|
COMPOSED_OF, COMPOSED_OF_NAMES, CONTROL_MAP, FILE, LAYOUT, TEXT_ANNOTATION |
| Method Summary | |
|---|---|
void |
addComponent(TemplateComponent component)
Add a TemplateComponent to the model. |
void |
addLink(TemplateLink link)
Add a TemplateLink to the model. |
TemplateComponent |
assembleComponent()
Create a new TemplateComponent which can be then added to the
model without breaking the model consistency (e.g., it has a unique id). |
TemplateLink |
assembleLink(long leftId,
long rightId)
Create a new TemplateLink which can be then added to the model
without breaking the model consistency (e.g., it has a unique id). |
void |
assignFSA(long componentId,
ides.api.model.fsa.FSAModel fsa)
Assign an FSAModel to the TemplateComponent with the
given id. |
TemplateComponent |
createComponent()
Create a new TemplateComponent and add it to the model. |
TemplateLink |
createLink(long leftId,
long rightId)
Create a new TemplateLink and add it to the model. |
boolean |
existsLink(long leftId,
long rightId)
Check if there is a TemplateLink between the
TemplateComponents with the given ids. |
java.util.Collection<TemplateLink> |
getAdjacentLinks(long componentId)
Retrieve all the TemplateLinks connected to the
TemplateComponent with the given id. |
java.util.Collection<TemplateComponent> |
getChannels()
Retrieve all the TemplateComponents in the model which are
channels. |
TemplateComponent |
getComponent(long id)
Return the TemplateComponent with the given id. |
int |
getComponentCount()
Return the number of TemplateComponents in the model. |
java.util.Collection<TemplateComponent> |
getComponents()
Retrieve all the TemplateComponents in the model. |
java.util.Collection<TemplateComponent> |
getCover(long channelId)
Retrieve all the modules linked to the channel with the given id. |
TemplateLink |
getLink(long id)
Return the TemplateLink with the given id. |
java.util.Collection<TemplateLink> |
getLinks()
Retrieve all the TemplateLinks in the model. |
java.util.Collection<TemplateLink> |
getLinks(long leftId,
long rightId)
Retrieve the TemplateLinks between the TemplateComponents
with the given ids. |
java.util.Collection<TemplateComponent> |
getModules()
Retrieve all the TemplateComponents in the model which are
modules. |
void |
removeComponent(long id)
Remove the TemplateComponent with the given id. |
void |
removeFSA(long componentId)
Remove the FSAModel assigned to the TemplateComponent
with the given id. |
void |
removeLink(long id)
Remove the TemplateLink with the given id. |
void |
setComponentType(long componentId,
int type)
Set the type (module or channel) of the TemplateComponent with the given id. |
| Methods inherited from interface ides.api.plugin.model.ParentModel |
|---|
getChildModel, getChildModelId |
| Methods inherited from interface ides.api.plugin.model.DESModel |
|---|
getEventSet, getModelType, getName, getParentModel, metadataChanged, modelSaved, needsSave, setName, setParentModel |
| Methods inherited from interface ides.api.core.Annotable |
|---|
getAnnotation, hasAnnotation, removeAnnotation, setAnnotation |
| Methods inherited from interface ides.api.plugin.model.DESModelPublisher |
|---|
addSubscriber, getDESModelSubscribers, removeSubscriber |
| Methods inherited from interface templates.model.TemplateModelPublisher |
|---|
addSubscriber, fireTemplateModelStructureChanged, getTemplateModelSubscribers, removeSubscriber |
| Field Detail |
|---|
static final java.lang.String FSA_NAME_PREFIX
TemplateComponents.
| Method Detail |
|---|
java.util.Collection<TemplateComponent> getComponents()
TemplateComponents in the model.
TemplateComponents in the modeljava.util.Collection<TemplateComponent> getModules()
TemplateComponents in the model which are
modules.
TemplateComponents in the model
which are modulesjava.util.Collection<TemplateComponent> getChannels()
TemplateComponents in the model which are
channels.
TemplateComponents in the model
which are channelsint getComponentCount()
TemplateComponents in the model.
TemplateComponents in the modeljava.util.Collection<TemplateLink> getLinks()
TemplateLinks in the model.
TemplateLinks in the modelTemplateComponent getComponent(long id)
TemplateComponent with the given id.
id - the id of the TemplateComponent
TemplateComponent with the given id;
null if there is no TemplateComponent with
such an idTemplateLink getLink(long id)
TemplateLink with the given id.
id - the id of the TemplateLink
TemplateLink with the given id; null if
there is no TemplateLink with such an idTemplateComponent assembleComponent()
TemplateComponent which can be then added to the
model without breaking the model consistency (e.g., it has a unique id).
TemplateComponent which can be then added to the
model without breaking the model consistencyTemplateComponent createComponent()
TemplateComponent and add it to the model.
TemplateComponent which was added to the modelvoid addComponent(TemplateComponent component)
TemplateComponent to the model.
component - the TemplateComponent to be added
InconsistentModificationException - if the model already contain a TemplateComponent with
the same id
TemplateLink assembleLink(long leftId,
long rightId)
TemplateLink which can be then added to the model
without breaking the model consistency (e.g., it has a unique id).
leftId - the id of the first TemplateComponent to be linkedrightId - the id of the second TemplateComponent to be linked
TemplateLink which can be then added to the model
without breaking the model consistency
InconsistentModificationException - if the model does not contain TemplateComponents with
the given ids
TemplateLink createLink(long leftId,
long rightId)
TemplateLink and add it to the model.
leftId - the id of the first TemplateComponent to be linkedrightId - the id of the second TemplateComponent to be linked
TemplateLink which was added to the model
InconsistentModificationException - if the model does not contain TemplateComponents with
the given idsvoid addLink(TemplateLink link)
TemplateLink to the model.
link - the TemplateLink to be added
InconsistentModificationException - if the model already contain a TemplateLink with the
same id or if the model does not contain the
TemplateComponents linked by the TemplateLinkvoid removeComponent(long id)
TemplateComponent with the given id.
id - the id of the TemplateComponent to be removedvoid removeLink(long id)
TemplateLink with the given id.
id - the id of the TemplateLink to be removedjava.util.Collection<TemplateLink> getAdjacentLinks(long componentId)
TemplateLinks connected to the
TemplateComponent with the given id.
componentId - the id of the TemplateComponent
TemplateLinks connected to the
TemplateComponent with the given idjava.util.Collection<TemplateComponent> getCover(long channelId)
channelId - the id of the channel TemplateComponent
TemplateComponent
with the given id is not a channel
boolean existsLink(long leftId,
long rightId)
TemplateLink between the
TemplateComponents with the given ids.
leftId - the id of the first TemplateComponentrightId - the id of the second TemplateComponent
true if there is a TemplateLink between the
TemplateComponents with the given ids; false
otherwise
java.util.Collection<TemplateLink> getLinks(long leftId,
long rightId)
TemplateLinks between the TemplateComponents
with the given ids.
leftId - the id of the first TemplateComponentrightId - the id of the second TemplateComponent
TemplateLinks between the
TemplateComponents with the given ids
void assignFSA(long componentId,
ides.api.model.fsa.FSAModel fsa)
FSAModel to the TemplateComponent with the
given id.
componentId - the id of the TemplateComponentfsa - the FSAModel to be assigned
InconsistentModificationException - if the model already contains a TemplateComponent
with the given FSAModelvoid removeFSA(long componentId)
FSAModel assigned to the TemplateComponent
with the given id.
componentId - the id of the TemplateComponent whose FSAModel
is to be removed
void setComponentType(long componentId,
int type)
TemplateComponent with the given id.
componentId - the id of the TemplateComponent whose type is to be
changedtype - the type to be set (TemplateComponent.TYPE_MODULE or
TemplateComponent.TYPE_CHANNEL)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||