| Line 92... |
Line 92... |
| 92 |
public String create() throws WidgetException, TException, IOException {
|
92 |
public String create() throws WidgetException, TException, IOException {
|
| 93 |
if(userinfo.getUserId() != -1){
|
93 |
if(userinfo.getUserId() != -1){
|
| 94 |
for (String item : items){
|
94 |
for (String item : items){
|
| 95 |
long itemId = Long.parseLong(item);
|
95 |
long itemId = Long.parseLong(item);
|
| 96 |
boolean isNew = client.updateMyResearch(userinfo.getUserId(), itemId);
|
96 |
boolean isNew = client.updateMyResearch(userinfo.getUserId(), itemId);
|
| - |
|
97 |
String fromsrc = "";
|
| 97 |
if(isNew){
|
98 |
if(isNew){
|
| 98 |
try {
|
99 |
try {
|
| 99 |
htmlSnippet = htmlSnippet + FileUtils.read( Utils.EXPORT_ENTITIES_PATH + itemId + File.separator + htmlSnippetFileName);
|
100 |
htmlSnippet = htmlSnippet + FileUtils.read( Utils.EXPORT_ENTITIES_PATH + itemId + File.separator + htmlSnippetFileName);
|
| 100 |
}
|
101 |
}
|
| 101 |
catch (FileNotFoundException e) {
|
102 |
catch (FileNotFoundException e) {
|
| 102 |
log.error("File not found : " + Utils.EXPORT_ENTITIES_PATH + itemId + File.separator + htmlSnippetFileName);
|
103 |
log.error("File not found : " + Utils.EXPORT_ENTITIES_PATH + itemId + File.separator + htmlSnippetFileName);
|
| 103 |
}
|
104 |
}
|
| 104 |
catch (IOException e) {
|
105 |
catch (IOException e) {
|
| 105 |
log.error("IO exception : " + Utils.EXPORT_ENTITIES_PATH + itemId + File.separator + htmlSnippetFileName);
|
106 |
log.error("IO exception : " + Utils.EXPORT_ENTITIES_PATH + itemId + File.separator + htmlSnippetFileName);
|
| 106 |
}
|
107 |
}
|
| - |
|
108 |
if(request.getParameter("fromsrc") != null){
|
| - |
|
109 |
fromsrc = request.getParameter("fromsrc");
|
| - |
|
110 |
}
|
| 107 |
DataLogger.logData(EventType.RESEARCH_ADD, getSessionId(), userinfo.getUserId(), userinfo.getEmail(), StringUtils.join(items, "_"));
|
111 |
DataLogger.logData(EventType.RESEARCH_ADD, getSessionId(), userinfo.getUserId(), userinfo.getEmail(), StringUtils.join(items, "_"), fromsrc);
|
| 108 |
}
|
112 |
}
|
| 109 |
}
|
113 |
}
|
| 110 |
}
|
114 |
}
|
| 111 |
return "success";
|
115 |
return "success";
|
| 112 |
}
|
116 |
}
|