15 lines
490 B
Java
15 lines
490 B
Java
package com.quantai.trader.domain;
|
|
|
|
import com.quantai.trader.enums.TraderErrorCode;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
@Component
|
|
public class FeedbackValidator {
|
|
public void validateP0(TraderAppFeedback feedback) {
|
|
if (!feedback.feedbackSource().p0Allowed() || feedback.realFill()) {
|
|
throw new TraderException(TraderErrorCode.TRADER_FEEDBACK_INVALID,
|
|
"P0 rejects PAPER_APP/REAL_APP and any realFill feedback");
|
|
}
|
|
}
|
|
}
|