de.uka.ipd.consensus.impl
Class DynamicRightsManagerImpl

java.lang.Object
  extended byde.uka.ipd.consensus.foundation.AbstractConsensusFoundationModule
      extended byde.uka.ipd.consensus.impl.DynamicRightsManagerImpl
All Implemented Interfaces:
ConsensusFoundationManager, ConsensusFoundationModule, DynamicRightsManager, EventListener, ScoringListener

public class DynamicRightsManagerImpl
extends AbstractConsensusFoundationModule
implements DynamicRightsManager, ScoringListener

TODO

Version:
2006-06-14
Author:
Thomas Much

Constructor Summary
DynamicRightsManagerImpl()
           
 
Method Summary
 void checkAddAttribute(User user, Attribute attr, Attributeable attributeable)
          Checks if the user is allowed to add the attribute to the given attributeable element (a topic).
 void checkAddClass(User user, Topic base)
          Checks if the user is allowed to add a superclass to a class topic.
 void checkAddRating(Rating rating, Rateable rateable)
          Checks if a user is allowed to assign a rating to a certain rateable element.
 void checkAddSynonym(User user, Topic base)
          Checks if the user is allowed to add a synonymous topic to a given topic.
 void checkAddType(User user, Topic base)
          Checks if the user is allowed to add a type topic to a given topic.
 void checkChangeAssociation(User user, Association assoc)
          Checks if the user is allowed to change an association (add/remove roles/topics).
 void checkChangeAttributeValue(User user, Attribute attr)
          Checks if the user is allowed to change the attribute's value.
 void checkChangeConceptComment(User user, Concept concept)
          Checks if the user is allowed to change the comment of a certain concept.
 void checkChangeOccurrence(User user)
          Checks if the user is allowed to change (create/delete) occurrences.
 void checkChangeUserComment(User user, User commentated)
          Checks if the user is allowed to change the comment of a certain user (including himself).
 void checkCreateAssociation(User user, Topic type)
          Checks if the user is allowed to create associations of the given type.
 void checkCreateAttribute(User user, Topic type)
          Checks if the user is allowed to create attributes of the given type.
 void checkCreateClassTopic(User user, Topic cls)
          Checks if the user is allowed to create topics of the given superclass.
 void checkCreateRating(User user)
          Checks if the user is allowed to create ratings.
 void checkCreateTopic(User user, Topic type)
          Checks if the user is allowed to create topics of the given type.
 void checkDeleteAssociation(User user, Association assoc)
          Checks if a user is allowed to remove an association permanently from the ontology.
 void checkDeleteTopic(User user, Topic topic)
          Checks if a user is allowed to remove a topic permanently from the ontology.
 void checkMergeTopics(User user, Topic topic1, Topic topic2)
          Checks if a user is allowed to merge to topics.
 void checkQuery(User user, String query)
          Checks if the user is allowed to do queries using the provided query language(s).
 void checkRemoveAttribute(User user, Attribute attr)
          Checks if the user is allowed to remove the attribute from its topic.
 void checkRemoveClass(User user, SuperSubclass cls)
          Checks if the user is allowed to remove a superclass from a class topic.
 void checkRemoveRating(User remover, Rating rating)
          Checks if a user is allowed to remove a rating permanently from an element.
 void checkRemoveSynonym(User user, Synonym synonym)
          Checks if the user is allowed to remove a synonym relationship between two topics.
 void checkRemoveType(User user, TypeInstance type)
          Checks if the user is allowed to remove a type from a topic.
 void checkViewAssociation(User user, Association assoc)
          Checks if the user is allowed to view a certain association.
 void checkViewAttribute(User user, Attribute attr)
          Checks if the user is allowed to see a certain attribute.
 void checkViewTopic(User user, Topic topic)
          Checks if the user is allowed to view a certain topic.
 String getVersion()
          Returns a version string of the implementation of this module.
 void init(Properties config, LoggingManager logging, UserManager users, OntologyManager ontology, IncentiveManager incentive)
          This method is called by the ConsensusFoundation constructor to initialize the DynamicRightsManager.
 void initCompleted(Properties config, ConsensusFoundationManager cfm)
          This method is called by the ConsensusFoundation constructor after all available modules have been initialized (i.e. their init() method has been called).
 boolean mayAddAttribute(User user, Attribute attr, Attributeable attributeable)
          Checks if the user is allowed to add the attribute to the given attributeable element (a topic).
 boolean mayAddClass(User user, Topic base)
          Checks if the user is allowed to add a superclass to a class topic.
 boolean mayAddRating(Rating rating, Rateable rateable)
          Checks if a user is allowed to assign a rating to a certain rateable element.
 boolean mayAddSynonym(User user, Topic base)
          Checks if the user is allowed to add a synonymous topic to a given topic.
 boolean mayAddType(User user, Topic base)
          Checks if the user is allowed to add a type topic to a given topic.
 boolean mayChangeAssociation(User user, Association assoc)
          Checks if the user is allowed to change an association (add/remove roles/topics).
 boolean mayChangeAttributeValue(User user, Attribute attr)
          Checks if the user is allowed to change the attribute's value.
 boolean mayChangeConceptComment(User user, Concept concept)
          Checks if the user is allowed to change the comment of a certain concept.
 boolean mayChangeOccurrence(User user)
          Checks if the user is allowed to change (create/delete) occurrences.
 boolean mayChangeUserComment(User user, User commentated)
          Checks if the user is allowed to change the comment of a certain user (including himself).
 boolean mayCreateAssociation(User user, Topic type)
          Checks if the user is allowed to create associations of the given type.
 boolean mayCreateAttribute(User user, Topic type)
          Checks if the user is allowed to create attributes of the given type.
 boolean mayCreateClassTopic(User user, Topic cls)
          Checks if the user is allowed to create topics of the given superclass.
 boolean mayCreateRating(User user)
          Checks if the user is allowed to create ratings.
 boolean mayCreateTopic(User user, Topic type)
          Checks if the user is allowed to create topics of the given type.
 boolean mayDeleteAssociation(User user, Association assoc)
          Checks if a user is allowed to remove an association permanently from the ontology.
 boolean mayDeleteTopic(User user, Topic topic)
          Checks if a user is allowed to remove a topic permanently from the ontology.
 boolean mayMergeTopics(User user, Topic topic1, Topic topic2)
          Checks if a user is allowed to merge to topics.
 boolean mayQuery(User user, String query)
          Checks if the user is allowed to do queries using the provided query language(s).
 boolean mayRemoveAttribute(User user, Attribute attr)
          Checks if the user is allowed to remove the attribute from its topic.
 boolean mayRemoveClass(User user, SuperSubclass cls)
          Checks if the user is allowed to remove a superclass from a class topic.
 boolean mayRemoveRating(User remover, Rating rating)
          Checks if a user is allowed to remove a rating permanently from an element.
 boolean mayRemoveSynonym(User user, Synonym synonym)
          Checks if the user is allowed to remove a synonym relationship between two topics.
 boolean mayRemoveType(User user, TypeInstance type)
          Checks if the user is allowed to remove a type from a topic.
 boolean mayViewAssociation(User user, Association assoc)
          Checks if the user is allowed to view a certain association.
 boolean mayViewAttribute(User user, Attribute attr)
          Checks if the user is allowed to see a certain attribute.
 boolean mayViewTopic(User user, Topic topic)
          Checks if the user is allowed to view a certain topic.
 void score(ScoringEvent event)
          In this method a ScoringListener can change the user's score.
 void scored(ScoringEvent event)
          This method is called after all listener's score() methods have been called for this ScoringEvent.
 void shutdown()
          Called by ConsensusFoundation.shutdown() when the application shuts down.
 
