de.uka.ipd.consensus.foundation.scoring
Interface IncentiveManager

All Superinterfaces:
ConsensusFoundationModule
All Known Implementing Classes:
IncentiveManagerImpl

public interface IncentiveManager
extends ConsensusFoundationModule

The IncentiveManager triggers ScoringListeners whenever an event occurs that might change a user's score. The other components do not actively push events, the IncentiveManager implementation has to register itself as a listener on various other components (usually on the RatingManager, OntologyManager and EvolutionManager).

The IncentiveManager implementation can be configured with the key cf.incentivemanager in the ConsensusFoundation.properties configuration file. It's an optional component.

If the key the key cf.incentivemanager is present, the implementation is loaded by the ConsensusFoundation constructor. For successful instantiation, the IncentiveManager implementation must provide a default constructor without arguments.

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

Method Summary
 void addScoringListener(ScoringListener listener)
          Registers a new ScoringListener.
 double getInitialUserScore()
          Returns the initial score for newly created users.
 void init(Properties config, LoggingManager logging, UserManager users, OntologyManager ontology)
          This method is called by the ConsensusFoundation constructor to initialize the IncentiveManager.
 void removeScoringListener(ScoringListener listener)
          Removes a ScoringListener, if it is registered with the IncentiveManager (otherwise this call is ignored).
 
Methods inherited from interface de.uka.ipd.consensus.foundation.ConsensusFoundationModule
getConsensusFoundationManager, getVersion, initCompleted, shutdown
 

Method Detail

init

public void init(Properties config,
                 LoggingManager logging,
                 UserManager users,
                 OntologyManager ontology)
          throws Exception
This method is called by the ConsensusFoundation constructor to initialize the IncentiveManager.

Parameters:
config - all entries from ConsensusFoundation.properties
logging - the successfully initialized LoggingManager instance
users - the the successfully initialized UserManager instance
ontology - the the successfully initialized OntologyManager instance
Throws:
Exception - if any error occurs (startup of the application is aborted in this case)
See Also:
ConsensusFoundation.ConsensusFoundation()

getInitialUserScore

public double getInitialUserScore()
Returns the initial score for newly created users. Usually 0.

Returns:
the initial score for newly created users

addScoringListener

public void addScoringListener(ScoringListener listener)
Registers a new ScoringListener. You don't have to call this method explicitely, since you can declare ScoringListeners in ConsensusFoundation.properties.

Parameters:
listener - the ScoringListener to be added
See Also:
ScoringListener

removeScoringListener

public void removeScoringListener(ScoringListener listener)
Removes a ScoringListener, if it is registered with the IncentiveManager (otherwise this call is ignored).

Parameters:
listener - the ScoringListener to be removed