| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
package nl.toolforge.karma.core.location; |
| 20 |
|
|
| 21 |
|
import org.apache.commons.digester.Digester; |
| 22 |
|
|
| 23 |
|
import java.util.ArrayList; |
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
3248 |
public class LocationDescriptor { |
| 32 |
|
|
| 33 |
3248 |
private String id = null; |
| 34 |
3248 |
private String type = null; |
| 35 |
|
|
| 36 |
3248 |
private String host = null; |
| 37 |
3248 |
private String port = null; |
| 38 |
3248 |
private String repository = null; |
| 39 |
3248 |
private String moduleOffset = null; |
| 40 |
3248 |
private String protocol = null; |
| 41 |
|
|
| 42 |
|
public String getId() { |
| 43 |
3362 |
return id; |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
public void setId(String id) { |
| 47 |
3248 |
this.id = id; |
| 48 |
3248 |
} |
| 49 |
|
|
| 50 |
|
public String getType() { |
| 51 |
2558 |
return type; |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
public void setType(String type) { |
| 55 |
3248 |
this.type = type; |
| 56 |
3248 |
} |
| 57 |
|
|
| 58 |
|
public String getHost() { |
| 59 |
2558 |
return host; |
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
public void setHost(String host) { |
| 63 |
3248 |
this.host = host; |
| 64 |
3248 |
} |
| 65 |
|
|
| 66 |
|
public String getPort() { |
| 67 |
2558 |
return port; |
| 68 |
|
} |
| 69 |
|
|
| 70 |
|
public void setPort(String port) { |
| 71 |
3184 |
this.port = port; |
| 72 |
3184 |
} |
| 73 |
|
|
| 74 |
|
public String getRepository() { |
| 75 |
2558 |
return repository; |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
public void setRepository(String repository) { |
| 79 |
3248 |
this.repository = repository; |
| 80 |
3248 |
} |
| 81 |
|
|
| 82 |
|
public String getModuleOffset() { |
| 83 |
2558 |
return moduleOffset; |
| 84 |
|
} |
| 85 |
|
|
| 86 |
|
public void setModuleOffset(String moduleOffset) { |
| 87 |
2712 |
this.moduleOffset = moduleOffset; |
| 88 |
2712 |
} |
| 89 |
|
|
| 90 |
|
public String getProtocol() { |
| 91 |
2558 |
return protocol; |
| 92 |
|
} |
| 93 |
|
|
| 94 |
|
public void setProtocol(String protocol) { |
| 95 |
2980 |
this.protocol = protocol; |
| 96 |
2980 |
} |
| 97 |
|
|
| 98 |
|
|
| 99 |
|
|
| 100 |
|
|
| 101 |
|
|
| 102 |
|
|
| 103 |
|
|
| 104 |
|
public static Digester getDigester() { |
| 105 |
|
|
| 106 |
1490 |
Digester digester = new Digester(); |
| 107 |
|
|
| 108 |
1490 |
digester.setNamespaceAware(true); |
| 109 |
|
|
| 110 |
2102 |
digester.addObjectCreate("*/locations", ArrayList.class); |
| 111 |
|
|
| 112 |
1490 |
digester.addObjectCreate("*/locations/location", LocationDescriptor.class); |
| 113 |
1490 |
digester.addSetProperties("*/locations/location"); |
| 114 |
|
|
| 115 |
1490 |
digester.addCallMethod("*/locations/location/protocol", "setProtocol", 0); |
| 116 |
1490 |
digester.addCallMethod("*/locations/location/host", "setHost", 0); |
| 117 |
1490 |
digester.addCallMethod("*/locations/location/port", "setPort", 0); |
| 118 |
1490 |
digester.addCallMethod("*/locations/location/repository", "setRepository", 0); |
| 119 |
1490 |
digester.addCallMethod("*/locations/location/module-offset", "setModuleOffset", 0); |
| 120 |
1490 |
digester.addSetNext("*/locations/location", "add"); |
| 121 |
|
|
| 122 |
1490 |
return digester; |
| 123 |
|
} |
| 124 |
|
|
| 125 |
|
} |