java.lang.Object
com.RuntimeCollective.content.bean.SimpleContent
com.RuntimeCollective.content.bean.TextComponent
com.RuntimeCollective.bboard.bean.SimpleBoard
com.RuntimeCollective.bboard.bean.PermissibleBoard
- All Implemented Interfaces:
- Board, com.RuntimeCollective.content.bean.Content, com.RuntimeCollective.webapps.bean.Duplicable, com.RuntimeCollective.webapps.bean.EntityBean, com.RuntimeCollective.permission.bean.Permissible, com.RuntimeCollective.webapps.bean.PermissionBean, java.io.Serializable
- public class PermissibleBoard
- extends SimpleBoard
- implements com.RuntimeCollective.permission.bean.Permissible
A special BBoard on which users must have special permissions to be able to read
and/or write messages.
- Version:
- $Id: PermissibleBoard.java,v 1.13 2003/09/30 15:12:43 joe Exp $
|
Constructor Summary |
PermissibleBoard()
Construct a new blank PermissibleBoard, giving it a new unique ID. |
PermissibleBoard(int id)
Get a current PermissibleBoard from the RuntimeDataSource, given an id. |
|
Method Summary |
boolean |
canEdit(com.RuntimeCollective.webapps.bean.User user)
Can a user "edit" this Bean. |
boolean |
canPerformAction(java.lang.String action,
com.RuntimeCollective.webapps.bean.User user)
Can a given User perform a given action on that Bean? |
boolean |
canView(com.RuntimeCollective.webapps.bean.User user)
Can a user "view" this Bean. |
void |
delete()
Delete this bean from the database. |
com.RuntimeCollective.permission.bean.PermissionRule |
getActionPermissionRule(java.lang.String action)
Get the PermissionRule for a given action on this Bean. |
java.util.Iterator |
getActions()
Get an Iterator of the actions constrained until now. |
java.lang.String |
getAuthorisationPathForAction(java.lang.String action,
javax.servlet.http.HttpSession session,
java.lang.String returnPath)
Deprecated. This method was modified not to refer to Client Tier classes (HttpSession). Use instead:
getAuthorisationPathForAction(action, (User) session.getAttribute(RuntimeParameters.get("logonUserKey")), (Session) session.getAttribute(Session.SESSION_KEY), new HttpSessionReturnPathContainer(session), returnPath) |
java.lang.String |
getAuthorisationPathForAction(java.lang.String action,
com.RuntimeCollective.webapps.bean.User user,
com.RuntimeCollective.webapps.bean.Session session,
com.RuntimeCollective.webapps.ReturnPathContainer rpContainer,
java.lang.String returnPath)
Get the path of the page where a User should be sent in order
to (maybe) get authorised for an action. |
com.RuntimeCollective.permission.bean.SimplePermissible |
getSimplePermissible()
Get the SimplePermissible |
void |
save()
Save this bean to the database. |
void |
setActionPermissionRule(java.lang.String action,
com.RuntimeCollective.permission.bean.PermissionRule permissionRule)
Set the PermissionRule for a given action on this Bean. |
void |
setSimplePermissible(com.RuntimeCollective.permission.bean.SimplePermissible simplePermissible)
Set the SimplePermissible |
| Methods inherited from class com.RuntimeCollective.bboard.bean.SimpleBoard |
addTopic, approveAll, archive, deleteTopics, getDescription, getDescription, getFaq, getIndexedTopics, getLastUpdated, getNumTopics, getOpen, getTopicList, getTopicListByMessageDate, getTopics, hasUnread, removeTopic, setDescription, setDescription, setOpen |
| Methods inherited from class com.RuntimeCollective.content.bean.SimpleContent |
customiseDuplicate, getAuthor, getCreationDate, getId, getLastModifiedDate, getLastModifierUser, makeDuplicate, makeDuplicate, setAuthor, setCreationDate, setId, setLastModifiedDate, setLastModifierUser |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.RuntimeCollective.content.bean.Content |
getAuthor, getCreationDate, getLastModifiedDate, getLastModifierUser, getTitle, setAuthor, setCreationDate, setLastModifiedDate, setLastModifierUser, setTitle, viewFormat |
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
SimplePermissibleId
protected int SimplePermissibleId
- The SimplePermissible
PermissibleBoard
public PermissibleBoard()
throws java.sql.SQLException
- Construct a new blank PermissibleBoard, giving it a new unique ID.
PermissibleBoard
public PermissibleBoard(int id)
throws java.sql.SQLException
- Get a current PermissibleBoard from the RuntimeDataSource, given an id.
save
public void save()
- Save this bean to the database.
We assume this bean's PermissionRules have already been saved.
- Specified by:
save in interface com.RuntimeCollective.permission.bean.Permissible- Overrides:
save in class SimpleBoard
delete
public void delete()
- Delete this bean from the database.
- Specified by:
delete in interface com.RuntimeCollective.permission.bean.Permissible- Overrides:
delete in class SimpleBoard
canEdit
public boolean canEdit(com.RuntimeCollective.webapps.bean.User user)
- Can a user "edit" this Bean.
- Specified by:
canEdit in interface com.RuntimeCollective.permission.bean.Permissible- Overrides:
canEdit in class SimpleBoard
canView
public boolean canView(com.RuntimeCollective.webapps.bean.User user)
- Can a user "view" this Bean.
- Specified by:
canView in interface com.RuntimeCollective.permission.bean.Permissible- Overrides:
canView in class SimpleBoard
setActionPermissionRule
public void setActionPermissionRule(java.lang.String action,
com.RuntimeCollective.permission.bean.PermissionRule permissionRule)
- Set the PermissionRule for a given action on this Bean.
- Specified by:
setActionPermissionRule in interface com.RuntimeCollective.permission.bean.Permissible
getActionPermissionRule
public com.RuntimeCollective.permission.bean.PermissionRule getActionPermissionRule(java.lang.String action)
- Get the PermissionRule for a given action on this Bean.
- Specified by:
getActionPermissionRule in interface com.RuntimeCollective.permission.bean.Permissible
canPerformAction
public boolean canPerformAction(java.lang.String action,
com.RuntimeCollective.webapps.bean.User user)
- Can a given User perform a given action on that Bean?
- Specified by:
canPerformAction in interface com.RuntimeCollective.permission.bean.Permissible
getAuthorisationPathForAction
public java.lang.String getAuthorisationPathForAction(java.lang.String action,
javax.servlet.http.HttpSession session,
java.lang.String returnPath)
- Deprecated. This method was modified not to refer to Client Tier classes (HttpSession). Use instead:
getAuthorisationPathForAction(action, (User) session.getAttribute(RuntimeParameters.get("logonUserKey")), (Session) session.getAttribute(Session.SESSION_KEY), new HttpSessionReturnPathContainer(session), returnPath)
- Get the path of the page where the session should be sent in order
to (maybe) get authorised to perform the specified action.
On submission of that page, the session should be checked again,
as there may be more than one page to go to.
- Specified by:
getAuthorisationPathForAction in interface com.RuntimeCollective.permission.bean.Permissible
getAuthorisationPathForAction
public java.lang.String getAuthorisationPathForAction(java.lang.String action,
com.RuntimeCollective.webapps.bean.User user,
com.RuntimeCollective.webapps.bean.Session session,
com.RuntimeCollective.webapps.ReturnPathContainer rpContainer,
java.lang.String returnPath)
- Get the path of the page where a User should be sent in order
to (maybe) get authorised for an action.
On submission of that resulting page, the user should be checked again,
as there may be more than one page to go to before he/she is authorised.
- Specified by:
getAuthorisationPathForAction in interface com.RuntimeCollective.permission.bean.Permissible
getActions
public java.util.Iterator getActions()
- Get an Iterator of the actions constrained until now.
- Specified by:
getActions in interface com.RuntimeCollective.permission.bean.Permissible
setSimplePermissible
public void setSimplePermissible(com.RuntimeCollective.permission.bean.SimplePermissible simplePermissible)
- Set the SimplePermissible
getSimplePermissible
public com.RuntimeCollective.permission.bean.SimplePermissible getSimplePermissible()
- Get the SimplePermissible