001: /*
002: * Copyright (c) 1998 - 2005 Versant Corporation
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * Versant Corporation - initial API and implementation
010: */
011: package com.versant.core.jdo.tools.ant;
012:
013: import com.versant.core.jdo.LogDownloader;
014:
015: import org.apache.tools.ant.Task;
016: import org.apache.tools.ant.BuildException;
017: import com.versant.core.jdo.LogDownloader;
018:
019: /**
020: * Ant task wrapper for LogDownloader.
021: */
022: public class LogDownloaderTask extends Task {
023:
024: private LogDownloader bean = new LogDownloader();
025:
026: public void execute() throws BuildException {
027: try {
028: LogDownloader.run(bean);
029: } catch (Exception e) {
030: throw new BuildException(e);
031: }
032: }
033:
034: public void setProject(String project) {
035: bean.setProject(project);
036: }
037:
038: public void setHost(String host) {
039: bean.setHost(host);
040: }
041:
042: public void setPort(int port) {
043: bean.setPort(port);
044: }
045:
046: public void setServer(String server) {
047: bean.setServer(server);
048: }
049:
050: public void setUsername(String username) {
051: bean.setUsername(username);
052: }
053:
054: public void setPassword(String password) {
055: bean.setPassword(password);
056: }
057:
058: public void setEventPollSecs(int eventPollSecs) {
059: bean.setEventPollSecs(eventPollSecs);
060: }
061:
062: public void setMetricPollSecs(int metricPollSecs) {
063: bean.setMetricPollSecs(metricPollSecs);
064: }
065:
066: public void setAppend(boolean append) {
067: bean.setAppend(append);
068: }
069:
070: public void setMaxFileSizeK(int maxFileSizeK) {
071: bean.setMaxFileSizeK(maxFileSizeK);
072: }
073:
074: public void setBackups(int backups) {
075: bean.setBackups(backups);
076: }
077:
078: public void setFilename(String filename) {
079: bean.setFilename(filename);
080: }
081:
082: public void setEventBinary(boolean eventBinary) {
083: bean.setEventBinary(eventBinary);
084: }
085:
086: public void setEventText(boolean eventText) {
087: bean.setEventText(eventText);
088: }
089:
090: public void setMetricBinary(boolean metricBinary) {
091: bean.setMetricBinary(metricBinary);
092: }
093:
094: public void setQuiet(boolean on) {
095: bean.setQuiet(on);
096: }
097:
098: public void setDateFormat(String dateFormat) {
099: bean.setDateFormat(dateFormat);
100: }
101:
102: public void setSingle(boolean on) {
103: bean.setSingle(on);
104: }
105:
106: }
|