-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCOSConnector.java
36 lines (29 loc) · 957 Bytes
/
COSConnector.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.ibm.ml.ilog;
import com.ibm.json.java.JSONObject;
import ilog.concert.IloException;
/*
A Simple connector to IBM Cloud Object Storage
*/
public interface COSConnector extends TokenHandler {
static COSConnector getConnector(Credentials creds) throws IloException {
return new com.ibm.ml.ilog.v4.COSConnector(creds);
}
/*
Builds a data reference from an id.
*/
JSONObject getDataReferences(String id) throws IloException;
/*
Method to upload a file on the disk to a COS bucket.
*/
String putFile(String fileName, String filePath) throws IloException;
/*
Method to create a connection asset from COS credentials.
*/
String getConnectionId() throws IloException;
void deleteConnection();
/*
Download the content of a COS file as a string.
*/
String getFile(String fileName) throws IloException;
void setBucketPath(String path) throws IloException;
}