Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-server
Commits
1c2cd486
Verified
Commit
1c2cd486
authored
4 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
renamed protobuf package
parent
bd66ed7f
No related branches found
No related tags found
2 merge requests
!44
Release 0.6
,
!43
Merge f-GRPC-main to dev
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/caosdb/server/grpc/EntityTransactionImpl.java
+12
-9
12 additions, 9 deletions
...in/java/org/caosdb/server/grpc/EntityTransactionImpl.java
src/main/proto/EntityService.proto
+2
-1
2 additions, 1 deletion
src/main/proto/EntityService.proto
with
14 additions
and
10 deletions
src/main/java/org/caosdb/server/grpc/EntityTransactionImpl.java
+
12
−
9
View file @
1c2cd486
package
org.caosdb.server.grpc
;
import
io.grpc.stub.StreamObserver
;
import
java.util.UUID
;
import
org.apache.shiro.SecurityUtils
;
import
org.caosdb.grpc.Entity
;
...
...
@@ -8,7 +9,6 @@ import org.caosdb.server.entity.EntityInterface;
import
org.caosdb.server.entity.container.RetrieveContainer
;
import
org.caosdb.server.transaction.Retrieve
;
import
org.caosdb.server.utils.EntityStatus
;
import
io.grpc.stub.StreamObserver
;
public
class
EntityTransactionImpl
extends
EntityTransactionServiceImplBase
{
...
...
@@ -16,7 +16,12 @@ public class EntityTransactionImpl extends EntityTransactionServiceImplBase {
public
void
retrieve
(
Entity
request
,
StreamObserver
<
Entity
>
responseObserver
)
{
String
requested_entity_id
=
request
.
getEid
();
RetrieveContainer
container
=
new
RetrieveContainer
(
SecurityUtils
.
getSubject
(),
System
.
currentTimeMillis
(),
UUID
.
randomUUID
().
toString
(),
null
);
RetrieveContainer
container
=
new
RetrieveContainer
(
SecurityUtils
.
getSubject
(),
System
.
currentTimeMillis
(),
UUID
.
randomUUID
().
toString
(),
null
);
container
.
add
(
Integer
.
parseInt
(
requested_entity_id
));
Retrieve
retrieve
=
new
Retrieve
(
container
);
try
{
...
...
@@ -31,8 +36,6 @@ public class EntityTransactionImpl extends EntityTransactionServiceImplBase {
if
(
retrieved_entity
.
getEntityStatus
()
==
EntityStatus
.
VALID
)
{
response
=
Entity
.
newBuilder
(
request
)
.
setName
(
retrieved_entity
.
getName
())
.
setDescription
(
retrieved_entity
.
getDescription
())
.
build
();
...
...
This diff is collapsed.
Click to expand it.
src/main/proto/EntityService.proto
+
2
−
1
View file @
1c2cd486
syntax
=
"proto3"
;
option
java_multiple_files
=
true
;
package
org
.
caosdb.grpc
;
option
java_package
=
"org.caosdb.grpc"
;
package
caosdb
;
message
Entity
{
string
eid
=
1
;
...
...
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