Package org.cyclos.services.marketplace
Interface AdQuestionService
-
- All Superinterfaces:
Service
- All Known Subinterfaces:
AdQuestionServiceLocal
public interface AdQuestionService extends Service
Service interface for advertisement questions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidanswer(@NotNull Long id, String answer)Saves the answer for the given question For theanswerparameter we don't use the ValidationApi because it is validated in the service implementation to allow send a properly validation message.Longask(@NotNull BasicAdVO adVO, String question)Creates a new question for the given ad For thequestionparameter we don't use the ValidationApi because it is validated in the service implementation to allow send a properly validation message.List<AdQuestionVO>list(@NotNull BasicAdVO adVO)Returns the questions for the given adAdQuestionVOload(@NotNull Long id)Loads a question by id.
Only if the logged user can ask for or it's the owner of the related advertisement.voidremove(@NotNull Long id)Removes a questionPage<AdQuestionVO>search(@NotNull AdQuestionQuery query)Searches for unanswered questions
-
-
-
Method Detail
-
answer
void answer(@NotNull @NotNull Long id, String answer) throws FrameworkException, IllegalActionExceptionSaves the answer for the given question For theanswerparameter we don't use the ValidationApi because it is validated in the service implementation to allow send a properly validation message.- Throws:
IllegalActionException- If the given question was already answeredFrameworkException
-
ask
Long ask(@NotNull @NotNull BasicAdVO adVO, String question) throws FrameworkException
Creates a new question for the given ad For thequestionparameter we don't use the ValidationApi because it is validated in the service implementation to allow send a properly validation message.- Throws:
FrameworkException
-
list
List<AdQuestionVO> list(@NotNull @NotNull BasicAdVO adVO) throws FrameworkException
Returns the questions for the given ad- Throws:
FrameworkException
-
load
AdQuestionVO load(@NotNull @NotNull Long id) throws FrameworkException
Loads a question by id.
Only if the logged user can ask for or it's the owner of the related advertisement.- Throws:
FrameworkException
-
remove
void remove(@NotNull @NotNull Long id) throws FrameworkExceptionRemoves a question- Throws:
FrameworkException
-
search
Page<AdQuestionVO> search(@NotNull @NotNull AdQuestionQuery query) throws FrameworkException
Searches for unanswered questions- Throws:
FrameworkException
-
-