|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.electrocodeogram.cpc.core.api.hub.event.CPCEvent org.electrocodeogram.cpc.core.api.hub.event.CloneEvent org.electrocodeogram.cpc.core.api.hub.event.CloneNotificationEvent
public class CloneNotificationEvent
Notification event object for clone modification warnings. Send whenever some module detected that a recent clone content modification might have introduced update anomalies.
This event type is typically generated by the CPC Notification module.
However, other modules are allowed to generate events of this type too.
The CPC Notification UI module will listen to events of this type and will display them to the user in some appropriate way. Other modules may also listen to this event and may initiate their own actions.
Nested Class Summary | |
---|---|
static class |
CloneNotificationEvent.Type
Possible presentation styles for this notification event. |
Field Summary | |
---|---|
protected java.lang.String |
message
|
protected IClone |
modifiedClone
|
protected CloneNotificationEvent.Type |
type
|
protected double |
weight
|
Constructor Summary | |
---|---|
CloneNotificationEvent(ICloneFile cloneFile)
Creates a new CloneNotificationEvent for the given file. |
Method Summary | |
---|---|
java.lang.String |
getMessage()
Retrieves the message for this notification. |
IClone |
getModifiedClone()
Retrieves the clone instance which triggered this event. |
CloneNotificationEvent.Type |
getType()
Retrieves the type of this notification event. |
double |
getWeight()
Retrieves the weight of this notification. |
boolean |
isValid()
Checks if this event has been fully initialised. |
void |
setMessage(java.lang.String message)
Retrieves the message for this notification. |
void |
setModifiedClone(IClone modifiedClone)
Sets the clone instance which triggered this event. |
void |
setType(CloneNotificationEvent.Type type)
Sets the type of this notification event. |
void |
setWeight(double weight)
Sets the weight of this notification. |
java.lang.String |
toString()
Every event should implement a sensible toString method for use in debugging log messages. |
Methods inherited from class org.electrocodeogram.cpc.core.api.hub.event.CloneEvent |
---|
getCloneFile, subToString |
Methods inherited from class org.electrocodeogram.cpc.core.api.hub.event.CPCEvent |
---|
checkSeal, clone, compareTo, getCreationTime, seal |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected IClone modifiedClone
protected CloneNotificationEvent.Type type
protected double weight
protected java.lang.String message
Constructor Detail |
---|
public CloneNotificationEvent(ICloneFile cloneFile)
CloneNotificationEvent
for the given file.
cloneFile
- the file which contains the affected clone, never null.Method Detail |
---|
public IClone getModifiedClone()
public void setModifiedClone(IClone modifiedClone)
This is a required value.
modifiedClone
- the modified clone, never null.public CloneNotificationEvent.Type getType()
CloneNotificationEvent.Type
of this event, never null.public void setType(CloneNotificationEvent.Type type)
This is a required value.
type
- the CloneNotificationEvent.Type
of this event, never null.public double getWeight()
IEvaluationResult
which triggered this event.
IEvaluationResult.getWeight()
public void setWeight(double weight)
IEvaluationResult
which triggered this event.
weight
- the weight of this notification, always >=0.IEvaluationResult.getWeight()
public java.lang.String getMessage()
IEvaluationResult
which triggered this event.
IEvaluationResult.getMessage()
public void setMessage(java.lang.String message)
IEvaluationResult
which triggered this event.
message
- the message for this notification, may be NULL.public boolean isValid()
CPCEvent
Subclasses should override this method but should never return true. Instead they should delegate to the super class implementation once all validity checks on their level have passed.
The CPCEvent.isValid()
implementation always returns true.
isValid
in class CPCEvent
IEventHubRegistry.dispatch(CPCEvent)
public java.lang.String toString()
CPCEvent
toString
in class CPCEvent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |