|
|||||||||
| Home >> All >> com >> RuntimeCollective >> sitemap >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.RuntimeCollective.sitemap.bean
Class SimplePublishable

java.lang.Objectcom.RuntimeCollective.permission.bean.SimplePermissible
com.RuntimeCollective.sitemap.bean.SimplePublishable
- All Implemented Interfaces:
- com.RuntimeCollective.webapps.bean.EntityBean, com.RuntimeCollective.permission.bean.Permissible, com.RuntimeCollective.webapps.bean.PermissionBean, Publishable, java.io.Serializable
- Direct Known Subclasses:
- SimpleSiteLocation
- public class SimplePublishable
- extends com.RuntimeCollective.permission.bean.SimplePermissible
- implements Publishable
- extends com.RuntimeCollective.permission.bean.SimplePermissible
A commodity class which implements all the basic functionality of Publishable, so we can spare duplicating lots of simple code.
It also now reuses SimplePermissible, to let you constrain the access to Publishable items.
This class should be subclassed to add more functionality.
- Version:
- $Id: SimplePublishable.java,v 1.21 2003/09/30 15:12:59 joe Exp $
| Field Summary | |
protected boolean |
AlwaysLive
Is the object always live, thus ignoring GoLive and GoDead dates ? |
static java.lang.String |
AND_STATUS
|
static java.lang.String |
DATABASE_TABLE
The name of the database table for this bean type. |
static java.lang.String |
ESC
|
protected java.util.Date |
GoDeadDate
When the object goes dead |
protected java.util.Date |
GoLiveDate
When the object goes live |
protected boolean |
IsNew
Is the object New ? |
protected boolean |
NeedApproval
Whether the object need to be approved before going live. |
static java.lang.String |
ORDER_BY_LAST_MOD_DATE
|
static java.lang.String |
SELECT_ID_FROM
|
protected java.lang.String |
Status
The status of this Publishable |
protected java.util.Date |
StatusLastModifiedDate
When the object goes live |
static java.lang.String |
WHERE_ALWAYS_LIVE
|
| Fields inherited from class com.RuntimeCollective.permission.bean.SimplePermissible |
DATABASE_PRULEMAP_TABLE, id, PermissionRuleIds |
| Fields inherited from interface com.RuntimeCollective.sitemap.bean.Publishable |
STATUS_APPROVED, STATUS_ARCHIVED, STATUS_EDITED, STATUS_TO_BE_APPROVED |
| Fields inherited from interface com.RuntimeCollective.permission.bean.Permissible |
EDIT_ACTION, VIEW_ACTION |
| Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean |
INTERFACE_BEAN, NULL_ID |
| Constructor Summary | |
SimplePublishable()
Construct a new blank SimplePublishable, giving it a new unique ID. |
|
SimplePublishable(int id)
Get a current SimplePublishable from the RuntimeDataSource, given an id. |
|
| Method Summary | |
void |
checkStillApproved()
|
void |
delete()
Delete this bean from the database. |
boolean |
getAlwaysLive()
Get whether the object will be always live |
java.util.Date |
getGoDeadDate()
Get the date bean when the object will go dead |
java.util.Date |
getGoLiveDate()
Get the date bean when the object will go live |
boolean |
getIsNew()
Get whether the object IsNew |
boolean |
getNeedApproval()
Get whether the object will be always approved |
java.lang.String |
getStatus()
Get the status of this Publishable |
java.util.Date |
getStatusLastModifiedDate()
Get the date bean when the object will go live |
static java.util.List |
getToBeApprovedPublishables()
Get a list of all the publishables which are to be approved, ordered by lastModifiedDate (older first). |
boolean |
isAlwaysLive()
Get whether the object will be always live |
boolean |
isApproved()
|
boolean |
isArchived()
|
boolean |
isEdited()
Set/Check for possible statuses |
boolean |
isLive()
Check whether the object is live right now |
boolean |
isNew()
Get whether the object IsNew |
boolean |
isToBeApproved()
|
void |
markAsApproved()
|
void |
markAsArchived()
|
void |
markAsEdited()
|
void |
markAsToBeApproved()
|
boolean |
needsApproval()
Get whether the object will be always approved |
void |
publish(java.util.Date liveDate,
java.util.Date deadDate)
Publish this object on (only) one Publishable |
void |
save()
Save this bean to the database. |
void |
saveArchivedData()
Special save method which only saves the necessary data when archiving the publishable. |
void |
setAlwaysLive(boolean bool)
Set whether the object will be always live |
void |
setGoDeadDate(java.util.Date date)
Set the date bean when the object will go dead |
void |
setGoLiveDate(java.util.Date date)
Set the date bean when the object will go live |
void |
setIsNew(boolean bool)
Set whether the object IsNew |
void |
setNeedApproval(boolean bool)
Set whether the object will be always approved |
void |
setStatus(java.lang.String status)
Set the status of this Publishable |
void |
setStatusLastModifiedDate(java.util.Date date)
Set the date bean when the object will go live |
| Methods inherited from class com.RuntimeCollective.permission.bean.SimplePermissible |
canEdit, canPerformAction, canView, getActionPermissionRule, getActions, getAuthorisationPathForAction, getAuthorisationPathForAction, getId, loadRules, removeActionPermissionRule, saveRules, setActionPermissionRule, setId |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.RuntimeCollective.permission.bean.Permissible |
canEdit, canPerformAction, canView, getActionPermissionRule, getActions, getAuthorisationPathForAction, getAuthorisationPathForAction, getId, setActionPermissionRule, setId |
| Field Detail |
SELECT_ID_FROM
public static final java.lang.String SELECT_ID_FROM
- See Also:
- Constant Field Values
WHERE_ALWAYS_LIVE
public static final java.lang.String WHERE_ALWAYS_LIVE
- See Also:
- Constant Field Values
AND_STATUS
public static final java.lang.String AND_STATUS
- See Also:
- Constant Field Values
ORDER_BY_LAST_MOD_DATE
public static final java.lang.String ORDER_BY_LAST_MOD_DATE
- See Also:
- Constant Field Values
ESC
public static final java.lang.String ESC
- See Also:
- Constant Field Values
DATABASE_TABLE
public static final java.lang.String DATABASE_TABLE
- The name of the database table for this bean type.
- See Also:
- Constant Field Values
GoLiveDate
protected java.util.Date GoLiveDate
- When the object goes live
GoDeadDate
protected java.util.Date GoDeadDate
- When the object goes dead
AlwaysLive
protected boolean AlwaysLive
- Is the object always live, thus ignoring GoLive and GoDead dates ?
NeedApproval
protected boolean NeedApproval
- Whether the object need to be approved before going live.
If not, ignores markAsEdited, markAsToBeApproved,
and setStatus to anything other than STATUS_APPROVED or STATUS_ARCHIVED.
NOTE: Setting needApproval to
falsewill not change the Publishable's status right away. It's possible to setNeedApproval(true), markAsEdited(), then setNeedApproval(false); the Publishable will then be have STATUS_EDITED, but cannot be put back into this state later.
Status
protected java.lang.String Status
- The status of this Publishable
StatusLastModifiedDate
protected java.util.Date StatusLastModifiedDate
- When the object goes live
IsNew
protected boolean IsNew
- Is the object New ?
| Constructor Detail |
SimplePublishable
public SimplePublishable()
- Construct a new blank SimplePublishable, giving it a new unique ID.
SimplePublishable
public SimplePublishable(int id)
- Get a current SimplePublishable from the RuntimeDataSource, given an id.
| Method Detail |
save
public void save()
- Save this bean to the database.
- Specified by:
savein interfacecom.RuntimeCollective.permission.bean.Permissible
saveArchivedData
public void saveArchivedData()
- Special save method which only saves the necessary data when archiving the publishable.
This supposes the object has been already saved.
The saved data is : Status, StatusLastModifiedDate.
- Specified by:
saveArchivedDatain interfacePublishable
delete
public void delete()
- Delete this bean from the database.
- Specified by:
deletein interfacecom.RuntimeCollective.permission.bean.Permissible
setGoLiveDate
public void setGoLiveDate(java.util.Date date)
- Set the date bean when the object will go live
- Specified by:
setGoLiveDatein interfacePublishable
getGoLiveDate
public java.util.Date getGoLiveDate()
- Get the date bean when the object will go live
- Specified by:
getGoLiveDatein interfacePublishable
setGoDeadDate
public void setGoDeadDate(java.util.Date date)
- Set the date bean when the object will go dead
- Specified by:
setGoDeadDatein interfacePublishable
getGoDeadDate
public java.util.Date getGoDeadDate()
- Get the date bean when the object will go dead
- Specified by:
getGoDeadDatein interfacePublishable
publish
public void publish(java.util.Date liveDate, java.util.Date deadDate)
- Publish this object on (only) one Publishable
- Specified by:
publishin interfacePublishable
setAlwaysLive
public void setAlwaysLive(boolean bool)
- Set whether the object will be always live
- Specified by:
setAlwaysLivein interfacePublishable
getAlwaysLive
public boolean getAlwaysLive()
- Get whether the object will be always live
- Specified by:
getAlwaysLivein interfacePublishable
isAlwaysLive
public boolean isAlwaysLive()
- Get whether the object will be always live
- Specified by:
isAlwaysLivein interfacePublishable
setNeedApproval
public void setNeedApproval(boolean bool)
- Set whether the object will be always approved
- Specified by:
setNeedApprovalin interfacePublishable
getNeedApproval
public boolean getNeedApproval()
- Get whether the object will be always approved
- Specified by:
getNeedApprovalin interfacePublishable
needsApproval
public boolean needsApproval()
- Get whether the object will be always approved
- Specified by:
needsApprovalin interfacePublishable
setStatus
public void setStatus(java.lang.String status)
- Set the status of this Publishable
- Specified by:
setStatusin interfacePublishable
getStatus
public java.lang.String getStatus()
- Get the status of this Publishable
- Specified by:
getStatusin interfacePublishable
setStatusLastModifiedDate
public void setStatusLastModifiedDate(java.util.Date date)
- Set the date bean when the object will go live
- Specified by:
setStatusLastModifiedDatein interfacePublishable
getStatusLastModifiedDate
public java.util.Date getStatusLastModifiedDate()
- Get the date bean when the object will go live
- Specified by:
getStatusLastModifiedDatein interfacePublishable
isEdited
public boolean isEdited()
- Set/Check for possible statuses
- Specified by:
isEditedin interfacePublishable
isToBeApproved
public boolean isToBeApproved()
- Specified by:
isToBeApprovedin interfacePublishable
isApproved
public boolean isApproved()
- Specified by:
isApprovedin interfacePublishable
isArchived
public boolean isArchived()
- Specified by:
isArchivedin interfacePublishable
markAsEdited
public void markAsEdited()
- Specified by:
markAsEditedin interfacePublishable
markAsToBeApproved
public void markAsToBeApproved()
- Specified by:
markAsToBeApprovedin interfacePublishable
markAsApproved
public void markAsApproved()
- Specified by:
markAsApprovedin interfacePublishable
markAsArchived
public void markAsArchived()
- Specified by:
markAsArchivedin interfacePublishable
checkStillApproved
public void checkStillApproved()
setIsNew
public void setIsNew(boolean bool)
- Set whether the object IsNew
- Specified by:
setIsNewin interfacePublishable
getIsNew
public boolean getIsNew()
- Get whether the object IsNew
- Specified by:
getIsNewin interfacePublishable
isNew
public boolean isNew()
- Get whether the object IsNew
- Specified by:
isNewin interfacePublishable
isLive
public boolean isLive()
- Check whether the object is live right now
- Specified by:
isLivein interfacePublishable
getToBeApprovedPublishables
public static java.util.List getToBeApprovedPublishables()
- Get a list of all the publishables which are to be approved,
ordered by lastModifiedDate (older first).
|
|||||||||
| Home >> All >> com >> RuntimeCollective >> sitemap >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC