LPS-45041 SF - move logic to Java class