Methods inherited from class de.uka.ipd.consensus.foundation.AbstractConsensusFoundationModule
finalize, getConsensusFoundationManager, getDynamicRightsManager, getEvolutionManager, getIncentiveManager, getLoggingManager, getOntologyManager, getRatingManager, getUserManager
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.uka.ipd.consensus.foundation.ConsensusFoundationModule
getConsensusFoundationManager
 

Constructor Detail

DynamicRightsManagerImpl

public DynamicRightsManagerImpl()
Method Detail

init

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

Specified by:
init in interface DynamicRightsManager
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
incentive - the the successfully initialized IncentiveManager instance or null, if no IncentiveManager is available
Throws:
Exception - if any error occurs (startup of the application is aborted in this case)
See Also:
ConsensusFoundation.ConsensusFoundation()

initCompleted

public void initCompleted(Properties config,
                          ConsensusFoundationManager cfm)
                   throws Exception
Description copied from interface: ConsensusFoundationModule
This method is called by the ConsensusFoundation constructor after all available modules have been initialized (i.e. their init() method has been called). Here a module can perform some final initialization that is dependant on other modules.

Specified by:
initCompleted in interface ConsensusFoundationModule
Overrides:
initCompleted in class AbstractConsensusFoundationModule
Throws:
Exception

