1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.kuali.student.common.ui.server.gwt;
16
17 import java.util.ArrayList;
18 import java.util.List;
19
20 import org.kuali.student.common.ui.client.service.MetadataRpcService;
21 import org.kuali.student.r1.common.assembly.data.Metadata;
22 import org.kuali.student.r1.common.assembly.dictionary.MetadataServiceImpl;
23
24 import com.google.gwt.user.server.rpc.RemoteServiceServlet;
25
26 @Deprecated
27 public class MetadataRpcGwtServlet extends RemoteServiceServlet implements MetadataRpcService {
28
29 private static final long serialVersionUID = 1L;
30
31 private MetadataServiceImpl serviceImpl;
32
33 @Override
34 public Metadata getMetadata(String objectKey, String type, String state) {
35 return serviceImpl.getMetadata(objectKey, type, state);
36 }
37
38 public List<Metadata> getMetadataList(String objectKey, List<String> types, String state) {
39 try
40 {
41 List<Metadata> metadataList = new ArrayList<Metadata>();
42 for (String type : types) {
43 metadataList.add(serviceImpl.getMetadata(objectKey, type, state));
44 }
45 return metadataList;
46 }
47 catch(Exception ex){
48
49 ex.printStackTrace();
50 throw new RuntimeException(ex);
51 }
52 }
53
54 public Metadata getMetadataList(String objectKey, String state) {
55 try
56 {
57 return serviceImpl.getMetadata(objectKey, state);
58 } catch (Exception ex) {
59
60 ex.printStackTrace();
61 throw new RuntimeException(ex);
62 }
63 }
64
65 public void setServiceImpl(MetadataServiceImpl serviceImpl) {
66 this.serviceImpl = serviceImpl;
67 }
68 }