Revision 1177

View differences:

org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/ToolsLocator.java
82 82

  
83 83
	private static final String SERVICE_LOADER_DESCRIPTION =
84 84
			"Default Service Loader";
85
	
85

  
86 86
	public static final String I18N_MANAGER_NAME =
87 87
		"org.gvsig.tools.i18n.manager";
88 88

  
......
101 101
	private static final String PACKAGE_MANAGER_DESCRIPTION =
102 102
			"Default Package Manager";
103 103

  
104
        public static final String IDENTITY_MANAGER_NAME =
104
    public static final String IDENTITY_MANAGER_NAME =
105 105
			"org.gvsig.tools.identity.manager";
106 106

  
107 107
	private static final String IDENTITY_MANAGER_DESCRIPTION =
108
			"Default Identiyty Manager";
109
	/**
108
			"Default Identity Manager";
109

  
110
    public static final String FIREWALL_MANAGER_NAME =
111
			"org.gvsig.tools.firewall.manager";
112

  
113
	private static final String FIREWALL_MANAGER_DESCRIPTION =
114
			"Default Firewall Manager";
115
/**
110 116
	 * Unique instance.
111 117
	 */
112 118
	private static final ToolsLocator instance = new ToolsLocator();
......
125 131

  
126 132
	/**
127 133
	 * Return the singleton instance.
128
	 * 
134
	 *
129 135
	 * @return the singleton instance
130 136
	 */
131 137
	public static ToolsLocator getInstance() {
......
138 144

  
139 145
	/**
140 146
	 * Return a reference to PersistenceManager.
141
	 * 
147
	 *
142 148
	 * @return a reference to PersistenceManager
143 149
	 * @throws LocatorException
144 150
	 *             if there is no access to the class or the class cannot be
......
152 158

  
153 159
	/**
154 160
	 * Registers the Class implementing the PersistenceManager interface.
155
	 * 
161
	 *
156 162
	 * @param clazz
157 163
	 *            implementing the PersistenceManager interface
158 164
	 */
......
168 174

  
169 175
	/**
170 176
	 * Return a reference to OperationManager.
171
	 * 
177
	 *
172 178
	 * @return a reference to OperationManager
173 179
	 * @throws LocatorException
174 180
	 *             if there is no access to the class or the class cannot be
......
182 188

  
183 189
	/**
184 190
	 * Registers the Class implementing the OperationManager interface.
185
	 * 
191
	 *
186 192
	 * @param clazz
187 193
	 *            implementing the OperationManager interface
188 194
	 */
......
202 208

  
203 209
	/**
204 210
	 * Return a reference to DynObjectManager.
205
	 * 
211
	 *
206 212
	 * @return a reference to DynObjectManager
207 213
	 * @throws LocatorException
208 214
	 *             if there is no access to the class or the class cannot be
......
216 222

  
217 223
	/**
218 224
	 * Registers the Class implementing the DynObjectManager interface.
219
	 * 
225
	 *
220 226
	 * @param clazz
221 227
	 *            implementing the {@link DynObjectManager} interface
222 228
	 */
......
227 233

  
228 234
	/**
229 235
	 * Return a reference to DisposableManager.
230
	 * 
236
	 *
231 237
	 * @return a reference to {@link DisposableManager}
232 238
	 * @throws LocatorException
233 239
	 *             if there is no access to the class or the class cannot be
......
241 247

  
242 248
	/**
243 249
	 * Registers the Class implementing the DisposableManager interface.
244
	 * 
250
	 *
245 251
	 * @param clazz
246 252
	 *            implementing the {@link DisposableManager} interface
247 253
	 */
......
252 258

  
253 259
	/**
254 260
	 * Return a reference to {@link ServiceLoader}.
255
	 * 
261
	 *
256 262
	 * @return a reference to {@link ServiceLoader}
257 263
	 * @throws LocatorException
258 264
	 *             if there is no access to the class or the class cannot be
......
265 271

  
266 272
	/**
267 273
	 * Registers the Class implementing the {@link ServiceLoader} interface.
268
	 * 
274
	 *
269 275
	 * @param clazz
270 276
	 *            implementing the {@link ServiceLoader} interface
271 277
	 */
......
273 279
		getInstance().register(SERVICE_LOADER_NAME, SERVICE_LOADER_DESCRIPTION,
274 280
				clazz);
275 281
	}
276
	
282

  
277 283
	/**
278 284
	 * Return a reference to {@link I18nManager}.
279
	 * 
285
	 *
280 286
	 * @return a reference to {@link I18nManager}
281 287
	 * @throws LocatorException
282 288
	 *             if there is no access to the class or the class cannot be
......
289 295

  
290 296
	/**
291 297
	 * Registers the Class implementing the {@link I18nManager} interface.
292
	 * 
298
	 *
293 299
	 * @param clazz
294 300
	 *            implementing the {@link I18nManager} interface
295 301
	 */