shutdown

public void shutdown()
Description copied from interface: ConsensusFoundationModule
Called by ConsensusFoundation.shutdown() when the application shuts down.

When implementing this method make sure that the shutdown code is executed only once even if this method is called multiple times.

Specified by:
shutdown in interface ConsensusFoundationModule
Overrides:
shutdown in class AbstractConsensusFoundationModule

mayCreateTopic

public boolean mayCreateTopic(User user,
                              Topic type)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to create topics of the given type.

Specified by:
mayCreateTopic in interface DynamicRightsManager
Parameters:
user - the user who wants to create a topic
type - the type of the topic to be created, including null for a typeless topic
Returns:
true if the user is allowed to create the topic, false otherwise
See Also:
DynamicRightsManager.checkCreateTopic(User, Topic)

mayCreateClassTopic

public boolean mayCreateClassTopic(User user,
                                   Topic cls)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to create topics of the given superclass.

Specified by:
mayCreateClassTopic in interface DynamicRightsManager
Parameters:
user - user the user who wants to create a class topic
cls - the superclass of the class topic to be created, including null for a root class topic
Returns:
true if the user is allowed to create the class topic, false otherwise
See Also:
DynamicRightsManager.checkCreateClassTopic(User, Topic), Topic.isClassTopic()

mayViewTopic

public boolean mayViewTopic(User user,
                            Topic topic)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to view a certain topic. This method is used for type (class) topics, too, i.e. if the user is allowed to see an element of a certain type.

Specified by:
mayViewTopic in interface DynamicRightsManager
Parameters:
user - the user who wants to see the topic
topic - the topic in question
Returns:
true if the user is allowed to view the topic, false otherwise
See Also:
DynamicRightsManager.checkViewTopic(User, Topic)

mayDeleteTopic

public boolean mayDeleteTopic(User user,
                              Topic topic)
Description copied from interface: DynamicRightsManager
Checks if a user is allowed to remove a topic permanently from the ontology.

Specified by:
mayDeleteTopic in interface DynamicRightsManager
Parameters:
user - the user who wants to delete the topic
topic - the topic to be deleted
Returns:
true if the user is allowed to delete the topic, false otherwise
See Also:
DynamicRightsManager.checkDeleteTopic(User, Topic)

mayMergeTopics

public boolean mayMergeTopics(User user,
                              Topic topic1,
                              Topic topic2)
Description copied from interface: DynamicRightsManager
Checks if a user is allowed to merge to topics.

Specified by:
mayMergeTopics in interface DynamicRightsManager
Parameters:
user - the user who wants to merge the topics
topic1 - the first topic to be merged
topic2 - the second topic to be merged
Returns:
true if the user is allowed to merge the topics, false otherwise
See Also:
DynamicRightsManager.checkMergeTopics(User, Topic, Topic)

mayCreateAssociation

public boolean mayCreateAssociation(User user,
                                    Topic type)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to create associations of the given type.

Specified by:
mayCreateAssociation in interface DynamicRightsManager
Parameters:
user - the user who wants to create an association
type - the type of the association to be created, including null for a typeless association
Returns:
true if the user is allowed to create the association, false otherwise
See Also:
DynamicRightsManager.checkCreateAssociation(User, Topic)

mayViewAssociation

public boolean mayViewAssociation(User user,
                                  Association assoc)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to view a certain association.

Specified by:
mayViewAssociation in interface DynamicRightsManager
Parameters:
user - the user who wants to see the association
assoc - the association in question
Returns:
true if the user is allowed to see the association, false otherwise
See Also:
DynamicRightsManager.checkViewAssociation(User, Association)

mayChangeAssociation

public boolean mayChangeAssociation(User user,
                                    Association assoc)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to change an association (add/remove roles/topics).

Specified by:
mayChangeAssociation in interface DynamicRightsManager
Parameters:
user - the user who wants to change the association
assoc - the association to be changed
Returns:
true if the user is allowed to change the association, false otherwise
See Also:
DynamicRightsManager.checkChangeAssociation(User, Association)

mayDeleteAssociation

public boolean mayDeleteAssociation(User user,
                                    Association assoc)
Description copied from interface: DynamicRightsManager
Checks if a user is allowed to remove an association permanently from the ontology.

Specified by:
mayDeleteAssociation in interface DynamicRightsManager
Parameters:
user - the user who wants to delete the association
assoc - the association to be deleted
Returns:
true if the user is allowed to delete the association, false otherwise
See Also:
DynamicRightsManager.checkDeleteAssociation(User, Association)

