Package com.xwiki.ideas
Interface IdeasManager
-
@Role @Unstable public interface IdeasManagerProvides methods to interact with Ideas.- Since:
- 1.14
- Version:
- $Id: f14f51d18865969c701ef4927c2bf331abe5b184 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanexists(org.xwiki.model.reference.DocumentReference documentReference)A function to check whether an Idea exists or not.Ideaget(org.xwiki.model.reference.DocumentReference documentReference)Retrieves the state of an Idea.booleanisOpenToVote(String status)A function to see if a status allows voting on an Idea.IdearemoveVote(org.xwiki.model.reference.DocumentReference documentReference)Ideavote(org.xwiki.model.reference.DocumentReference documentReference, boolean pro)Registers a vote for an Idea on the behalf of the current user.
-
-
-
Method Detail
-
vote
Idea vote(org.xwiki.model.reference.DocumentReference documentReference, boolean pro) throws IdeasException
Registers a vote for an Idea on the behalf of the current user. The vote can be either for or against.- Parameters:
documentReference- a reference to a document that contains an Ideapro- true if the user agrees with the Idea; false otherwise- Returns:
- an Object representation of the vote result
- Throws:
IdeasException- if the document does not exist or it doesn't have an Idea
-
removeVote
Idea removeVote(org.xwiki.model.reference.DocumentReference documentReference) throws IdeasException
- Parameters:
documentReference- a reference to a document that contains an Idea- Returns:
- an Object representation of the Idea after the vote has been removed
- Throws:
IdeasException- if the document does not exist or it doesn't have an Idea
-
get
Idea get(org.xwiki.model.reference.DocumentReference documentReference) throws IdeasException
Retrieves the state of an Idea.- Parameters:
documentReference- a reference to a document that contains an Idea- Returns:
- an Object representation of the Idea
- Throws:
IdeasException- if the document does not exist or it doesn't have an Idea
-
exists
boolean exists(org.xwiki.model.reference.DocumentReference documentReference) throws IdeasExceptionA function to check whether an Idea exists or not.- Parameters:
documentReference- a document reference that we want to check- Returns:
- true if the document has an Idea; false otherwise
- Throws:
IdeasException- if the document does not exists or it doesn't have an Idea
-
isOpenToVote
boolean isOpenToVote(String status) throws IdeasException
A function to see if a status allows voting on an Idea.- Parameters:
status- the name of the status to check- Returns:
- whether the status allows voting on an Idea
- Throws:
IdeasException- Since:
- 1.16
-
-