View Javadoc

1   /*
2    * Copyright 2004 Sun Microsystems, Inc.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   *
16   */
17  package com.sun.syndication.feed.synd;
18  
19  import com.sun.syndication.common.ToString;
20  import com.sun.syndication.common.CopyFrom;
21  
22  
23  /***
24   * Bean interface for content of SyndFeedImpl entries.
25   * <p>
26   * @author Alejandro Abdelnur
27   *
28   */
29  public interface SyndContent extends ToString,Cloneable,CopyFrom {
30      /***
31       * Returns the content type.
32       * <p>
33       * When used for the description of an entry, if <b>null</b> 'text/plain' must be assumed.
34       * <p>
35       * @return the content type, <b>null</b> if none.
36       *
37       */
38      String getType();
39  
40      /***
41       * Sets the content type.
42       * <p>
43       * When used for the description of an entry, if <b>null</b> 'text/plain' must be assumed.
44       * <p>
45       * @param type the content type to set, <b>null</b> if none.
46       *
47       */
48      void setType(String type);
49  
50      /***
51       * Returns the content value.
52       * <p>
53       * @return the content value, <b>null</b> if none.
54       *
55       */
56      String getValue();
57  
58      /***
59       * Sets the content value.
60       * <p>
61       * @param value the content value to set, <b>null</b> if none.
62       *
63       */
64      void setValue(String value);
65  
66      /***
67       * Creates a deep clone of the object.
68       * <p>
69       * @return a clone of the object.
70       * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
71       *
72       */
73      public Object clone() throws CloneNotSupportedException;
74  
75  }