|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttemplates.model.Validator
public class Validator
Validator of the consistency of TemplateModels.
| Nested Class Summary | |
|---|---|
static class |
Validator.ValidatorResult
Encapsulates a consistency issue found by the validator. |
| Field Summary | |
|---|---|
static java.lang.String |
ERROR_FORKED_EVENT
A channel event is linked to multiple module events. |
static java.lang.String |
ERROR_MERGED_EVENT
A module event is linked to multiple events from the same channel. |
static java.lang.String |
ERROR_MODULE_CHANNEL
A link connects two modules or two channels. |
static java.lang.String |
ERROR_NO_EVENT
A linked event is not contained in the FSAModel of the
corresponding TemplateComponent. |
static java.lang.String |
ERROR_NO_MODEL
A TemplateComponent does not have an assigned FSAModel. |
static java.lang.String |
ERROR_NO_MODULE
No module is present in the model. |
static java.lang.String |
ERROR_NONUNIQUE_NAME
The FSAModels of two or more TemplateComponents share the
same name. |
static java.lang.String |
WARNING_FREE_COMPONENT
There is a TemplateComponent which is not connected. |
static java.lang.String |
WARNING_FREE_EVENT
A channel contains one or more events which are not linked. |
static java.lang.String |
WARNING_NO_CHANNEL
There is no channel in the model. |
| Constructor Summary | |
|---|---|
Validator()
|
|
| Method Summary | |
|---|---|
static boolean |
canComputeSup(TemplateModel model,
long channelId)
Checks if a it is safe to compute the local supervisor for a channel, i.e., if the part of the model involving the channel and the immediate neighbors of the channel contains any consistency issues of type Validator.ValidatorResult.ERROR. |
protected static java.util.Collection<TemplateLink> |
linksWithEvent(TemplateModel model,
TemplateComponent component,
java.lang.String event)
Retrieve all TemplateLinks which link a given event of a given
TemplateComponent. |
static java.util.List<Validator.ValidatorResult> |
validate(TemplateModel model)
Validate the consistency of a given TemplateModel and return a
collection of all consistency issues discovered. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ERROR_NO_MODULE
public static final java.lang.String ERROR_NO_MODEL
TemplateComponent does not have an assigned FSAModel.
public static final java.lang.String ERROR_MODULE_CHANNEL
public static final java.lang.String ERROR_NO_EVENT
FSAModel of the
corresponding TemplateComponent.
public static final java.lang.String ERROR_FORKED_EVENT
public static final java.lang.String ERROR_MERGED_EVENT
public static final java.lang.String ERROR_NONUNIQUE_NAME
FSAModels of two or more TemplateComponents share the
same name. This becomes a problem when auto-renaming events to indicate
which model they belong to.
public static final java.lang.String WARNING_NO_CHANNEL
public static final java.lang.String WARNING_FREE_COMPONENT
TemplateComponent which is not connected.
public static final java.lang.String WARNING_FREE_EVENT
| Constructor Detail |
|---|
public Validator()
| Method Detail |
|---|
public static java.util.List<Validator.ValidatorResult> validate(TemplateModel model)
TemplateModel and return a
collection of all consistency issues discovered.
model - the TemplateModel to be validated
public static boolean canComputeSup(TemplateModel model,
long channelId)
Validator.ValidatorResult.ERROR.
model - the model containing the channelchannelId - the id of the channel TemplateComponent
true if the part of the model involving the
channel and the immediate neighbors of the channel
does not contain any consistency issues of type
Validator.ValidatorResult.ERROR; false otherwise
protected static java.util.Collection<TemplateLink> linksWithEvent(TemplateModel model,
TemplateComponent component,
java.lang.String event)
TemplateLinks which link a given event of a given
TemplateComponent.
model - the TemplateModel containing the
TemplateComponentcomponent - the TemplateComponent for which links have to be
retrievedevent - the event name for which links have to be retrieved
TemplateLinks which link the given event of the given
TemplateComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||