......
301 307
	/**
302 308
	 * Registers the default Class implementing the {@link I18nManager}
303 309
	 * interface.
304
	 * 
310
	 *
305 311
	 * @param clazz
306 312
	 *            implementing the {@link I18nManager} interface
307 313
	 */
......
309 315
		getInstance().registerDefault(I18N_MANAGER_NAME,
310 316
				I18N_MANAGER_DESCRIPTION, clazz);
311 317
	}
312
	
318

  
313 319
	/**
314 320
	 * Registers the Class implementing the DataTypesManager interface.
315
	 * 
321
	 *
316 322
	 * @param clazz
317 323
	 *            implementing the {@link DataTypesManag} interface
318 324
	 */
......
323 329

  
324 330
	/**
325 331
	 * Registers the default Class implementing the DataTypesManager interface.
326
	 * 
332
	 *
327 333
	 * @param clazz
328 334
	 *            implementing the {@link DataTypesManager} interface
329 335
	 */
......
334 340

  
335 341
	/**
336 342
	 * Return a reference to {@link DataTypesManager}.
337
	 * 
343
	 *
338 344
	 * @return a reference to {@link DataTypesManager}
339 345
	 * @throws LocatorException
340 346
	 *             if there is no access to the class or the class cannot be
......
357 363
	 * </p>
358 364
	 * <p>
359 365
	 * <strong>Example getting an {@link XmlPullParser}:</strong>
360
	 * 
366
	 *
361 367
	 * <pre>
362 368
	 * XmlPullParserFactory factory = XmlPullParserFactory.newInstance(ToolsLocator
363 369
	 * 		.getInstance().getXmlPullParserFactoryClassNames(), null);
364
	 * 
370
	 *
365 371
	 * XmlPullParser xpp = factory.newPullParser();
366 372
	 * </pre>
367
	 * 
373
	 *
368 374
	 * </p>
369 375
	 * <p>
370 376
	 * <strong>Example getting an {@link XmlSerializer}:</strong>
371
	 * 
377
	 *
372 378
	 * <pre>
373 379
	 * XmlPullParserFactory factory = XmlPullParserFactory.newInstance(ToolsLocator
374 380
	 * 		.getInstance().getXmlPullParserFactoryClassNames(), null);
375
	 * 
381
	 *
376 382
	 * XmlSerializer serializer = factory.newSerializer();
377 383
	 * </pre>
378
	 * 
384
	 *
379 385
	 * </p>
380
	 * 
386
	 *
381 387
	 * @return the xmlPullParserFactoryClassNames
382 388
	 * @see XmlPullParserFactory#newInstance(String, Class).
383 389
	 */
......
388 394
	/**
389 395
	 * Sets a comma separated list of XmlPullParserFactory, XmlPullParser or
390 396
	 * XmlSerializer implementations to be used.
391
	 * 
397
	 *
392 398
	 * @param xmlPullParserFactoryClassNames
393 399
	 *            the comma separated list of XmlPullParserFactory class name
394 400
	 */
......
399 405

  
400 406
	/**
401 407
	 * Registers the Class implementing the {@link TaskStatusManager} interface.
402
	 * 
408
	 *
403 409
	 * @param clazz
404 410
	 *            implementing the {@link TaskStatusManager} interface
405 411
	 */
......
410 416

  
411 417
	/**
412 418
	 * Registers the default Class implementing the {@link TaskStatusManager} interface.
413
	 * 
419
	 *
414 420
	 * @param clazz
415 421
	 *            implementing the {@link TaskStatusManager} interface
416 422
	 */
......
421 427

  
422 428
	/**
423 429
	 * Return a reference to {@link TaskStatusManager}.
424
	 * 
430
	 *
425 431
	 * @return a reference to {@link TaskStatusManager}
426 432
	 * @throws LocatorException
427 433
	 *             if there is no access to the class or the class cannot be
......
437 443

  
438 444
	/**
439 445
	 * Registers the Class implementing the {@link PackageManager} interface.
440
	 * 
446
	 *
441 447
	 * @param clazz
442 448
	 *            implementing the {@link PackageManager} interface
443 449
	 */
......
447 453
	}
448 454
	/**
449 455
	 * Registers the default Class implementing the {@link PackageManager} interface.
450
	 * 
456
	 *
451 457
	 * @param clazz
452 458
	 *            implementing the {@link PackageManager} interface
453 459
	 */
