Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FIT-Connect-SDK - Java
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FIT-Connect
FIT-Connect-SDK - Java
Commits
a6cf4c0e
Commit
a6cf4c0e
authored
2 years ago
by
Martin Vogel
Browse files
Options
Downloads
Patches
Plain Diff
#414 Add single overloaded methods for sending a submission directly without method chaining
parent
118c0975
No related branches found
No related tags found
2 merge requests
!2
#414 Remaining changes from MR
,
!1
planning#414 Methoden Signaturen (Zwischenstand)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
client/src/main/java/de/fitko/fitconnect/TestRunner.java
+4
-0
4 additions, 0 deletions
client/src/main/java/de/fitko/fitconnect/TestRunner.java
client/src/main/java/de/fitko/fitconnect/client/SenderClient.java
+29
-0
29 additions, 0 deletions
...rc/main/java/de/fitko/fitconnect/client/SenderClient.java
with
33 additions
and
0 deletions
client/src/main/java/de/fitko/fitconnect/TestRunner.java
+
4
−
0
View file @
a6cf4c0e
...
...
@@ -16,6 +16,10 @@ public class TestRunner {
private
static
void
senderSample
()
{
// straight call in one go
SenderClient
.
build
().
send
(
UUID
.
randomUUID
(),
Collections
.
emptyList
());
SenderClient
.
build
().
send
(
UUID
.
randomUUID
(),
Collections
.
emptyList
(),
"some json or xml"
);
// Without data
SenderClient
.
build
()
.
withDestination
(
UUID
.
randomUUID
())
...
...
This diff is collapsed.
Click to expand it.
client/src/main/java/de/fitko/fitconnect/client/SenderClient.java
+
29
−
0
View file @
a6cf4c0e
...
...
@@ -42,6 +42,12 @@ public class SenderClient extends Client {
* @return the upload step for attachments
*/
WithAttachments
withDestination
(
UUID
destinationId
);
SubmissionResponse
send
(
UUID
destinationId
,
List
<
File
>
attachments
,
String
data
);
SubmissionResponse
send
(
UUID
destinationId
,
List
<
File
>
attachments
,
byte
[]
data
);
SubmissionResponse
send
(
UUID
destinationId
,
List
<
File
>
attachments
);
}
public
interface
WithAttachments
{
...
...
@@ -98,6 +104,29 @@ public class SenderClient extends Client {
return
this
;
}
@Override
public
SubmissionResponse
send
(
UUID
destinationId
,
List
<
File
>
attachments
,
String
data
)
{
return
this
.
withDestination
(
destinationId
)
.
withAttachments
(
attachments
)
.
withData
(
data
)
.
submit
();
}
@Override
public
SubmissionResponse
send
(
UUID
destinationId
,
List
<
File
>
attachments
,
byte
[]
data
)
{
return
this
.
withDestination
(
destinationId
)
.
withAttachments
(
attachments
)
.
withData
(
data
)
.
submit
();
}
@Override
public
SubmissionResponse
send
(
UUID
destinationId
,
List
<
File
>
attachments
)
{
return
this
.
withDestination
(
destinationId
)
.
withAttachments
(
attachments
)
.
submit
();
}
@Override
public
Submit
withData
(
String
data
)
{
return
withData
(
data
.
getBytes
(
StandardCharsets
.
UTF_8
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment