-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathLaunchServiceImpl.java
More file actions
59 lines (50 loc) · 2.14 KB
/
Copy pathLaunchServiceImpl.java
File metadata and controls
59 lines (50 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// -*- mode: java; c-basic-offset: 2; -*-
// Copyright 2009-2011 Google, All Rights reserved
// Copyright 2011-2012 MIT, All rights reserved
// Released under the MIT License https://raw.github.com/mit-cml/app-inventor/master/mitlicense.txt
package com.google.appinventor.server;
import com.google.appinventor.server.encryption.EncryptionException;
import com.google.appinventor.server.project.utils.JavaWebStart;
import com.google.appinventor.server.storage.StorageIo;
import com.google.appinventor.server.storage.StorageIoInstanceHolder;
import com.google.appinventor.server.util.JsonpConnectionUtil;
import com.google.appinventor.shared.jsonp.JsonpConnectionInfo;
import com.google.appinventor.shared.rpc.launch.LaunchService;
import com.google.appinventor.shared.rpc.user.UserInfoProvider;
import java.util.logging.Logger;
// TODO(lizlooney) - This class is no longer for launching. It is used for codeblocks,
// so it should be renamed.
/**
* The implementation of the Launch RPC service which runs on the server.
*
* <p>Note that this service must be state-less so that it can be run on
* multiple servers.
*
* @author lizlooney@google.com (Liz Looney)
*/
public class LaunchServiceImpl extends OdeRemoteServiceServlet implements LaunchService {
// Logging support
private static final Logger LOG = Logger.getLogger(LaunchServiceImpl.class.getName());
// Storage
private final StorageIo storageIo = StorageIoInstanceHolder.INSTANCE;
@Override
public void clearJsonpConnectionInfo(String filePrefix) {
JsonpConnectionUtil.clearJsonpConnectionInfo(storageIo, userInfoProvider.getUserId(),
filePrefix);
}
@Override
public JsonpConnectionInfo retrieveJsonpConnectionInfo(String filePrefix) {
return JsonpConnectionUtil.retrieveJsonpConnectionInfo(storageIo, userInfoProvider.getUserId(),
filePrefix);
}
@Override
public String getWebStartProjectPath(long projectId) {
try {
return JavaWebStart.getWebStartProjectPath(userInfoProvider, projectId);
} catch (EncryptionException e) {
//TODO(sharon): what to do here?
//throw CrashReport.createAndLogError(LOG, null, null, e);
}
return null;
}
}