mayCreateAttribute

public boolean mayCreateAttribute(User user,
                                  Topic type)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to create attributes of the given type.

Specified by:
mayCreateAttribute in interface DynamicRightsManager
Parameters:
user - the user who wants to create an attribute
type - the type of the attribute to be created, including null for a typeless attribute
Returns:
true if the user is allowed to create the attribute, false otherwise
See Also:
DynamicRightsManager.checkCreateAttribute(User, Topic), DynamicRightsManager.mayAddAttribute(User, Attribute, Attributeable)

mayViewAttribute

public boolean mayViewAttribute(User user,
                                Attribute attr)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to see a certain attribute.

Specified by:
mayViewAttribute in interface DynamicRightsManager
Parameters:
user - the user who wants to see the attribute
attr - the attribute in question
Returns:
true if the user is allowed to see the attribute, false otherwise
See Also:
DynamicRightsManager.checkViewAttribute(User, Attribute)

mayAddAttribute

public boolean mayAddAttribute(User user,
                               Attribute attr,
                               Attributeable attributeable)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to add the attribute to the given attributeable element (a topic).

Specified by:
mayAddAttribute in interface DynamicRightsManager
Parameters:
user - the user who wants to add the attribute
attr - the attribute to be added
attributeable - the topic that will be container of the attribute
Returns:
true if the user is allowed to add the attribute, false otherwise
See Also:
DynamicRightsManager.checkAddAttribute(User, Attribute, Attributeable), DynamicRightsManager.mayCreateAttribute(User, Topic)

mayChangeAttributeValue

public boolean mayChangeAttributeValue(User user,
                                       Attribute attr)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to change the attribute's value.

Specified by:
mayChangeAttributeValue in interface DynamicRightsManager
Parameters:
user - the user who wants to change the value
attr - the attribute in question
Returns:
true if the user is allowed to change the attribute's value, false otherwise
See Also:
DynamicRightsManager.checkChangeAttributeValue(User, Attribute)

mayRemoveAttribute

public boolean mayRemoveAttribute(User user,
                                  Attribute attr)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to remove the attribute from its topic.

Specified by:
mayRemoveAttribute in interface DynamicRightsManager
Parameters:
user - the user who wants to remove the attribute
attr - the attribute to be removed
Returns:
true if the user is allowed to remove the attribute, false otherwise
See Also:
DynamicRightsManager.checkRemoveAttribute(User, Attribute)

mayCreateRating

public boolean mayCreateRating(User user)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to create ratings.

Specified by:
mayCreateRating in interface DynamicRightsManager
Parameters:
user - the user who wants to create a rating
Returns:
true if the user is allowed to create ratings, false otherwise
See Also:
DynamicRightsManager.checkCreateRating(User), DynamicRightsManager.mayAddRating(Rating, Rateable)

mayChangeConceptComment

public boolean mayChangeConceptComment(User user,
                                       Concept concept)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to change the comment of a certain concept.

Specified by:
mayChangeConceptComment in interface DynamicRightsManager
Parameters:
user - the user who wants to change the comment
concept - the concept in question
Returns:
true if the user is allowed to change the comment, false otherwise
See Also:
DynamicRightsManager.checkChangeConceptComment(User, Concept)

mayChangeUserComment

public boolean mayChangeUserComment(User user,
                                    User commentated)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to change the comment of a certain user (including himself).

Specified by:
mayChangeUserComment in interface DynamicRightsManager
Parameters:
user - the user who wants to change the comment
commentated - the user who's comment string will be changed
Returns:
true if the user is allowed to change the comment, false otherwise
See Also:
DynamicRightsManager.checkChangeUserComment(User, User)

mayChangeOccurrence

public boolean mayChangeOccurrence(User user)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to change (create/delete) occurrences.

Specified by:
mayChangeOccurrence in interface DynamicRightsManager
Parameters:
user - the user who wants to change an occurrence
Returns:
true if the user is allowed to change occurrences, false otherwise
See Also:
DynamicRightsManager.checkChangeOccurrence(User)

mayAddRating

public boolean mayAddRating(Rating rating,
                            Rateable rateable)
Description copied from interface: DynamicRightsManager
Checks if a user is allowed to assign a rating to a certain rateable element.

Specified by:
mayAddRating in interface DynamicRightsManager
Parameters:
rating - the rating to be assigned
rateable - the rateable element that will receive the rating
Returns:
true if the user is allowed to add the rating, false otherwise
See Also:
DynamicRightsManager.checkAddRating(Rating, Rateable), DynamicRightsManager.mayCreateRating(User)

