-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hanskataan lähetystilojen puuttuminen
- Loading branch information
Showing
5 changed files
with
59 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,7 +166,7 @@ object LocalUtil { | |
// alustetaan data | ||
val kantaOperaatiot = new KantaOperaatiot(DbUtil.database) | ||
if(kantaOperaatiot.getLahetykset(Option.empty, Option.apply(20)).isEmpty) { | ||
// lähetystä joissa useita viestejä | ||
// lähetyksiä joissa useita viestejä | ||
/* | ||
otsikko: String, | ||
omistaja: String, lahettavaPalvelu: String, | ||
|
@@ -196,6 +196,42 @@ object LocalUtil { | |
Prioriteetti.NORMAALI, | ||
365 | ||
) | ||
// viestit lähetystunnuksella | ||
kantaOperaatiot.tallennaViesti("Viestin testiotsikko 1", | ||
"Viestin sisältö", | ||
SisallonTyyppi.TEXT, | ||
Set(Kieli.FI), | ||
Map.empty, | ||
Option.empty, | ||
Option.empty, | ||
Option.empty | ||
Range(0, 25).map(suffix => Kontakti(Option.apply("Vastaanottaja" + suffix), "vastaanottaja" + suffix + "@example.com")), | ||
Seq.empty, | ||
Option.empty, | ||
Option.apply(lahetys.tunniste), | ||
Prioriteetti.NORMAALI, | ||
Option.apply(365), | ||
Set(SEQURITY_ROOLIT_KATSELU), | ||
Map("avain" -> Seq("arvo")), | ||
"omistaja") | ||
kantaOperaatiot.tallennaViesti("Viestin testiotsikko 2", | ||
"Viestin sisältö", | ||
SisallonTyyppi.TEXT, | ||
Set(Kieli.FI), | ||
Map.empty, | ||
Option.empty, | ||
Option.empty, | ||
Option.empty | ||
Range (0, 3).map(suffix => Kontakti(Option.apply("Vastaanottaja" + suffix), "vastaanottaja" + suffix + "@example.com")), | ||
Seq.empty, | ||
Option.empty, | ||
Option.apply(lahetys2.tunniste), | ||
Prioriteetti.NORMAALI, | ||
Option.apply(365), | ||
Set(SEQURITY_ROOLIT_KATSELU), | ||
Map("avain" -> Seq("arvo")), | ||
"omistaja") | ||
// tyhjä lähetys | ||
val lahetys3 = kantaOperaatiot.tallennaLahetys( | ||
"Testiotsikko3", | ||
"omistaja", | ||
|
@@ -225,10 +261,24 @@ object LocalUtil { | |
metadata: Map[String, Seq[String]], | ||
omistaja: String | ||
*/ | ||
//kantaOperaatiot.tallennaViesti() | ||
// viesti lähetystunnuksella | ||
// viesti ilman lähetystunnusta | ||
|
||
kantaOperaatiot.tallennaViesti("Viestin testiotsikko 1", | ||
"Viestin sisältö", | ||
SisallonTyyppi.TEXT, | ||
Set(Kieli.FI), | ||
Map.empty, | ||
Option.apply("0.1.2.3"), | ||
Kontakti(Option.apply("Testi Virkailija"), "[email protected]"), | ||
Option.apply("[email protected]"), | ||
Range(0, 3).map(suffix => Kontakti(Option.apply("Vastaanottaja" + suffix), "vastaanottaja" + suffix + "@example.com")), | ||
Seq.empty, | ||
Option.apply("testipalvelu"), | ||
Option.empty, | ||
Prioriteetti.NORMAALI, | ||
Option.apply(365), | ||
Set(SEQURITY_ROOLIT_KATSELU), | ||
Map("avain" -> Seq("arvo")), | ||
"omistaja") | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters