Revision 1986
Added by Matt Jones about 21 years ago
lib/srbrmi/SrbJavaGlue.java | ||
---|---|---|
1 |
/** |
|
2 |
* Name: SrbJavaGlue.java |
|
3 |
* Institution: National Center for Ecological Analysis and Synthesis |
|
4 |
* Copyright: 2000 The Regents of the University of California and |
|
5 |
* National Center for Ecological Analysis and Synthesis, |
|
6 |
* University of California, Santa Barbara 2000. |
|
7 |
* All rights reserved. |
|
8 |
* |
|
9 |
* Authors: Dan Higgins, John Moreland |
|
10 |
* |
|
11 |
* Version: '$Id$' |
|
12 |
*/ |
|
13 |
/************************************************************************** |
|
14 |
Copyright ^?? General Atomics, 1995-1999 |
|
15 |
All Rights Reserved |
|
16 |
|
|
17 |
This file contains Original Code and/or Modifications of Original Code as |
|
18 |
defined in and that are subject to the General Atomics Storage Resource |
|
19 |
Broker Academic and Research Use License (the 'License'). This license is |
|
20 |
for academic and research use only. You may not use, copy, modify or |
|
21 |
distribute SRB for commercial purposes, nor incorporate the SRB into |
|
22 |
commercial products without the express written permission of General |
|
23 |
Atomics nor may you distribute SRB to any third party. |
|
24 |
|
|
25 |
You may not use this software except in compliance with the License. Please |
|
26 |
obtain a copy of the License at http://www.npaci.edu/DICE/SRB/License and |
|
27 |
read it before using this file. |
|
28 |
|
|
29 |
The Original Code and all software distributed under the License are |
|
30 |
distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER |
|
31 |
EXPRESS OR IMPLIED, AND GENERAL ATOMICS AND THE SAN DIEGO SUPERCOMPUTER |
|
32 |
CENTER HEREBY DISCLAIM ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, |
|
33 |
ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR |
|
34 |
NON-INFRINGEMENT OF ANY COPYRIGHT, PATENT , TRADEMARK OR OTHER RIGHTS. |
|
35 |
GENERAL ATOMICS AND THE SAN DIEGO SUPERCOMPUTER CENTER FURTHER HAVE NO |
|
36 |
OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCMENTS OR |
|
37 |
MODIFICATIONS.. Please see the License for the specific language governing |
|
38 |
rights and limitations under the License." |
|
39 |
|
|
40 |
Please read the terms of this license carefully. By using the SRB software, |
|
41 |
you are accepting and agreeing to the terms of this license with General |
|
42 |
Atomics. If you are agreeing to this license on behalf of a company, or |
|
43 |
other institution, you represent that you are authorized to bind the |
|
44 |
company/institution to such a license. If you do not meet this criterion or |
|
45 |
you do not agree to any of the terms of this license, you are not |
|
46 |
authorized to use the software. |
|
47 |
**************************************************************************/ |
|
48 |
|
|
49 |
/* Note: Based on Java code originally produced at SDSC |
|
50 |
* Copyright 1999 The Regents of the University of California |
|
51 |
* All Rights Reserved |
|
52 |
*/ |
|
53 |
|
|
54 |
/** |
|
55 |
* SrbJavaGlue |
|
56 |
* |
|
57 |
* Implementation of RMI Interface |
|
58 |
* |
|
59 |
* @version 1.1 6/8/00 |
|
60 |
* @author Dan Higgins - NCEAS |
|
61 |
* @version 1.0 10/23/97 |
|
62 |
* @author John Moreland |
|
63 |
*/ |
|
64 |
|
|
65 |
import java.rmi.*; |
|
66 |
import java.rmi.server.*; |
|
67 |
import java.io.*; //DFH 6/8/00 |
|
68 |
|
|
69 |
|
|
70 |
public class SrbJavaGlue extends UnicastRemoteObject implements SrbJavaGlueInterface |
|
71 |
|
|
72 |
{ |
|
73 |
byte[] ByteData; |
|
74 |
String FileName; |
|
75 |
|
|
76 |
// JNI (Java Native Interface) Glue Routines for the SRB client library. |
|
77 |
|
|
78 |
public SrbJavaGlue() throws RemoteException { |
|
79 |
super(); |
|
80 |
} |
|
81 |
|
|
82 |
public native int clConnectJ( String host, String port, String auth, |
|
83 |
String user, String domain ); |
|
84 |
|
|
85 |
public native int srbListCollectJ( int conn, int catType, |
|
86 |
String collectionName, String flag, int types[] ); |
|
87 |
|
|
88 |
public native String getFileListItem( int index ); |
|
89 |
|
|
90 |
public native int clFinishJ( int conn ); |
|
91 |
|
|
92 |
public native int srbObjCopyNewJ( String srcDir, String srcFile, |
|
93 |
String dstDir, String dstFile, String dstRes ); |
|
94 |
|
|
95 |
public native int srbListResourceJ( int bs ); |
|
96 |
|
|
97 |
public native String getResListItem( int index ); |
|
98 |
|
|
99 |
public native String getDefCollection(); |
|
100 |
|
|
101 |
public native String getDefResource(); |
|
102 |
|
|
103 |
public native String getUser(); |
|
104 |
|
|
105 |
public native String getDomain(); |
|
106 |
|
|
107 |
public native String getLocalCacheDir(); |
|
108 |
|
|
109 |
public native int srbObjReplicateJ(int conn, int catType, |
|
110 |
String objID, String replNum, String collection, String resource); |
|
111 |
|
|
112 |
public native int srbCollReplicateJ(int conn, int catType, |
|
113 |
String collection, String resource); |
|
114 |
|
|
115 |
public native int queryDataInCollJ (int conn, int catType, |
|
116 |
String parColl); |
|
117 |
|
|
118 |
public native int queryDataJ (int conn, int catType, String objID, |
|
119 |
String parColl); |
|
120 |
|
|
121 |
public native int querySubCollInCollJ (int conn, int catType, |
|
122 |
String parColl); |
|
123 |
|
|
124 |
public native String getDataResultJ( int metaIndex, int rowIndex ); |
|
125 |
|
|
126 |
public native String getCollResultJ( int metaIndex, int rowIndex ); |
|
127 |
|
|
128 |
public native String getGenQueResultJ( int metaIndex, int rowIndex ); |
|
129 |
|
|
130 |
public native int getNCollAttriJ (); |
|
131 |
|
|
132 |
public native int getNDataAttriJ (); |
|
133 |
|
|
134 |
public native int srbObjUnlinkJ (int conn, int catType, |
|
135 |
String objID, String replNum, String parColl); |
|
136 |
|
|
137 |
public native int srbCreateCollectJ (int conn, int catType, |
|
138 |
String parColl, String newColl); |
|
139 |
|
|
140 |
public native int srbModifyDatasetMetaDJ (int conn, int catType, |
|
141 |
String objID, String collection, |
|
142 |
String newValue1, String newValue2, int retractionType); |
|
143 |
public native int srbModifyCollectMetaDJ (int conn, int catType, |
|
144 |
String collection, String newValue1, String newValue2, |
|
145 |
String newValue3, int retractionType); |
|
146 |
public native int importToOldObjJ (int conn, int catType, |
|
147 |
String objID, String replNum, String parColl, String resource, |
|
148 |
String localFile, String container); |
|
149 |
|
|
150 |
public native int importToNewObjJ (int conn, int catType, |
|
151 |
String objID, String parColl, String resource, String localFile, |
|
152 |
String container); |
|
153 |
|
|
154 |
public native int importDirJ (int conn, int catType, |
|
155 |
String parColl, String resource, String localDir, String container); |
|
156 |
|
|
157 |
public native int srbRmCollJ (int conn, int catType, String parColl); |
|
158 |
|
|
159 |
public native int srbUnregCollJ (int conn, int catType, String parColl); |
|
160 |
|
|
161 |
public native int copyToOldObjJ (int conn, int catType, |
|
162 |
String objID, String replNum, String srcColl, String targObj, |
|
163 |
String targReplNum, String targColl, String targResource, |
|
164 |
String container); |
|
165 |
|
|
166 |
public native int copyDataToCollJ (int conn, int catType, |
|
167 |
String objID, String replNum, String srcColl, |
|
168 |
String dataType, String size, String targColl, String targResource, |
|
169 |
String container); |
|
170 |
|
|
171 |
public native int copyCollToCollJ (int conn, int catType, |
|
172 |
String srcColl, String targColl, String targResource, |
|
173 |
String container); |
|
174 |
|
|
175 |
public native int exportToFileJ(int conn, int catType, |
|
176 |
String objID, String replNum, String srcColl, |
|
177 |
String targFile, int forceFlag); |
|
178 |
|
|
179 |
public native int exportToDirJ(int conn, int catType, |
|
180 |
String objID, String replNum, String srcColl, |
|
181 |
String targDir); |
|
182 |
|
|
183 |
public native int exportCollToDirJ(int conn, int catType, |
|
184 |
String srcColl, String targDir); |
|
185 |
|
|
186 |
public native int srbGenQuery (int conn, int catType, |
|
187 |
String[] qval, int qvalInx[], int selVal[]); |
|
188 |
|
|
189 |
public native int srbRegisterDatasetJ(int conn, int catType, |
|
190 |
String objID, String dataType, String resource, String collection, |
|
191 |
String pathName, int dataSize); |
|
192 |
|
|
193 |
public native int srbUnregisterDatasetJ (int conn, int catType, |
|
194 |
String objID, String replNum, String collection); |
|
195 |
|
|
196 |
public native int srbRegisterDirJ (int conn, int catType, |
|
197 |
String srcDirPath, String targColl, String resource); |
|
198 |
|
|
199 |
public native int getMoreDataRowsJ (int conn, int catType); |
|
200 |
|
|
201 |
public native int getMoreCollRowsJ (int conn, int catType); |
|
202 |
|
|
203 |
public native int getMoreGenQueRowsJ (int conn, int catType); |
|
204 |
|
|
205 |
public native int chmodInCollJ (int conn, int catType, |
|
206 |
String collection, String user, String domain, String mode); |
|
207 |
|
|
208 |
public native int ingestUserJ (int conn, int catType, |
|
209 |
String userName, String passwd, String domain, |
|
210 |
String userType, String userAddr, String userPhone, String userEmail, |
|
211 |
String parentColl); |
|
212 |
|
|
213 |
public native int ingestGroupJ (int conn, int catType, |
|
214 |
String groupName, String passwd, |
|
215 |
String groupAddr, String groupPhone, String groupEMail); |
|
216 |
|
|
217 |
public native int ingestLocJ (int conn, int catType, |
|
218 |
String locName, String fullAddr, String parentLoc, |
|
219 |
String serverUser, String serverUserDomain); |
|
220 |
|
|
221 |
public native int ingestResourceJ (int conn, int catType, |
|
222 |
String rescName, String rescType, String location, String phyPath, |
|
223 |
String rscClass, int size); |
|
224 |
|
|
225 |
public native int ingestLogRescJ (int conn, int catType, |
|
226 |
String logRescName, String phyResc, String phyPath); |
|
227 |
|
|
228 |
public native int addLogRescJ (int conn, int catType, |
|
229 |
String logResc, String phyResc, String phyPath); |
|
230 |
|
|
231 |
public native int modifyUserJ (int conn, int catType, |
|
232 |
int modOpr, String userName, String domain, String modValue); |
|
233 |
|
|
234 |
public native int containerCreateJ (int conn, int catType, |
|
235 |
String contName, String dataType, String logResc, int size); |
|
236 |
|
|
237 |
public native int containerDeleteJ (int conn, int catType, |
|
238 |
String contName, int forceFlag); |
|
239 |
|
|
240 |
public native int containerSyncJ (int conn, int catType, |
|
241 |
String contName, int purgeFlag); |
|
242 |
|
|
243 |
//DFH 6/8/00 |
|
244 |
public byte[] getByteData(String name) { |
|
245 |
File tmp = new File("./tmp/"); |
|
246 |
if (!tmp.exists()) { tmp.mkdir();} |
|
247 |
|
|
248 |
File temp = new File("./tmp/"+name); // looks for file in tmp dir under current directory |
|
249 |
if (temp.exists()) { |
|
250 |
ByteData = new byte[(int)temp.length()]; |
|
251 |
try{ |
|
252 |
FileInputStream fis = new FileInputStream(temp); |
|
253 |
fis.read(ByteData); |
|
254 |
fis.close(); |
|
255 |
} |
|
256 |
catch (Exception e) {;} |
|
257 |
temp.delete(); |
|
258 |
} |
|
259 |
else { |
|
260 |
ByteData = new byte[0]; |
|
261 |
} |
|
262 |
return ByteData; |
|
263 |
} |
|
264 |
|
|
265 |
public void setByteData(String name, byte[] in) { |
|
266 |
ByteData = in; |
|
267 |
FileName = name; |
|
268 |
File tmp = new File("./tmp/"); |
|
269 |
if (!tmp.exists()) { tmp.mkdir();} |
|
270 |
|
|
271 |
File temp = new File("./tmp/"+name); |
|
272 |
try{ |
|
273 |
FileOutputStream fos = new FileOutputStream(temp); |
|
274 |
fos.write(ByteData); |
|
275 |
fos.close(); |
|
276 |
} |
|
277 |
catch (Exception e) {;} |
|
278 |
} |
|
279 |
|
|
280 |
public void clearTmpFiles() { |
|
281 |
File temp = new File("./tmp/"+FileName); |
|
282 |
if (temp.exists()) { temp.delete(); } |
|
283 |
} |
|
284 |
|
|
285 |
// -- |
|
286 |
|
|
287 |
static |
|
288 |
{ |
|
289 |
System.loadLibrary( "SrbJavaGlue" ); |
|
290 |
|
|
291 |
} |
|
292 |
|
|
293 |
public static void main(String[] args) { |
|
294 |
if (System.getSecurityManager() == null) { |
|
295 |
System.setSecurityManager(new RMISecurityManager()); |
|
296 |
} |
|
297 |
String name = "//localhost/SrbJavaGlue"; |
|
298 |
if (args.length==1) name = "//localhost" + ":"+args[0]+"/SrbJavaGlue"; |
|
299 |
try { |
|
300 |
SrbJavaGlue engine = new SrbJavaGlue(); |
|
301 |
Naming.rebind(name, engine); |
|
302 |
System.out.println("SrbJavaGlue bound"); |
|
303 |
} catch (Exception e) { |
|
304 |
System.err.println("SrbJavaGlue exception: " + |
|
305 |
e.getMessage()); |
|
306 |
e.printStackTrace(); |
|
307 |
} |
|
308 |
} |
|
309 |
|
|
310 |
|
|
311 |
} |
|
312 |
|
|
313 | 0 |
lib/srbrmi/SrbJavaGlueInterface.java | ||
---|---|---|
1 |
/************************************************************************** |
|
2 |
Copyright ^?? General Atomics, 1995-1999 |
|
3 |
All Rights Reserved |
|
4 |
|
|
5 |
This file contains Original Code and/or Modifications of Original Code as |
|
6 |
defined in and that are subject to the General Atomics Storage Resource |
|
7 |
Broker Academic and Research Use License (the 'License'). This license is |
|
8 |
for academic and research use only. You may not use, copy, modify or |
|
9 |
distribute SRB for commercial purposes, nor incorporate the SRB into |
|
10 |
commercial products without the express written permission of General |
|
11 |
Atomics nor may you distribute SRB to any third party. |
|
12 |
|
|
13 |
You may not use this software except in compliance with the License. Please |
|
14 |
obtain a copy of the License at http://www.npaci.edu/DICE/SRB/License and |
|
15 |
read it before using this file. |
|
16 |
|
|
17 |
The Original Code and all software distributed under the License are |
|
18 |
distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER |
|
19 |
EXPRESS OR IMPLIED, AND GENERAL ATOMICS AND THE SAN DIEGO SUPERCOMPUTER |
|
20 |
CENTER HEREBY DISCLAIM ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, |
|
21 |
ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR |
|
22 |
NON-INFRINGEMENT OF ANY COPYRIGHT, PATENT , TRADEMARK OR OTHER RIGHTS. |
|
23 |
GENERAL ATOMICS AND THE SAN DIEGO SUPERCOMPUTER CENTER FURTHER HAVE NO |
|
24 |
OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCMENTS OR |
|
25 |
MODIFICATIONS.. Please see the License for the specific language governing |
|
26 |
rights and limitations under the License." |
|
27 |
|
|
28 |
Please read the terms of this license carefully. By using the SRB software, |
|
29 |
you are accepting and agreeing to the terms of this license with General |
|
30 |
Atomics. If you are agreeing to this license on behalf of a company, or |
|
31 |
other institution, you represent that you are authorized to bind the |
|
32 |
company/institution to such a license. If you do not meet this criterion or |
|
33 |
you do not agree to any of the terms of this license, you are not |
|
34 |
authorized to use the software. |
|
35 |
**************************************************************************/ |
|
36 |
|
|
37 |
|
|
38 |
/** |
|
39 |
* SrbJavaGlue |
|
40 |
* |
|
41 |
* @version 1.0 10/23/97 |
|
42 |
* @author John Moreland |
|
43 |
*/ |
|
44 |
/** |
|
45 |
* Name: SrbJavaGlueInterface.java |
|
46 |
* Purpose: Interface for RMI Implementation |
|
47 |
* Copyright: 2000 Regents of the University of California and the |
|
48 |
* National Center for Ecological Analysis and Synthesis |
|
49 |
* Authors: Dan Higgins |
|
50 |
* |
|
51 |
* Version: '$Id$' |
|
52 |
* @version 1.1 6/8/00 |
|
53 |
* @author Dan Higgins - NCEAS |
|
54 |
*/ |
|
55 |
|
|
56 |
import java.rmi.Remote; |
|
57 |
import java.rmi.RemoteException; |
|
58 |
|
|
59 |
public interface SrbJavaGlueInterface extends Remote |
|
60 |
{ |
|
61 |
// Interface for JNI/RMI |
|
62 |
// JNI (Java Native Interface) Glue Routines for the SRB client library. |
|
63 |
|
|
64 |
public int clConnectJ( String host, String port, String auth, |
|
65 |
String user, String domain )throws RemoteException; |
|
66 |
|
|
67 |
public int srbListCollectJ( int conn, int catType, |
|
68 |
String collectionName, String flag, int types[] )throws RemoteException; |
|
69 |
|
|
70 |
public String getFileListItem( int index ) throws RemoteException; |
|
71 |
|
|
72 |
public int clFinishJ( int conn )throws RemoteException ; |
|
73 |
|
|
74 |
public int srbObjCopyNewJ( String srcDir, String srcFile, |
|
75 |
String dstDir, String dstFile, String dstRes ) throws RemoteException ; |
|
76 |
|
|
77 |
public int srbListResourceJ( int bs )throws RemoteException; |
|
78 |
|
|
79 |
public String getResListItem( int index )throws RemoteException; |
|
80 |
|
|
81 |
public String getDefCollection()throws RemoteException; |
|
82 |
|
|
83 |
public String getDefResource()throws RemoteException; |
|
84 |
|
|
85 |
public String getUser()throws RemoteException; |
|
86 |
|
|
87 |
public String getDomain()throws RemoteException; |
|
88 |
|
|
89 |
public String getLocalCacheDir()throws RemoteException; |
|
90 |
|
|
91 |
public int srbObjReplicateJ(int conn, int catType, |
|
92 |
String objID, String replNum, String collection, String resource)throws RemoteException; |
|
93 |
|
|
94 |
public int srbCollReplicateJ(int conn, int catType, |
|
95 |
String collection, String resource)throws RemoteException; |
|
96 |
|
|
97 |
public int queryDataInCollJ (int conn, int catType, |
|
98 |
String parColl) throws RemoteException; |
|
99 |
|
|
100 |
public int queryDataJ (int conn, int catType, String objID, |
|
101 |
String parColl)throws RemoteException; |
|
102 |
|
|
103 |
public int querySubCollInCollJ (int conn, int catType, |
|
104 |
String parColl)throws RemoteException; |
|
105 |
|
|
106 |
public String getDataResultJ( int metaIndex, int rowIndex ) throws RemoteException; |
|
107 |
|
|
108 |
public String getCollResultJ( int metaIndex, int rowIndex ) throws RemoteException; |
|
109 |
|
|
110 |
public String getGenQueResultJ( int metaIndex, int rowIndex ) throws RemoteException; |
|
111 |
|
|
112 |
public int getNCollAttriJ () throws RemoteException; |
|
113 |
|
|
114 |
public int getNDataAttriJ () throws RemoteException; |
|
115 |
|
|
116 |
public int srbObjUnlinkJ (int conn, int catType, |
|
117 |
String objID, String replNum, String parColl) throws RemoteException; |
|
118 |
|
|
119 |
public int srbCreateCollectJ (int conn, int catType, |
|
120 |
String parColl, String newColl) throws RemoteException; |
|
121 |
|
|
122 |
public int srbModifyDatasetMetaDJ (int conn, int catType, |
|
123 |
String objID, String collection, |
|
124 |
String newValue1, String newValue2, int retractionType) throws RemoteException; |
|
125 |
public int srbModifyCollectMetaDJ (int conn, int catType, |
|
126 |
String collection, String newValue1, String newValue2, |
|
127 |
String newValue3, int retractionType) throws RemoteException; |
|
128 |
public int importToOldObjJ (int conn, int catType, |
|
129 |
String objID, String replNum, String parColl, String resource, |
|
130 |
String localFile, String container) throws RemoteException; |
|
131 |
|
|
132 |
public int importToNewObjJ (int conn, int catType, |
|
133 |
String objID, String parColl, String resource, String localFile, |
|
134 |
String container) throws RemoteException; |
|
135 |
|
|
136 |
public int importDirJ (int conn, int catType, |
|
137 |
String parColl, String resource, String localDir, String container) throws RemoteException; |
|
138 |
|
|
139 |
public int srbRmCollJ (int conn, int catType, String parColl) throws RemoteException; |
|
140 |
|
|
141 |
public int srbUnregCollJ (int conn, int catType, String parColl) throws RemoteException; |
|
142 |
|
|
143 |
public int copyToOldObjJ (int conn, int catType, |
|
144 |
String objID, String replNum, String srcColl, String targObj, |
|
145 |
String targReplNum, String targColl, String targResource, |
|
146 |
String container) throws RemoteException; |
|
147 |
|
|
148 |
public int copyDataToCollJ (int conn, int catType, |
|
149 |
String objID, String replNum, String srcColl, |
|
150 |
String dataType, String size, String targColl, String targResource, |
|
151 |
String container) throws RemoteException; |
|
152 |
|
|
153 |
public int copyCollToCollJ (int conn, int catType, |
|
154 |
String srcColl, String targColl, String targResource, |
|
155 |
String container) throws RemoteException; |
|
156 |
|
|
157 |
public int exportToFileJ(int conn, int catType, |
|
158 |
String objID, String replNum, String srcColl, |
|
159 |
String targFile, int forceFlag) throws RemoteException; |
|
160 |
|
|
161 |
public int exportToDirJ(int conn, int catType, |
|
162 |
String objID, String replNum, String srcColl, |
|
163 |
String targDir) throws RemoteException; |
|
164 |
|
|
165 |
public int exportCollToDirJ(int conn, int catType, |
|
166 |
String srcColl, String targDir) throws RemoteException; |
|
167 |
|
|
168 |
public int srbGenQuery (int conn, int catType, |
|
169 |
String[] qval, int qvalInx[], int selVal[]) throws RemoteException; |
|
170 |
|
|
171 |
public int srbRegisterDatasetJ(int conn, int catType, |
|
172 |
String objID, String dataType, String resource, String collection, |
|
173 |
String pathName, int dataSize) throws RemoteException; |
|
174 |
|
|
175 |
public int srbUnregisterDatasetJ (int conn, int catType, |
|
176 |
String objID, String replNum, String collection) throws RemoteException; |
|
177 |
|
|
178 |
public int srbRegisterDirJ (int conn, int catType, |
|
179 |
String srcDirPath, String targColl, String resource) throws RemoteException; |
|
180 |
|
|
181 |
public int getMoreDataRowsJ (int conn, int catType) throws RemoteException; |
|
182 |
|
|
183 |
public int getMoreCollRowsJ (int conn, int catType) throws RemoteException; |
|
184 |
|
|
185 |
public int getMoreGenQueRowsJ (int conn, int catType) throws RemoteException; |
|
186 |
|
|
187 |
public int chmodInCollJ (int conn, int catType, |
|
188 |
String collection, String user, String domain, String mode) throws RemoteException; |
|
189 |
|
|
190 |
public int ingestUserJ (int conn, int catType, |
|
191 |
String userName, String passwd, String domain, |
|
192 |
String userType, String userAddr, String userPhone, String userEmail, |
|
193 |
String parentColl) throws RemoteException; |
|
194 |
|
|
195 |
public int ingestGroupJ (int conn, int catType, |
|
196 |
String groupName, String passwd, |
|
197 |
String groupAddr, String groupPhone, String groupEMail) throws RemoteException; |
|
198 |
|
|
199 |
public int ingestLocJ (int conn, int catType, |
|
200 |
String locName, String fullAddr, String parentLoc, |
|
201 |
String serverUser, String serverUserDomain) throws RemoteException; |
|
202 |
|
|
203 |
public int ingestResourceJ (int conn, int catType, |
|
204 |
String rescName, String rescType, String location, String phyPath, |
|
205 |
String rscClass, int size) throws RemoteException; |
|
206 |
|
|
207 |
public int ingestLogRescJ (int conn, int catType, |
|
208 |
String logRescName, String phyResc, String phyPath) throws RemoteException; |
|
209 |
|
|
210 |
public int addLogRescJ (int conn, int catType, |
|
211 |
String logResc, String phyResc, String phyPath) throws RemoteException; |
|
212 |
|
|
213 |
public int modifyUserJ (int conn, int catType, |
|
214 |
int modOpr, String userName, String domain, String modValue) throws RemoteException; |
|
215 |
|
|
216 |
public int containerCreateJ (int conn, int catType, |
|
217 |
String contName, String dataType, String logResc, int size) throws RemoteException; |
|
218 |
|
|
219 |
public int containerDeleteJ (int conn, int catType, |
|
220 |
String contName, int forceFlag) throws RemoteException; |
|
221 |
|
|
222 |
public int containerSyncJ (int conn, int catType, |
|
223 |
String contName, int purgeFlag) throws RemoteException; |
|
224 |
|
|
225 |
|
|
226 |
// additions June 2000 by DFH to allows file transfers to client side of RMI |
|
227 |
|
|
228 |
public byte[] getByteData(String fileName) throws RemoteException; |
|
229 |
|
|
230 |
public void setByteData(String fileName, byte[] byteData) throws RemoteException; |
|
231 |
|
|
232 |
public void clearTmpFiles() throws RemoteException; |
|
233 |
|
|
234 |
} |
|
235 | 0 |
lib/srbrmi/RMIControllerInterface.java | ||
---|---|---|
1 |
/** |
|
2 |
* Name: RMIControllerInterface.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$' |
|
9 |
* @version 1.1 6/8/00 |
|
10 |
* @author Dan Higgins - NCEAS |
|
11 |
*/ |
|
12 |
|
|
13 |
|
|
14 |
import java.rmi.Remote; |
|
15 |
import java.rmi.RemoteException; |
|
16 |
|
|
17 |
public interface RMIControllerInterface extends Remote |
|
18 |
{ |
|
19 |
|
|
20 |
public void restart() throws RemoteException; |
|
21 |
|
|
22 |
|
|
23 |
} |
|
24 | 0 |
lib/srbProps.properties | ||
---|---|---|
1 |
# |
|
2 |
# Properties file defining options for establishing connection to SRB at LTER, NM |
|
3 |
# SDSC, Jivka Bojilova |
|
4 |
# '$Id$' |
|
5 |
# |
|
6 |
host=lorax.lternet.edu |
|
7 |
port= |
|
8 |
domain=lter |
|
9 |
|
|
10 | 0 |
build.xml | ||
---|---|---|
126 | 126 |
value="lib/eml.jar" /> |
127 | 127 |
<property name="util" |
128 | 128 |
value="lib/utilities.jar" /> |
129 |
<property name="srb" |
|
130 |
value="lib/srbrmi" /> |
|
131 | 129 |
</target> |
132 | 130 |
|
133 | 131 |
<target name="init" depends="config"> |
... | ... | |
190 | 188 |
<filter token="recipient" value="${recipient}"/> |
191 | 189 |
|
192 | 190 |
<property name="cpath" |
193 |
value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${srb}:${cos}:${morpho}:${emlparser}:${jdbc-add1}:${jdbc-add2}:${util}:${httpclient}"/>
|
|
191 |
value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${cos}:${morpho}:${emlparser}:${jdbc-add1}:${jdbc-add2}:${util}:${httpclient}"/> |
|
194 | 192 |
|
195 | 193 |
<filter token="docrooturl" value="./" /> |
196 | 194 |
<filter token="jdbc-connect" value="${jdbc-connect}"/> |
... | ... | |
282 | 280 |
</target> |
283 | 281 |
|
284 | 282 |
<target name="compile" depends="prepare,utilities" |
285 |
description="Compiles java code to build dir, and copies metacat + srb props files there">
|
|
283 |
description="Compiles java code to build dir, and copies metacat props files there"> |
|
286 | 284 |
|
287 | 285 |
<javac srcdir="${build.src}" |
288 | 286 |
destdir="${build.dest}" |
289 | 287 |
classpath="${cpath}" |
290 | 288 |
debug="${debug}" |
291 | 289 |
excludes="**/*.sql **/stringclient/** **/client/*.java"/> |
292 |
<copy file="lib/srbProps.properties" |
|
293 |
tofile="${build.dest}/${package.home}/srbProps.properties"/> |
|
294 | 290 |
</target> |
295 | 291 |
|
296 | 292 |
<target name="jar" depends="compile" |
297 | 293 |
description="Compiles and jars metacat java code to metacat.jar in build dir"> |
298 | 294 |
|
299 | 295 |
<delete file="${build.dir}/${name}.jar" /> |
300 |
<copy todir="${build.dest}"> |
|
301 |
<fileset dir="lib/srbrmi"/> |
|
302 |
</copy> |
|
303 | 296 |
<jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}" |
304 | 297 |
excludes="**/protocols/" /> |
305 | 298 |
</target> |
... | ... | |
569 | 562 |
<exclude name="*.jar"/> |
570 | 563 |
<exclude name="*.properties"/> |
571 | 564 |
<exclude name="web.xml"/> |
572 |
<exclude name="**/srbrmi*"/> |
|
573 | 565 |
<exclude name="**/*.jpg"/> |
574 | 566 |
<exclude name="**/*.png"/> |
575 | 567 |
<exclude name="**/*.gif"/> |
Also available in: Unified diff
Removed obsolete SRB support files that are no longer used.