Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iotgateway
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
0Tyler
iotgateway
Commits
66b615d9
Commit
66b615d9
authored
May 13, 2019
by
0Tyler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
isAccepted
parent
70633781
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/privacy/PrivacyChoice.java
...ab/tyler/iotgateway/cloud/pojo/privacy/PrivacyChoice.java
+2
-0
gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/PrivacyService.java
...lab/tyler/iotgateway/gateway/services/PrivacyService.java
+2
-1
No files found.
cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/privacy/PrivacyChoice.java
View file @
66b615d9
package
edu.prlab.tyler.iotgateway.cloud.pojo.privacy
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
...
...
@@ -20,5 +21,6 @@ public class PrivacyChoice {
@OneToOne
(
cascade
=
CascadeType
.
ALL
)
@JoinColumn
(
name
=
"privacyContent_id"
)
private
PrivacyContent
privacyContent
;
@JsonProperty
(
"isAccepted"
)
private
boolean
isAccepted
;
}
gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/PrivacyService.java
View file @
66b615d9
...
...
@@ -40,9 +40,10 @@ public class PrivacyService {
}
public
Optional
<
PrivacyChoiceResponse
>
setPrivacyPolicyChoice
(
PrivacyChoice
privacyChoice
)
{
System
.
out
.
println
(
privacyChoice
.
toString
());
return
Optional
.
of
(
privacyChoice
)
.
map
(
choice
->
template
.
postForObject
(
cloudAddress
+
"/choice"
,
choice
,
PrivacyChoice
.
class
))
.
flatMap
(
choice
->
Optional
.
of
Nullable
(
privacyChoiceIndexRepository
.
save
(
PrivacyChoiceIndex
.
builder
()
.
flatMap
(
choice
->
Optional
.
of
(
privacyChoiceIndexRepository
.
save
(
PrivacyChoiceIndex
.
builder
()
.
id
(
choice
.
getId
())
.
localDateTime
(
LocalDateTime
.
now
())
.
build
()))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment