de.uka.ipd.consensus.foundation.scoring
Class ScoringEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byde.uka.ipd.consensus.foundation.AbstractConsensusFoundationEvent
          extended byde.uka.ipd.consensus.foundation.scoring.ScoringEvent
All Implemented Interfaces:
ConsensusFoundationManager, Serializable

public class ScoringEvent
extends AbstractConsensusFoundationEvent

Event objects of this type are passed to ScoringListeners.

Version:
2006-06-14
Author:
Thomas Much
See Also:
ScoringListener, Serialized Form

Field Summary
static int ASSOCIATION_CREATED
          The event id if a user created an association.
static int ASSOCIATION_DELETED
          The event id if a user deleted an association.
static int ASSOCIATION_TOPIC_ADDED
          The event id if a topic joins an association as a player.
static int ASSOCIATION_TOPIC_REMOVED
          The event id if a topic leaves an association as a player.
static int ATTRIBUTE_ADDED
          The event id if an attribute is added to a topic.
static int ATTRIBUTE_REMOVED
          The event id if an attribute is removed from a topic.
static int ATTRIBUTE_VALUE_CHANGED
          The event id if the value of an attribute is changed.
static int CONCEPT_COMMENT_CHANGED
          The event id if a user changed the comment of a concept.
static int CONCEPT_NAME_CHANGED
          The event id if a user changed the name of a concept.
static int CONCEPT_RATING_CHANGED
          The event id if the value of an existing concept rating has been changed.
static int CONCEPT_RATING_REMOVED
          The event id if a rating has been removed from a concept.
static int CONCEPT_RATING_SET
          The event id if a new rating has been assigned to a concept.
static int CONCEPT_TYPE_CHANGED
          The event id if a user add/removed a type to/from a concept.
static int OCCURRENCE_CHANGED
          The event id if the value of an occurrence is changed.
static int OCCURRENCE_CREATED
          The event id if an occurrence is created (added to a topic).
static int OCCURRENCE_REMOVED
          The event id if an occurrence is removed from a topic.
static int SYNONYM_ADDED
          The event id if a synonym association is established between two topics.
static int SYNONYM_REMOVED
          The event id if a synonym association between two topics is removed.
static int TOPIC_CLASS_CHANGED
          The event id if a user changed the classes of a topic.
static int TOPIC_CREATED
          The event id if a user created a topic.
static int TOPIC_DELETED
          The event id if a user deleted a topic.
static int TOPICS_MERGED
          The event id if a user merged two topics.
static int USER_RATING_CHANGED
          The event id if the value of an existing user rating has been changed.
static int USER_RATING_REMOVED
          The event id if a rating has been removed from a user.
static int USER_RATING_SET
          The event id if a new rating has been assigned to a user.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ScoringEvent(ConsensusFoundationManager cfm, User source, int id, Concept concept, User ratedUser, Rating rating, double oldRatingValue, String oldValue, Topic oldType, Topic topic, Occurrence occurrence, Synonym synonym)
           
 
Method Summary
 Concept getConcept()
          If the event happened on a concept, the concept is returned.
 int getId()
          Returns the event type (id).
 Occurrence getOccurrence()
          Returns the occurrence for occurrence events (creating, changing, removing).
 double getOldRatingValue()
          If an existing rating was changed, this method returns the old rating value.
 Topic getOldType()
          If the type of a concept changes, this method returns the old type.
 String getOldValue()
          If a string value (like a concept name or an occurrence value) was changed, this method returns the old value.
 User getRatedUser()
          If a user rates another user, this method returns the rated user.
 Rating getRating()
          If a new rating was created or an existing rating was changed, this method returns the current rating object.
 Synonym getSynonym()
          If a synonym is added or removed, this method returns the Synonym object.
 Topic getTopic()
          If an event happens on two topics (e.g. if two topics are merged), this method returns the second topic.
 User getUser()
          Returns the user who caused the event, i.e. the user who created or rated an element etc.
 
Methods inherited from class de.uka.ipd.consensus.foundation.AbstractConsensusFoundationEvent
getDynamicRightsManager, getEvolutionManager, getIncentiveManager, getLoggingManager, getOntologyManager, getRatingManager, getUserManager, getVersion
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONCEPT_RATING_SET

public static final int CONCEPT_RATING_SET
The event id if a new rating has been assigned to a concept.

See Also:
getId(), Constant Field Values

CONCEPT_RATING_CHANGED

public static final int CONCEPT_RATING_CHANGED
The event id if the value of an existing concept rating has been changed.

See Also:
getId(), Constant Field Values

CONCEPT_RATING_REMOVED

public static final int CONCEPT_RATING_REMOVED
The event id if a rating has been removed from a concept.

See Also:
getId(), Constant Field Values

USER_RATING_SET

public static final int USER_RATING_SET
The event id if a new rating has been assigned to a user.

See Also:
getId(), Constant Field Values

USER_RATING_CHANGED

public static final int USER_RATING_CHANGED
The event id if the value of an existing user rating has been changed.

See Also:
getId(), Constant Field Values

USER_RATING_REMOVED

public static final int USER_RATING_REMOVED
The event id if a rating has been removed from a user.

See Also:
getId(), Constant Field Values

TOPIC_CREATED

public static final int TOPIC_CREATED
The event id if a user created a topic.

See Also:
getId(), Constant Field Values

TOPIC_DELETED

public static final int TOPIC_DELETED
The event id if a user deleted a topic.

See Also:
getId(), Constant Field Values

TOPICS_MERGED

public static final int TOPICS_MERGED
The event id if a user merged two topics.

See Also:
getId(), Constant Field Values

ASSOCIATION_CREATED

public static final int ASSOCIATION_CREATED
The event id if a user created an association.

See Also:
getId(), Constant Field Values

ASSOCIATION_DELETED

public static final int ASSOCIATION_DELETED
The event id if a user deleted an association.

See Also:
getId(), Constant Field Values

CONCEPT_COMMENT_CHANGED

public static final int CONCEPT_COMMENT_CHANGED
The event id if a user changed the comment of a concept.

See Also:
getId(), Constant Field Values

CONCEPT_NAME_CHANGED

public static final int CONCEPT_NAME_CHANGED
The event id if a user changed the name of a concept.

See Also:
getId(), Constant Field Values

CONCEPT_TYPE_CHANGED

public static final int CONCEPT_TYPE_CHANGED
The event id if a user add/removed a type to/from a concept.

See Also:
getId(), Constant Field Values

TOPIC_CLASS_CHANGED

public static final int TOPIC_CLASS_CHANGED
The event id if a user changed the classes of a topic.

See Also:
getId(), Constant Field Values

ASSOCIATION_TOPIC_ADDED

public static final int ASSOCIATION_TOPIC_ADDED
The event id if a topic joins an association as a player.

See Also:
getId(), Constant Field Values

ASSOCIATION_TOPIC_REMOVED

public static final int ASSOCIATION_TOPIC_REMOVED
The event id if a topic leaves an association as a player.

See Also:
getId(), Constant Field Values

OCCURRENCE_CREATED

public static final int OCCURRENCE_CREATED
The event id if an occurrence is created (added to a topic).

See Also:
getId(), Constant Field Values

OCCURRENCE_CHANGED

public static final int OCCURRENCE_CHANGED
The event id if the value of an occurrence is changed.

See Also:
getId(), Constant Field Values

OCCURRENCE_REMOVED

public static final int OCCURRENCE_REMOVED
The event id if an occurrence is removed from a topic.

See Also:
getId(), Constant Field Values

ATTRIBUTE_ADDED

public static final int ATTRIBUTE_ADDED
The event id if an attribute is added to a topic.

See Also:
getId(), Constant Field Values

ATTRIBUTE_VALUE_CHANGED

public static final int ATTRIBUTE_VALUE_CHANGED
The event id if the value of an attribute is changed.

See Also:
getId(), Constant Field Values

ATTRIBUTE_REMOVED

public static final int ATTRIBUTE_REMOVED
The event id if an attribute is removed from a topic.

See Also:
getId(), Constant Field Values

SYNONYM_ADDED

public static final int SYNONYM_ADDED
The event id if a synonym association is established between two topics.

See Also:
getId(), Constant Field Values

SYNONYM_REMOVED

public static final int SYNONYM_REMOVED
The event id if a synonym association between two topics is removed.

See Also:
getId(), Constant Field Values
Constructor Detail

ScoringEvent

public ScoringEvent(ConsensusFoundationManager cfm,
                    User source,
                    int id,
                    Concept concept,
                    User ratedUser,
                    Rating rating,
                    double oldRatingValue,
                    String oldValue,
                    Topic oldType,
                    Topic topic,
                    Occurrence occurrence,
                    Synonym synonym)
Method Detail

getUser

public User getUser()
Returns the user who caused the event, i.e. the user who created or rated an element etc.

Returns:
the user who caused the event

getId

public int getId()
Returns the event type (id). See the constants in this class.

Returns:
the event type

getConcept

public Concept getConcept()
If the event happened on a concept, the concept is returned. Many events have a base concept, like a topic being rated or an association being created.

Returns:
the base concept that this event happened on or null

getRatedUser

public User getRatedUser()
If a user rates another user, this method returns the rated user.

Returns:
the rated user
See Also:
getUser()

getRating

public Rating getRating()
If a new rating was created or an existing rating was changed, this method returns the current rating object.

Returns:
the new or changed rating

getOldRatingValue

public double getOldRatingValue()
If an existing rating was changed, this method returns the old rating value.

Returns:
the old rating value

getOldValue

public String getOldValue()
If a string value (like a concept name or an occurrence value) was changed, this method returns the old value.

Returns:
the old string value

getOldType

public Topic getOldType()
If the type of a concept changes, this method returns the old type. null is returned if the concept did not have a type before.

Returns:
the old type topic

getTopic

public Topic getTopic()
If an event happens on two topics (e.g. if two topics are merged), this method returns the second topic.

Returns:
the second topic if an event happens on two topics
See Also:
getConcept()

getOccurrence

public Occurrence getOccurrence()
Returns the occurrence for occurrence events (creating, changing, removing).

Returns:
an occurrence

getSynonym

public Synonym getSynonym()
If a synonym is added or removed, this method returns the Synonym object.

Returns:
the Synonym object