mayRemoveRating

public boolean mayRemoveRating(User remover,
                               Rating rating)
Description copied from interface: DynamicRightsManager
Checks if a user is allowed to remove a rating permanently from an element.

Specified by:
mayRemoveRating in interface DynamicRightsManager
Parameters:
remover - the user who wants to remove the rating
rating - the rating to be removed
Returns:
true if the user is allowed to remove the rating, false otherwise
See Also:
DynamicRightsManager.checkRemoveRating(User, Rating)

mayAddSynonym

public boolean mayAddSynonym(User user,
                             Topic base)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to add a synonymous topic to a given topic.

Specified by:
mayAddSynonym in interface DynamicRightsManager
Parameters:
user - the user who wants to add the synonym
base - the topic that is assigned the synonymous topic
Returns:
true if the user is allowed to add the synonym, false otherwise
See Also:
DynamicRightsManager.checkAddSynonym(User, Topic)

mayRemoveSynonym

public boolean mayRemoveSynonym(User user,
                                Synonym synonym)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to remove a synonym relationship between two topics.

Specified by:
mayRemoveSynonym in interface DynamicRightsManager
Parameters:
user - the user who wants to remove the synonym relationship
synonym - the Synonym object containing the two synonymous topics
Returns:
true if the user is allowed to remove the synonym, false otherwise
See Also:
DynamicRightsManager.checkRemoveSynonym(User, Synonym)

mayAddType

public boolean mayAddType(User user,
                          Topic base)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to add a type topic to a given topic.

Specified by:
mayAddType in interface DynamicRightsManager
Parameters:
user - the user who wants to add a type
base - the topic which is assigned the new type
Returns:
true if the user is allowed to add a type, false otherwise
See Also:
DynamicRightsManager.checkAddType(User, Topic)

mayRemoveType

public boolean mayRemoveType(User user,
                             TypeInstance type)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to remove a type from a topic.

Specified by:
mayRemoveType in interface DynamicRightsManager
Parameters:
user - the user who wants to remove a type
type - the TypeInstance object which contains both the type topic and the base topic
Returns:
true if the user is allowed to remove the type, false otherwise
See Also:
DynamicRightsManager.checkRemoveType(User, TypeInstance)

mayAddClass

public boolean mayAddClass(User user,
                           Topic base)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to add a superclass to a class topic.

Specified by:
mayAddClass in interface DynamicRightsManager
Parameters:
user - the user who wants to add the superclass
base - the topic that will be assigned a new superclass
Returns:
true if the user is allowed to add a superclass, false otherwise
See Also:
DynamicRightsManager.checkAddClass(User, Topic), Topic.isClassTopic()

mayRemoveClass

public boolean mayRemoveClass(User user,
                              SuperSubclass cls)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to remove a superclass from a class topic.

Specified by:
mayRemoveClass in interface DynamicRightsManager
Parameters:
user - the user who wants to remove the superclass
cls - the SuperSubclass object containing both the superclass and the subclass topic
Returns:
true if the user is allowed to remove the superclass, false otherwise
See Also:
DynamicRightsManager.checkRemoveClass(User, SuperSubclass)

mayQuery

public boolean mayQuery(User user,
                        String query)
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to do queries using the provided query language(s).

Specified by:
mayQuery in interface DynamicRightsManager
Parameters:
user - the user who wants to do the query
query - the query string
Returns:
true if the user is allowed to do the query, false otherwise
See Also:
DynamicRightsManager.checkQuery(User, String)

checkCreateTopic

public void checkCreateTopic(User user,
                             Topic type)
                      throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to create topics of the given type.

This method returns silently if the user is granted the right.

Specified by:
checkCreateTopic in interface DynamicRightsManager
Parameters:
user - the user who wants to create a topic
type - the type of the topic to be created, including null for a typeless topic
Throws:
DynamicRightsManagerException - if the user is not allowed to create the topic
See Also:
DynamicRightsManager.mayCreateTopic(User, Topic)

checkCreateClassTopic

public void checkCreateClassTopic(User user,
                                  Topic cls)
                           throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to create topics of the given superclass.

This method returns silently if the user is granted the right.

Specified by:
checkCreateClassTopic in interface DynamicRightsManager
Parameters:
user - user the user who wants to create a class topic
cls - the superclass of the class topic to be created, including null for a root class topic
Throws:
DynamicRightsManagerException - if the user is not allowed to create the class topic
See Also:
DynamicRightsManager.mayCreateClassTopic(User, Topic), Topic.isClassTopic()

checkViewTopic

public void checkViewTopic(User user,
                           Topic topic)
                    throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to view a certain topic. This method is used for type (class) topics, too, i.e. if the user is allowed to see an element of a certain type.

This method returns silently if the user is granted the right.

Specified by:
checkViewTopic in interface DynamicRightsManager
Parameters:
user - the user who wants to see the topic
topic - the topic in question
Throws:
DynamicRightsManagerException - if the user is not allowed to view the topic
See Also:
DynamicRightsManager.mayViewTopic(User, Topic)

checkDeleteTopic

public void checkDeleteTopic(User user,
                             Topic topic)
                      throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if a user is allowed to remove a topic permanently from the ontology.

This method returns silently if the user is granted the right.

Specified by:
checkDeleteTopic in interface DynamicRightsManager
Parameters:
user - the user who wants to delete the topic
topic - the topic to be deleted
Throws:
DynamicRightsManagerException - if the user is not allowed to delete the topic
See Also:
DynamicRightsManager.mayDeleteTopic(User, Topic)

checkMergeTopics

public void checkMergeTopics(User user,
                             Topic topic1,
                             Topic topic2)
                      throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if a user is allowed to merge to topics.

This method returns silently if the user is granted the right.

Specified by:
checkMergeTopics in interface DynamicRightsManager
Parameters:
user - the user who wants to merge the topics
topic1 - the first topic to be merged
topic2 - the second topic to be merged
Throws:
DynamicRightsManagerException - if the user is not allowed to merge the topics
See Also:
DynamicRightsManager.mayMergeTopics(User, Topic, Topic)

checkCreateAssociation

public void checkCreateAssociation(User user,
                                   Topic type)
                            throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to create associations of the given type.

This method returns silently if the user is granted the right.

Specified by:
checkCreateAssociation in interface DynamicRightsManager
Parameters:
user - the user who wants to create an association
type - the type of the association to be created, including null for a typeless association
Throws:
DynamicRightsManagerException - if the user is not allowed to create the association
See Also:
DynamicRightsManager.mayCreateAssociation(User, Topic)

checkViewAssociation

public void checkViewAssociation(User user,
                                 Association assoc)
                          throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to view a certain association.

This method returns silently if the user is granted the right.

Specified by:
checkViewAssociation in interface DynamicRightsManager
Parameters:
user - the user who wants to see the association
assoc - the association in question
Throws:
DynamicRightsManagerException - if the user is not allowed to see the association
See Also:
DynamicRightsManager.mayViewAssociation(User, Association)

checkChangeAssociation

public void checkChangeAssociation(User user,
                                   Association assoc)
                            throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to change an association (add/remove roles/topics).

This method returns silently if the user is granted the right.

Specified by:
checkChangeAssociation in interface DynamicRightsManager
Parameters:
user - the user who wants to change the association
assoc - the association to be changed
Throws:
DynamicRightsManagerException - if the user is not allowed to change the association
See Also:
DynamicRightsManager.mayChangeAssociation(User, Association)

checkDeleteAssociation

public void checkDeleteAssociation(User user,
                                   Association assoc)
                            throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if a user is allowed to remove an association permanently from the ontology.

This method returns silently if the user is granted the right.

Specified by:
checkDeleteAssociation in interface DynamicRightsManager
Parameters:
user - the user who wants to delete the association
assoc - the association to be deleted
Throws:
DynamicRightsManagerException - if the user is not allowed to delete the association
See Also:
DynamicRightsManager.mayDeleteAssociation(User, Association)

checkCreateAttribute

public void checkCreateAttribute(User user,
                                 Topic type)
                          throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to create attributes of the given type.

This method returns silently if the user is granted the right.

Specified by:
checkCreateAttribute in interface DynamicRightsManager
Parameters:
user - the user who wants to create an attribute
type - the type of the attribute to be created, including null for a typeless attribute
Throws:
DynamicRightsManagerException - if the user is not allowed to create the attribute
See Also:
DynamicRightsManager.mayCreateAttribute(User, Topic), DynamicRightsManager.checkAddAttribute(User, Attribute, Attributeable)

checkViewAttribute

public void checkViewAttribute(User user,
                               Attribute attr)
                        throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to see a certain attribute.

This method returns silently if the user is granted the right.

Specified by:
checkViewAttribute in interface DynamicRightsManager
Parameters:
user - the user who wants to see the attribute
attr - the attribute in question
Throws:
DynamicRightsManagerException - if the user is not allowed to see the attribute
See Also:
DynamicRightsManager.mayViewAttribute(User, Attribute)

