| 1 | /** |
| 2 | * BSD-style license; for more info see http://xradar.sourceforge.net/license.html |
| 3 | */ |
| 4 | package org.sourceforge.xradar.ant; |
| 5 | |
| 6 | import org.apache.tools.ant.Task; |
| 7 | |
| 8 | /** |
| 9 | * <p>Abstraction layer for all Ant Task provided by XRadar.</p> |
| 10 | * <p>Provide common support for the 'online' attributes.</p> |
| 11 | * |
| 12 | * @author Romain PELISSE, belaran@gmail.com |
| 13 | * |
| 14 | */ |
| 15 | public class AbstractXRadarAntTask extends Task { |
| 16 | |
| 17 | /* |
| 18 | * Specify if the program is running online or not (if not, |
| 19 | * therefore induce the need for at least a XML Catalog to |
| 20 | * resolve internet entities or dtd). |
| 21 | * Both 'online' and 'offline' name are supported out |
| 22 | */ |
| 23 | private boolean online; |
| 24 | |
| 25 | /** |
| 26 | * @return the offline |
| 27 | */ |
| 28 | public boolean isOffline() { |
| 29 | return (! online); |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * @param offline the offline to set |
| 34 | */ |
| 35 | public void setOffline(boolean offline) { |
| 36 | this.online = (! offline); |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * <p>Get online value</p> |
| 41 | * @return |
| 42 | */ |
| 43 | public boolean isOnline() { |
| 44 | return online; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * <p>set online value.</p> |
| 49 | * @param online |
| 50 | */ |
| 51 | public void setOnline(boolean online) { |
| 52 | this.online = online; |
| 53 | } |
| 54 | |
| 55 | } |