001: /*
002: * Copyright 2004 Sun Microsystems, Inc.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: *
016: */
017: package com.sun.syndication.feed.rss;
018:
019: import com.sun.syndication.feed.impl.ObjectBean;
020:
021: import java.io.Serializable;
022:
023: /**
024: * Bean for clouds of RSS feeds.
025: * <p>
026: * @author Alejandro Abdelnur
027: *
028: */
029: public class Cloud implements Cloneable, Serializable {
030: private ObjectBean _objBean;
031: private String _domain;
032: private int _port;
033: private String _path;
034: private String _registerProcedure;
035: private String _protocol;
036:
037: /**
038: * Default constructor. All properties are set to <b>null</b>.
039: * <p>
040: *
041: */
042: public Cloud() {
043: _objBean = new ObjectBean(this .getClass(), this );
044: }
045:
046: /**
047: * Creates a deep 'bean' clone of the object.
048: * <p>
049: * @return a clone of the object.
050: * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
051: *
052: */
053: public Object clone() throws CloneNotSupportedException {
054: return _objBean.clone();
055: }
056:
057: /**
058: * Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
059: * <p>
060: * @param other he reference object with which to compare.
061: * @return <b>true</b> if 'this' object is equal to the 'other' object.
062: *
063: */
064: public boolean equals(Object other) {
065: return _objBean.equals(other);
066: }
067:
068: /**
069: * Returns a hashcode value for the object.
070: * <p>
071: * It follows the contract defined by the Object hashCode() method.
072: * <p>
073: * @return the hashcode of the bean object.
074: *
075: */
076: public int hashCode() {
077: return _objBean.hashCode();
078: }
079:
080: /**
081: * Returns the String representation for the object.
082: * <p>
083: * @return String representation for the object.
084: *
085: */
086: public String toString() {
087: return _objBean.toString();
088: }
089:
090: /**
091: * Returns the cloud domain.
092: * <p>
093: * @return the cloud domain, <b>null</b> if none.
094: *
095: */
096: public String getDomain() {
097: return _domain;
098: }
099:
100: /**
101: * Sets the cloud domain.
102: * <p>
103: * @param domain the cloud domain to set, <b>null</b> if none.
104: *
105: */
106: public void setDomain(String domain) {
107: _domain = domain;
108: }
109:
110: /**
111: * Returns the cloud port.
112: * <p>
113: * @return the cloud port, <b>null</b> if none.
114: *
115: */
116: public int getPort() {
117: return _port;
118: }
119:
120: /**
121: * Sets the cloud port.
122: * <p>
123: * @param port the cloud port to set, <b>null</b> if none.
124: *
125: */
126: public void setPort(int port) {
127: _port = port;
128: }
129:
130: /**
131: * Returns the cloud path.
132: * <p>
133: * @return the cloud path, <b>null</b> if none.
134: *
135: */
136: public String getPath() {
137: return _path;
138: }
139:
140: /**
141: * Sets the cloud path.
142: * <p>
143: * @param path the cloud path to set, <b>null</b> if none.
144: *
145: */
146: public void setPath(String path) {
147: _path = path;
148: }
149:
150: /**
151: * Returns the cloud register procedure.
152: * <p>
153: * @return the cloud register procedure, <b>null</b> if none.
154: *
155: */
156: public String getRegisterProcedure() {
157: return _registerProcedure;
158: }
159:
160: /**
161: * Sets the cloud register procedure.
162: * <p>
163: * @param registerProcedure the cloud register procedure to set, <b>null</b> if none.
164: *
165: */
166: public void setRegisterProcedure(String registerProcedure) {
167: _registerProcedure = registerProcedure;
168: }
169:
170: /**
171: * Returns the cloud protocol.
172: * <p>
173: * @return the cloud protocol, <b>null</b> if none.
174: *
175: */
176: public String getProtocol() {
177: return _protocol;
178: }
179:
180: /**
181: * Sets the cloud protocol.
182: * <p>
183: * @param protocol the cloud protocol to set, <b>null</b> if none.
184: *
185: */
186: public void setProtocol(String protocol) {
187: _protocol = protocol;
188: }
189:
190: }
|