1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.lum.lu.ui.course.server.gwt;
17
18 import java.util.List;
19
20 import org.apache.log4j.Logger;
21 import org.kuali.student.common.ui.server.gwt.BaseRpcGwtServletAbstract;
22 import org.kuali.student.lum.lu.ui.course.client.service.LuRpcService;
23 import org.kuali.student.r2.common.util.ContextUtils;
24 import org.kuali.student.r2.core.versionmanagement.dto.VersionDisplayInfo;
25 import org.kuali.student.r2.lum.clu.dto.CluInfo;
26 import org.kuali.student.r2.lum.clu.dto.CluLoRelationInfo;
27 import org.kuali.student.r2.lum.clu.service.CluService;
28
29
30
31
32
33
34
35
36 public class LuRpcGwtServlet extends BaseRpcGwtServletAbstract<CluService>
37 implements LuRpcService {
38
39 private static final long serialVersionUID = 1L;
40 final static Logger LOG = Logger.getLogger(LuRpcGwtServlet.class);
41
42
43
44
45 @Override
46 public CluInfo createClu(String luTypeKey, CluInfo cluInfo) {
47 try {
48 return service.createClu(luTypeKey, cluInfo, ContextUtils.getContextInfo());
49 } catch (Exception e) {
50 LOG.error(e);
51 }
52 return null;
53 }
54
55
56
57
58
59 @Override
60 public CluInfo updateClu(String cluId, CluInfo cluInfo) {
61 try {
62 return service.updateClu(cluId, cluInfo, ContextUtils.getContextInfo());
63 } catch (Exception e) {
64 LOG.error(e);
65 }
66 return null;
67 }
68
69 @Override
70 public List<CluLoRelationInfo> getCluLoRelationsByClu(String cluId) {
71 try {
72 return service.getCluLoRelationsByClu(cluId, ContextUtils.getContextInfo());
73 } catch (Exception e) {
74 LOG.error(e);
75 }
76 return null;
77 }
78
79 @Override
80 public CluInfo getClu(String cluId) {
81 try {
82 return service.getClu(cluId, ContextUtils.getContextInfo());
83 } catch (Exception e) {
84 LOG.error(e);
85 }
86 return null;
87 }
88
89
90 @Override
91 public VersionDisplayInfo getCurrentVersion(String refObjectTypeURI, String refObjectId) {
92 try {
93 return service.getCurrentVersion(refObjectTypeURI, refObjectId, ContextUtils.getContextInfo());
94
95 } catch (Exception e) {
96 LOG.error(e);
97 }
98 return null;
99 }
100 }