Created
October 31, 2017 19:47
-
-
Save asunwoo/674f877549e1e30383aa6f9ce7ff0cc6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public ProductSort getExperimentImpl(String experimentName, String userId){ | |
| Variation variation = this.optimizelyClient.activate(experimentName, userId); | |
| ProductSort retobj = null; | |
| if(variation.getKey().equals("PriceProductSort")){ | |
| retobj = new CategoryProductSort(); | |
| } else if(variation.getKey().equals("NameProductSort")){ | |
| retobj = new NameProductSort(); | |
| } else if(variation.getKey().equals("CategoryProductSort")){ | |
| retobj = new PriceProductSort(); | |
| } else{ | |
| //Defaulting to price sorting | |
| retobj = new PriceProductSort(); | |
| } | |
| return retobj; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment