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 org.netbeans.modules.xml.wsdl.model.WSDLModel;
023: import org.netbeans.modules.wsdlextensions.ftp.FTPAddress;
024: import org.netbeans.modules.wsdlextensions.ftp.FTPComponent;
025: import org.netbeans.modules.wsdlextensions.ftp.FTPQName;
026: import org.w3c.dom.Element;
027:
028: /**
029: */
030: public class FTPAddressImpl extends FTPComponentImpl implements
031: FTPAddress {
032: public FTPAddressImpl(WSDLModel model, Element e) {
033: super (model, e);
034: }
035:
036: public FTPAddressImpl(WSDLModel model) {
037: this (model, createPrefixedElement(FTPQName.ADDRESS.getQName(),
038: model));
039: }
040:
041: public void accept(FTPComponent.Visitor visitor) {
042: visitor.visit(this );
043: }
044:
045: public void setFTPURL(String ftpURL) {
046: setAttribute(FTPAddress.FTP_URL_PROPERTY,
047: FTPAttribute.FTP_URL_PROPERTY, ftpURL);
048: }
049:
050: public String getFTPURL() {
051: return getAttribute(FTPAttribute.FTP_URL_PROPERTY);
052: }
053:
054: public String getDirListStyle() {
055: return getAttribute(FTPAttribute.FTP_DIRLSTSTYLE_PROPERTY);
056: }
057:
058: public void setDirListStyle(String style) {
059: setAttribute(FTP_DIRLSTSTYLE_PROPERTY,
060: FTPAttribute.FTP_DIRLSTSTYLE_PROPERTY, style);
061: }
062:
063: public String getUserDefDirListStyle() {
064: return getAttribute(FTPAttribute.FTP_UD_DIRLSTSTYLE_PROPERTY);
065: }
066:
067: public void setUserDefDirListStyle(String style) {
068: setAttribute(FTP_UD_DIRLSTSTYLE_PROPERTY,
069: FTPAttribute.FTP_UD_DIRLSTSTYLE_PROPERTY, style);
070: }
071:
072: public String getUserDefDirListHeuristics() {
073: return getAttribute(FTPAttribute.FTP_UD_HEURISTICS_PROPERTY);
074: }
075:
076: public void setUserDefDirListHeuristics(String heuristicsLoc) {
077: setAttribute(FTP_UD_HEURISTICS_PROPERTY,
078: FTPAttribute.FTP_UD_HEURISTICS_PROPERTY, heuristicsLoc);
079: }
080:
081: public String getTrnasferMode() {
082: return getAttribute(FTPAttribute.FTP_TRANSMODE_PROPERTY);
083: }
084:
085: public void setTransferMode(String mode) {
086: setAttribute(FTP_TRANSMODE_PROPERTY,
087: FTPAttribute.FTP_TRANSMODE_PROPERTY, mode);
088: }
089:
090: public boolean getUseUserDefinedHeuristics() {
091: String heuristic = getAttribute(FTPAttribute.FTP_USE_UD_HEURISTICS_PROPERTY);
092: return heuristic != null && heuristic.equals("true");
093: }
094:
095: public void setUseUserDefinedHeuristics(boolean useUserDefined) {
096: setAttribute(FTP_USE_UD_HEURISTICS_PROPERTY,
097: FTPAttribute.FTP_USE_UD_HEURISTICS_PROPERTY,
098: useUserDefined ? "true" : "false");
099: }
100:
101: public String getCmdChannelTimeout() {
102: return getAttribute(FTPAttribute.FTP_CMD_CH_TIMEOUT_PROPERTY);
103: }
104:
105: public void setCmdChannelTimeout(String s) {
106: setAttribute(FTP_CMD_CH_TIMEOUT_PROPERTY,
107: FTPAttribute.FTP_CMD_CH_TIMEOUT_PROPERTY, s);
108: }
109:
110: public String getDataChannelTimeout() {
111: return getAttribute(FTPAttribute.FTP_DATA_CH_TIMEOUT_PROPERTY);
112: }
113:
114: public void setDataChannelTimeout(String s) {
115: setAttribute(FTP_DATA_CH_TIMEOUT_PROPERTY,
116: FTPAttribute.FTP_DATA_CH_TIMEOUT_PROPERTY, s);
117: }
118:
119: }
|