za.org.coefficient.modules.mailforum
Class MailForum
java.lang.Object
za.org.coefficient.modules.BaseModule
za.org.coefficient.modules.BaseNavProjectModule
za.org.coefficient.modules.mailforum.MailForum
- All Implemented Interfaces:
- CoefficientEventPublisher, ModuleLocal
public class MailForum
- extends BaseNavProjectModule
Method Summary |
private void |
addForum(Forum forum,
java.util.HashMap map)
|
private static java.util.Set |
addNotificationLists(java.util.List projectChampionUserList,
Forum forum)
|
private boolean |
canCreateForum(Project currentProject)
This method is used to check the number of forums that
can be created per project |
java.lang.String |
canExecuteForRole(CoefficientContext ctx,
java.lang.String methodName,
Role usersHighestRole)
This is a base implementation that will allow all methods to be
invoked without regard to roles |
private void |
checkAllowPost(CoefficientUser user,
Forum forum,
java.util.HashMap map)
|
CoefficientContext |
conversationList(CoefficientContext ctx)
|
CoefficientContext |
conversationView(CoefficientContext ctx)
|
private java.util.HashMap |
createMap(CoefficientContext ctx)
|
Message |
createMessage(CoefficientContext ctx)
|
CoefficientContext |
deleteAllForProject(CoefficientContext ctx)
|
CoefficientContext |
forumDelete(CoefficientContext ctx)
|
CoefficientContext |
forumEdit(CoefficientContext ctx)
|
CoefficientContext |
forumList(CoefficientContext ctx)
|
CoefficientContext |
forumSaveAction(CoefficientContext ctx)
|
CoefficientContext |
forumSettingsEdit(CoefficientContext ctx)
|
CoefficientContext |
forumSettingsSaveAction(CoefficientContext ctx)
|
CoefficientContext |
forumView(CoefficientContext ctx)
|
private void |
generatePage(java.lang.String page,
CoefficientContext ctx,
java.util.HashMap map)
|
private Forum |
getForum(CoefficientContext ctx,
java.util.HashMap map)
|
static java.util.Collection |
getForumList(Project project)
|
java.lang.String |
getMainMethod()
This method is used to determine which method should be invoked when
the module is requested without an operation. |
java.lang.String |
getModuleDescription()
This method is used to find the description of the module |
java.lang.String |
getModuleDisplayName()
This method is used to find the display name of the module |
private java.lang.Long |
getResourceId(CoefficientContext ctx,
java.util.HashMap map)
|
CoefficientContext |
messageEdit(CoefficientContext ctx)
|
CoefficientContext |
messageSaveAction(CoefficientContext ctx)
|
CoefficientContext |
messageView(CoefficientContext ctx)
|
private java.util.Map |
prepareSettingsForDisplay(java.util.Set settingsKeySet)
|
CoefficientContext |
userForumSubscribeToggleAction(CoefficientContext ctx)
|
CoefficientContext |
userMailPreferencesEdit(CoefficientContext ctx)
|
CoefficientContext |
userMailPreferencesSaveAction(CoefficientContext ctx)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARAM_RESOURCE_URI
public static final java.lang.String PARAM_RESOURCE_URI
- See Also:
- Constant Field Values
PARAM_RESOURCE_ID
public static final java.lang.String PARAM_RESOURCE_ID
- See Also:
- Constant Field Values
PARAM_FORUM_ID
public static final java.lang.String PARAM_FORUM_ID
- See Also:
- Constant Field Values
PARAM_CONVERSATION_ID
public static final java.lang.String PARAM_CONVERSATION_ID
- See Also:
- Constant Field Values
CONVERSATION_PAGER
private static final java.lang.String CONVERSATION_PAGER
- See Also:
- Constant Field Values
roleChanged
private static boolean roleChanged
MailForum
public MailForum()
getModuleDisplayName
public java.lang.String getModuleDisplayName()
- Description copied from interface:
ModuleLocal
- This method is used to find the display name of the module
- Specified by:
getModuleDisplayName
in interface ModuleLocal
- Specified by:
getModuleDisplayName
in class BaseModule
- Returns:
- the display name of the module
getModuleDescription
public java.lang.String getModuleDescription()
- Description copied from interface:
ModuleLocal
- This method is used to find the description of the module
- Specified by:
getModuleDescription
in interface ModuleLocal
- Specified by:
getModuleDescription
in class BaseModule
- Returns:
- the description of the module
getMainMethod
public java.lang.String getMainMethod()
- Description copied from interface:
ModuleLocal
- This method is used to determine which method should be invoked when
the module is requested without an operation.
- Specified by:
getMainMethod
in interface ModuleLocal
- Specified by:
getMainMethod
in class BaseModule
- Returns:
- name of the method that should be invoked
canExecuteForRole
public java.lang.String canExecuteForRole(CoefficientContext ctx,
java.lang.String methodName,
Role usersHighestRole)
- Description copied from class:
BaseModule
- This is a base implementation that will allow all methods to be
invoked without regard to roles
- Specified by:
canExecuteForRole
in interface ModuleLocal
- Overrides:
canExecuteForRole
in class BaseModule
- Returns:
- null if we can execute the method an error message if not
forumList
public CoefficientContext forumList(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
getForumList
public static java.util.Collection getForumList(Project project)
throws java.lang.Exception
- Parameters:
project
-
- Returns:
-
- Throws:
java.lang.Exception
- Apr 25, 2005 pieter20
Returns a collection of forums that are linked to this project
forumEdit
public CoefficientContext forumEdit(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
forumSaveAction
public CoefficientContext forumSaveAction(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
addNotificationLists
private static java.util.Set addNotificationLists(java.util.List projectChampionUserList,
Forum forum)
- Parameters:
projectChampionUserList
- forum
-
- Returns:
- Apr 25, 2005 pieter20
we need to set the ForumChampion's parent ForumId and for this we need
the forum. If this is not set we will have forumChamp's that do not have any reference
back to the forum. But are saved in the db. Please consult the Hibernate Reference Manual Ch 16: Parent/Child
and one-to-many relationships
forumView
public CoefficientContext forumView(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
userForumSubscribeToggleAction
public CoefficientContext userForumSubscribeToggleAction(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
forumDelete
public CoefficientContext forumDelete(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
conversationList
public CoefficientContext conversationList(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
messageEdit
public CoefficientContext messageEdit(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
createMessage
public Message createMessage(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
messageSaveAction
public CoefficientContext messageSaveAction(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
messageView
public CoefficientContext messageView(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
conversationView
public CoefficientContext conversationView(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
userMailPreferencesEdit
public CoefficientContext userMailPreferencesEdit(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
userMailPreferencesSaveAction
public CoefficientContext userMailPreferencesSaveAction(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
deleteAllForProject
public CoefficientContext deleteAllForProject(CoefficientContext ctx)
throws java.lang.Exception
- Specified by:
deleteAllForProject
in class BaseNavProjectModule
- Throws:
java.lang.Exception
getResourceId
private java.lang.Long getResourceId(CoefficientContext ctx,
java.util.HashMap map)
throws java.lang.Exception
- Throws:
java.lang.Exception
createMap
private java.util.HashMap createMap(CoefficientContext ctx)
throws java.lang.Exception
- Throws:
java.lang.Exception
generatePage
private void generatePage(java.lang.String page,
CoefficientContext ctx,
java.util.HashMap map)
checkAllowPost
private void checkAllowPost(CoefficientUser user,
Forum forum,
java.util.HashMap map)
throws java.lang.Exception
- Throws:
java.lang.Exception
addForum
private void addForum(Forum forum,
java.util.HashMap map)
getForum
private Forum getForum(CoefficientContext ctx,
java.util.HashMap map)
throws java.lang.Exception
- Throws:
java.lang.Exception
forumSettingsEdit
public CoefficientContext forumSettingsEdit(CoefficientContext ctx)
throws java.lang.Exception
- Parameters:
ctx
-
- Returns:
-
- Throws:
java.lang.Exception
- Apr 19, 2005 pieter20
prepareSettingsForDisplay
private java.util.Map prepareSettingsForDisplay(java.util.Set settingsKeySet)
- Parameters:
settingsMap
-
- Returns:
- Apr 29, 2005
pieter20
pvz: I am preparing the forum settings for display by wraping their names (to display)
and their type of display widget in the ConfigKeyUtil class
The MailForumSettings does not do this as I feel it should have no knowledge of display issues.
The MailForum is responsible for display
forumSettingsSaveAction
public CoefficientContext forumSettingsSaveAction(CoefficientContext ctx)
throws java.lang.Exception
- Parameters:
ctx
-
- Returns:
-
- Throws:
java.lang.Exception
- Apr 19, 2005 pieter20
canCreateForum
private boolean canCreateForum(Project currentProject)
- This method is used to check the number of forums that
can be created per project
- Returns:
- May 30, 2005
pieter20
Copyright CSIR. All Rights Reserved.