|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents one role of an association.
Association
Method Summary | |
void |
addTopic(User adder,
Topic topic)
Adds a topic to this role. |
Association |
getAssociation()
Returns the association that this role belongs to. |
String |
getName()
Returns the name of this role's type. |
Collection |
getTopics(User user)
Returns the player Topic objects of this role. |
Topic |
getType()
Returns the type topic of this role. |
boolean |
hasTopic(Topic topic)
Checks if the given topic is a player of this role. |
boolean |
isOfType(Topic type)
Checks if this role is of the given type. |
void |
removeTopic(User remover,
Topic topic)
Removes a topic from this role. |
void |
setType(User setter,
Topic type)
Sets the type of the role. |
Methods inherited from interface java.lang.Comparable |
compareTo |
Method Detail |
public Association getAssociation()
null
public Topic getType()
null
if the role does not have a typepublic void setType(User setter, Topic type) throws OntologyManagerException, DynamicRightsManagerException
setter
- the user who wants to set the typetype
- the type topic (or null
to remove the type)
OntologyManagerException
- if the type could not be set
DynamicRightsManagerException
- if the user is not allowed to change the typeTopic.isClassTopic()
,
DynamicRightsManager.mayChangeAssociation(User, Association)
public boolean isOfType(Topic type)
type
- the type topic, including null
for the typeless role
true
if the role is of the specified type, false
otherwisepublic String getName()
null
)Concept.getName()
public Collection getTopics(User user)
user
- the user who wants to see the topics
null
DynamicRightsManager.mayViewTopic(User, Topic)
public void addTopic(User adder, Topic topic) throws OntologyManagerException, DynamicRightsManagerException
adder
- the user who wants to add the topictopic
- the topic to be added
OntologyManagerException
- if the topic could not be added
DynamicRightsManagerException
- if the user is not allowed to add the topicDynamicRightsManager.mayChangeAssociation(User, Association)
public void removeTopic(User remover, Topic topic) throws OntologyManagerException, DynamicRightsManagerException
remover
- the user who wants to remove the topic.topic
- the topic to be removed
OntologyManagerException
- if the topic could not be removed
DynamicRightsManagerException
- if the user is not allowed to remove the topicDynamicRightsManager.mayChangeAssociation(User, Association)
public boolean hasTopic(Topic topic)
topic
- the topic in question
true
if the topic is player of this role, false
otherwise
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |