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.wsdlextensions.ftp.FTPMessage;
023: import java.util.Collection;
024: import org.netbeans.modules.xml.wsdl.model.Binding;
025: import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
026: import org.netbeans.modules.xml.wsdl.model.WSDLModel;
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 FTPMessageImpl extends FTPComponentImpl implements
035: FTPMessage {
036:
037: public FTPMessageImpl(WSDLModel model, Element e) {
038: super (model, e);
039: }
040:
041: public FTPMessageImpl(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 getPart() {
069: return getAttribute(FTPAttribute.FTP_PART_PROPERTY);
070: }
071:
072: public void setPart(String part) {
073: setAttribute(FTP_PART_PROPERTY, FTPAttribute.FTP_PART_PROPERTY,
074: part);
075: }
076:
077: public String getEncodingStyle() {
078: return getAttribute(FTPAttribute.FTP_ENCODINGSTYLE_PROPERTY);
079: }
080:
081: public void setEncodingStyle(String encodingStyle) {
082: setAttribute(FTP_ENCODINGSTYLE_PROPERTY,
083: FTPAttribute.FTP_ENCODINGSTYLE_PROPERTY, encodingStyle);
084: }
085:
086: public String getMessageRepository() {
087: return getAttribute(FTPAttribute.FTP_SYMETRIC_MSG_REPO_PROPERTY);
088: }
089:
090: public void setMessageRepository(String s) {
091: setAttribute(FTP_SYMETRIC_MSG_REPO_PROPERTY,
092: FTPAttribute.FTP_SYMETRIC_MSG_REPO_PROPERTY, s);
093: }
094:
095: public boolean getArchiveEnabled() {
096: String s = getAttribute(FTPAttribute.FTP_ARCHIVE_ENABLED_PROPERTY);
097: return s != null && s.equals("true");
098: }
099:
100: public void setArchiveEnabled(boolean b) {
101: setAttribute(FTP_ARCHIVE_ENABLED_PROPERTY,
102: FTPAttribute.FTP_ARCHIVE_ENABLED_PROPERTY, b ? "true"
103: : "false");
104: }
105:
106: public boolean getProtectEnabled() {
107: String s = getAttribute(FTPAttribute.FTP_PROTECT_ENABLED_PROPERTY);
108: return s != null && s.equals("true");
109: }
110:
111: public void setProtectEnabled(boolean b) {
112: setAttribute(FTP_PROTECT_ENABLED_PROPERTY,
113: FTPAttribute.FTP_PROTECT_ENABLED_PROPERTY, b ? "true"
114: : "false");
115: }
116:
117: public boolean getMessageCorrelateEnabled() {
118: String s = getAttribute(FTPAttribute.FTP_MSG_CORRELATE_PROPERTY);
119: return s != null && s.equals("true");
120: }
121:
122: public void setMessageCorrelateEnabled(boolean b) {
123: setAttribute(FTP_MSG_CORRELATE_PROPERTY,
124: FTPAttribute.FTP_MSG_CORRELATE_PROPERTY, b ? "true"
125: : "false");
126: }
127:
128: public String getMessageName() {
129: return getAttribute(FTPAttribute.FTP_SYMETRIC_MSG_NAME_PROPERTY);
130: }
131:
132: public void setMessageName(String s) {
133: setAttribute(FTP_SYMETRIC_MSG_NAME_PROPERTY,
134: FTPAttribute.FTP_SYMETRIC_MSG_NAME_PROPERTY, s);
135: }
136:
137: public String getMessageNamePrefixIB() {
138: return getAttribute(FTPAttribute.FTP_SYMETRIC_MSG_NAME_PREFIX_IB_PROPERTY);
139: }
140:
141: public void setMessageNamePrefixIB(String s) {
142: setAttribute(FTP_SYMETRIC_MSG_NAME_PREFIX_IB_PROPERTY,
143: FTPAttribute.FTP_SYMETRIC_MSG_NAME_PREFIX_IB_PROPERTY,
144: s);
145: }
146:
147: public String getMessageNamePrefixOB() {
148: return getAttribute(FTPAttribute.FTP_SYMETRIC_MSG_NAME_PREFIX_OB_PROPERTY);
149: }
150:
151: public void setMessageNamePrefixOB(String s) {
152: setAttribute(FTP_SYMETRIC_MSG_NAME_PREFIX_OB_PROPERTY,
153: FTPAttribute.FTP_SYMETRIC_MSG_NAME_PREFIX_OB_PROPERTY,
154: s);
155: }
156:
157: public boolean getStagingEnabled() {
158: String s = getAttribute(FTPAttribute.FTP_STAGING_ENABLED_PROPERTY);
159: return s != null && s.equals("true");
160: }
161:
162: public void setStagingEnabled(boolean b) {
163: setAttribute(FTP_STAGING_ENABLED_PROPERTY,
164: FTPAttribute.FTP_STAGING_ENABLED_PROPERTY, b ? "true"
165: : "false");
166: }
167: }
|