connected the logic of add new voter to the DSP
parent
9825b3409b
commit
c90be520fe
|
@ -0,0 +1,46 @@
|
||||||
|
|
||||||
|
|
||||||
|
import ch.qos.logback.classic.encoder.PatternLayoutEncoder
|
||||||
|
import ch.qos.logback.classic.filter.ThresholdFilter
|
||||||
|
import ch.qos.logback.core.ConsoleAppender
|
||||||
|
import ch.qos.logback.core.util.Duration
|
||||||
|
import static ch.qos.logback.classic.Level.*
|
||||||
|
|
||||||
|
if (System.getProperty("log.debug") != null) {
|
||||||
|
println "Logback configuration debugging enabled"
|
||||||
|
|
||||||
|
statusListener(OnConsoleStatusListener)
|
||||||
|
}
|
||||||
|
|
||||||
|
def LOG_LEVEL = toLevel(System.getProperty("log.level"), INFO)
|
||||||
|
|
||||||
|
def haveBeagle = System.getProperty("log.beagle") != null
|
||||||
|
def logOps = System.getProperty("log.ops") != null
|
||||||
|
|
||||||
|
appender("CONSOLE", ConsoleAppender) {
|
||||||
|
|
||||||
|
filter(ThresholdFilter) {
|
||||||
|
level = toLevel(System.getProperty("log.level"), TRACE)
|
||||||
|
}
|
||||||
|
|
||||||
|
encoder(PatternLayoutEncoder) {
|
||||||
|
pattern = "%d{HH:mm:ss.SSS} [%thread %file:%line] %-5level %logger{0} - %msg%n"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def appenders = [ "CONSOLE" ]
|
||||||
|
|
||||||
|
if (haveBeagle) {
|
||||||
|
appender("SOCKET", SocketAppender) {
|
||||||
|
includeCallerData = true
|
||||||
|
remoteHost = "localhost"
|
||||||
|
port = 4321
|
||||||
|
reconnectionDelay = new Duration(10000)
|
||||||
|
}
|
||||||
|
|
||||||
|
appenders += ["SOCKET"]
|
||||||
|
}
|
||||||
|
|
||||||
|
root(LOG_LEVEL, appenders)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
signed-messages/* -text
|
|
@ -0,0 +1,6 @@
|
||||||
|
Certs and private keys for testing generated using OpenSSL
|
||||||
|
|
||||||
|
.crt and .pem files are in PEM format
|
||||||
|
.der files are in binary DER format
|
||||||
|
|
||||||
|
files that have a name of the form *-with-password-xxxx.pem are encrypted with the password xxxx
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
-----BEGIN EC PRIVATE KEY-----
|
||||||
|
Proc-Type: 4,ENCRYPTED
|
||||||
|
DEK-Info: AES-256-CBC,243D718A0D80C59590E582A26E87A49C
|
||||||
|
|
||||||
|
RG6ITUTIdbJdWYX57oMn3tTCzHJSTjXAIZLjoVxy/v4UFYjluaFhGonIlbH1q2pP
|
||||||
|
ueu29Q3eT6144ypB8ARUJ1x0kRX1OL9zNHgdF9ulrCf9/nhGyC2nL+tHZ0YPbxoQ
|
||||||
|
+6yCQcRWvjUXLVzPEUnwMuHXJDpaXES8X0R4CISQKIA=
|
||||||
|
-----END EC PRIVATE KEY-----
|
Binary file not shown.
|
@ -0,0 +1,5 @@
|
||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQge8JqCoaLoZq61aQki5Xm
|
||||||
|
GppcfAAkhHDGNQw/wLof5LmhRANCAAQJD1kW6BsNkRY9tslaugpOJOaoKX4uBz4S
|
||||||
|
Q96lPaPWkatNVgQchwNeB/hdjZwNuwE7A7XAwr69HFmhXRhsM005
|
||||||
|
-----END PRIVATE KEY-----
|
|
@ -0,0 +1,4 @@
|
||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAECQ9ZFugbDZEWPbbJWroKTiTmqCl+Lgc+
|
||||||
|
EkPepT2j1pGrTVYEHIcDXgf4XY2cDbsBOwO1wMK+vRxZoV0YbDNNOQ==
|
||||||
|
-----END PUBLIC KEY-----
|
|
@ -0,0 +1,19 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDFjCCArygAwIBAgICEAAwCgYIKoZIzj0EAwIwgYIxKTAnBgNVBAMMIE1lZXJr
|
||||||
|
YXQgVm90aW5nIEludGVybWVkaWF0ZSBDQSAxMRMwEQYDVQQIDApTb21lLVN0YXRl
|
||||||
|
MQswCQYDVQQGEwJJTDEVMBMGA1UECgwMSURDIEhlcnpsaXlhMRwwGgYDVQQLDBNN
|
||||||
|
ZWVya2F0IFZvdGluZyBUZWFtMB4XDTE1MTExMTE2MTM1NFoXDTI1MTEwODE2MTM1
|
||||||
|
NFowbjEaMBgGA1UEAwwRUG9sbGluZyBTdGF0aW9uIDExEzARBgNVBAgMClNvbWUt
|
||||||
|
U3RhdGUxCzAJBgNVBAYTAklMMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV
|
||||||
|
BAsMDk1lZXJrYXQgVm90aW5nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAECQ9ZFugb
|
||||||
|
DZEWPbbJWroKTiTmqCl+Lgc+EkPepT2j1pGrTVYEHIcDXgf4XY2cDbsBOwO1wMK+
|
||||||
|
vRxZoV0YbDNNOaOCATYwggEyMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFLamS8o2
|
||||||
|
hFNd0vWy/irEBNWVNwFXMB8GA1UdIwQYMBaAFBeyv0c75eT6PNumHo9TZ2B9vtcp
|
||||||
|
MAsGA1UdDwQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBEBgNVHR8EPTA7MDmg
|
||||||
|
N6A1hjNodHRwOi8vY3JsLmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRp
|
||||||
|
YXRlMS5jcmwwegYIKwYBBQUHAQEEbjBsMEEGCCsGAQUFBzAChjVodHRwOi8vcGtp
|
||||||
|
LmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRpYXRlLWNhLmNydDAnBggr
|
||||||
|
BgEFBQcwAYYbaHR0cDovL29jc3AuZmFjdGNlbnRlci5vcmcvMAoGCCqGSM49BAMC
|
||||||
|
A0gAMEUCIQD6QbhNNmB3AVVqhmXuiLA7WF6raShw6n0g/VloVGQebQIgEvxYclpO
|
||||||
|
MMynt5wH6X65rtn4Q1EGaDMvNbFweCDsldk=
|
||||||
|
-----END CERTIFICATE-----
|
|
@ -0,0 +1,9 @@
|
||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBOjCB4QIBADCBgTELMAkGA1UEBhMCSUwxEzARBgNVBAgMClNvbWUtU3RhdGUx
|
||||||
|
ETAPBgNVBAcMCEhlcnpsaXlhMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV
|
||||||
|
BAsMDk1lZXJrYXQgVm90aW5nMRowGAYDVQQDDBFQb2xsaW5nIFN0YXRpb24gMTBW
|
||||||
|
MBAGByqGSM49AgEGBSuBBAAKA0IABAkPWRboGw2RFj22yVq6Ck4k5qgpfi4HPhJD
|
||||||
|
3qU9o9aRq01WBByHA14H+F2NnA27ATsDtcDCvr0cWaFdGGwzTTmgADAKBggqhkjO
|
||||||
|
PQQDAgNIADBFAiEA8gmIhALr7O5M1QLReGH3jheildTIr1mDWl14WyMf9U4CIF23
|
||||||
|
mInyo4VqNHLzxMLg5Cn3Oddokng3OXa63y4nTfv+
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
|
@ -0,0 +1,5 @@
|
||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgYpBEO+XWm/n6VPeMVK76
|
||||||
|
mrZkDTpiwLsDykG7M4fU5RKhRANCAAR71/kVGyA3hdxcLBBT3NPQF6R3LholmLRN
|
||||||
|
qhnvHqzJWuy7ev+Xbuxtt9AN0ajyeFDy8Oe1bUSidnLyQi+nXC0f
|
||||||
|
-----END PRIVATE KEY-----
|
|
@ -0,0 +1,4 @@
|
||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEe9f5FRsgN4XcXCwQU9zT0Bekdy4aJZi0
|
||||||
|
TaoZ7x6syVrsu3r/l27sbbfQDdGo8nhQ8vDntW1EonZy8kIvp1wtHw==
|
||||||
|
-----END PUBLIC KEY-----
|
|
@ -0,0 +1,19 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDFjCCArygAwIBAgICEAEwCgYIKoZIzj0EAwIwgYIxKTAnBgNVBAMMIE1lZXJr
|
||||||
|
YXQgVm90aW5nIEludGVybWVkaWF0ZSBDQSAxMRMwEQYDVQQIDApTb21lLVN0YXRl
|
||||||
|
MQswCQYDVQQGEwJJTDEVMBMGA1UECgwMSURDIEhlcnpsaXlhMRwwGgYDVQQLDBNN
|
||||||
|
ZWVya2F0IFZvdGluZyBUZWFtMB4XDTE1MTExMTE2MjAzM1oXDTI1MTEwODE2MjAz
|
||||||
|
M1owbjEaMBgGA1UEAwwRUG9sbGluZyBTdGF0aW9uIDIxEzARBgNVBAgMClNvbWUt
|
||||||
|
U3RhdGUxCzAJBgNVBAYTAklMMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV
|
||||||
|
BAsMDk1lZXJrYXQgVm90aW5nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEe9f5FRsg
|
||||||
|
N4XcXCwQU9zT0Bekdy4aJZi0TaoZ7x6syVrsu3r/l27sbbfQDdGo8nhQ8vDntW1E
|
||||||
|
onZy8kIvp1wtH6OCATYwggEyMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFKCdquYj
|
||||||
|
DGHqAHt+4PIDlw0h2UvuMB8GA1UdIwQYMBaAFBeyv0c75eT6PNumHo9TZ2B9vtcp
|
||||||
|
MAsGA1UdDwQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBEBgNVHR8EPTA7MDmg
|
||||||
|
N6A1hjNodHRwOi8vY3JsLmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRp
|
||||||
|
YXRlMS5jcmwwegYIKwYBBQUHAQEEbjBsMEEGCCsGAQUFBzAChjVodHRwOi8vcGtp
|
||||||
|
LmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRpYXRlLWNhLmNydDAnBggr
|
||||||
|
BgEFBQcwAYYbaHR0cDovL29jc3AuZmFjdGNlbnRlci5vcmcvMAoGCCqGSM49BAMC
|
||||||
|
A0gAMEUCIQDpo5B0vvEJSax3YzOMfE8l0pfDUIKLdBWJVGeq0VLtIgIgVr0+4/0e
|
||||||
|
n+R+l1OVOLh2GirloOgbv5Ch5BQ2pQNAG2Y=
|
||||||
|
-----END CERTIFICATE-----
|
|
@ -0,0 +1,9 @@
|
||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBOzCB4QIBADCBgTELMAkGA1UEBhMCSUwxEzARBgNVBAgMClNvbWUtU3RhdGUx
|
||||||
|
ETAPBgNVBAcMCEhlcnpsaXlhMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV
|
||||||
|
BAsMDk1lZXJrYXQgVm90aW5nMRowGAYDVQQDDBFQb2xsaW5nIFN0YXRpb24gMjBW
|
||||||
|
MBAGByqGSM49AgEGBSuBBAAKA0IABHvX+RUbIDeF3FwsEFPc09AXpHcuGiWYtE2q
|
||||||
|
Ge8erMla7Lt6/5du7G230A3RqPJ4UPLw57VtRKJ2cvJCL6dcLR+gADAKBggqhkjO
|
||||||
|
PQQDAgNJADBGAiEA6Ls/ojRaZT+u4YeOBYcPbRcJE3jSTe1Sm/lR7fDyEhMCIQCk
|
||||||
|
UOca+e2b8+CqM3CURBv6TqUMmZ3HeMRvEAxFPqOWSw==
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIBGjCBw6ADAgECAgEBMAkGByqGSM49BAEwEDEOMAwGA1UEAxMFY2VydDEwHhcN
|
||||||
|
MTUxMTI4MTEwNDAwWhcNMTYxMTI4MTEwNDAwWjAQMQ4wDAYDVQQDEwVjZXJ0MTBZ
|
||||||
|
MBMGByqGSM49AgEGCCqGSM49AwEHA0IABLiyFMVWQtFi4fCjOGLDwQcdjyr48Y8j
|
||||||
|
P+eLEIGMYKKv8bqL3Vchs0iOPoyGH6jxYj2/ShnLSIEuIMPfVgV9kxSjDzANMAsG
|
||||||
|
A1UdDwQEAwIHgDAJBgcqhkjOPQQBA0cAMEQCIH7R0AWO0AYiHOs+QsHEpWiebFc1
|
||||||
|
cyxCKJGkf8KA1KJrAiArCia7PWl0KzaqA0RQC4J0BKp4rZo1PCqKI8DirKQf/Q==
|
||||||
|
-----END CERTIFICATE-----
|
|
@ -0,0 +1,19 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDFjCCArygAwIBAgICEAAwCgYIKoZIzj0EAwIwgYIxKTAnBgNVBAMMIE1lZXJr
|
||||||
|
YXQgVm90aW5nIEludGVybWVkaWF0ZSBDQSAxMRMwEQYDVQQIDApTb21lLVN0YXRl
|
||||||
|
MQswCQYDVQQGEwJJTDEVMBMGA1UECgwMSURDIEhlcnpsaXlhMRwwGgYDVQQLDBNN
|
||||||
|
ZWVya2F0IFZvdGluZyBUZWFtMB4XDTE1MTExMTE2MTM1NFoXDTI1MTEwODE2MTM1
|
||||||
|
NFowbjEaMBgGA1UEAwwRUG9sbGluZyBTdGF0aW9uIDExEzARBgNVBAgMClNvbWUt
|
||||||
|
U3RhdGUxCzAJBgNVBAYTAklMMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV
|
||||||
|
BAsMDk1lZXJrYXQgVm90aW5nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAECQ9ZFugb
|
||||||
|
DZEWPbbJWroKTiTmqCl+Lgc+EkPepT2j1pGrTVYEHIcDXgf4XY2cDbsBOwO1wMK+
|
||||||
|
vRxZoV0YbDNNOaOCATYwggEyMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFLamS8o2
|
||||||
|
hFNd0vWy/irEBNWVNwFXMB8GA1UdIwQYMBaAFBeyv0c75eT6PNumHo9TZ2B9vtcp
|
||||||
|
MAsGA1UdDwQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBEBgNVHR8EPTA7MDmg
|
||||||
|
N6A1hjNodHRwOi8vY3JsLmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRp
|
||||||
|
YXRlMS5jcmwwegYIKwYBBQUHAQEEbjBsMEEGCCsGAQUFBzAChjVodHRwOi8vcGtp
|
||||||
|
LmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRpYXRlLWNhLmNydDAnBggr
|
||||||
|
BgEFBQcwAYYbaHR0cDovL29jc3AuZmFjdGNlbnRlci5vcmcvMAoGCCqGSM49BAMC
|
||||||
|
A0gAMEUCIQD6QbhNNmB3AVVqhmXuiLA7WF6raShw6n0g/VloVGQebQIgEvxYclpO
|
||||||
|
MMynt5wH6X65rtn4Q1EGaDMvNbFweCDsldk=
|
||||||
|
-----END CERTIFICATE-----
|
|
@ -0,0 +1,19 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDFjCCArygAwIBAgICEAEwCgYIKoZIzj0EAwIwgYIxKTAnBgNVBAMMIE1lZXJr
|
||||||
|
YXQgVm90aW5nIEludGVybWVkaWF0ZSBDQSAxMRMwEQYDVQQIDApTb21lLVN0YXRl
|
||||||
|
MQswCQYDVQQGEwJJTDEVMBMGA1UECgwMSURDIEhlcnpsaXlhMRwwGgYDVQQLDBNN
|
||||||
|
ZWVya2F0IFZvdGluZyBUZWFtMB4XDTE1MTExMTE2MjAzM1oXDTI1MTEwODE2MjAz
|
||||||
|
M1owbjEaMBgGA1UEAwwRUG9sbGluZyBTdGF0aW9uIDIxEzARBgNVBAgMClNvbWUt
|
||||||
|
U3RhdGUxCzAJBgNVBAYTAklMMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV
|
||||||
|
BAsMDk1lZXJrYXQgVm90aW5nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEe9f5FRsg
|
||||||
|
N4XcXCwQU9zT0Bekdy4aJZi0TaoZ7x6syVrsu3r/l27sbbfQDdGo8nhQ8vDntW1E
|
||||||
|
onZy8kIvp1wtH6OCATYwggEyMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFKCdquYj
|
||||||
|
DGHqAHt+4PIDlw0h2UvuMB8GA1UdIwQYMBaAFBeyv0c75eT6PNumHo9TZ2B9vtcp
|
||||||
|
MAsGA1UdDwQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBEBgNVHR8EPTA7MDmg
|
||||||
|
N6A1hjNodHRwOi8vY3JsLmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRp
|
||||||
|
YXRlMS5jcmwwegYIKwYBBQUHAQEEbjBsMEEGCCsGAQUFBzAChjVodHRwOi8vcGtp
|
||||||
|
LmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRpYXRlLWNhLmNydDAnBggr
|
||||||
|
BgEFBQcwAYYbaHR0cDovL29jc3AuZmFjdGNlbnRlci5vcmcvMAoGCCqGSM49BAMC
|
||||||
|
A0gAMEUCIQDpo5B0vvEJSax3YzOMfE8l0pfDUIKLdBWJVGeq0VLtIgIgVr0+4/0e
|
||||||
|
n+R+l1OVOLh2GirloOgbv5Ch5BQ2pQNAG2Y=
|
||||||
|
-----END CERTIFICATE-----
|
|
@ -0,0 +1,2 @@
|
||||||
|
V 251108161354Z 1000 unknown /CN=Polling Station 1/ST=Some-State/C=IL/O=IDC Herzliya/OU=Meerkat Voting
|
||||||
|
V 251108162033Z 1001 unknown /CN=Polling Station 2/ST=Some-State/C=IL/O=IDC Herzliya/OU=Meerkat Voting
|
|
@ -0,0 +1 @@
|
||||||
|
unique_subject = no
|
|
@ -0,0 +1 @@
|
||||||
|
unique_subject = no
|
|
@ -0,0 +1 @@
|
||||||
|
V 251108161354Z 1000 unknown /CN=Polling Station 1/ST=Some-State/C=IL/O=IDC Herzliya/OU=Meerkat Voting
|
|
@ -0,0 +1 @@
|
||||||
|
1002
|
|
@ -0,0 +1 @@
|
||||||
|
1001
|
|
@ -0,0 +1 @@
|
||||||
|
1000
|
|
@ -0,0 +1,5 @@
|
||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgJvMhOfcQfdK/42QlBbri
|
||||||
|
IYXLM/gVHq/yppOykDqB3s6hRANCAAQoShAtCGW5c9pk/4/sKN1qjCgDKngqJpba
|
||||||
|
kku6cIDqXDr+aHsl+/KdSHd46OI3fEynl+/Pc85wRsaY6Z7b1PdS
|
||||||
|
-----END PRIVATE KEY-----
|
|
@ -0,0 +1,21 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDfDCCAyGgAwIBAgICEAAwCgYIKoZIzj0EAwIwgbAxCzAJBgNVBAYTAklMMRMw
|
||||||
|
EQYDVQQIDApTb21lLVN0YXRlMREwDwYDVQQHDAhIZXJ6bGl5YTEUMBIGA1UECgwL
|
||||||
|
SURDIEhlcmxpeWExHzAdBgNVBAsMFk1lZXJrYXQgVm90aW5nIFByb2plY3QxGDAW
|
||||||
|
BgNVBAMMD1Rlc3RpbmcgUm9vdCBDQTEoMCYGCSqGSIb3DQEJARYZdGVzdGluZy1j
|
||||||
|
YUBmYWN0Y2VudGVyLm9yZzAeFw0xNTExMTExNjA4MDJaFw0yNTExMDgxNjA4MDJa
|
||||||
|
MIGCMSkwJwYDVQQDDCBNZWVya2F0IFZvdGluZyBJbnRlcm1lZGlhdGUgQ0EgMTET
|
||||||
|
MBEGA1UECAwKU29tZS1TdGF0ZTELMAkGA1UEBhMCSUwxFTATBgNVBAoMDElEQyBI
|
||||||
|
ZXJ6bGl5YTEcMBoGA1UECwwTTWVlcmthdCBWb3RpbmcgVGVhbTBWMBAGByqGSM49
|
||||||
|
AgEGBSuBBAAKA0IABChKEC0IZblz2mT/j+wo3WqMKAMqeComltqSS7pwgOpcOv5o
|
||||||
|
eyX78p1Id3jo4jd8TKeX789zznBGxpjpntvU91KjggFYMIIBVDAPBgNVHRMBAf8E
|
||||||
|
BTADAQH/MB0GA1UdDgQWBBQXsr9HO+Xk+jzbph6PU2dgfb7XKTAfBgNVHSMEGDAW
|
||||||
|
gBSJD9L1fLmX4A9CBoLsYXn3OPy1ojALBgNVHQ8EBAMCAaYwEwYDVR0lBAwwCgYI
|
||||||
|
KwYBBQUHAwEwPgYDVR0fBDcwNTAzoDGgL4YtaHR0cDovL2NybC5mYWN0Y2VudGVy
|
||||||
|
Lm9yZy9tZWVya2F0LXJvb3QtY2EuY3JsMCsGA1UdEQQkMCKCIE1lZXJrYXQgVm90
|
||||||
|
aW5nIEludGVybWVkaWF0ZSBDQSAxMHIGCCsGAQUFBwEBBGYwZDA5BggrBgEFBQcw
|
||||||
|
AoYtaHR0cDovL3BraS5mYWN0Y2VudGVyLm9yZy9tZWVya2F0LXJvb3QtY2EuY3J0
|
||||||
|
MCcGCCsGAQUFBzABhhtodHRwOi8vb2NzcC5mYWN0Y2VudGVyLm9yZy8wCgYIKoZI
|
||||||
|
zj0EAwIDSQAwRgIhALEMHq2ssC9rLXiG8v6NcZetwwxdu3B3LW9s0KeGoNIEAiEA
|
||||||
|
skA56tMnhiZe38msyanRyRrAHyBI2fGs6GP3UBrg2P8=
|
||||||
|
-----END CERTIFICATE-----
|
|
@ -0,0 +1,10 @@
|
||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBTTCB9QIBADCBlTELMAkGA1UEBhMCSUwxEzARBgNVBAgMClNvbWUtU3RhdGUx
|
||||||
|
ETAPBgNVBAcMCEhlcnpsaXlhMRUwEwYDVQQKDAxJREMgSGVyemxpeWExHDAaBgNV
|
||||||
|
BAsME01lZXJrYXQgVm90aW5nIFRlYW0xKTAnBgNVBAMMIE1lZXJrYXQgVm90aW5n
|
||||||
|
IEludGVybWVkaWF0ZSBDQSAxMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEKEoQLQhl
|
||||||
|
uXPaZP+P7CjdaowoAyp4KiaW2pJLunCA6lw6/mh7JfvynUh3eOjiN3xMp5fvz3PO
|
||||||
|
cEbGmOme29T3UqAAMAoGCCqGSM49BAMCA0cAMEQCIFlyJO5NFqnMUu5hOlQa872E
|
||||||
|
yy0V3zkqeN6Aly+LtEQqAiAfHwbi1lkJOZT2tOX8gfJzcac2jKmbgIhmITNq7uma
|
||||||
|
Wg==
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
|
@ -0,0 +1,46 @@
|
||||||
|
[ ca ]
|
||||||
|
default_ca = myca
|
||||||
|
|
||||||
|
[ crl_ext ]
|
||||||
|
issuerAltName=issuer:copy
|
||||||
|
authorityKeyIdentifier=keyid:always
|
||||||
|
|
||||||
|
[ myca ]
|
||||||
|
dir = ./
|
||||||
|
new_certs_dir = $dir
|
||||||
|
unique_subject = no
|
||||||
|
certificate = $dir/intermediate-ca-1.crt
|
||||||
|
database = $dir/certindex
|
||||||
|
private_key = $dir/intermediate-ca-1-private-key.pem
|
||||||
|
serial = $dir/certserial
|
||||||
|
default_days = 3650
|
||||||
|
default_md = sha256
|
||||||
|
policy = myca_policy
|
||||||
|
x509_extensions = myca_extensions
|
||||||
|
crlnumber = $dir/crlnumber
|
||||||
|
default_crl_days = 3650
|
||||||
|
|
||||||
|
[ myca_policy ]
|
||||||
|
commonName = supplied
|
||||||
|
stateOrProvinceName = optional
|
||||||
|
countryName = optional
|
||||||
|
emailAddress = optional
|
||||||
|
organizationName = supplied
|
||||||
|
organizationalUnitName = optional
|
||||||
|
|
||||||
|
[ myca_extensions ]
|
||||||
|
basicConstraints = critical,CA:FALSE
|
||||||
|
keyUsage = critical,any
|
||||||
|
subjectKeyIdentifier = hash
|
||||||
|
authorityKeyIdentifier = keyid:always,issuer
|
||||||
|
keyUsage = digitalSignature,keyEncipherment
|
||||||
|
extendedKeyUsage = serverAuth
|
||||||
|
crlDistributionPoints = @crl_section
|
||||||
|
authorityInfoAccess = @ocsp_section
|
||||||
|
|
||||||
|
[crl_section]
|
||||||
|
URI.0 = http://crl.factcenter.org/meerkat-intermediate1.crl
|
||||||
|
|
||||||
|
[ocsp_section]
|
||||||
|
caIssuers;URI.0 = http://pki.factcenter.org/meerkat-intermediate-ca.crt
|
||||||
|
OCSP;URI.0 = http://ocsp.factcenter.org/
|
|
@ -0,0 +1,21 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDfDCCAyGgAwIBAgICEAAwCgYIKoZIzj0EAwIwgbAxCzAJBgNVBAYTAklMMRMw
|
||||||
|
EQYDVQQIDApTb21lLVN0YXRlMREwDwYDVQQHDAhIZXJ6bGl5YTEUMBIGA1UECgwL
|
||||||
|
SURDIEhlcmxpeWExHzAdBgNVBAsMFk1lZXJrYXQgVm90aW5nIFByb2plY3QxGDAW
|
||||||
|
BgNVBAMMD1Rlc3RpbmcgUm9vdCBDQTEoMCYGCSqGSIb3DQEJARYZdGVzdGluZy1j
|
||||||
|
YUBmYWN0Y2VudGVyLm9yZzAeFw0xNTExMTExNjA4MDJaFw0yNTExMDgxNjA4MDJa
|
||||||
|
MIGCMSkwJwYDVQQDDCBNZWVya2F0IFZvdGluZyBJbnRlcm1lZGlhdGUgQ0EgMTET
|
||||||
|
MBEGA1UECAwKU29tZS1TdGF0ZTELMAkGA1UEBhMCSUwxFTATBgNVBAoMDElEQyBI
|
||||||
|
ZXJ6bGl5YTEcMBoGA1UECwwTTWVlcmthdCBWb3RpbmcgVGVhbTBWMBAGByqGSM49
|
||||||
|
AgEGBSuBBAAKA0IABChKEC0IZblz2mT/j+wo3WqMKAMqeComltqSS7pwgOpcOv5o
|
||||||
|
eyX78p1Id3jo4jd8TKeX789zznBGxpjpntvU91KjggFYMIIBVDAPBgNVHRMBAf8E
|
||||||
|
BTADAQH/MB0GA1UdDgQWBBQXsr9HO+Xk+jzbph6PU2dgfb7XKTAfBgNVHSMEGDAW
|
||||||
|
gBSJD9L1fLmX4A9CBoLsYXn3OPy1ojALBgNVHQ8EBAMCAaYwEwYDVR0lBAwwCgYI
|
||||||
|
KwYBBQUHAwEwPgYDVR0fBDcwNTAzoDGgL4YtaHR0cDovL2NybC5mYWN0Y2VudGVy
|
||||||
|
Lm9yZy9tZWVya2F0LXJvb3QtY2EuY3JsMCsGA1UdEQQkMCKCIE1lZXJrYXQgVm90
|
||||||
|
aW5nIEludGVybWVkaWF0ZSBDQSAxMHIGCCsGAQUFBwEBBGYwZDA5BggrBgEFBQcw
|
||||||
|
AoYtaHR0cDovL3BraS5mYWN0Y2VudGVyLm9yZy9tZWVya2F0LXJvb3QtY2EuY3J0
|
||||||
|
MCcGCCsGAQUFBzABhhtodHRwOi8vb2NzcC5mYWN0Y2VudGVyLm9yZy8wCgYIKoZI
|
||||||
|
zj0EAwIDSQAwRgIhALEMHq2ssC9rLXiG8v6NcZetwwxdu3B3LW9s0KeGoNIEAiEA
|
||||||
|
skA56tMnhiZe38msyanRyRrAHyBI2fGs6GP3UBrg2P8=
|
||||||
|
-----END CERTIFICATE-----
|
|
@ -0,0 +1 @@
|
||||||
|
V 251108160802Z 1000 unknown /CN=Meerkat Voting Intermediate CA 1/ST=Some-State/C=IL/O=IDC Herzliya/OU=Meerkat Voting Team
|
|
@ -0,0 +1 @@
|
||||||
|
unique_subject = no
|
|
@ -0,0 +1 @@
|
||||||
|
1001
|
|
@ -0,0 +1 @@
|
||||||
|
1000
|
|
@ -0,0 +1 @@
|
||||||
|
1000
|
|
@ -0,0 +1,61 @@
|
||||||
|
[ ca ]
|
||||||
|
default_ca = myca
|
||||||
|
|
||||||
|
[ crl_ext ]
|
||||||
|
issuerAltName=issuer:copy
|
||||||
|
authorityKeyIdentifier=keyid:always
|
||||||
|
|
||||||
|
[ myca ]
|
||||||
|
dir = ./
|
||||||
|
new_certs_dir = $dir
|
||||||
|
unique_subject = no
|
||||||
|
certificate = $dir/root-ca.crt
|
||||||
|
database = $dir/certindex
|
||||||
|
private_key = $dir/root-ca-private-key.pem
|
||||||
|
serial = $dir/certserial
|
||||||
|
default_days = 3650
|
||||||
|
default_md = sha256
|
||||||
|
policy = myca_policy
|
||||||
|
x509_extensions = myca_extensions
|
||||||
|
crlnumber = $dir/crlnumber
|
||||||
|
default_crl_days = 3650
|
||||||
|
|
||||||
|
[ myca_policy ]
|
||||||
|
commonName = supplied
|
||||||
|
stateOrProvinceName = optional
|
||||||
|
countryName = optional
|
||||||
|
emailAddress = optional
|
||||||
|
organizationName = supplied
|
||||||
|
organizationalUnitName = optional
|
||||||
|
|
||||||
|
[ myca_extensions ]
|
||||||
|
basicConstraints = critical,CA:TRUE
|
||||||
|
keyUsage = critical,any
|
||||||
|
subjectKeyIdentifier = hash
|
||||||
|
authorityKeyIdentifier = keyid:always,issuer
|
||||||
|
keyUsage = digitalSignature,keyEncipherment,cRLSign,keyCertSign
|
||||||
|
extendedKeyUsage = serverAuth
|
||||||
|
crlDistributionPoints = @crl_section
|
||||||
|
subjectAltName = @alt_names
|
||||||
|
authorityInfoAccess = @ocsp_section
|
||||||
|
|
||||||
|
[ v3_ca ]
|
||||||
|
basicConstraints = critical,CA:TRUE,pathlen:0
|
||||||
|
keyUsage = critical,any
|
||||||
|
subjectKeyIdentifier = hash
|
||||||
|
authorityKeyIdentifier = keyid:always,issuer
|
||||||
|
keyUsage = digitalSignature,keyEncipherment,cRLSign,keyCertSign
|
||||||
|
extendedKeyUsage = serverAuth
|
||||||
|
crlDistributionPoints = @crl_section
|
||||||
|
subjectAltName = @alt_names
|
||||||
|
authorityInfoAccess = @ocsp_section
|
||||||
|
|
||||||
|
[alt_names]
|
||||||
|
DNS.0 = Meerkat Voting Intermediate CA 1
|
||||||
|
|
||||||
|
[crl_section]
|
||||||
|
URI.0 = http://crl.factcenter.org/meerkat-root-ca.crl
|
||||||
|
|
||||||
|
[ocsp_section]
|
||||||
|
caIssuers;URI.0 = http://pki.factcenter.org/meerkat-root-ca.crt
|
||||||
|
OCSP;URI.0 = http://ocsp.factcenter.org/
|
|
@ -0,0 +1,8 @@
|
||||||
|
-----BEGIN EC PRIVATE KEY-----
|
||||||
|
Proc-Type: 4,ENCRYPTED
|
||||||
|
DEK-Info: AES-256-CBC,B8CA131346FD6C9568A6C80935F2AF14
|
||||||
|
|
||||||
|
8q1seEln39/tQTo5KqN+qNRhd0fQ0oC71dYpfTHsP0NlNmjMtwKo2niFwzjxnSyP
|
||||||
|
vpJjGzUlnq30ucbeJA7CDm/1cmYAU5gGQ7gldgpi2TQVS+EBjqi/Y5P9AlrgLv6K
|
||||||
|
tKe4AvkqQcpi4ZvlUL9xmNaM9jEH4syopR9YClEMfa8=
|
||||||
|
-----END EC PRIVATE KEY-----
|
Binary file not shown.
|
@ -0,0 +1,5 @@
|
||||||
|
-----BEGIN EC PRIVATE KEY-----
|
||||||
|
MHQCAQEEIEi9y6pSKu1kDZcIfQQAnojl1iFxm32W0DVCp2P6HRrkoAcGBSuBBAAK
|
||||||
|
oUQDQgAEoijIYF12bpA0tcjyQnWZGQ4lzdBGR+hK/5al/M+zFgFwvWHoWf6yJsSB
|
||||||
|
ymviB5yUaH+cE+/3LXlGbpRzYKLBYQ==
|
||||||
|
-----END EC PRIVATE KEY-----
|
|
@ -0,0 +1,17 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICpTCCAkygAwIBAgIJAJoVb07aGgNaMAoGCCqGSM49BAMCMIGwMQswCQYDVQQG
|
||||||
|
EwJJTDETMBEGA1UECAwKU29tZS1TdGF0ZTERMA8GA1UEBwwISGVyemxpeWExFDAS
|
||||||
|
BgNVBAoMC0lEQyBIZXJsaXlhMR8wHQYDVQQLDBZNZWVya2F0IFZvdGluZyBQcm9q
|
||||||
|
ZWN0MRgwFgYDVQQDDA9UZXN0aW5nIFJvb3QgQ0ExKDAmBgkqhkiG9w0BCQEWGXRl
|
||||||
|
c3RpbmctY2FAZmFjdGNlbnRlci5vcmcwHhcNMTUxMTExMTUzODE4WhcNMjUxMTA4
|
||||||
|
MTUzODE4WjCBsDELMAkGA1UEBhMCSUwxEzARBgNVBAgMClNvbWUtU3RhdGUxETAP
|
||||||
|
BgNVBAcMCEhlcnpsaXlhMRQwEgYDVQQKDAtJREMgSGVybGl5YTEfMB0GA1UECwwW
|
||||||
|
TWVlcmthdCBWb3RpbmcgUHJvamVjdDEYMBYGA1UEAwwPVGVzdGluZyBSb290IENB
|
||||||
|
MSgwJgYJKoZIhvcNAQkBFhl0ZXN0aW5nLWNhQGZhY3RjZW50ZXIub3JnMFYwEAYH
|
||||||
|
KoZIzj0CAQYFK4EEAAoDQgAEoijIYF12bpA0tcjyQnWZGQ4lzdBGR+hK/5al/M+z
|
||||||
|
FgFwvWHoWf6yJsSBymviB5yUaH+cE+/3LXlGbpRzYKLBYaNQME4wHQYDVR0OBBYE
|
||||||
|
FIkP0vV8uZfgD0IGguxhefc4/LWiMB8GA1UdIwQYMBaAFIkP0vV8uZfgD0IGguxh
|
||||||
|
efc4/LWiMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDRwAwRAIgNftHrW30Git8
|
||||||
|
VFQKyMCkasauSpEHpAGdcRAhRHqUQMUCIDxw++trz/Iv8818xVB1ARr9EQAmH0aC
|
||||||
|
7MHETGuiBC7L
|
||||||
|
-----END CERTIFICATE-----
|
|
@ -0,0 +1,3 @@
|
||||||
|
-----BEGIN EC PARAMETERS-----
|
||||||
|
BgUrgQQACg==
|
||||||
|
-----END EC PARAMETERS-----
|
|
@ -0,0 +1 @@
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
||||||
|
0D r=¥|n“Ò2ɪ‰!S»®[gCŸ$ä°Ž/ Ê”(Âò½ ^esüHLŸ½o,oV®”§ce²p0(èXÆ]&@
|
|
@ -2,6 +2,7 @@ package polling_station_dashboard.java;
|
||||||
|
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import polling_station_dashboard.search.SearchHandler;
|
import polling_station_dashboard.search.SearchHandler;
|
||||||
|
import polling_station_dashboard.search.VotersFetcher.DummyVotersFetcher;
|
||||||
import polling_station_dashboard.search.addVoter.java.AddVoterLoader;
|
import polling_station_dashboard.search.addVoter.java.AddVoterLoader;
|
||||||
import polling_station_dashboard.settings.java.SettingsVisualUpdater;
|
import polling_station_dashboard.settings.java.SettingsVisualUpdater;
|
||||||
import polling_station_dashboard.settings.java.settingsLoader;
|
import polling_station_dashboard.settings.java.settingsLoader;
|
||||||
|
@ -35,10 +36,10 @@ public class EventHandlerMapper {
|
||||||
StatusLogVisualUpdater statusLogVisualUpdater =
|
StatusLogVisualUpdater statusLogVisualUpdater =
|
||||||
new StatusLogVisualUpdater(statusLogLoader.GetStatusLogInstance(), primaryStage);
|
new StatusLogVisualUpdater(statusLogLoader.GetStatusLogInstance(), primaryStage);
|
||||||
map.Add("StatusLogButton", statusLogVisualUpdater);
|
map.Add("StatusLogButton", statusLogVisualUpdater);
|
||||||
map.Add("StatusLog", statusLogVisualUpdater);
|
map.Add("statusLog", statusLogVisualUpdater);
|
||||||
|
|
||||||
// map add voter to search button triggered
|
// map add voter to search button triggered
|
||||||
SearchHandler searchHandler = new SearchHandler(primaryStage);
|
SearchHandler searchHandler = new SearchHandler(primaryStage, new DummyVotersFetcher());
|
||||||
map.Add("SearchButton", searchHandler);
|
map.Add("SearchButton", searchHandler);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,15 @@ package polling_station_dashboard.search;
|
||||||
|
|
||||||
import javafx.event.Event;
|
import javafx.event.Event;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
|
import javafx.scene.layout.GridPane;
|
||||||
|
import javafx.scene.layout.Pane;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import polling_station_dashboard.search.VotersFetcher.VotersFetcher;
|
import polling_station_dashboard.search.VotersFetcher.VotersFetcher;
|
||||||
import polling_station_dashboard.search.addVoter.java.AddVoterLoader;
|
import polling_station_dashboard.search.addVoter.java.AddVoterLoader;
|
||||||
|
|
||||||
|
import javafx.scene.control.Button;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,25 +18,65 @@ import java.util.List;
|
||||||
* SearchHandler trying to fetch wanted users by given strings (VotersFetcher) and then
|
* SearchHandler trying to fetch wanted users by given strings (VotersFetcher) and then
|
||||||
* Starts the eddit/add panel based on what the VotersFetcher Have fetched.
|
* Starts the eddit/add panel based on what the VotersFetcher Have fetched.
|
||||||
*/
|
*/
|
||||||
public class SearchHandler implements EventHandler, VotersFetcher {
|
public class SearchHandler implements EventHandler {
|
||||||
|
|
||||||
private Stage currentStage;
|
private Stage currentStage;
|
||||||
|
private VotersFetcher votersFetcher;
|
||||||
public SearchHandler(Stage primaryStage){
|
private Button AddVoterButton;
|
||||||
|
public SearchHandler(Stage primaryStage, VotersFetcher votersFetcher)
|
||||||
|
{
|
||||||
this.currentStage = primaryStage;
|
this.currentStage = primaryStage;
|
||||||
|
this.votersFetcher = votersFetcher;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> GetFilters()
|
||||||
|
{
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddVoterPanel() throws IOException
|
||||||
|
{
|
||||||
|
((Pane)currentStage.getScene().lookup("#AddEditPane")).getChildren().remove(this.AddVoterButton);
|
||||||
|
new AddVoterLoader(currentStage);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddVoterAddButton() throws IOException {
|
||||||
|
this.AddVoterButton = new Button("Add New Voter");
|
||||||
|
this.AddVoterButton.setOnAction(e -> {
|
||||||
|
try {
|
||||||
|
AddVoterPanel();
|
||||||
|
} catch (IOException e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
((Pane)currentStage.getScene().lookup("#AddEditPane")).getChildren().add(AddVoterButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void VotersCheck() throws IOException {
|
||||||
|
List<String> filters = GetFilters();
|
||||||
|
|
||||||
|
List<Object> voters = votersFetcher.FetchVoters(filters);
|
||||||
|
|
||||||
|
if (voters.isEmpty())
|
||||||
|
{
|
||||||
|
AddVoterAddButton();
|
||||||
|
}
|
||||||
|
else if(1==1)
|
||||||
|
{
|
||||||
|
// founded the voter but he cant vote
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// founded the voter and he can vote
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(Event event) {
|
public void handle(Event event) {
|
||||||
try {
|
try {
|
||||||
AddVoterLoader addVoterLoader = new AddVoterLoader(currentStage);
|
VotersCheck();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object FetchVoters(List<String> filters) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
package polling_station_dashboard.search.VotersFetcher;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Vladimir Eliezer Tokarev on 18/06/2016.
|
||||||
|
* This object used for receiving empty list of object for the logic of add voter could be tested
|
||||||
|
*/
|
||||||
|
public class DummyVotersFetcher implements VotersFetcher {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Object> FetchVoters(List<String> filters) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,5 +8,5 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface VotersFetcher {
|
public interface VotersFetcher {
|
||||||
|
|
||||||
Object FetchVoters(List<String> filters);
|
List<Object> FetchVoters(List<String> filters);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
<?import java.lang.*?>
|
<?import java.lang.*?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
|
|
||||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="250.0" prefWidth="753.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
|
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="250.0" prefWidth="753.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="polling_station_dashboard.search.addVoter.java.AddVoterController">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints />
|
<ColumnConstraints />
|
||||||
<ColumnConstraints />
|
<ColumnConstraints />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="251.0" minWidth="10.0" prefWidth="118.0" />
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="251.0" minWidth="10.0" prefWidth="118.0" />
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
<children>
|
<children>
|
||||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||||
<center>
|
<center>
|
||||||
<Button mnemonicParsing="false" text="Cancel" BorderPane.alignment="CENTER" />
|
<Button mnemonicParsing="false" text="Cancel" onMousePressed="#RemoveAddVoterPanel" BorderPane.alignment="CENTER" />
|
||||||
</center>
|
</center>
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||||
|
|
|
@ -1,7 +1,27 @@
|
||||||
package polling_station_dashboard.search.addVoter.java;
|
package polling_station_dashboard.search.addVoter.java;
|
||||||
|
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.scene.layout.Pane;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Vladimir Eliezer Tokarev on 11/06/2016.
|
* Created by Vladimir Eliezer Tokarev on 11/06/2016.
|
||||||
|
* This object controls the add voter panel behavior
|
||||||
*/
|
*/
|
||||||
public class AddVoterController {
|
public class AddVoterController {
|
||||||
|
|
||||||
|
private Stage currentStage;
|
||||||
|
|
||||||
|
public void SetStage(Stage primaryStage)
|
||||||
|
{
|
||||||
|
this.currentStage = primaryStage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private void RemoveAddVoterPanel()
|
||||||
|
{
|
||||||
|
// when this button pressed (the cancel button) only the add voter panel is in list of children of AddEditPane
|
||||||
|
// this why removing the element at index 0 will remove this panel
|
||||||
|
((Pane)this.currentStage.getScene().lookup("#AddEditPane")).getChildren().remove(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,5 +26,6 @@ public class AddVoterLoader {
|
||||||
|
|
||||||
Pane addEditPane = (Pane)currentStage.getScene().lookup("#AddEditPane");
|
Pane addEditPane = (Pane)currentStage.getScene().lookup("#AddEditPane");
|
||||||
addEditPane.getChildren().add(root);
|
addEditPane.getChildren().add(root);
|
||||||
|
controller.SetStage(primaryStage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,18 +45,18 @@ public class StatusLogVisualUpdater implements EventHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addStatusLog() {
|
private void addStatusLog() {
|
||||||
Pane statusLog = (Pane) currentStage.getScene().lookup("#StatusLog");
|
Pane statusLog = (Pane) currentStage.getScene().lookup("#statusLog");
|
||||||
statusLog.getChildren().add(this.statusLog);
|
statusLog.getChildren().add(this.statusLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeStatusLog(){
|
private void removeStatusLog(){
|
||||||
Pane statusLog = (Pane) currentStage.getScene().lookup("#StatusLog");
|
Pane statusLog = (Pane) currentStage.getScene().lookup("#statusLog");
|
||||||
statusLog.getChildren().remove(this.statusLog);
|
statusLog.getChildren().remove(this.statusLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetStatusLogSize(int expansionWidth) {
|
private void SetStatusLogSize(int expansionWidth) {
|
||||||
currentStage.setWidth(currentStage.getWidth() + expansionWidth);
|
currentStage.setWidth(currentStage.getWidth() + expansionWidth);
|
||||||
Pane statusLog = (Pane) currentStage.getScene().lookup("#StatusLog");
|
Pane statusLog = (Pane) currentStage.getScene().lookup("#statusLog");
|
||||||
statusLog.setPrefWidth(expansionWidth);
|
statusLog.setPrefWidth(expansionWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue