Rev 1692 | Rev 1778 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1692 | Rev 1776 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | package pt.estgp.estgweb.services.entity; |
1 | package pt.estgp.estgweb.services.entity; |
2 | 2 | ||
3 | import com.owlike.genson.Genson; |
3 | import com.owlike.genson.Genson; |
4 | import com.owlike.genson.TransformationException; |
- | |
5 | import pt.estgp.estgweb.domain.*; |
4 | import pt.estgp.estgweb.domain.*; |
6 | import pt.estgp.estgweb.domain.dao.DaoFactory; |
5 | import pt.estgp.estgweb.domain.dao.DaoFactory; |
7 | import pt.utl.ist.berserk.logic.serviceManager.IService; |
6 | import pt.utl.ist.berserk.logic.serviceManager.IService; |
8 | 7 | ||
9 | import java.io.IOException; |
8 | import java.io.IOException; |
Line 38... | Line 37... | ||
38 | .include("email", User.class) |
37 | .include("email", User.class) |
39 | .include("roles", User.class) |
38 | .include("roles", User.class) |
40 | 39 | ||
41 | .create(); |
40 | .create(); |
42 | 41 | ||
43 | public 1.5.0/docs/api/java/lang/String.html">String courseUnit(CourseUnit cu) throws 1.5.0/docs/api/java/io/IOException.html">IOException, TransformationException { |
42 | public 1.5.0/docs/api/java/lang/String.html">String courseUnit(CourseUnit cu) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
44 | return courseUnitGenson.serialize(cu); |
43 | return courseUnitGenson.serialize(cu); |
45 | } |
44 | } |
46 | public 1.5.0/docs/api/java/lang/String.html">String courseUnit(1.5.0/docs/api/java/io/Serializable.html">Serializable s) throws 1.5.0/docs/api/java/io/IOException.html">IOException, TransformationException { |
45 | public 1.5.0/docs/api/java/lang/String.html">String courseUnit(1.5.0/docs/api/java/io/Serializable.html">Serializable s) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
47 | CourseUnit cu = DaoFactory.getCourseUnitDaoImpl().get(s); |
46 | CourseUnit cu = DaoFactory.getCourseUnitDaoImpl().get(s); |
48 | return courseUnitGenson.serialize(cu); |
47 | return courseUnitGenson.serialize(cu); |
49 | } |
48 | } |
50 | 49 | ||
51 | public 1.5.0/docs/api/java/lang/String.html">String user(1.5.0/docs/api/java/io/Serializable.html">Serializable s) throws 1.5.0/docs/api/java/io/IOException.html">IOException, TransformationException { |
50 | public 1.5.0/docs/api/java/lang/String.html">String user(1.5.0/docs/api/java/io/Serializable.html">Serializable s) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
52 | User u = DaoFactory.getUserDaoImpl().get(s); |
51 | User u = DaoFactory.getUserDaoImpl().get(s); |
53 | return userGenson.serialize(u); |
52 | return userGenson.serialize(u); |
54 | } |
53 | } |
55 | public 1.5.0/docs/api/java/lang/String.html">String user(User u) throws 1.5.0/docs/api/java/io/IOException.html">IOException, TransformationException { |
54 | public 1.5.0/docs/api/java/lang/String.html">String user(User u) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
56 | return userGenson.serialize(u); |
55 | return userGenson.serialize(u); |
57 | } |
56 | } |
58 | 57 | ||
59 | public 1.5.0/docs/api/java/lang/String.html">String user(ArrayList<User> users) throws 1.5.0/docs/api/java/io/IOException.html">IOException, TransformationException { |
58 | public 1.5.0/docs/api/java/lang/String.html">String user(ArrayList<User> users) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
60 | return userGenson.serialize(users); |
59 | return userGenson.serialize(users); |
61 | } |
60 | } |
62 | } |
61 | } |