Refactoring setupItem in LinkAdaptor.java