www in docker support
This commit is contained in:
parent
539a848e95
commit
c227fce036
2145 changed files with 399596 additions and 58 deletions
|
|
@ -0,0 +1,78 @@
|
|||
package it.acxent.rd.servlet.admin;
|
||||
|
||||
import it.acxent.anag.servlet._AnagAdapterSvlt;
|
||||
import it.acxent.cloudmsg.MsgJson;
|
||||
import it.acxent.cloudmsg.PushNotificationService;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.rd.RemoteDevice;
|
||||
import it.acxent.rd.RemoteDeviceCR;
|
||||
import it.acxent.servlet.AddImgSvlt;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/rd/RemoteDevice.abl"})
|
||||
public class RemoteDeviceSvlt extends _AnagAdapterSvlt implements AddImgSvlt {
|
||||
private static final long serialVersionUID = -759824794431772574L;
|
||||
|
||||
protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new RemoteDevice(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new RemoteDeviceCR(getApFull(req));
|
||||
}
|
||||
|
||||
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected boolean isSimpleServlet(HttpServletRequest req) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void _creaToken(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ResParm rp = new ResParm();
|
||||
RemoteDevice bean = new RemoteDevice(apFull);
|
||||
long l_id = getRequestLongParameter(req, "id_remoteDevice");
|
||||
bean.findByPrimaryKey(l_id);
|
||||
if (bean.getId_remoteDevice() > 0L)
|
||||
rp = bean.generaNuovoToken();
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _inviaNotifica(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ResParm rp = new ResParm();
|
||||
RemoteDevice bean = new RemoteDevice(apFull);
|
||||
long l_id = getRequestLongParameter(req, "id_remoteDevice");
|
||||
bean.findByPrimaryKey(l_id);
|
||||
if (bean.getId_remoteDevice() > 0L) {
|
||||
String fileJsonAuth = getParm("FIREBASE_JSON_AUTH_PRIVATE_KEY").getTesto();
|
||||
PushNotificationService pns = new PushNotificationService(fileJsonAuth);
|
||||
MsgJson notifica = new MsgJson("notification", "Test Remote Device Gateway", "Il tuo dispositivo e' correttamente registrato sul server " +
|
||||
bean.getRemoteDeviceApiServer() + "!");
|
||||
MsgJson data = new MsgJson("notification", "Test RDG", "Test Remote Device Gateway");
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add(bean.getFcmToken());
|
||||
pns.sendPushNotification(list, notifica, data, "smsgateway-f05ec");
|
||||
}
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
protected boolean isLoadImageServlet() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
package it.acxent.rd.servlet.admin;
|
||||
Loading…
Add table
Add a link
Reference in a new issue