|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface manages associations between topics which are separated into roles.
Topic,
AssociationRole,
OntologyManager.createAssociation(User, String, String, Topic)| Method Summary | |
AssociationRole |
addAssociationRole(User adder,
Topic type)
Creates an association role of the given type if the role does not exist yet. |
void |
addTopic(User adder,
Topic topic,
Topic roleType)
Adds a topic to this association as a player of the given role. |
AssociationRole |
getAssociationRole(Topic type)
Returns the AssociationRole of a certain type. |
Collection |
getAssociationRoles(User getter)
Returns a collection of all AssociationRole objects used by this association. |
Collection |
getTopics(User getter,
Topic roleType)
Returns a collection of Topic player objects of the given role. |
Topic |
getType()
Returns the type of the association. |
boolean |
hasTopic(Topic topic,
Topic roleType)
Queries if the topic is player of the given role in this association. |
boolean |
hasTopic(User user,
Topic topic)
Queries if the topic is player of any role (that the user is allowed to see) in this association. |
void |
removeAssociationRole(User remover,
Topic type)
Removes the association role of the given type. |
void |
removeTopic(User remover,
Topic topic,
Topic roleType)
Removes a topic from the given role if it is player of the role. |
void |
setType(User setter,
Topic type)
Sets the type of the association. |
| Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Concept |
getId, getName, isOfType, setName |
| Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Versionable |
getVersion |
| Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Commentatable |
getComment, setComment |
| Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Rateable |
addRating, getAverageRatingValue, getRating, getRatings, getRatingsCount |
| Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Createable |
getCreator |
| Methods inherited from interface java.lang.Comparable |
compareTo |
| Method Detail |
public Topic getType()
null if the association does not have a type
public 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 Collection getAssociationRoles(User getter)
getter - the user who wants to see the roles
nullAssociationRole,
DynamicRightsManager.mayViewTopic(User, Topic)public AssociationRole getAssociationRole(Topic type)
type - the type topic of the desired role, null for the typeless role
null if this association does not contain a player topic of the type
public AssociationRole addAssociationRole(User adder,
Topic type)
throws OntologyManagerException,
DynamicRightsManagerException
adder - the user who wants to add the roletype - the type topic of the role to be created, including null for the typeless role
null
OntologyManagerException - if the role could not be created
DynamicRightsManagerException - if the user is not allowed to add the roleDynamicRightsManager.mayChangeAssociation(User, Association)
public void removeAssociationRole(User remover,
Topic type)
throws OntologyManagerException,
DynamicRightsManagerException
remover - the user who wants to remove the roletype - the type of the role to be removed, including null for the typeless role
OntologyManagerException - if the role could not be removed
DynamicRightsManagerException - if the user is not allowed to remove the roleDynamicRightsManager.mayChangeAssociation(User, Association)
public void addTopic(User adder,
Topic topic,
Topic roleType)
throws OntologyManagerException,
DynamicRightsManagerException
adder - the user who wants to add the topictopic - the topic to be added to this associationroleType - the player role of the topic, including null for the typeless role
OntologyManagerException - if the topic could not be added
DynamicRightsManagerException - if the user is not allowed to add the topicAssociationRole.addTopic(User, Topic),
DynamicRightsManager.mayChangeAssociation(User, Association)
public void removeTopic(User remover,
Topic topic,
Topic roleType)
throws OntologyManagerException,
DynamicRightsManagerException
remover - the user who wants to remove the topictopic - the topic to be removedroleType - the role that the topic to be removed plays, including null for the typeless role
OntologyManagerException - if the topic could not be removed
DynamicRightsManagerException - if the user is not allowed to remove the topicAssociationRole.removeTopic(User, Topic),
DynamicRightsManager.mayChangeAssociation(User, Association)
public boolean hasTopic(Topic topic,
Topic roleType)
topic - the queried topicroleType - the role that this topic must play, including null for the typeless role
true if the topic is player of the given role in this association, false otherwiseAssociationRole.hasTopic(Topic)
public boolean hasTopic(User user,
Topic topic)
user - the user who does the querytopic - the queried topic
true if the topic is player of any role in this association, false otherwiseDynamicRightsManager.mayViewTopic(User, Topic),
AssociationRole.hasTopic(Topic)
public Collection getTopics(User getter,
Topic roleType)
getter - the user who wants to see the topicsroleType - the role type, ncluding null for the typeless role
nullDynamicRightsManager.mayViewTopic(User, Topic),
AssociationRole.getTopics(User)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||