de.uka.ipd.consensus.foundation.rights
Interface DynamicRightsManager

All Superinterfaces:
ConsensusFoundationModule
All Known Implementing Classes:
DynamicRightsManagerImpl

public interface DynamicRightsManager
extends ConsensusFoundationModule

The DynamicRightsManager is used by many other components to check if an user action is allowed. An implementation can be written to carry out the incentives for the IncentiveManager (that are basically a question of the user's score and his rights). To compute the users rights efficiently, an implementation can register itself as a ScoringListener and compute the rights in the scored() method.

Use the mayXXX() methods for efficiency. The checkXXX() methods exist for convenience. An implementation should realize the logic within the former methods, the latter methods should use the former ones.

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

The implementation is loaded by the ConsensusFoundation constructor. For successful instantiation, the DynamicRightsManager implementation must provide a default constructor without arguments.

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

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.
 void init(Properties config, LoggingManager logging, UserManager users, OntologyManager ontology, IncentiveManager incentive)
          This method is called by the ConsensusFoundation constructor to initialize the DynamicRightsManager.
 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.
 
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,
                 IncentiveManager incentive)
          throws Exception
This method is called by the ConsensusFoundation constructor to initialize the 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()

mayCreateTopic

public boolean mayCreateTopic(User user,
                              Topic type)
Checks if the user is allowed to create topics of the given type.

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:
checkCreateTopic(User, Topic)

mayCreateClassTopic

public boolean mayCreateClassTopic(User user,
                                   Topic cls)
Checks if the user is allowed to create topics of the given superclass.

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:
checkCreateClassTopic(User, Topic), Topic.isClassTopic()

mayViewTopic

public boolean mayViewTopic(User user,
                            Topic topic)
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.

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:
checkViewTopic(User, Topic)

mayDeleteTopic

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

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:
checkDeleteTopic(User, Topic)

mayMergeTopics

public boolean mayMergeTopics(User user,
                              Topic topic1,
                              Topic topic2)
Checks if a user is allowed to merge to topics.

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:
checkMergeTopics(User, Topic, Topic)

mayCreateAssociation

public boolean mayCreateAssociation(User user,
                                    Topic type)
Checks if the user is allowed to create associations of the given type.

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:
checkCreateAssociation(User, Topic)

mayViewAssociation

public boolean mayViewAssociation(User user,
                                  Association assoc)
Checks if the user is allowed to view a certain association.

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:
checkViewAssociation(User, Association)

mayChangeAssociation

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

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:
checkChangeAssociation(User, Association)

mayDeleteAssociation

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

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:
checkDeleteAssociation(User, Association)

mayCreateAttribute

public boolean mayCreateAttribute(User user,
                                  Topic type)
Checks if the user is allowed to create attributes of the given type.

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:
checkCreateAttribute(User, Topic), mayAddAttribute(User, Attribute, Attributeable)

mayAddAttribute

public 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).

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:
checkAddAttribute(User, Attribute, Attributeable), mayCreateAttribute(User, Topic)

mayRemoveAttribute

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

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:
checkRemoveAttribute(User, Attribute)

mayViewAttribute

public boolean mayViewAttribute(User user,
                                Attribute attr)
Checks if the user is allowed to see a certain attribute.

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:
checkViewAttribute(User, Attribute)

mayChangeAttributeValue

public boolean mayChangeAttributeValue(User user,
                                       Attribute attr)
Checks if the user is allowed to change the attribute's value.

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:
checkChangeAttributeValue(User, Attribute)

mayCreateRating

public boolean mayCreateRating(User user)
Checks if the user is allowed to create ratings.

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

mayAddRating

public boolean mayAddRating(Rating rating,
                            Rateable rateable)
Checks if a user is allowed to assign a rating to a certain rateable element.

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:
checkAddRating(Rating, Rateable), mayCreateRating(User)

mayRemoveRating

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

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:
checkRemoveRating(User, Rating)

mayChangeConceptComment

public boolean mayChangeConceptComment(User user,
                                       Concept concept)
Checks if the user is allowed to change the comment of a certain concept.

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:
checkChangeConceptComment(User, Concept)

mayChangeUserComment

public boolean mayChangeUserComment(User user,
                                    User commentated)
Checks if the user is allowed to change the comment of a certain user (including himself).

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:
checkChangeUserComment(User, User)

mayChangeOccurrence

public boolean mayChangeOccurrence(User user)
Checks if the user is allowed to change (create/delete) occurrences.

Parameters:
user - the user who wants to change an occurrence
Returns:
true if the user is allowed to change occurrences, false otherwise
See Also:
checkChangeOccurrence(User)

mayAddSynonym

public boolean mayAddSynonym(User user,
                             Topic base)
Checks if the user is allowed to add a synonymous topic to a given topic.

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:
checkAddSynonym(User, Topic)

mayRemoveSynonym

public boolean mayRemoveSynonym(User user,
                                Synonym synonym)
Checks if the user is allowed to remove a synonym relationship between two topics.

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:
checkRemoveSynonym(User, Synonym)

mayAddType

public boolean mayAddType(User user,
                          Topic base)
Checks if the user is allowed to add a type topic to a given topic.

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:
checkAddType(User, Topic)

mayRemoveType

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

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:
checkRemoveType(User, TypeInstance)

mayAddClass

public boolean mayAddClass(User user,
                           Topic base)
Checks if the user is allowed to add a superclass to a class topic.

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:
checkAddClass(User, Topic), Topic.isClassTopic()