......
458 464

  
459 465
	/**
460 466
	 * Return a reference to {@link PackageManager}.
461
	 * 
467
	 *
462 468
	 * @return a reference to {@link PackageManager}
463 469
	 * @throws LocatorException
464 470
	 *             if there is no access to the class or the class cannot be
......
472 478

  
473 479
	/**
474 480
	 * Registers the Class implementing the {@link SimpleIdentityManager} interface.
475
	 * 
481
	 *
476 482
	 * @param clazz
477 483
	 *            implementing the {@link SimpleIdentityManager} interface
478 484
	 */
......
482 488
	}
483 489
	/**
484 490
	 * Registers the default Class implementing the {@link SimpleIdentityManager} interface.
485
	 * 
491
	 *
486 492
	 * @param clazz
487 493
	 *            implementing the {@link SimpleIdentityManager} interface
488 494
	 */
......
493 499

  
494 500
	/**
495 501
	 * Return a reference to {@link SimpleIdentityManager}.
496
	 * 
502
	 *
497 503
	 * @return a reference to {@link SimpleIdentityManager}
498 504
	 * @throws LocatorException
499 505
	 *             if there is no access to the class or the class cannot be
......
505 511
		return (SimpleIdentityManager) getInstance().get(IDENTITY_MANAGER_NAME);
506 512
	}
507 513

  
514
	/**
515
	 * Registers the default Class implementing the FirewallManager interface.
516
	 *
517
	 * @param clazz
518
	 *            implementing the {@link FirewallManager} interface
519
	 */
520
	public static void registerDefaultFirewallManager(Class clazz) {
521
		getInstance().registerDefault(FIREWALL_MANAGER_NAME,
522
				FIREWALL_MANAGER_DESCRIPTION, clazz);
523
	}
524

  
525
	/**
526
	 * Return a reference to {@link FirewallManager}.
527
	 *
528
	 * @return a reference to {@link FirewallManager}
529
	 * @throws LocatorException
530
	 *             if there is no access to the class or the class cannot be
531
	 *             instantiated
532
	 * @see Locator#get(String)
533
	 */
534
	public static DataTypesManager getFirewallManager()
535
			throws LocatorException {
536
		return (DataTypesManager) getInstance().get(FIREWALL_MANAGER_NAME);
537
	}
538

  
539

  
508 540
}
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/firewall/FirewallConfiguration.java
1

  
2

  
3
package org.gvsig.tools.firewall;
4

  
5
import java.net.URL;
6
import java.util.List;
7

  
8
public interface FirewallConfiguration {
9

  
10
    public void apply();
11

  
12
    public boolean isAuthenticate();
13

  
14
    public boolean isEnabled();
15
    public void setEnabled(boolean enabled);
16

  
17
    public URL getHost();
18
    public String getUserName();
19
    public String getPassword();
20

  
21
    public void setHost(URL host);
22
    public boolean setHost(String host, String port);
23
    public void setUserName(String userName);
24
    public void setPassword(String password);
25

  
26
    public List<String> getNonProxyHosts();
27
    public String getNonProxyHostsAsString();
28
    public void setNonProxyHosts(String nonProxyHosts);
29
    public void addNonProxyHost(String host);
30

  
31
}
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/pom.xml
6 6
    <artifactId>org.gvsig.tools.lib</artifactId>
7 7
    <packaging>jar</packaging>
8 8
    <name>org.gvsig.tools.lib</name>
9
    <description>Tools related to application framework architecture 
9
    <description>Tools related to application framework architecture
10 10
	and implementations of design patterns</description>
11 11
    <parent>
12 12
        <groupId>org.gvsig</groupId>
......
19 19
                <artifactId>commons-lang3</artifactId>
20 20
            <scope>compile</scope>
21 21
            </dependency>
22
        
22

  
23 23
        <dependency>
24 24
            <groupId>easymock</groupId>
25 25
            <artifactId>easymock</artifactId>
......
40 40
                <groupId>org.apache.maven.plugins</groupId>
41 41
                <artifactId>maven-compiler-plugin</artifactId>
42 42
                <configuration>
43
                    <source>1.4</source>
44
                    <target>1.4</target>
43
                    <source>1.5</source>
44
                    <target>1.5</target>
45 45
                </configuration>
46 46
            </plugin>
47 47
            <plugin>
......
71 71
                        <configuration>
72 72
                            <signature>
73 73
                                <groupId>org.codehaus.mojo.signature</groupId>
74
                                <artifactId>java14</artifactId>
74
                                <artifactId>java15</artifactId>
75 75
                                <version>1.0</version>
76 76
                            </signature>
77 77
                        </configuration>

Also available in: Unified diff