public void loadAccessesForBasicSampleBean(SampleBasicBean sampleBean) throws Exception { Sample sample = sampleBean.getDomain(); if (user != null) { List<AccessibilityBean> groupAccesses = super.findGroupAccessibilities(sample.getId().toString()); List<AccessibilityBean> userAccesses = super.findUserAccessibilities(sample.getId().toString()); sampleBean.setUserAccesses(userAccesses); sampleBean.setGroupAccesses(groupAccesses); sampleBean.setUser(user); } }
private SampleBasicBean loadSampleBean(Sample sample, boolean checkReadPermission) throws Exception { SampleBasicBean sampleBean = new SampleBasicBean(sample); if (user != null) { logger.debug("=== Loading group accesses"); List<AccessibilityBean> groupAccesses = super.findGroupAccessibilities(sample.getId().toString(), checkReadPermission); logger.debug("=== Done Loading group accesses"); logger.debug("=== Loading user accesses"); List<AccessibilityBean> userAccesses = super.findUserAccessibilities(sample.getId().toString(), checkReadPermission); logger.debug("=== Done Loading user accesses"); sampleBean.setUserAccesses(userAccesses); sampleBean.setGroupAccesses(groupAccesses); sampleBean.setUser(user); } return sampleBean; }