mayRemoveClass

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

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:
checkRemoveClass(User, SuperSubclass)

mayQuery

public boolean mayQuery(User user,
                        String query)
Checks if the user is allowed to do queries using the provided query language(s).

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:
checkQuery(User, String)

checkCreateTopic

public void checkCreateTopic(User user,
                             Topic type)
                      throws DynamicRightsManagerException
Checks if the user is allowed to create topics of the given type.

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

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:
mayCreateTopic(User, Topic)

checkCreateClassTopic

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

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

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:
mayCreateClassTopic(User, Topic), Topic.isClassTopic()

checkViewTopic

public void checkViewTopic(User user,
                           Topic topic)
                    throws DynamicRightsManagerException
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.

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:
mayViewTopic(User, Topic)

checkDeleteTopic

public void checkDeleteTopic(User user,
                             Topic topic)
                      throws DynamicRightsManagerException
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.

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:
mayDeleteTopic(User, Topic)

checkMergeTopics

public void checkMergeTopics(User user,
                             Topic topic1,
                             Topic topic2)
                      throws DynamicRightsManagerException
Checks if a user is allowed to merge to topics.

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

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:
mayMergeTopics(User, Topic, Topic)

checkCreateAssociation

public void checkCreateAssociation(User user,
                                   Topic type)
                            throws DynamicRightsManagerException
Checks if the user is allowed to create associations of the given type.

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

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:
mayCreateAssociation(User, Topic)

checkViewAssociation

public void checkViewAssociation(User user,
                                 Association assoc)
                          throws DynamicRightsManagerException
Checks if the user is allowed to view a certain association.

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

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:
mayViewAssociation(User, Association)

checkChangeAssociation

public void checkChangeAssociation(User user,
                                   Association assoc)
                            throws DynamicRightsManagerException
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.

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:
mayChangeAssociation(User, Association)

checkDeleteAssociation

public void checkDeleteAssociation(User user,
                                   Association assoc)
                            throws DynamicRightsManagerException
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.

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:
mayDeleteAssociation(User, Association)

checkCreateAttribute

public void checkCreateAttribute(User user,
                                 Topic type)
                          throws DynamicRightsManagerException
Checks if the user is allowed to create attributes of the given type.

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

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:
mayCreateAttribute(User, Topic), checkAddAttribute(User, Attribute, Attributeable)

checkAddAttribute

public void checkAddAttribute(User user,
                              Attribute attr,
                              Attributeable attributeable)
                       throws DynamicRightsManagerException
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.

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:
mayAddAttribute(User, Attribute, Attributeable), checkCreateAttribute(User, Topic)

checkRemoveAttribute

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

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

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:
mayRemoveAttribute(User, Attribute)

checkViewAttribute

public void checkViewAttribute(User user,
                               Attribute attr)
                        throws DynamicRightsManagerException
Checks if the user is allowed to see a certain attribute.

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

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:
mayViewAttribute(User, Attribute)

checkChangeAttributeValue

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

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

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:
mayChangeAttributeValue(User, Attribute)

checkCreateRating

public void checkCreateRating(User user)
                       throws DynamicRightsManagerException
Checks if the user is allowed to create ratings.

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

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

checkAddRating

public void checkAddRating(Rating rating,
                           Rateable rateable)
                    throws DynamicRightsManagerException
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.

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:
mayAddRating(Rating, Rateable), checkCreateRating(User)

checkRemoveRating

public void checkRemoveRating(User remover,
                              Rating rating)
                       throws DynamicRightsManagerException
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.

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:
mayRemoveRating(User, Rating)

checkChangeConceptComment

public void checkChangeConceptComment(User user,
                                      Concept concept)
                               throws DynamicRightsManagerException
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.

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:
mayChangeConceptComment(User, Concept)

checkChangeUserComment

public void checkChangeUserComment(User user,
                                   User commentated)
                            throws DynamicRightsManagerException
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.

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:
mayChangeUserComment(User, User)

checkChangeOccurrence

public void checkChangeOccurrence(User user)
                           throws DynamicRightsManagerException
Checks if the user is allowed to change (create/delete) occurrences.

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

Parameters:
user - the user who wants to change an occurrence
Throws:
DynamicRightsManagerException - if the user is not allowed to change occurrences
See Also:
mayChangeOccurrence(User)

checkAddSynonym

public void checkAddSynonym(User user,
                            Topic base)
                     throws DynamicRightsManagerException
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.

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:
mayAddSynonym(User, Topic)

checkRemoveSynonym

public void checkRemoveSynonym(User user,
                               Synonym synonym)
                        throws DynamicRightsManagerException
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.

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:
mayRemoveSynonym(User, Synonym)

checkAddType

public void checkAddType(User user,
                         Topic base)
                  throws DynamicRightsManagerException
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.

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:
mayAddType(User, Topic)

checkRemoveType

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

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

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:
mayRemoveType(User, TypeInstance)

checkAddClass

public void checkAddClass(User user,
                          Topic base)
                   throws DynamicRightsManagerException
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.

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:
mayAddClass(User, Topic), Topic.isClassTopic()

checkRemoveClass

public void checkRemoveClass(User user,
                             SuperSubclass cls)
                      throws DynamicRightsManagerException
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.

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:
mayRemoveClass(User, SuperSubclass)

checkQuery

public void checkQuery(User user,
                       String query)
                throws DynamicRightsManagerException
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.

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:
mayQuery(User, String)