Skip to content

Commit 00bfa7d

Browse files
committed
Merge branch 'realease-1.0.1'
2 parents 7179f0e + eddd3b3 commit 00bfa7d

File tree

22 files changed

+612
-22
lines changed

22 files changed

+612
-22
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ it.unibo.iss.libs/*
3333

3434
node_modules
3535
build
36+
37+
.vscode
38+
slides/*

App/.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,3 @@ proguard/
3535

3636
# Android Studio captures folder
3737
captures/
38-
39-
40-
**/ServerParameters.java

App/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ android {
66
applicationId "org.gammf.proxima"
77
minSdkVersion 18
88
targetSdkVersion 26
9-
versionCode 1
10-
versionName "1.0"
9+
versionCode 2
10+
versionName "1.0.1"
1111
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1212
}
1313
buildTypes {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package org.gammf.proxima.util;
2+
3+
/**
4+
* Class meant to contain the server parameter, such as its communication protocol, its IP address and its port.
5+
*/
6+
public final class ServerParameters {
7+
8+
public static final String PROTOCOL = "https";
9+
public static final String SERVER_IP = "192.168.43.57";
10+
public static final Integer SERVER_PORT = 6041;
11+
12+
private ServerParameters() {}
13+
}

DnsService/gradle.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ jdkVersion = 1.8
22

33
group = org.gammf.proxima
44
artifactId = dnsservice
5-
version = 1.0
5+
version = 1.0.1
66
longName = Proxima DNS Service
77
projectDescription = A Domain Name System for the Proxima project.
88

@@ -18,4 +18,4 @@ playFrameworkVersion = 2.6.9
1818
httpClientVersion = 4.5.4
1919

2020
jUnitVersion = 4.12
21-
scalaTestVersion = 3.0.1
21+
scalaTestVersion = 3.0.1

FirstAidService/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "first_aid_service",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "The server that manages the access to medical data. It manages the authorization system (base on digital signature) and the physical access to medical databases.",
55
"main": "build/main.js",
66
"scripts": {

FirstAidService/src/main/handlers/dataRequestHandler.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class DataRequestHandler extends RequestHandler {
3535
let targetID: string = req.query.targetID;
3636
let signature: string = req.query.signature;
3737

38-
this.consoleLogger.logInConsole("New medical data request");
38+
DataRequestHandler.consoleLogger.logInConsole("New medical data request");
3939

4040
if (operatorID && targetID && signature) {
4141

@@ -57,32 +57,32 @@ export class DataRequestHandler extends RequestHandler {
5757
.then((data) => {
5858
res.send(data);
5959
DataRequestHandler.logger.logDataAccess(operatorID, targetID);
60-
this.consoleLogger.logInConsole("Rescuer " + operatorID + " autorized to read medical data of patient " + targetID);
60+
DataRequestHandler.consoleLogger.logInConsole("Rescuer " + operatorID + " autorized to read medical data of patient " + targetID);
6161
})
6262
.catch(error => {
6363
if (error instanceof DatabaseError) {
6464
DataRequestHandler.sendServerError(res);
65-
this.consoleLogger.logInConsole("An internal error occurred");
65+
DataRequestHandler.consoleLogger.logInConsole("An internal error occurred");
6666
}
6767
else if ((error instanceof WrongDigitalSignatureError) || (error instanceof RescuerShiftError)) {
6868
DataRequestHandler.sendUnauthorizedError(res);
6969
if (error instanceof WrongDigitalSignatureError) {
70-
this.consoleLogger.logInConsole("Wrong digital signature, rescuer " + operatorID);
70+
DataRequestHandler.consoleLogger.logInConsole("Wrong digital signature, rescuer " + operatorID);
7171
}
7272
else {
73-
this.consoleLogger.logInConsole("Rescuer " + operatorID + " tried to access data outside work hours");
73+
DataRequestHandler.consoleLogger.logInConsole("Rescuer " + operatorID + " tried to access data outside work hours");
7474
}
7575
}
7676
else {
7777
DataRequestHandler.sendServerError(res);
78-
this.consoleLogger.logInConsole("An internal error occurred");
78+
DataRequestHandler.consoleLogger.logInConsole("An internal error occurred");
7979
}
8080
DataRequestHandler.logger.logDataAccessDenied(operatorID, targetID);
8181
});
8282
}
8383
else {
8484
DataRequestHandler.sendBadRequestError(res);
85-
this.consoleLogger.logInConsole("Bad Request...dropped");
85+
DataRequestHandler.consoleLogger.logInConsole("Bad Request...dropped");
8686
}
8787
}
8888

FrontServer/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "frontserver",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "HTTP front server of the Proxima system",
55
"main": "index.js",
66
"scripts": {

Logger/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "proxima-first-aid-logger",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "",
55
"main": "build/main.js",
66
"scripts": {

ProximaProblemAnalysisModel/src/baseModel.qa

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ QActor qpatient context ctxBaseDebug {
1616
Rules {
1717
identifier(patient1).
1818
}
19-
2019
Plan init normal
2120
[
2221
println("[qpatient] started!")
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
authorized(SENDER, RESCUER_ID, PATIENT_ID) :- request(SENDER, RESCUER_ID, PATIENT_ID), rescuer(RESCUER_ID).
22

3-
response(SENDER, PATIENT_ID, NAME, SURNAME, BLOOD_GROUP) :- senderRequestData(SENDER, PATIENT_ID),
3+
response(SENDER, PATIENT_ID, NAME, SURNAME, BLOOD_GROUP) :- senderRequestData(SENDER, RESCUER_ID, PATIENT_ID),
44
data(PATIENT_ID, NAME, SURNAME, BLOOD_GROUP).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* Generated by AN DISI Unibo */
2+
/*
3+
This code is generated only ONCE
4+
*/
5+
package it.unibo.qdns;
6+
import it.unibo.is.interfaces.IOutputEnvView;
7+
import it.unibo.qactors.QActorContext;
8+
9+
public class Qdns extends AbstractQdns {
10+
public Qdns(String actorId, QActorContext myCtx, IOutputEnvView outEnvView ) throws Exception{
11+
super(actorId, myCtx, outEnvView);
12+
}
13+
/*
14+
* ADDED BY THE APPLICATION DESIGNER
15+
*/
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* Generated by AN DISI Unibo */
2+
/*
3+
This code is generated only ONCE
4+
*/
5+
package it.unibo.qfirstaid;
6+
import it.unibo.is.interfaces.IOutputEnvView;
7+
import it.unibo.qactors.QActorContext;
8+
9+
public class Qfirstaid extends AbstractQfirstaid {
10+
public Qfirstaid(String actorId, QActorContext myCtx, IOutputEnvView outEnvView ) throws Exception{
11+
super(actorId, myCtx, outEnvView);
12+
}
13+
/*
14+
* ADDED BY THE APPLICATION DESIGNER
15+
*/
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* Generated by AN DISI Unibo */
2+
/*
3+
This code is generated only ONCE
4+
*/
5+
package it.unibo.qlogger;
6+
import it.unibo.is.interfaces.IOutputEnvView;
7+
import it.unibo.qactors.QActorContext;
8+
9+
public class Qlogger extends AbstractQlogger {
10+
public Qlogger(String actorId, QActorContext myCtx, IOutputEnvView outEnvView ) throws Exception{
11+
super(actorId, myCtx, outEnvView);
12+
}
13+
/*
14+
* ADDED BY THE APPLICATION DESIGNER
15+
*/
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* Generated by AN DISI Unibo */
2+
/*
3+
This code is generated only ONCE
4+
*/
5+
package it.unibo.qorchestrator;
6+
import it.unibo.is.interfaces.IOutputEnvView;
7+
import it.unibo.qactors.QActorContext;
8+
9+
public class Qorchestrator extends AbstractQorchestrator {
10+
public Qorchestrator(String actorId, QActorContext myCtx, IOutputEnvView outEnvView ) throws Exception{
11+
super(actorId, myCtx, outEnvView);
12+
}
13+
/*
14+
* ADDED BY THE APPLICATION DESIGNER
15+
*/
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* Generated by AN DISI Unibo */
2+
/*
3+
This code is generated only ONCE
4+
*/
5+
package it.unibo.qusersauth;
6+
import it.unibo.is.interfaces.IOutputEnvView;
7+
import it.unibo.qactors.QActorContext;
8+
9+
public class Qusersauth extends AbstractQusersauth {
10+
public Qusersauth(String actorId, QActorContext myCtx, IOutputEnvView outEnvView ) throws Exception{
11+
super(actorId, myCtx, outEnvView);
12+
}
13+
/*
14+
* ADDED BY THE APPLICATION DESIGNER
15+
*/
16+
}

0 commit comments

Comments
 (0)