LPS-34672 SF - move logic to Java class