-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhow-to-plugin.txt
47 lines (30 loc) · 1.16 KB
/
how-to-plugin.txt
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
37
38
39
40
41
42
43
44
45
46
47
step 1: implement class CompletenessChecker (see javadoc)
step 2: compile with "javac -cp darepLib.jar <your java file>"
step 3: generate data-repository-plugin.jar with "jar cf data-repository-plugin.jar <your-class-file>"
step 4: copy this jar to the directory which contains the darep.jar
step 5: specify your class in your properties file
Example:
Create MyCompletenessChecker.java in the sdk-directory with the following content:
==================================================================================
import java.io.File;
public class MyCompletenessChecker implements darep.server.CompletenessChecker {
@Override
public File[] getCompletedFiles(File directory) throws Exception {
return directory.listFiles();
}
@Override
public void setProperty(String key, String value) throws IllegalArgumentException {
// No Properties
}
}
Compile it:
===========
javac -cp darepLib.jar MyCompletenessChecker.java
Jar it:
=======
jar cf data-repository-plugin.jar MyCompletenessChecker.class
Write the following in your properties file:
============================================
completeness-checker.class-name = MyCompletenessChecker
Be Happy
========