checkAddAttribute

public void checkAddAttribute(User user,
                              Attribute attr,
                              Attributeable attributeable)
                       throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to add the attribute to the given attributeable element (a topic).

This method returns silently if the user is granted the right.

Specified by:
checkAddAttribute in interface DynamicRightsManager
Parameters:
user - the user who wants to add the attribute
attr - the attribute to be added
attributeable - the topic that will be container of the attribute
Throws:
DynamicRightsManagerException - if the user is not allowed to add the attribute
See Also:
DynamicRightsManager.mayAddAttribute(User, Attribute, Attributeable), DynamicRightsManager.checkCreateAttribute(User, Topic)

checkChangeAttributeValue

public void checkChangeAttributeValue(User user,
                                      Attribute attr)
                               throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to change the attribute's value.

This method returns silently if the user is granted the right.

Specified by:
checkChangeAttributeValue in interface DynamicRightsManager
Parameters:
user - the user who wants to change the value
attr - the attribute in question
Throws:
DynamicRightsManagerException - if the user is not allowed to change the attribute's value
See Also:
DynamicRightsManager.mayChangeAttributeValue(User, Attribute)

checkRemoveAttribute

public void checkRemoveAttribute(User user,
                                 Attribute attr)
                          throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to remove the attribute from its topic.

This method returns silently if the user is granted the right.

Specified by:
checkRemoveAttribute in interface DynamicRightsManager
Parameters:
user - the user who wants to remove the attribute
attr - the attribute to be removed
Throws:
DynamicRightsManagerException - if the user is not allowed to remove the attribute
See Also:
DynamicRightsManager.mayRemoveAttribute(User, Attribute)

checkCreateRating

public void checkCreateRating(User user)
                       throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to create ratings.

This method returns silently if the user is granted the right.

Specified by:
checkCreateRating in interface DynamicRightsManager
Parameters:
user - the user who wants to create a rating
Throws:
DynamicRightsManagerException - if the user is not allowed to create ratings
See Also:
DynamicRightsManager.mayCreateRating(User), DynamicRightsManager.checkAddRating(Rating, Rateable)

checkAddRating

public void checkAddRating(Rating rating,
                           Rateable rateable)
                    throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if a user is allowed to assign a rating to a certain rateable element.

This method returns silently if the user is granted the right.

Specified by:
checkAddRating in interface DynamicRightsManager
Parameters:
rating - the rating to be assigned
rateable - the rateable element that will receive the rating
Throws:
DynamicRightsManagerException - if the user is not allowed to add the rating
See Also:
DynamicRightsManager.mayAddRating(Rating, Rateable), DynamicRightsManager.checkCreateRating(User)

checkRemoveRating

public void checkRemoveRating(User remover,
                              Rating rating)
                       throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if a user is allowed to remove a rating permanently from an element.

This method returns silently if the user is granted the right.

Specified by:
checkRemoveRating in interface DynamicRightsManager
Parameters:
remover - the user who wants to remove the rating
rating - the rating to be removed
Throws:
DynamicRightsManagerException - if the user is not allowed to remove the rating
See Also:
DynamicRightsManager.mayRemoveRating(User, Rating)

checkChangeConceptComment

public void checkChangeConceptComment(User user,
                                      Concept concept)
                               throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to change the comment of a certain concept.

This method returns silently if the user is granted the right.

Specified by:
checkChangeConceptComment in interface DynamicRightsManager
Parameters:
user - the user who wants to change the comment
concept - the concept in question
Throws:
DynamicRightsManagerException - if the user is not allowed to change the comment
See Also:
DynamicRightsManager.mayChangeConceptComment(User, Concept)

checkChangeUserComment

public void checkChangeUserComment(User user,
                                   User commentated)
                            throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to change the comment of a certain user (including himself).

This method returns silently if the user is granted the right.

Specified by:
checkChangeUserComment in interface DynamicRightsManager
Parameters:
user - the user who wants to change the comment
commentated - the user who's comment string will be changed
Throws:
DynamicRightsManagerException - if the user is not allowed to change the comment
See Also:
DynamicRightsManager.mayChangeUserComment(User, User)

checkChangeOccurrence

public void checkChangeOccurrence(User user)
                           throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to change (create/delete) occurrences.

This method returns silently if the user is granted the right.

