Class RepositoryClient
java.lang.Object
ai.pipeline.connector.intake.service.RepositoryClient
Client for repository-service integration.
Handles document storage via repository-service's CreateNode RPC.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RepositoryClient
public RepositoryClient()Default constructor for CDI.
-
-
Method Details
-
storeDocument
public io.smallrye.mutiny.Uni<String> storeDocument(String drive, String connectorId, String name, String path, String contentType, byte[] data, Map<String, String> metadata) Store a document in the repository-service.Builds a
CreateNodeRequestand invokes the filesystem gRPC API to persist content and metadata. A client-side UUID is generated and passed asdocumentId, but the repository-service may override it. Reactive semantics:- Returns a
Uni<String>that emits the final document ID upon successful creation. - gRPC failures are mapped to
io.grpc.StatusRuntimeExceptionwithINTERNALstatus.
- Parameters:
drive- Drive/bucket nameconnectorId- Connector IDname- Document namepath- Document path (folder-like hierarchy)contentType- MIME type of the contentdata- Document content bytesmetadata- Arbitrary metadata map serialized as JSON- Returns:
- a
Uniemitting the repository-assigned document ID
- Returns a
-