Package org.cyclos.services.users
Interface TransactionFeedbackService
-
- All Superinterfaces:
CRUDService<TransactionFeedbackDTO,TransactionFeedbackData,TransactionVO>,Service
- All Known Subinterfaces:
TransactionFeedbackServiceLocal
public interface TransactionFeedbackService extends CRUDService<TransactionFeedbackDTO,TransactionFeedbackData,TransactionVO>
Service interface for direct/scheduled/recurring payment feedbacks.
Feedbacks are intended only forTransferTypeDirection.USER_TO_USERpayments.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Longcomment(@NotNull TransactionVO transaction, ReferenceLevel level, String comment)Creates or edits the comments for the feedback of the given payment (be it a direct/scheduled/recurring payment)TransactionFeedbackDatagetDataFromTransaction(TransactionVO vo)Retrieve the data but from the transaction instead of using the feedback's idTransactionFeedbackDatagetGiveData(TransactionVO transaction)Return data for create or modify a feedback.TransactionFeedbackDatagetReplyData(TransactionVO transaction)Return data for reply for an already given feedback.
The logged user must be the payment's receiver withPermission.MY_TRANSACTION_FEEDBACKS_RECEIVEpermission.TransactionFeedbackSearchDatagetSearchData(@NotNull UserLocatorVO locator)Returns data used for search, like results and statisticsReferenceStatisticsVOgetStatistics(@NotNull ReferenceStatisticsParams params)Returns reference statistics for the given user.TransactionFeedbackVOgetTransactionFeedback(@NotNull TransactionVO transaction)Returns the transaction feedback related to the given paymentList<UserVO>listIgnoredUsers()Returns all users ignored for feedbacks for the logged userbooleanmarkAsIgnored(@NotNull UserLocatorVO locator, boolean ignored)Adds/Removes the given user to/from the logged user's ignore list for feedbacks.voidremoveFromTransaction(TransactionVO asTrasaction)Removes (logically) the feedback associated to the given transaction.Longreply(@NotNull TransactionVO transaction, String replyComments)Creates or edits the comments for the feedback of the given payment (be it a transfer os scheduled payment)Page<TransactionFeedbackEntryVO>search(@NotNull TransactionFeedbackQuery query)Searches for transaction feedbacks for a given owner, according to the given queryPage<TransactionResultVO>searchTransactionsAwaitingFeedback(@NotNull TransactionsAwaitingFeedbackQuery transactionAwaitingFeedbackQuery)Searches for transactions awaiting feedback by the given from user.voidupdateFeedbackFromTransaction(TransactionVO vo, TransactionFeedbackUpdateDTO update)Updates the feedback associated to the given transaction as an admin/broker-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
-
-
-
Method Detail
-
comment
Long comment(@NotNull @NotNull TransactionVO transaction, ReferenceLevel level, String comment) throws FrameworkException, IllegalActionException
Creates or edits the comments for the feedback of the given payment (be it a direct/scheduled/recurring payment)- Throws:
IllegalActionException- When the given payment cannot receive a feedback comment (feedbacks not used, already replied or timed out)FrameworkException
-
getDataFromTransaction
TransactionFeedbackData getDataFromTransaction(TransactionVO vo) throws FrameworkException
Retrieve the data but from the transaction instead of using the feedback's id- Throws:
FrameworkException
-
getGiveData
TransactionFeedbackData getGiveData(TransactionVO transaction) throws FrameworkException
Return data for create or modify a feedback. This method is similar to getDataForNew but it doesn't throw aPermissionDeniedExceptionThe logged user must be the payment's payer.- Throws:
FrameworkException
-
getReplyData
TransactionFeedbackData getReplyData(TransactionVO transaction) throws FrameworkException
Return data for reply for an already given feedback.
The logged user must be the payment's receiver withPermission.MY_TRANSACTION_FEEDBACKS_RECEIVEpermission.- Throws:
FrameworkException
-
getSearchData
TransactionFeedbackSearchData getSearchData(@NotNull @NotNull UserLocatorVO locator) throws FrameworkException
Returns data used for search, like results and statistics- Throws:
FrameworkException
-
getStatistics
ReferenceStatisticsVO getStatistics(@NotNull @NotNull ReferenceStatisticsParams params) throws FrameworkException
Returns reference statistics for the given user. The params allows periods. The order of the resulting periods is the same as the order of the input periods. If no periods are specified, 3 statistics are returned: all time and last 30 days. The maximum allowed number of periods is 5.- Throws:
FrameworkException
-
getTransactionFeedback
TransactionFeedbackVO getTransactionFeedback(@NotNull @NotNull TransactionVO transaction) throws FrameworkException
Returns the transaction feedback related to the given payment- Throws:
FrameworkException
-
listIgnoredUsers
List<UserVO> listIgnoredUsers() throws FrameworkException
Returns all users ignored for feedbacks for the logged user- Throws:
FrameworkException
-
markAsIgnored
boolean markAsIgnored(@NotNull @NotNull UserLocatorVO locator, boolean ignored) throws FrameworkExceptionAdds/Removes the given user to/from the logged user's ignore list for feedbacks.- Returns:
- true if the user was not ignored and now is ignored and vice versa.
- Throws:
FrameworkException
-
removeFromTransaction
void removeFromTransaction(TransactionVO asTrasaction) throws FrameworkException
Removes (logically) the feedback associated to the given transaction. It's used only by the REST layer because the paymentFeedback REST API works with transaction's id instead of feedback's id.
Only for admin/brokers with manage permission.- Throws:
FrameworkException
-
reply
Long reply(@NotNull @NotNull TransactionVO transaction, String replyComments) throws FrameworkException, IllegalActionException
Creates or edits the comments for the feedback of the given payment (be it a transfer os scheduled payment)- Throws:
IllegalActionException- When the given payment cannot receive a feedback reply (feedbacks not used or timed out)FrameworkException
-
search
Page<TransactionFeedbackEntryVO> search(@NotNull @NotNull TransactionFeedbackQuery query) throws FrameworkException
Searches for transaction feedbacks for a given owner, according to the given query- Throws:
FrameworkException
-
searchTransactionsAwaitingFeedback
Page<TransactionResultVO> searchTransactionsAwaitingFeedback(@NotNull @NotNull TransactionsAwaitingFeedbackQuery transactionAwaitingFeedbackQuery) throws FrameworkException
Searches for transactions awaiting feedback by the given from user. The logged must have permission to give feedback or manage feedback (manager)- Throws:
FrameworkException
-
updateFeedbackFromTransaction
void updateFeedbackFromTransaction(TransactionVO vo, TransactionFeedbackUpdateDTO update) throws FrameworkException
Updates the feedback associated to the given transaction as an admin/broker- Throws:
FrameworkException
-
-