View Javadoc

1   /*
2    * Copyright 2000-2004 The Apache Software Foundation.
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  package org.apache.portals.graffito.model;
17  
18  
19  /***
20   * CMS Document interface.
21   *
22   * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
23   * 
24   * @version $Id: Document.java,v 1.1 2004/12/22 21:16:11 christophe Exp $
25   */
26  public interface Document extends CmsObject, Cloneable
27  {
28          
29      /***
30      * Get the content type of this document
31      *
32      * @return String representation of the document's type
33      */
34      String getContentType();
35  
36      /***
37      * Set the content type for this document
38      *
39      * @param type the new document type
40      */
41      void setContentType(String type);
42      
43      /***
44       * Get the size of the document
45       * 
46       * @return long
47       */
48      long getSize();
49  
50      /***
51       * Set the size of the document
52       * @param size the size to set
53       */
54      void setSize(long size);
55      
56      /***
57       * Set the language code using ISO-639 abbreviation
58       * 
59       * @return the language code abbreviation
60       */
61      String getLanguage();
62      
63      /***
64       * Get the language code using ISO-639 abbreviation
65       * 
66       * @param language code abbreviation
67       */
68      void setLanguage(String language);
69      
70      /***
71       * Gets the name of the owner of this document
72       * 
73       * @return the owner name
74       */
75      String getOwner();
76      
77      /***
78       * Sets the owner of this document
79       * 
80       * @param owner
81       */
82      void setOwner(String owner);
83   
84      /***
85       * Get the content of this document
86       * 
87       * @return the document content
88       */
89      Content getContent();
90      
91      /***
92       * Sets the content of this document
93       * 
94       * @param content the document content
95       */
96      void setContent(Content content);
97      
98      /***
99       *  Clone the document object
100      *  @return the new clone instante created
101      */
102     Object clone();
103 }