Specified by:
checkChangeOccurrence in interface DynamicRightsManager
Parameters:
user - the user who wants to change an occurrence
Throws:
DynamicRightsManagerException - if the user is not allowed to change occurrences
See Also:
DynamicRightsManager.mayChangeOccurrence(User)

checkAddSynonym

public void checkAddSynonym(User user,
                            Topic base)
                     throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to add a synonymous topic to a given topic.

This method returns silently if the user is granted the right.

Specified by:
checkAddSynonym in interface DynamicRightsManager
Parameters:
user - the user who wants to add the synonym
base - the topic that is assigned the synonymous topic
Throws:
DynamicRightsManagerException - if the user is not allowed to add a synonym
See Also:
DynamicRightsManager.mayAddSynonym(User, Topic)

checkRemoveSynonym

public void checkRemoveSynonym(User user,
                               Synonym synonym)
                        throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to remove a synonym relationship between two topics.

This method returns silently if the user is granted the right.

Specified by:
checkRemoveSynonym in interface DynamicRightsManager
Parameters:
user - the user who wants to remove the synonym relationship
synonym - the Synonym object containing the two synonymous topics
Throws:
DynamicRightsManagerException - if the user is not allowed to remove the synonym
See Also:
DynamicRightsManager.mayRemoveSynonym(User, Synonym)

checkAddType

public void checkAddType(User user,
                         Topic base)
                  throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to add a type topic to a given topic.

This method returns silently if the user is granted the right.

Specified by:
checkAddType in interface DynamicRightsManager
Parameters:
user - the user who wants to add a type
base - the topic which is assigned the new type
Throws:
DynamicRightsManagerException - if the user is not allowed to add a type
See Also:
DynamicRightsManager.mayAddType(User, Topic)

checkRemoveType

public void checkRemoveType(User user,
                            TypeInstance type)
                     throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to remove a type from a topic.

This method returns silently if the user is granted the right.

Specified by:
checkRemoveType in interface DynamicRightsManager
Parameters:
user - the user who wants to remove a type
type - the TypeInstance object which contains both the type topic and the base topic
Throws:
DynamicRightsManagerException - if the user is not allowed to remove the type
See Also:
DynamicRightsManager.mayRemoveType(User, TypeInstance)

checkAddClass

public void checkAddClass(User user,
                          Topic base)
                   throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to add a superclass to a class topic.

This method returns silently if the user is granted the right.

Specified by:
checkAddClass in interface DynamicRightsManager
Parameters:
user - the user who wants to add the superclass
base - the topic that will be assigned a new superclass
Throws:
DynamicRightsManagerException - if the user is not allowed to add a superclass
See Also:
DynamicRightsManager.mayAddClass(User, Topic), Topic.isClassTopic()

checkRemoveClass

public void checkRemoveClass(User user,
                             SuperSubclass cls)
                      throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to remove a superclass from a class topic.

This method returns silently if the user is granted the right.

Specified by:
checkRemoveClass in interface DynamicRightsManager
Parameters:
user - the user who wants to remove the superclass
cls - the SuperSubclass object containing both the superclass and the subclass topic
Throws:
DynamicRightsManagerException - if the user is not allowed to remove the superclass
See Also:
DynamicRightsManager.mayRemoveClass(User, SuperSubclass)

checkQuery

public void checkQuery(User user,
                       String query)
                throws DynamicRightsManagerException
Description copied from interface: DynamicRightsManager
Checks if the user is allowed to do queries using the provided query language(s).

This method returns silently if the user is granted the right.

Specified by:
checkQuery in interface DynamicRightsManager
Parameters:
user - the user who wants to do the query
query - the query string
Throws:
DynamicRightsManagerException - if the user is not allowed to do the query
See Also:
DynamicRightsManager.mayQuery(User, String)

score

public void score(ScoringEvent event)
Description copied from interface: ScoringListener
In this method a ScoringListener can change the user's score. It is called by the IncentiveManager.

Specified by:
score in interface ScoringListener
See Also:
User.getScore(), User.setScore(double)

scored

public void scored(ScoringEvent event)
Description copied from interface: ScoringListener

This method is called after all listener's score() methods have been called for this ScoringEvent.

Do not change the user's score here! This method is intended to be used for calculations based upon the finished scoring for this ScoringEvent, e.g. calculating the user's roles/rights.

Specified by:
scored in interface ScoringListener
See Also:
User.getScore()

getVersion

public String getVersion()
Description copied from interface: ConsensusFoundationModule
Returns a version string of the implementation of this module.

Specified by:
getVersion in interface ConsensusFoundationModule
Returns:
the version of the module's implementation