Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/RuntimeCollective/content/bean/Content.java


1   /* $Header: /home/CVS/rjp/src/com/RuntimeCollective/content/bean/Content.java,v 1.7 2003/09/30 15:12:46 joe Exp $
2    * $Revision: 1.7 $
3    * $Date: 2003/09/30 15:12:46 $
4    *
5    * ====================================================================
6    *
7    * Josephine : http://www.runtime-collective.com/josephine/index.html
8    *
9    * Copyright (C) 2003 Runtime Collective
10   * 
11   * This product includes software developed by the
12   * Apache Software Foundation (http://www.apache.org/).
13   *
14   * This library is free software; you can redistribute it and/or
15   * modify it under the terms of the GNU Lesser General Public
16   * License as published by the Free Software Foundation; either
17   * version 2.1 of the License, or (at your option) any later version.
18   *
19   * This library is distributed in the hope that it will be useful,
20   * but WITHOUT ANY WARRANTY; without even the implied warranty of
21   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22   * Lesser General Public License for more details.
23   *
24   * You should have received a copy of the GNU Lesser General Public
25   * License along with this library; if not, write to the Free Software
26   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27   *
28   */
29  
30  package com.RuntimeCollective.content.bean;
31  
32  import com.RuntimeCollective.webapps.bean.EntityBean;
33  import com.RuntimeCollective.webapps.bean.Duplicable;
34  import com.RuntimeCollective.webapps.bean.User;
35  
36  import java.sql.SQLException;
37  import java.util.Date;
38  
39  /**
40   * Interface to implement if you want an object to be considerable as a piece of content.
41   * Typical subclasses: TextComponent, Image.
42   *
43   * @version $Id: Content.java,v 1.7 2003/09/30 15:12:46 joe Exp $
44   */
45  public interface Content extends EntityBean, Duplicable {
46  
47      // ---Inherited from EntityBean---------------------------
48  
49      /** The name of the database table for this bean type. */
50      public static final String DATABASE_TABLE = "content_content";
51  
52      //---Content specific methods---------------------
53  
54      /** Set the author */
55      public void setAuthor(User author);
56  
57      /** Get the author */
58      public User getAuthor();
59  
60      /** Set the creation date bean */
61      public void setCreationDate(Date date);
62  
63      /** Get the creation date bean */
64      public Date getCreationDate();
65  
66      /** Set the last modified date bean */
67      public void setLastModifiedDate(Date date);
68  
69      /** Get the last modified date bean */
70      public Date getLastModifiedDate();
71  
72      /** Set the last modifier user */
73      public void setLastModifierUser(User user);
74  
75      /** Get the last modifier user */
76      public User getLastModifierUser();
77  
78      /** Get the title
79       * The title will be extracted from sub-class specific information,
80       * for example from the caption of an image, or the first line of
81       * an abstract. The title will be in plain text format.
82       *
83       * This is a commodity method useful when displaying lists of contents.
84       */
85      public String getTitle();
86  
87      /** Set the title
88       * This method *may* set the title of the Content.
89       * Some implementations may automatically extract the title
90       * from the content, so this method may not be effective.
91       */
92      public void setTitle(String title);
93  
94      /** Get the description
95       * The description will be extracted from sub-class specific information,
96       * for example from the caption of an image, or the first line of
97       * an abstract. The title will be in plain text format.
98       *
99       * This is a commodity method useful when displaying lists of contents.
100      */
101     public String getDescription();
102 
103     /** Set the description
104      * This method *may* set the description of the Content.
105      * Some implementations may automatically extract the description
106      * from the content, so this method may not be effective.
107      */
108     public void setDescription(String description);
109 
110     /** Get the content in a certain format
111      * This most important method will return a view of the content,
112      * under the specified format.
113      *
114      * For now, formats will be unconstrained. We only expect to use "html".
115      * In the future we can set up a global list of formats, and for each
116      * content subclass a list of the formats it supports.
117      * Each format would also specify what type it returns (for "html",
118      * it is "String").
119      */
120     public Object viewFormat(String format);
121 }
122 
123 
124 
125