001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019:
020: package org.netbeans.modules.wsdlextensions.ftp.impl;
021:
022: import java.util.Collection;
023: import org.netbeans.modules.xml.wsdl.model.Binding;
024: import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
025: import org.netbeans.modules.xml.wsdl.model.WSDLModel;
026: import org.netbeans.modules.wsdlextensions.ftp.FTPTransfer;
027: import org.netbeans.modules.wsdlextensions.ftp.FTPComponent;
028: import org.netbeans.modules.wsdlextensions.ftp.FTPQName;
029: import org.w3c.dom.Element;
030:
031: /**
032: * @author jim.fu@sun.com
033: */
034: public class FTPTransferImpl extends FTPComponentImpl implements
035: FTPTransfer {
036:
037: public FTPTransferImpl(WSDLModel model, Element e) {
038: super (model, e);
039: }
040:
041: public FTPTransferImpl(WSDLModel model) {
042: this (model, createPrefixedElement(FTPQName.TRANSFER.getQName(),
043: model));
044: }
045:
046: public void accept(FTPComponent.Visitor visitor) {
047: visitor.visit(this );
048: }
049:
050: public String getUse() {
051: return getAttribute(FTPAttribute.FTP_USE_PROPERTY);
052: }
053:
054: public void setUse(String use) {
055: setAttribute(FTP_USE_PROPERTY, FTPAttribute.FTP_USE_PROPERTY,
056: use);
057: }
058:
059: public String getPollInterval() {
060: return getAttribute(FTPAttribute.FTP_POLLINTERVAL_PROPERTY);
061: }
062:
063: public void setPollInterval(String s) {
064: setAttribute(FTP_POLLINTERVAL_PROPERTY,
065: FTPAttribute.FTP_POLLINTERVAL_PROPERTY, s);
066: }
067:
068: public String getSendTo() {
069: return getAttribute(FTPAttribute.FTP_SENDTO_PROPERTY);
070: }
071:
072: public void setSendTo(String s) {
073: setAttribute(FTP_SENDTO_PROPERTY,
074: FTPAttribute.FTP_SENDTO_PROPERTY, s);
075: }
076:
077: public boolean getSendToHasPatterns() {
078: String isPattStr = getAttribute(FTPAttribute.FTP_SENDTO_HAS_PATTS_PROPERTY);
079: return isPattStr != null && isPattStr.equals("true");
080: }
081:
082: public void setSendToHasPatterns(boolean b) {
083: setAttribute(FTP_SENDTO_HAS_PATTS_PROPERTY,
084: FTPAttribute.FTP_SENDTO_HAS_PATTS_PROPERTY, b ? "true"
085: : "false");
086: }
087:
088: public String getReceiveFrom() {
089: return getAttribute(FTPAttribute.FTP_RECEIVEFROM_PROPERTY);
090: }
091:
092: public void setReceiveFrom(String s) {
093: setAttribute(FTP_RECEIVEFROM_PROPERTY,
094: FTPAttribute.FTP_RECEIVEFROM_PROPERTY, s);
095: }
096:
097: public boolean getReceiveFromHasPatterns() {
098: String isPattStr = getAttribute(FTPAttribute.FTP_RECEIVEFROM_HAS_PATTS_PROPERTY);
099: return isPattStr != null && isPattStr.equals("true");
100: }
101:
102: public void setReceiveFromHasPatterns(boolean b) {
103: setAttribute(FTP_RECEIVEFROM_HAS_PATTS_PROPERTY,
104: FTPAttribute.FTP_RECEIVEFROM_HAS_PATTS_PROPERTY,
105: b ? "true" : "false");
106: }
107:
108: public String getPreSendCommand() {
109: return getAttribute(FTPAttribute.FTP_PRE_SEND_CMD_PROPERTY);
110: }
111:
112: public void setPreSendCommand(String s) {
113: setAttribute(FTP_PRE_SEND_CMD_PROPERTY,
114: FTPAttribute.FTP_PRE_SEND_CMD_PROPERTY, s);
115: }
116:
117: public String getPreSendLocation() {
118: return getAttribute(FTPAttribute.FTP_PRE_SEND_LOC_PROPERTY);
119: }
120:
121: public void setPreSendLocation(String s) {
122: setAttribute(FTP_PRE_SEND_LOC_PROPERTY,
123: FTPAttribute.FTP_PRE_SEND_LOC_PROPERTY, s);
124: }
125:
126: public boolean getPreSendLocationHasPatterns() {
127: String isPattStr = getAttribute(FTPAttribute.FTP_PRE_SEND_LOC_HAS_PATTS_PROPERTY);
128: return isPattStr != null && isPattStr.equals("true");
129: }
130:
131: public void setPreSendLocationHasPatterns(boolean b) {
132: setAttribute(FTP_PRE_SEND_LOC_HAS_PATTS_PROPERTY,
133: FTPAttribute.FTP_PRE_SEND_LOC_HAS_PATTS_PROPERTY,
134: b ? "true" : "false");
135: }
136:
137: public String getPreReceiveCommand() {
138: return getAttribute(FTPAttribute.FTP_PRE_RECEIVE_CMD_PROPERTY);
139: }
140:
141: public void setPreReceiveCommand(String s) {
142: setAttribute(FTP_PRE_RECEIVE_CMD_PROPERTY,
143: FTPAttribute.FTP_PRE_RECEIVE_CMD_PROPERTY, s);
144: }
145:
146: public String getPreReceiveLocation() {
147: return getAttribute(FTPAttribute.FTP_PRE_RECEIVE_LOC_PROPERTY);
148: }
149:
150: public void setPreReceiveLocation(String s) {
151: setAttribute(FTP_PRE_RECEIVE_LOC_PROPERTY,
152: FTPAttribute.FTP_PRE_RECEIVE_LOC_PROPERTY, s);
153: }
154:
155: public boolean getPreReceiveLocationHasPatterns() {
156: String isPattStr = getAttribute(FTPAttribute.FTP_PRE_RECEIVE_LOC_HAS_PATTS_PROPERTY);
157: return isPattStr != null && isPattStr.equals("true");
158: }
159:
160: public void setPreReceiveLocationHasPatterns(boolean b) {
161: setAttribute(FTP_PRE_RECEIVE_LOC_HAS_PATTS_PROPERTY,
162: FTPAttribute.FTP_PRE_RECEIVE_LOC_HAS_PATTS_PROPERTY,
163: b ? "true" : "false");
164: }
165:
166: public String getPostSendCommand() {
167: return getAttribute(FTPAttribute.FTP_POST_SEND_CMD_PROPERTY);
168: }
169:
170: public void setPostSendCommand(String s) {
171: setAttribute(FTP_POST_SEND_CMD_PROPERTY,
172: FTPAttribute.FTP_POST_SEND_CMD_PROPERTY, s);
173: }
174:
175: public String getPostSendLocation() {
176: return getAttribute(FTPAttribute.FTP_POST_SEND_LOC_PROPERTY);
177: }
178:
179: public void setPostSendLocation(String s) {
180: setAttribute(FTP_POST_SEND_LOC_PROPERTY,
181: FTPAttribute.FTP_POST_SEND_LOC_PROPERTY, s);
182: }
183:
184: public boolean getPostSendLocationHasPatterns() {
185: String isPattStr = getAttribute(FTPAttribute.FTP_POST_SEND_LOC_PROPERTY);
186: return isPattStr != null && isPattStr.equals("true");
187: }
188:
189: public void setPostSendLocationHasPatterns(boolean b) {
190: setAttribute(FTP_POST_SEND_LOC_PROPERTY,
191: FTPAttribute.FTP_POST_SEND_LOC_PROPERTY, b ? "true"
192: : "false");
193: }
194:
195: public String getPostReceiveCommand() {
196: return getAttribute(FTPAttribute.FTP_POST_RECEIVE_CMD_PROPERTY);
197: }
198:
199: public void setPostReceiveCommand(String s) {
200: setAttribute(FTP_POST_RECEIVE_CMD_PROPERTY,
201: FTPAttribute.FTP_POST_RECEIVE_CMD_PROPERTY, s);
202: }
203:
204: public String getPostReceiveLocation() {
205: return getAttribute(FTPAttribute.FTP_POST_RECEIVE_LOC_PROPERTY);
206: }
207:
208: public void setPostReceiveLocation(String s) {
209: setAttribute(FTP_POST_RECEIVE_LOC_PROPERTY,
210: FTPAttribute.FTP_POST_RECEIVE_LOC_PROPERTY, s);
211: }
212:
213: public boolean getPostReceiveLocationHasPatterns() {
214: String isPattStr = getAttribute(FTPAttribute.FTP_POST_RECEIVE_LOC_HAS_PATTS_PROPERTY);
215: return isPattStr != null && isPattStr.equals("true");
216: }
217:
218: public void setPostReceiveLocationHasPatterns(boolean b) {
219: setAttribute(FTP_POST_RECEIVE_LOC_HAS_PATTS_PROPERTY,
220: FTPAttribute.FTP_POST_RECEIVE_LOC_HAS_PATTS_PROPERTY,
221: b ? "true" : "false");
222: }
223:
224: public String getPart() {
225: return getAttribute(FTPAttribute.FTP_PART_PROPERTY);
226: }
227:
228: public void setPart(String part) {
229: setAttribute(FTP_PART_PROPERTY, FTPAttribute.FTP_PART_PROPERTY,
230: part);
231: }
232:
233: public String getEncodingStyle() {
234: return getAttribute(FTPAttribute.FTP_ENCODINGSTYLE_PROPERTY);
235: }
236:
237: public void setEncodingStyle(String encodingStyle) {
238: setAttribute(FTP_ENCODINGSTYLE_PROPERTY,
239: FTPAttribute.FTP_ENCODINGSTYLE_PROPERTY, encodingStyle);
240: }
241:
242: public boolean getAppend() {
243: String append = getAttribute(FTPAttribute.FTP_APPEND_PROPERTY);
244: return append != null && append.equals("true");
245: }
246:
247: public void setAppend(boolean b) {
248: setAttribute(FTP_APPEND_PROPERTY,
249: FTPAttribute.FTP_APPEND_PROPERTY, b ? "true" : "false");
250: }
251:
252: public boolean getSenderUseProxy() {
253: String useProxy = getAttribute(FTPAttribute.FTP_SENDER_USEPROXY_PROPERTY);
254: return useProxy != null && useProxy.equals("true");
255: }
256:
257: public void setSenderUseProxy(boolean useProxy) {
258: setAttribute(FTP_SENDER_USEPROXY_PROPERTY,
259: FTPAttribute.FTP_SENDER_USEPROXY_PROPERTY,
260: useProxy ? "true" : "false");
261: }
262:
263: public String getSenderProxyURL() {
264: return getAttribute(FTPAttribute.FTP_SENDER_PROXY_PROPERTY);
265: }
266:
267: public void setSenderProxyURL(String proxyURL) {
268: setAttribute(FTP_SENDER_PROXY_PROPERTY,
269: FTPAttribute.FTP_SENDER_PROXY_PROPERTY, proxyURL);
270: }
271:
272: public boolean getSenderUsePassive() {
273: String usePassive = getAttribute(FTPAttribute.FTP_SENDER_USEPASSIVE_PROPERTY);
274: return usePassive != null && usePassive.equals("true");
275: }
276:
277: public void setSenderUsePassive(boolean usePassive) {
278: setAttribute(FTP_SENDER_USEPASSIVE_PROPERTY,
279: FTPAttribute.FTP_SENDER_USEPASSIVE_PROPERTY,
280: usePassive ? "true" : "false");
281: }
282:
283: public boolean getReceiverUseProxy() {
284: String useProxy = getAttribute(FTPAttribute.FTP_RECEIVER_USEPROXY_PROPERTY);
285: return useProxy != null && useProxy.equals("true");
286: }
287:
288: public void setReceiverUseProxy(boolean useProxy) {
289: setAttribute(FTP_RECEIVER_USEPROXY_PROPERTY,
290: FTPAttribute.FTP_RECEIVER_USEPROXY_PROPERTY,
291: useProxy ? "true" : "false");
292: }
293:
294: public String getReceiverProxyURL() {
295: return getAttribute(FTPAttribute.FTP_RECEIVER_PROXY_PROPERTY);
296: }
297:
298: public void setReceiverProxyURL(String proxyURL) {
299: setAttribute(FTP_RECEIVER_PROXY_PROPERTY,
300: FTPAttribute.FTP_RECEIVER_PROXY_PROPERTY, proxyURL);
301: }
302:
303: public boolean getReceiverUsePassive() {
304: String usePassive = getAttribute(FTPAttribute.FTP_RECEIVER_USEPASSIVE_PROPERTY);
305: return usePassive != null && usePassive.equals("true");
306: }
307:
308: public void setReceiverUsePassive(boolean usePassive) {
309: setAttribute(FTP_RECEIVER_USEPASSIVE_PROPERTY,
310: FTPAttribute.FTP_RECEIVER_USEPASSIVE_PROPERTY,
311: usePassive ? "true" : "false");
312: }
313:
314: public boolean getMessageCorrelateEnabled() {
315: String s = getAttribute(FTPAttribute.FTP_MSG_CORRELATE_PROPERTY);
316: return s != null && s.equals("true");
317: }
318:
319: public void setMessageCorrelateEnabled(boolean b) {
320: setAttribute(FTP_MSG_CORRELATE_PROPERTY,
321: FTPAttribute.FTP_MSG_CORRELATE_PROPERTY, b ? "true"
322: : "false");
323: }
324:
325: }
|