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

Quick Search    Search Deep

Source code: com/RuntimeCollective/sitemap/bean/Publishable.java


1   /* $Header: /home/CVS/rjp/src/com/RuntimeCollective/sitemap/bean/Publishable.java,v 1.12 2003/09/30 15:12:59 joe Exp $
2    * $Revision: 1.12 $
3    * $Date: 2003/09/30 15:12:59 $
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.sitemap.bean;
31  
32  import com.RuntimeCollective.permission.bean.Permissible;
33  import com.RuntimeCollective.permission.bean.PermissionRule;
34  import com.RuntimeCollective.webapps.bean.DateBean;
35  import com.RuntimeCollective.webapps.bean.User;
36  
37  import java.util.Iterator;
38  import java.util.Date;
39  
40  /**
41   * Interface to implement if you want an object to be publishable, ie sometimes live and sometimes dead.
42   * <p>
43   * If you want to be spared the hassle of writing JSPs for the publishing of your Publishable objects,
44   * do have a look at the pages written for the Sussex Enterprise project. You can find them by
45   * checking out the relevent project: "cvs co rsework", then look in rsework/web/admin.
46   * <p>
47   * The pages are called publishPageXXX.jsp. They should be pretty self-explanatory.
48   * The rsework/struts-config.xml file is also worth checking, for the action mappings etc.
49   * <p>
50   * And while you're at it, why not vanilla them and copy them to sitemap/web/admin ...
51   * <p>
52   * You can also check the Sussex Enterprise staging server (ask Fabrice, JoeH or Sophie).
53   *
54   * @version $Id: Publishable.java,v 1.12 2003/09/30 15:12:59 joe Exp $
55   */
56  public interface Publishable extends Permissible {
57  
58      // EntityBean specific
59  
60      /** The name of the database table for this bean type. */
61      public static final String DATABASE_TABLE = "sitemap_publishable";
62  
63      /** Special save method which only saves the necessary data when archiving the publishable.
64       * This supposes the object has been already saved.
65       */
66      public void saveArchivedData();
67  
68  
69      // Publishable specific
70  
71      /** Set the date bean when the object will go live */
72      public void setGoLiveDate(Date date);
73  
74      /** Get the date bean when the object will go live */
75      public Date getGoLiveDate();
76  
77      /** Set the date bean when the object will go dead */
78      public void setGoDeadDate(Date date);
79  
80      /** Get the date bean when the object will go dead */
81      public Date getGoDeadDate();
82  
83      /** Publish this object on (only) one SiteLocation */
84      public void publish(Date liveDate, Date deadDate);
85  
86      /** Set whether the object will be always approved */
87      public void setNeedApproval(boolean bool);
88  
89      /** Get whether the object will be always approved */
90      public boolean getNeedApproval();
91  
92      /** Get whether the object will be always approved */
93      public boolean needsApproval();
94  
95      /** Set whether the object will be always live */
96      public void setAlwaysLive(boolean bool);
97  
98      /** Get whether the object will be always live */
99      public boolean getAlwaysLive();
100 
101     /** Get whether the object will be always live */
102     public boolean isAlwaysLive();
103 
104     /** Check whether the object is live right now */
105     public boolean isLive();
106 
107     /** Set the status of this Publishable */
108     public void setStatus(String status);
109 
110     /** Get the status of this Publishable */
111     public String getStatus();
112 
113     /** Set the date of the last status modificatin of this Publishable */
114     public void setStatusLastModifiedDate(Date date);
115 
116     /** Get the date of the last status modificatin of this Publishable */
117     public Date getStatusLastModifiedDate();
118 
119     /** Possible statuses */
120     public static final String STATUS_EDITED = "edited";
121     public static final String STATUS_TO_BE_APPROVED = "to_be_approved";
122     public static final String STATUS_APPROVED = "approved";
123     public static final String STATUS_ARCHIVED = "archived";
124 
125     /** Set/Check for possible statuses */
126     public boolean isEdited();
127     public boolean isToBeApproved();
128     public boolean isApproved();
129     public boolean isArchived();
130     public void markAsEdited();
131     public void markAsToBeApproved();
132     public void markAsApproved();
133     public void markAsArchived();
134 
135     /** Set whether the object IsNew */
136     public void setIsNew(boolean bool);
137 
138     /** Get whether the object IsNew */
139     public boolean getIsNew();
140 
141     /** Get whether the object IsNew */
142     public boolean isNew();
143 }
144 
145 
146 
147