1
|
/**
|
2
|
* Name: SrbJavaGlueInterface.java
|
3
|
* Purpose: Interface for RMI Implementation
|
4
|
* Copyright: 2000 Regents of the University of California and the
|
5
|
* National Center for Ecological Analysis and Synthesis
|
6
|
* Authors: Dan Higgins
|
7
|
*
|
8
|
* Version: '$Id: SrbJavaGlueInterface.java 299 2000-07-27 17:14:36Z higgins $'
|
9
|
* @version 1.1 6/8/00
|
10
|
* @author Dan Higgins - NCEAS
|
11
|
*/
|
12
|
|
13
|
import java.rmi.Remote;
|
14
|
import java.rmi.RemoteException;
|
15
|
|
16
|
public interface SrbJavaGlueInterface extends Remote
|
17
|
{
|
18
|
// Interface for JNI/RMI
|
19
|
// JNI (Java Native Interface) Glue Routines for the SRB client library.
|
20
|
|
21
|
|
22
|
public int clConnectJ( String host, String port, String auth ) throws RemoteException;
|
23
|
|
24
|
public int rmiConnectJ(String host, String port, String auth, String user ) throws RemoteException;
|
25
|
|
26
|
public int srbListCollectJ( int conn, int catType,
|
27
|
String collectionName, String flag, int types[] ) throws RemoteException;
|
28
|
|
29
|
public String getFileListItem( int index ) throws RemoteException;
|
30
|
|
31
|
public int clFinishJ( int conn ) throws RemoteException;
|
32
|
|
33
|
public int rmiFinishJ( int conn ) throws RemoteException;
|
34
|
|
35
|
public int srbObjCopyNewJ( String srcDir, String srcFile,
|
36
|
String dstDir, String dstFile, String dstRes ) throws RemoteException;
|
37
|
|
38
|
public int srbListResourceJ( int bs ) throws RemoteException;
|
39
|
|
40
|
public String getResListItem( int index ) throws RemoteException;
|
41
|
|
42
|
public String getDefCollection() throws RemoteException;
|
43
|
|
44
|
public String getDefResource() throws RemoteException;
|
45
|
|
46
|
public String getUser() throws RemoteException;
|
47
|
|
48
|
public String getDomain() throws RemoteException;
|
49
|
|
50
|
public String getLocalCacheDir() throws RemoteException;
|
51
|
|
52
|
public int srbObjReplicateJ(int conn, int catType,
|
53
|
String objID, String replNum, String collection, String resource) throws RemoteException;
|
54
|
|
55
|
public int srbCollReplicateJ(int conn, int catType,
|
56
|
String collection, String resource) throws RemoteException;
|
57
|
|
58
|
public int queryDataInCollJ (int conn, int catType,
|
59
|
String parColl) throws RemoteException;
|
60
|
|
61
|
public int queryDataJ (int conn, int catType, String objID,
|
62
|
String parColl) throws RemoteException;
|
63
|
|
64
|
public int querySubCollInCollJ (int conn, int catType,
|
65
|
String parColl) throws RemoteException;
|
66
|
|
67
|
public String getDataResultJ( int metaIndex, int rowIndex ) throws RemoteException;
|
68
|
|
69
|
public String getCollResultJ( int metaIndex, int rowIndex ) throws RemoteException;
|
70
|
|
71
|
public String getGenQueResultJ( int metaIndex, int rowIndex ) throws RemoteException;
|
72
|
|
73
|
public int getNCollAttriJ () throws RemoteException;
|
74
|
|
75
|
public int getNDataAttriJ () throws RemoteException;
|
76
|
|
77
|
public int srbObjUnlinkJ (int conn, int catType,
|
78
|
String objID, String replNum, String parColl) throws RemoteException;
|
79
|
|
80
|
public int srbCreateCollectJ (int conn, int catType,
|
81
|
String parColl, String newColl) throws RemoteException;
|
82
|
|
83
|
public int srbModifyDatasetMetaDJ (int conn, int catType,
|
84
|
String objID, String collection,
|
85
|
String newValue1, String newValue2, int retractionType) throws RemoteException;
|
86
|
public int srbModifyCollectMetaDJ (int conn, int catType,
|
87
|
String collection, String newValue1, String newValue2,
|
88
|
String newValue3, int retractionType) throws RemoteException;
|
89
|
public int importToOldObjJ (int conn, int catType,
|
90
|
String objID, String replNum, String parColl, String resource,
|
91
|
String localFile, String container) throws RemoteException;
|
92
|
|
93
|
public int importToNewObjJ (int conn, int catType,
|
94
|
String objID, String parColl, String resource, String localFile,
|
95
|
String container) throws RemoteException;
|
96
|
|
97
|
public int importDirJ (int conn, int catType,
|
98
|
String parColl, String resource, String localDir, String container) throws RemoteException;
|
99
|
|
100
|
public int srbRmCollJ (int conn, int catType, String parColl) throws RemoteException;
|
101
|
|
102
|
public int srbUnregCollJ (int conn, int catType, String parColl) throws RemoteException;
|
103
|
|
104
|
public int copyToOldObjJ (int conn, int catType,
|
105
|
String objID, String replNum, String srcColl, String targObj,
|
106
|
String targReplNum, String targColl, String targResource,
|
107
|
String container) throws RemoteException;
|
108
|
|
109
|
public int copyDataToCollJ (int conn, int catType,
|
110
|
String objID, String replNum, String srcColl,
|
111
|
String dataType, String size, String targColl, String targResource,
|
112
|
String container) throws RemoteException;
|
113
|
|
114
|
public int copyCollToCollJ (int conn, int catType,
|
115
|
String srcColl, String targColl, String targResource,
|
116
|
String container) throws RemoteException;
|
117
|
|
118
|
public int exportToFileJ(int conn, int catType,
|
119
|
String objID, String replNum, String srcColl,
|
120
|
String targFile, int forceFlag) throws RemoteException;
|
121
|
|
122
|
public int exportToDirJ(int conn, int catType,
|
123
|
String objID, String replNum, String srcColl,
|
124
|
String targDir) throws RemoteException;
|
125
|
|
126
|
public int exportCollToDirJ(int conn, int catType,
|
127
|
String srcColl, String targDir) throws RemoteException;
|
128
|
|
129
|
public int srbGenQuery (int conn, int catType,
|
130
|
String[] qval, int qvalInx[], int selVal[]) throws RemoteException;
|
131
|
|
132
|
public int srbRegisterDatasetJ(int conn, int catType,
|
133
|
String objID, String dataType, String resource, String collection,
|
134
|
String pathName, int dataSize) throws RemoteException;
|
135
|
|
136
|
public int srbUnregisterDatasetJ (int conn, int catType,
|
137
|
String objID, String replNum, String collection) throws RemoteException;
|
138
|
|
139
|
public int srbRegisterDirJ (int conn, int catType,
|
140
|
String srcDirPath, String targColl, String resource) throws RemoteException;
|
141
|
|
142
|
public int getMoreDataRowsJ (int conn, int catType) throws RemoteException;
|
143
|
|
144
|
public int getMoreCollRowsJ (int conn, int catType) throws RemoteException;
|
145
|
|
146
|
public int getMoreGenQueRowsJ (int conn, int catType) throws RemoteException;
|
147
|
|
148
|
public int chmodInCollJ (int conn, int catType,
|
149
|
String collection, String user, String domain, String mode) throws RemoteException;
|
150
|
|
151
|
public int ingestUserJ (int conn, int catType,
|
152
|
String userName, String passwd, String domain,
|
153
|
String userType, String userAddr, String userPhone, String userEmail,
|
154
|
String parentColl) throws RemoteException;
|
155
|
|
156
|
public int ingestGroupJ (int conn, int catType,
|
157
|
String groupName, String passwd,
|
158
|
String groupAddr, String groupPhone, String groupEMail) throws RemoteException;
|
159
|
|
160
|
public int ingestLocJ (int conn, int catType,
|
161
|
String locName, String fullAddr, String parentLoc) throws RemoteException;
|
162
|
|
163
|
public int ingestResourceJ (int conn, int catType,
|
164
|
String rescName, String rescType, String location, String phyPath) throws RemoteException;
|
165
|
|
166
|
public int ingestLogRescJ (int conn, int catType,
|
167
|
String logRescName, String phyResc, String phyPath) throws RemoteException;
|
168
|
|
169
|
public int addLogRescJ (int conn, int catType,
|
170
|
String logResc, String phyResc, String phyPath) throws RemoteException;
|
171
|
|
172
|
public int modifyUserJ (int conn, int catType,
|
173
|
int modOpr, String userName, String domain, String modValue) throws RemoteException;
|
174
|
|
175
|
public int containerCreateJ (int conn, int catType,
|
176
|
String contName, String dataType, String logResc, int size) throws RemoteException;
|
177
|
|
178
|
public int containerDeleteJ (int conn, int catType,
|
179
|
String contName, int forceFlag) throws RemoteException;
|
180
|
|
181
|
public int containerSyncJ (int conn, int catType,
|
182
|
String contName, int purgeFlag) throws RemoteException;
|
183
|
|
184
|
// additions June 2000 by DFH to allows file transfers to client side of RMI
|
185
|
|
186
|
public byte[] getByteData(String fileName) throws RemoteException;
|
187
|
|
188
|
public void setByteData(String fileName, byte[] byteData) throws RemoteException;
|
189
|
|
190
|
public void clearTmpFiles() throws RemoteException;
|
191
|
|
192
|
public void Reset() throws RemoteException;
|
193
|
|
194
|
|
195
|
}
|
196
|
|